Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature to pass vcf.gz files as an additional resource for vcfanno #589

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 |
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this one here since I forgot to do so in the previous PR.


## 2.1.0 - Obelix [2024-05-29]

Expand Down
28 changes: 23 additions & 5 deletions subworkflows/local/prepare_references.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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, [[],[]])
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down