Skip to content

Commit 3e4c213

Browse files
authored
Merge pull request #872 from d4straub/strict-nextflow
Update to nextflow strict syntax
2 parents 9598f1b + 4bc9ba7 commit 3e4c213

File tree

99 files changed

+271
-514
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+271
-514
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121

2222
### `Fixed`
2323

24-
- [#876](https://github.com/nf-core/ampliseq/pull/876) Pulled the updated vsearch/clusters module from nf-core to fix a bug where a wildcard expansion trigging an arguments-too-long error.
24+
- [#872](https://github.com/nf-core/ampliseq/pull/872) - Follow nextflow's strict syntax
25+
- [#876](https://github.com/nf-core/ampliseq/pull/876) - Pulled the updated vsearch/clusters module from nf-core to fix a bug where a wildcard expansion trigging an arguments-too-long error.
2526

2627
### `Dependencies`
2728

modules.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
},
100100
"vsearch/usearchglobal": {
101101
"branch": "master",
102-
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
102+
"git_sha": "087a2003d9709be9cd580b432a799805777794be",
103103
"installed_by": ["modules"]
104104
}
105105
}

modules/local/assignsh.nf

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ process ASSIGNSH {
1717
path outtable , emit: tsv
1818
path "versions.yml" , emit: versions
1919

20-
when:
21-
task.ext.when == null || task.ext.when
2220

2321
script:
2422
def args = task.ext.args ?: ''

modules/local/barrnap.nf

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ process BARRNAP {
1515
path( "rrna.*.gff" ) , emit: gff
1616
path "versions.yml" , emit: versions
1717

18-
when:
19-
task.ext.when == null || task.ext.when
2018

2119
script:
2220
def args = task.ext.args ?: ''

modules/local/barrnapsummary.nf

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ process BARRNAPSUMMARY {
1414
path "*warning.txt", emit: warning
1515
path "versions.yml", emit: versions
1616

17-
when:
18-
task.ext.when == null || task.ext.when
1917

2018
script:
2119
def args = task.ext.args ?: ''

modules/local/combine_table.nf

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ process COMBINE_TABLE {
1616
path("${outfile}") , emit: tsv
1717
path "versions.yml" , emit: versions
1818

19-
when:
20-
task.ext.when == null || task.ext.when
2119

2220
script:
2321
"""

modules/local/cutadapt_summary.nf

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ process CUTADAPT_SUMMARY {
1515
path("*_summary.tsv") , emit: tsv
1616
path "versions.yml" , emit: versions
1717

18-
when:
19-
task.ext.when == null || task.ext.when
2018

2119
script:
2220
def mode = meta.single_end ? "single_end" : "paired_end"

modules/local/cutadapt_summary_merge.nf

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ process CUTADAPT_SUMMARY_MERGE {
1515
path("cutadapt_summary.tsv") , emit: tsv
1616
path "versions.yml", optional:true, emit: versions
1717

18-
when:
19-
task.ext.when == null || task.ext.when
2018

2119
script:
2220
if (action == "merge") {

modules/local/dada2_addspecies.nf

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ process DADA2_ADDSPECIES {
1818
path "versions.yml" , emit: versions
1919
path "*.args.txt" , emit: args
2020

21-
when:
22-
task.ext.when == null || task.ext.when
2321

2422
script:
2523
def args = task.ext.args ?: ''

modules/local/dada2_denoising.nf

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ process DADA2_DENOISING {
1919
path "versions.yml" , emit: versions
2020
path "*.args.txt" , emit: args
2121

22-
when:
23-
task.ext.when == null || task.ext.when
2422

2523
script:
2624
def prefix = task.ext.prefix ?: "prefix"

modules/local/dada2_err.nf

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ process DADA2_ERR {
1919
path "versions.yml" , emit: versions
2020
path "*.args.txt" , emit: args
2121

22-
when:
23-
task.ext.when == null || task.ext.when
2422

2523
script:
2624
def prefix = task.ext.prefix ?: "prefix"

modules/local/dada2_filtntrim.nf

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,19 @@ process DADA2_FILTNTRIM {
88
'biocontainers/bioconductor-dada2:1.30.0--r43hf17093f_0' }"
99

1010
input:
11-
tuple val(meta), path(reads), val(trunclenf), val(trunclenr)
11+
tuple val(meta), path(reads), val(trunclenf_in), val(trunclenr_in)
1212

1313
output:
1414
tuple val(meta), path("*.filt.fastq.gz"), path("*.filter_stats.tsv"), path("*.args.txt"), emit: reads_logs_args
1515
path "versions.yml" , emit: versions
1616

17-
when:
18-
task.ext.when == null || task.ext.when
1917

2018
script:
2119
def args = task.ext.args ?: ''
2220
def in_and_out = meta.single_end ? "\"${reads}\", \"${meta.id}.filt.fastq.gz\"" : "\"${reads[0]}\", \"${meta.id}_1.filt.fastq.gz\", \"${reads[1]}\", \"${meta.id}_2.filt.fastq.gz\""
2321
def outfiles = meta.single_end ? "\"${meta.id}.filt.fastq.gz\"" : "\"${meta.id}_1.filt.fastq.gz\", \"${meta.id}_2.filt.fastq.gz\""
24-
def trunclenf = trunclenf[1].toInteger()
25-
def trunclenr = trunclenr[1].toInteger()
22+
def trunclenf = trunclenf_in[1].toInteger()
23+
def trunclenr = trunclenr_in[1].toInteger()
2624
def trunc_args = meta.single_end ? "truncLen = $trunclenf" : "truncLen = c($trunclenf, $trunclenr)"
2725
"""
2826
#!/usr/bin/env Rscript

modules/local/dada2_merge.nf

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ process DADA2_MERGE {
1919
path( "DADA2_table.rds" ), emit: rds
2020
path "versions.yml" , emit: versions
2121

22-
when:
23-
task.ext.when == null || task.ext.when
24-
2522
script:
2623
"""
2724
#!/usr/bin/env Rscript

modules/local/dada2_quality.nf

-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ process DADA2_QUALITY {
1818
path "*.args.txt" , emit: args
1919
path "*plotQualityProfile.txt" , emit: warning
2020

21-
when:
22-
task.ext.when == null || task.ext.when
23-
2421
script:
2522
def args = task.ext.args ?: ''
2623
def prefix = task.ext.prefix ?: "${meta}"

modules/local/dada2_rmchimera.nf

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ process DADA2_RMCHIMERA {
1515
path "versions.yml" , emit: versions
1616
path "*.args.txt" , emit: args
1717

18-
when:
19-
task.ext.when == null || task.ext.when
20-
2118
script:
2219
def prefix = task.ext.prefix ?: "prefix"
2320
def args = task.ext.args ?: ''

modules/local/dada2_splitregions.nf

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ process DADA2_SPLITREGIONS {
1515
tuple val(meta), path( "ASV_table_*.tsv" ), path( "ASV_seqs_*.fasta" ), emit: for_sidle
1616
path "versions.yml" , emit: versions
1717

18-
when:
19-
task.ext.when == null || task.ext.when
20-
2118
script:
2219
// Make groovy map to R list; requirement: Values may not be false,true,null
2320
def mapping_r_list = mapping

modules/local/dada2_stats.nf

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ process DADA2_STATS {
1414
tuple val(meta), path("*.stats.tsv"), emit: stats
1515
path "versions.yml" , emit: versions
1616

17-
when:
18-
task.ext.when == null || task.ext.when
19-
2017
script:
2118
def prefix = task.ext.prefix ?: "prefix"
2219
if (!meta.single_end) {

modules/local/dada2_taxonomy.nf

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ process DADA2_TAXONOMY {
1919
path "versions.yml" , emit: versions
2020
path "*.args.txt" , emit: args
2121

22-
when:
23-
task.ext.when == null || task.ext.when
24-
2522
script:
2623
def args = task.ext.args ?: ''
2724
def taxlevels = taxlevels_input ?

modules/local/filter_clusters.nf

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,12 @@ process FILTER_CLUSTERS {
1717
path( "ASV_post_clustering_filtered.stats.tsv") , emit: stats
1818
path( "versions.yml" ) , emit: versions
1919

20-
when:
21-
task.ext.when == null || task.ext.when
22-
2320
script:
2421
def prefix = task.ext.prefix ?: "'$meta.id'"
25-
def clusters = "'$clusters'"
2622
def ulimiter = params.raise_filter_stacksize ? "ulimit -s unlimited" : ""
2723
"""
2824
${ulimiter}
29-
echo ${clusters} | filt_clusters.py -t ${asv} -p ${prefix} -c -
25+
echo '${clusters}' | filt_clusters.py -t ${asv} -p ${prefix} -c -
3026
3127
cat <<-END_VERSIONS > versions.yml
3228
"${task.process}":

modules/local/filter_codons.nf

-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ process FILTER_CODONS {
1818
path( "codon.filtered.stats.tsv" ) , emit: stats, optional: true
1919
path( "versions.yml" ) , emit: versions
2020

21-
when:
22-
task.ext.when == null || task.ext.when
23-
2421
script:
2522
def args = task.ext.args ?: ''
2623
def count_table = asv ? "-t ${asv}" : ""

modules/local/filter_len.nf

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ process FILTER_LEN {
1919
path( "ASV_len_filt.tsv" ) , emit: len_filt
2020
path "versions.yml" , emit: versions
2121

22-
when:
23-
task.ext.when == null || task.ext.when
24-
2522
script:
2623
def min_len_asv = task.ext.min_len_asv ?: '1'
2724
def max_len_asv = task.ext.max_len_asv ?: '1000000'

modules/local/filter_ssu.nf

-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ process FILTER_SSU {
1818
path( "ASV_seqs.ssu.fasta" ) , emit: fasta
1919
path "versions.yml" , emit: versions
2020

21-
when:
22-
task.ext.when == null || task.ext.when
23-
2421
script:
2522
def kingdom = params.filter_ssu ?: "bac,arc,mito,euk"
2623
def read_table = table ? "table <- read.table(file = '$table', sep = '\t', comment.char = '', header=TRUE)" : "table <- data.frame(matrix(ncol = 1, nrow = 0))"

modules/local/filter_stats.nf

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ process FILTER_STATS {
1414
path("count_table_filter_stats.tsv"), emit: tsv
1515
path "versions.yml" , emit: versions
1616

17-
when:
18-
task.ext.when == null || task.ext.when
19-
2017
script:
2118
"""
2219
filter_stats.py $unfiltered $filtered

modules/local/format_fastainput.nf

-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ process FORMAT_FASTAINPUT {
1313
path "input.mod.fasta" , emit: fasta
1414
path "versions.yml" , emit: versions
1515

16-
when:
17-
task.ext.when == null || task.ext.when
18-
1916
script:
2017
"""
2118
cat $fastain | sed '/^>/s/\t/ /g' > input.mod.fasta

modules/local/format_pplacetax.nf

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ process FORMAT_PPLACETAX {
1515
path("*.taxonomy.tsv") , emit: tsv
1616
path "versions.yml" , emit: versions
1717

18-
when:
19-
task.ext.when == null || task.ext.when
20-
2118
script:
2219
"""
2320
#!/usr/bin/env Rscript

modules/local/format_taxonomy.nf

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ process FORMAT_TAXONOMY {
1616
path( "ref_taxonomy.*.txt") , emit: ref_tax_info
1717
path "versions.yml" , emit: versions
1818

19-
when:
20-
task.ext.when == null || task.ext.when
21-
2219
script:
2320
"""
2421
${params.dada_ref_databases[params.dada_ref_taxonomy]["fmtscript"]} \\

modules/local/format_taxonomy_qiime.nf

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ process FORMAT_TAXONOMY_QIIME {
1616
path( "ref_taxonomy.txt"), emit: ref_tax_info
1717
path "versions.yml" , emit: versions
1818

19-
when:
20-
task.ext.when == null || task.ext.when
21-
2219
script:
2320
"""
2421
${params.qiime_ref_databases[params.qiime_ref_taxonomy]["fmtscript"]} \\

modules/local/format_taxonomy_sidle.nf

-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ process FORMAT_TAXONOMY_SIDLE {
1717
path( "ref_taxonomy.*.txt") , emit: ref_tax_info
1818
path "versions.yml" , emit: versions
1919

20-
when:
21-
task.ext.when == null || task.ext.when
22-
2320
script:
2421
def derep = params.sidle_ref_databases[params.sidle_ref_taxonomy]["derep"] ?: "99"
2522
"""

modules/local/format_taxonomy_sintax.nf

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ process FORMAT_TAXONOMY_SINTAX {
1414
path( "ref_taxonomy_sintax.txt") , emit: ref_tax_info
1515
path "versions.yml" , emit: versions
1616

17-
when:
18-
task.ext.when == null || task.ext.when
19-
2017
script:
2118
"""
2219
${params.sintax_ref_databases[params.sintax_ref_taxonomy]["fmtscript"]} \\

modules/local/format_taxresults.nf

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ process FORMAT_TAXRESULTS {
1515
path(outfile) , emit: tsv
1616
path "versions.yml", emit: versions
1717

18-
when:
19-
task.ext.when == null || task.ext.when
20-
2118
script:
2219
"""
2320
add_full_sequence_to_taxfile.py $taxtable $fastafile $outfile

modules/local/format_taxresults_kraken2.nf

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ process FORMAT_TAXRESULTS_KRAKEN2 {
88

99
input:
1010
tuple val(meta), path(report)
11-
tuple val(meta), path(classified_reads_assignment)
11+
tuple val(meta2), path(classified_reads_assignment)
1212
val(taxlevels_input)
1313

1414
output:
@@ -18,9 +18,6 @@ process FORMAT_TAXRESULTS_KRAKEN2 {
1818
path("*.kraken2.into-qiime2.tsv"), emit: qiime2_tsv
1919
path "versions.yml" , emit: versions
2020

21-
when:
22-
task.ext.when == null || task.ext.when
23-
2421
script:
2522
def taxlevels = taxlevels_input ? taxlevels_input : "D,P,C,O,F,G,S"
2623
def prefix = task.ext.prefix ?: "${meta.id}"

modules/local/format_taxresults_sintax.nf

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ process FORMAT_TAXRESULTS_SINTAX {
1616
path(outfile) , emit: tsv
1717
path "versions.yml", emit: versions
1818

19-
when:
20-
task.ext.when == null || task.ext.when
21-
2219
script:
2320
def taxlevels = taxlevels_input ? taxlevels_input : "Kingdom,Phylum,Class,Order,Family,Genus,Species"
2421
"""

modules/local/itsx_cutasv.nf

-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ process ITSX_CUTASV {
1717
path "versions.yml" , emit: versions
1818
path "*.args.txt" , emit: args
1919

20-
when:
21-
task.ext.when == null || task.ext.when
22-
2320
script:
2421
def args = task.ext.args ?: ''
2522
"""

modules/local/merge_stats.nf

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ process MERGE_STATS {
1414
path("overall_summary.tsv") , emit: tsv
1515
path "versions.yml" , emit: versions
1616

17-
when:
18-
task.ext.when == null || task.ext.when
19-
2017
script:
2118
"""
2219
#!/usr/bin/env Rscript

modules/local/metadata_all.nf

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ process METADATA_ALL {
1414
stdout emit: category
1515
path "versions.yml", emit: versions
1616

17-
when:
18-
task.ext.when == null || task.ext.when
19-
2017
script:
2118
"""
2219
metadata_all.r ${metadata}

modules/local/metadata_pairwise.nf

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ process METADATA_PAIRWISE {
1414
stdout emit: category
1515
path "versions.yml", emit: versions
1616

17-
when:
18-
task.ext.when == null || task.ext.when
19-
2017
script:
2118
"""
2219
metadata_pairwise.r ${metadata}

modules/local/novaseq_err.nf

-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ process NOVASEQ_ERR {
1717
tuple val(meta), path("*.md.err.convergence.txt"), emit: convergence
1818
path "versions.yml" , emit: versions
1919

20-
when:
21-
task.ext.when == null || task.ext.when
22-
2320
script:
2421
if (!meta.single_end) {
2522
"""

0 commit comments

Comments
 (0)