diff --git a/CHANGELOG.md b/CHANGELOG.md index 140d2a28..2c4667bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Added` +- A new functionality to pass gzipped resources to vcfanno_extra_resources [#589](https://github.com/nf-core/raredisease/pull/589) - A new parameter `vcfanno_extra_resources` to pass an extra resource to vcfanno [#588](https://github.com/nf-core/raredisease/pull/588) - A new parameter `scatter_count` to control how many interval files are created from a genome (used to parallelize annotations) [#585](https://github.com/nf-core/raredisease/pull/585) - Print warning messages if user intends to perform ranking when there are no affected samples [#579](https://github.com/nf-core/raredisease/pull/579) @@ -51,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | | skip_smncopynumbercaller | | | skip_repeat_annotation | | | scatter_count | +| | vcfanno_extra_resources | ## 2.1.0 - Obelix [2024-05-29] diff --git a/subworkflows/local/prepare_references.nf b/subworkflows/local/prepare_references.nf index dd502db2..4484bcd0 100644 --- a/subworkflows/local/prepare_references.nf +++ b/subworkflows/local/prepare_references.nf @@ -22,7 +22,8 @@ include { SAMTOOLS_FAIDX as SAMTOOLS_FAIDX_MT_SHIFT } from '../../modul include { SENTIEON_BWAINDEX as SENTIEON_BWAINDEX_GENOME } from '../../modules/nf-core/sentieon/bwaindex/main' include { SENTIEON_BWAINDEX as SENTIEON_BWAINDEX_MT_SHIFT } from '../../modules/nf-core/sentieon/bwaindex/main' include { TABIX_BGZIPTABIX as TABIX_PBT } from '../../modules/nf-core/tabix/bgziptabix/main' -include { TABIX_BGZIPTABIX as TABIX_VCFANNOEXTRA } from '../../modules/nf-core/tabix/bgziptabix/main' +include { TABIX_BGZIPTABIX as TABIX_BGZIPINDEX_VCFANNOEXTRA } from '../../modules/nf-core/tabix/bgziptabix/main' +include { TABIX_TABIX as TABIX_VCFANNOEXTRA } from '../../modules/nf-core/tabix/tabix/main' include { TABIX_TABIX as TABIX_DBSNP } from '../../modules/nf-core/tabix/tabix/main' include { TABIX_TABIX as TABIX_GNOMAD_AF } from '../../modules/nf-core/tabix/tabix/main' include { TABIX_TABIX as TABIX_PT } from '../../modules/nf-core/tabix/tabix/main' @@ -47,6 +48,8 @@ workflow PREPARE_REFERENCES { ch_bwa = Channel.empty() ch_sentieonbwa = Channel.empty() ch_vcfanno_extra = Channel.empty() + ch_vcfanno_bgzip = Channel.empty() + ch_vcfanno_index = Channel.empty() // Genome indices SAMTOOLS_FAIDX_GENOME(ch_genome_fasta, [[],[]]) @@ -90,12 +93,26 @@ workflow PREPARE_REFERENCES { TABIX_GNOMAD_AF(ch_gnomad_af_tab) TABIX_PT(ch_target_bed).tbi.set { ch_tbi } TABIX_PBT(ch_target_bed).gz_tbi.set { ch_bgzip_tbi } - TABIX_VCFANNOEXTRA(ch_vcfanno_extra_unprocessed) - .gz_tbi + ch_vcfanno_extra_unprocessed + .branch { it -> + bgzipindex: !it[1].toString().endsWith(".gz") + index: it[1].toString().endsWith(".gz") + } + .set { ch_vcfanno_tabix_in } + + TABIX_VCFANNOEXTRA(ch_vcfanno_tabix_in.index).tbi + .join(ch_vcfanno_tabix_in.index) + .map { meta, tbi, vcf -> return [[vcf,tbi]]} + .set {ch_vcfanno_index} + + TABIX_BGZIPINDEX_VCFANNOEXTRA(ch_vcfanno_tabix_in.bgzipindex).gz_tbi .map { meta, vcf, tbi -> return [[vcf,tbi]] } - .collect() - .set {ch_vcfanno_extra} + .set {ch_vcfanno_bgzip} + Channel.empty() + .mix(ch_vcfanno_bgzip, ch_vcfanno_index) + .collect() + .set{ch_vcfanno_extra} // Generate bait and target intervals GATK_BILT(ch_target_bed, ch_dict).interval_list GATK_ILT(GATK_BILT.out.interval_list) @@ -133,6 +150,7 @@ workflow PREPARE_REFERENCES { ch_versions = ch_versions.mix(TABIX_GNOMAD_AF.out.versions) ch_versions = ch_versions.mix(TABIX_PT.out.versions) ch_versions = ch_versions.mix(TABIX_PBT.out.versions) + ch_versions = ch_versions.mix(TABIX_BGZIPINDEX_VCFANNOEXTRA.out.versions) ch_versions = ch_versions.mix(TABIX_VCFANNOEXTRA.out.versions) ch_versions = ch_versions.mix(TABIX_DBSNP.out.versions) ch_versions = ch_versions.mix(GATK_BILT.out.versions)