Skip to content

Commit 23c1ef2

Browse files
authored
Merge pull request #840 from nf-core/reviewcomments
review comments
2 parents 8d7bb35 + ddada5d commit 23c1ef2

14 files changed

Lines changed: 65 additions & 62 deletions

File tree

conf/modules/call_repeat_expansions.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ process {
2727

2828
withName: '.*CALL_REPEAT_EXPANSIONS:BCFTOOLS_REHEADER_EXP' {
2929
ext.args = "--temp-prefix ."
30-
ext.args2 = "-O v"
30+
ext.args2 = "--output-type v"
3131
ext.prefix = { "${meta.id}_repeat_expansion" }
3232
}
3333

docs/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ no header and the following columns: `CHROM POS REF_ALLELE,ALT_ALLELE AF`. Sampl
309309
<sup>9</sup>Used by GENMOD while modeling the variants. Contains a list of loci that show [reduced penetrance](https://medlineplus.gov/genetics/understanding/inheritance/penetranceexpressivity/) in people. Sample file [here](https://github.com/nf-core/test-datasets/blob/raredisease/reference/reduced_penetrance.tsv).<br />
310310
<sup>10</sup> This file contains a list of candidate genes (with [HGNC](https://www.genenames.org/) IDs) that is used to split the variants into candidate variants and research variants. Research variants contain all the variants, while candidate variants are a subset of research variants and are associated with candidate genes. Sample file [here](https://github.com/nf-core/test-datasets/blob/raredisease/reference/hgnc.txt). Not required if `--skip_subworkflows generate_clinical_set` is set.<br />
311311
<sup>11</sup>Path to a folder containing cadd annotations. Equivalent of the data/annotations/ folder described [here](https://github.com/kircherlab/CADD-scripts/#manual-installation), and it is used to calculate CADD scores for small indels. <br />
312-
<sup>12</sup>When set to `true`, each vcfanno database file listed in `vcfanno_resources` is checked for records (non-header lines). Any database with zero records is removed from the vcfanno TOML config before annotation runs. Default: `false`.<br />
312+
<sup>12</sup>When set to `true`, each vcfanno database file listed in `vcfanno_resources` is checked for records (non-header lines). Any database with zero records is removed from the vcfanno TOML config before annotation runs to prevent vcfanno from crashing on default resource files. Default: `false`.<br />
313313

314314
:::note
315315
We use CADD only to annotate small indels. To annotate SNVs with precomputed CADD scores, pass the file containing CADD scores as a resource to vcfanno instead. Files containing the precomputed CADD scores for SNVs can be downloaded from [here](https://cadd.gs.washington.edu/download) (download files listed under the description: "All possible SNVs of GRCh3<7/8>/hg3<7/8>")

subworkflows/local/align/main.nf

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,20 @@ workflow ALIGN {
7676
//
7777
// If input is bam
7878
//
79-
ch_alignments.map { meta, files ->
80-
def new_id = meta.sample
81-
def new_meta = meta + [id:new_id, read_group:"\'@RG\\tID:" + new_id + "\\tPL:" + val_platform + "\\tSM:" + new_id + "\'"] - meta.subMap('lane')
82-
return [new_meta, files].flatten()
83-
}
84-
.map { meta, bam, _bai -> [meta, bam] }
85-
.set{ch_input_bam}
86-
87-
ch_alignments.map { meta, files ->
88-
def new_id = meta.sample
89-
def new_meta = meta + [id:new_id, read_group:"\'@RG\\tID:" + new_id + "\\tPL:" + val_platform + "\\tSM:" + new_id + "\'"] - meta.subMap('lane')
90-
return [new_meta, files].flatten()
91-
}
92-
.map { meta, _bam, bai -> [meta, bai] }
93-
.set{ch_input_bai}
79+
ch_alignments
80+
.map { meta, files ->
81+
def new_id = meta.sample
82+
def new_meta = meta + [id:new_id, read_group:"\'@RG\\tID:" + new_id + "\\tPL:" + val_platform + "\\tSM:" + new_id + "\'"] - meta.subMap('lane')
83+
return [new_meta, files].flatten()
84+
}
85+
.multiMap { meta, bam, bai ->
86+
bam: [meta, bam]
87+
bai: [meta, bai]
88+
}
89+
.set { ch_input_aligned }
90+
91+
ch_input_bam = ch_input_aligned.bam
92+
ch_input_bai = ch_input_aligned.bai
9493

9594
if (val_aligner.matches("bwamem2|bwa|bwameme")) {
9695
ALIGN_BWA_BWAMEM2_BWAMEME (

subworkflows/local/align_sentieon/tests/nextflow.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ process {
1515

1616
withName: 'EXTRACT_ALIGNMENTS' {
1717
ext.prefix = { "${meta.id}_merged_extracted" }
18-
ext.args2 = { params.restrict_to_contigs }
1918
}
2019

2120
withName: 'SENTIEON_DEDUP' {

subworkflows/local/annotate_genome_snvs/main.nf

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ workflow ANNOTATE_GENOME_SNVS {
5858

5959
ZIP_TABIX_ROHCALL (RHOCALL_ANNOTATE.out.vcf)
6060

61+
// BCFTOOLS_ROH and RHOCALL_ANNOTATE only run when probands are present (filtered above).
62+
// The remainder:true join pads cases without rohcall output with a single null, giving
63+
// tuples of length 4 (no rohcall) vs 5 (rohcall). After combining with an interval both
64+
// grow by one, so size==6 means this case has probands and a rohcall-annotated VCF.
6165
ch_vcf
6266
.join(ZIP_TABIX_ROHCALL.out.gz_index, remainder: true)
6367
.combine(ch_split_intervals)
@@ -160,11 +164,6 @@ workflow ANNOTATE_GENOME_SNVS {
160164
ch_vep_vcf_out
161165
.join(ch_vep_tbi_out, failOnMismatch:true)
162166
.groupTuple()
163-
.map { meta, vcfs, tbis ->
164-
def sortedvcfs = vcfs.sort { vcf -> vcf.baseName }
165-
def sortedtbis = tbis.sort { tbi -> tbi.baseName }
166-
return [ meta, sortedvcfs, sortedtbis ]
167-
}
168167
.set { ch_concat_in }
169168

170169
BCFTOOLS_CONCAT (ch_concat_in)

subworkflows/local/annotate_genome_snvs/tests/nextflow.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ process {
6868
}
6969

7070
withName: 'BCFTOOLS_CONCAT' {
71-
ext.args = { "-Oz" }
71+
ext.args = { "--output-type z" }
7272
}
7373
}

subworkflows/local/annotate_mt_snvs/tests/main.nf.test

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ nextflow_workflow {
2222
options "-stub"
2323

2424
when {
25+
params {
26+
homoplasmy_af_threshold = 0.95
27+
}
2528
workflow {
2629
"""
2730
input[0] = channel.of([[id:'resources'], file('https://raw.githubusercontent.com/nf-core/raredisease/refs/heads/master/assets/cadd_to_vcf_header_-1.0-.txt', checkIfExists: true)]).collect()

subworkflows/local/call_snv/main.nf

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ workflow CALL_SNV {
4343
val_variant_caller // string: 'deepvariant' or 'sentieon'
4444

4545
main:
46-
ch_concat_publish = channel.empty()
47-
ch_deepvar_vcf = channel.empty()
48-
ch_deepvar_tbi = channel.empty()
49-
ch_deepvar_gvcf = channel.empty()
50-
ch_deepvar_gtbi = channel.empty()
51-
ch_deepvar_publish = channel.empty()
52-
ch_mt_snv_publish = channel.empty()
53-
ch_mt_tabix = channel.empty()
54-
ch_mt_vcf = channel.empty()
55-
ch_mt_vcf_tabix = channel.empty()
56-
ch_sentieon_vcf = channel.empty()
57-
ch_sentieon_tbi = channel.empty()
58-
ch_sentieon_gvcf = channel.empty()
59-
ch_sentieon_gtbi = channel.empty()
46+
ch_concat_publish = channel.empty()
47+
ch_deepvariant_vcf = channel.empty()
48+
ch_deepvariant_tbi = channel.empty()
49+
ch_deepvariant_gvcf = channel.empty()
50+
ch_deepvariant_gtbi = channel.empty()
51+
ch_deepvariant_publish = channel.empty()
52+
ch_mt_snv_publish = channel.empty()
53+
ch_mt_tabix = channel.empty()
54+
ch_mt_vcf = channel.empty()
55+
ch_mt_vcf_tabix = channel.empty()
56+
ch_sentieon_vcf = channel.empty()
57+
ch_sentieon_tbi = channel.empty()
58+
ch_sentieon_gvcf = channel.empty()
59+
ch_sentieon_gtbi = channel.empty()
6060

6161
if (val_variant_caller.equals("deepvariant") && !val_analysis_type.equals("mito")) {
6262
CALL_SNV_DEEPVARIANT (
@@ -71,11 +71,11 @@ workflow CALL_SNV {
7171
val_analysis_type,
7272
val_skip_split_multiallelics
7373
)
74-
ch_deepvar_vcf = CALL_SNV_DEEPVARIANT.out.vcf
75-
ch_deepvar_tbi = CALL_SNV_DEEPVARIANT.out.tabix
76-
ch_deepvar_gvcf = CALL_SNV_DEEPVARIANT.out.gvcf
77-
ch_deepvar_gtbi = CALL_SNV_DEEPVARIANT.out.gvcf_tabix
78-
ch_deepvar_publish = CALL_SNV_DEEPVARIANT.out.publish
74+
ch_deepvariant_vcf = CALL_SNV_DEEPVARIANT.out.vcf
75+
ch_deepvariant_tbi = CALL_SNV_DEEPVARIANT.out.tabix
76+
ch_deepvariant_gvcf = CALL_SNV_DEEPVARIANT.out.gvcf
77+
ch_deepvariant_gtbi = CALL_SNV_DEEPVARIANT.out.gvcf_tabix
78+
ch_deepvariant_publish = CALL_SNV_DEEPVARIANT.out.publish
7979
} else if (val_variant_caller.equals("sentieon")) {
8080
CALL_SNV_SENTIEON(
8181
ch_genome_bam_bai,
@@ -97,16 +97,16 @@ workflow CALL_SNV {
9797
ch_sentieon_gtbi = CALL_SNV_SENTIEON.out.gvcf_tbi
9898
}
9999

100-
ch_vcf = channel.empty().mix(ch_deepvar_vcf, ch_sentieon_vcf)
101-
ch_tabix = channel.empty().mix(ch_deepvar_tbi, ch_sentieon_tbi)
102-
ch_gvcf = channel.empty().mix(ch_deepvar_gvcf, ch_sentieon_gvcf)
103-
ch_gtabix = channel.empty().mix(ch_deepvar_gtbi, ch_sentieon_gtbi)
100+
ch_vcf = channel.empty().mix(ch_deepvariant_vcf, ch_sentieon_vcf)
101+
ch_tabix = channel.empty().mix(ch_deepvariant_tbi, ch_sentieon_tbi)
102+
ch_gvcf = channel.empty().mix(ch_deepvariant_gvcf, ch_sentieon_gvcf)
103+
ch_gtabix = channel.empty().mix(ch_deepvariant_gtbi, ch_sentieon_gtbi)
104104

105105
ch_vcf
106106
.join(ch_tabix, failOnMismatch:true, failOnDuplicate:true)
107107
.map { meta, vcf, tbi -> return [meta, vcf, tbi, []]}
108-
.set {ch_selvar_in}
109-
GATK4_SELECTVARIANTS(ch_selvar_in) // remove mitochondrial variants
108+
.set {ch_select_variants_in}
109+
GATK4_SELECTVARIANTS(ch_select_variants_in) // remove mitochondrial variants
110110

111111
ch_genome_vcf = GATK4_SELECTVARIANTS.out.vcf
112112
ch_genome_tabix = GATK4_SELECTVARIANTS.out.tbi
@@ -159,7 +159,7 @@ workflow CALL_SNV {
159159

160160
ch_publish = GATK4_SELECTVARIANTS.out.vcf
161161
.mix(GATK4_SELECTVARIANTS.out.tbi)
162-
.mix(ch_deepvar_publish)
162+
.mix(ch_deepvariant_publish)
163163
.map { meta, value -> ['call_snv/genome/', [meta, value]] }
164164
.mix(ch_concat_publish)
165165
.mix(ch_mt_snv_publish)

subworkflows/local/call_snv_MT/main.nf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ workflow CALL_SNV_MT {
1515

1616
main:
1717

18-
ch_bam_bai_int = ch_bam_bai.combine(ch_intervals)
18+
ch_bam_bai_intervals = ch_bam_bai.combine(ch_intervals)
1919

20-
GATK4_MUTECT2_MT (ch_bam_bai_int, ch_fasta, ch_fai.map{meta, fai -> return [meta,fai,[]]}, ch_dict, [], [], [], [], [],[])
20+
GATK4_MUTECT2_MT (ch_bam_bai_intervals, ch_fasta, ch_fai.map{meta, fai -> return [meta,fai,[]]}, ch_dict, [], [], [], [], [],[])
2121

2222
// Filter Mutect2 calls
2323
ch_mutect_vcf = GATK4_MUTECT2_MT.out.vcf.join(GATK4_MUTECT2_MT.out.tbi, failOnMismatch:true, failOnDuplicate:true)

subworkflows/local/call_snv_sentieon/tests/nextflow.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ process {
99
}
1010

1111
withName: 'BCF_FILTER_ONE' {
12-
ext.args = "-s 'ML_FAIL' -i 'INFO/ML_PROB <= 0.95' -m x -Oz --write-index=tbi"
12+
ext.args = "-s 'ML_FAIL' -i 'INFO/ML_PROB <= 0.95' -m x --output-type z --write-index=tbi"
1313
ext.prefix = { "${meta.id}_mlfiltered_0.95" }
1414
}
1515

1616
withName: 'BCF_FILTER_TWO' {
17-
ext.args = "-i FILTER='\"PASS\"' -m x -Oz --write-index=tbi"
17+
ext.args = "-i FILTER='\"PASS\"' -m x --output-type z --write-index=tbi"
1818
ext.prefix = { "${meta.id}_passed" }
1919
}
2020

0 commit comments

Comments
 (0)