diff --git a/.gitpod.yml b/.gitpod.yml index 6fe79af6..289c86e5 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,10 +1,14 @@ -# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/ -tasks: - - name: Install Nextflow - init: | - curl -s https://get.nextflow.io | bash - sudo mv nextflow /usr/local/bin +image: nfcore/gitpod:latest - - name: Install pytest-workflow - init: | - pip install pytest-workflow +vscode: + extensions: # based on nf-core.nf-core-extensionpack + - codezombiech.gitignore # Language support for .gitignore files + # - cssho.vscode-svgviewer # SVG viewer + - davidanson.vscode-markdownlint # Markdown/CommonMark linting and style checking for Visual Studio Code + - eamodio.gitlens # Quickly glimpse into whom, why, and when a line or code block was changed + - EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files + - Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar + - mechatroner.rainbow-csv # Highlight columns in csv files in different colors + # - nextflow.nextflow # Nextflow syntax highlighting + - oderwat.indent-rainbow # Highlight indentation level + - streetsidesoftware.code-spell-checker # Spelling checker for source code diff --git a/.nf-core.yml b/.nf-core.yml index 72971af8..723a978c 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -1,3 +1,4 @@ +repository_type: modules bump-versions: rseqc/junctionannotation: False rseqc/bamstat: False diff --git a/modules/abacas/main.nf b/modules/abacas/main.nf index 49040214..00c9169f 100644 --- a/modules/abacas/main.nf +++ b/modules/abacas/main.nf @@ -15,6 +15,9 @@ process ABACAS { tuple val(meta), path('*.abacas*'), emit: results path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/adapterremoval/main.nf b/modules/adapterremoval/main.nf index 0cf257ff..55c5f17c 100644 --- a/modules/adapterremoval/main.nf +++ b/modules/adapterremoval/main.nf @@ -15,6 +15,9 @@ process ADAPTERREMOVAL { tuple val(meta), path('*.log') , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/agrvate/main.nf b/modules/agrvate/main.nf index aff72abc..8503505d 100644 --- a/modules/agrvate/main.nf +++ b/modules/agrvate/main.nf @@ -15,6 +15,9 @@ process AGRVATE { path "${fasta.baseName}-results" , emit: results_dir path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/allelecounter/main.nf b/modules/allelecounter/main.nf index 850a018f..b2cb1b0c 100644 --- a/modules/allelecounter/main.nf +++ b/modules/allelecounter/main.nf @@ -16,6 +16,9 @@ process ALLELECOUNTER { tuple val(meta), path("*.alleleCount"), emit: allelecount path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/amps/main.nf b/modules/amps/main.nf index 871b57c6..57cdcff8 100644 --- a/modules/amps/main.nf +++ b/modules/amps/main.nf @@ -18,6 +18,9 @@ process AMPS { path "results/pdf_candidate_profiles/" , emit: candidate_pdfs path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/arriba/main.nf b/modules/arriba/main.nf index 0fcb6ba7..e0d30b45 100644 --- a/modules/arriba/main.nf +++ b/modules/arriba/main.nf @@ -17,6 +17,9 @@ process ARRIBA { tuple val(meta), path("*.fusions.discarded.tsv"), emit: fusions_fail path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/artic/guppyplex/main.nf b/modules/artic/guppyplex/main.nf index 780f5111..8e6b2879 100644 --- a/modules/artic/guppyplex/main.nf +++ b/modules/artic/guppyplex/main.nf @@ -14,6 +14,9 @@ process ARTIC_GUPPYPLEX { tuple val(meta), path("*.fastq.gz"), emit: fastq path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/artic/minion/main.nf b/modules/artic/minion/main.nf index c25ec0db..af74b132 100644 --- a/modules/artic/minion/main.nf +++ b/modules/artic/minion/main.nf @@ -31,6 +31,9 @@ process ARTIC_MINION { tuple val(meta), path("*.json"), optional:true , emit: json path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/assemblyscan/main.nf b/modules/assemblyscan/main.nf index 56541222..889f92a9 100644 --- a/modules/assemblyscan/main.nf +++ b/modules/assemblyscan/main.nf @@ -14,6 +14,9 @@ process ASSEMBLYSCAN { tuple val(meta), path("*.json"), emit: json path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/ataqv/ataqv/main.nf b/modules/ataqv/ataqv/main.nf index fbd623f4..952aaed4 100644 --- a/modules/ataqv/ataqv/main.nf +++ b/modules/ataqv/ataqv/main.nf @@ -19,6 +19,9 @@ process ATAQV_ATAQV { tuple val(meta), path("*.problems") , emit: problems, optional: true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bakta/main.nf b/modules/bakta/main.nf index 2582dac2..95e87899 100644 --- a/modules/bakta/main.nf +++ b/modules/bakta/main.nf @@ -25,6 +25,9 @@ process BAKTA { tuple val(meta), path("${prefix}.tsv") , emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bamaligncleaner/main.nf b/modules/bamaligncleaner/main.nf index 88fe21aa..922b72e6 100644 --- a/modules/bamaligncleaner/main.nf +++ b/modules/bamaligncleaner/main.nf @@ -14,6 +14,9 @@ process BAMALIGNCLEANER { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bamcmp/main.nf b/modules/bamcmp/main.nf new file mode 100644 index 00000000..f45b73d8 --- /dev/null +++ b/modules/bamcmp/main.nf @@ -0,0 +1,38 @@ +def VERSION = '2.2' +process BAMCMP { + label 'process_low' + + conda (params.enable_conda ? "bioconda::bamcmp=2.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bamcmp:2.2--h05f6578_0' : + 'quay.io/biocontainers/bamcmp:2.2--h05f6578_0' }" + + input: + tuple val(meta), path(sample), path(contaminant) + + output: + tuple val(meta), path("*primary.bam") , emit: bam + tuple val(meta), path("*contamination.bam"), emit: contamination_bam + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + bamcmp \\ + -1 $sample \\ + -2 $contaminant \\ + -A ${prefix}_primary.bam \\ + -B ${prefix}_contamination.bam \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bamcmp: $VERSION + END_VERSIONS + """ + +} diff --git a/modules/bamcmp/meta.yml b/modules/bamcmp/meta.yml new file mode 100644 index 00000000..480d8609 --- /dev/null +++ b/modules/bamcmp/meta.yml @@ -0,0 +1,57 @@ +name: bamcmp +description: Bamcmp (Bam Compare) is a tool for assigning reads between a primary genome and a contamination genome. For instance, filtering out mouse reads from patient derived xenograft mouse models (PDX). +keywords: + - filter + - xenograft + - host + - graft + - contamination + - mouse + +tools: + - bamcmp: + description: Bamcmp is a tool for deconvolving host and graft reads, using two bam files. Reads should be mapped to two genomes, and the mapped, + sorted bam files supplied to the tool. It is highly recommended to use the "-s as" option not the "-s mapq" option, else + reads which multimap to the contamination genome will be spuriously kept. + homepage: https://github.com/CRUKMI-ComputationalBiology/bamcmp + documentation: https://github.com/CRUKMI-ComputationalBiology/bamcmp + tool_dev_url: https://github.com/CRUKMI-ComputationalBiology/bamcmp + doi: "10.1158/1541-7786.MCR-16-0431" + licence: ['GPL v3'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + + - sample: + type: file + description: BAM/CRAM/SAM file with the reads aligned to the primary genome (the one you want to keep) + pattern: "*.{bam,cram,sam}" + + - contaminant: + type: file + description: BAM/CRAM/SAM file with the reads aligned to the contaminant genome (the one you want to filter out) + pattern: "*.{bam,cram,sam}" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - bam: + type: file + description: Bam file containing the reads which align better to the primary genome. + pattern: "*.{bam,cram,sam}" + + - bam: + type: file + description: Bam file containing the reads which align better to the contaminant genome. + pattern: "*.{bam,cram,sam}" + +authors: + - "@kmurat1" + - "@sppearce" diff --git a/modules/bamtools/convert/main.nf b/modules/bamtools/convert/main.nf new file mode 100644 index 00000000..b993aad1 --- /dev/null +++ b/modules/bamtools/convert/main.nf @@ -0,0 +1,41 @@ +process BAMTOOLS_CONVERT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::bamtools=2.5.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bamtools:2.5.1--h9a82719_9' : + 'quay.io/biocontainers/bamtools:2.5.1--h9a82719_9' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.{bed,fasta,fastq,json,pileup,sam,yaml}"), emit: data + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def test = args ==~ /-format (bed|fasta|fastq|json|pileup|sam|yaml)/ + if ( test == false ) error "-format option must be provided in args. Possible values: bed fasta fastq json pileup sam yaml" + m = args =~ /-format ([a-z]+)/ + ext = m[0][1] + + + """ + bamtools \\ + convert \\ + $args \\ + -in $bam \\ + -out ${prefix}.${ext} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bamtools: \$( bamtools --version | grep -e 'bamtools' | sed 's/^.*bamtools //' ) + END_VERSIONS + """ +} diff --git a/modules/bamtools/convert/meta.yml b/modules/bamtools/convert/meta.yml new file mode 100644 index 00000000..acc7e4df --- /dev/null +++ b/modules/bamtools/convert/meta.yml @@ -0,0 +1,52 @@ +name: bamtools_convert +description: BamTools provides both a programmer's API and an end-user's toolkit for handling BAM files. +keywords: + - bamtools + - bamtools/convert + - bam + - convert + - bed + - fasta + - fastq + - json + - pileup + - sam + - yaml +tools: + - bamtools: + description: C++ API & command-line toolkit for working with BAM data + homepage: http://github.com/pezmaster31/bamtools + documentation: https://github.com/pezmaster31/bamtools/wiki + tool_dev_url: http://github.com/pezmaster31/bamtools + doi: "" + licence: ['MIT'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file + pattern: "*.bam" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + ## TODO nf-core: Delete / customise this example output + - out: + type: file + description: The data in the asked format (bed, fasta, fastq, json, pileup, sam, yaml) + pattern: "*.{bed,fasta,fastq,json,pileup,sam,yaml}" + +authors: + - "@sguizard" diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 8d5e5690..014e5cdb 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -14,6 +14,9 @@ process BAMTOOLS_SPLIT { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bamutil/trimbam/main.nf b/modules/bamutil/trimbam/main.nf index 9ceb2b65..514ea4c0 100644 --- a/modules/bamutil/trimbam/main.nf +++ b/modules/bamutil/trimbam/main.nf @@ -14,6 +14,9 @@ process BAMUTIL_TRIMBAM { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bandage/image/main.nf b/modules/bandage/image/main.nf index bc2a9495..ee504a12 100644 --- a/modules/bandage/image/main.nf +++ b/modules/bandage/image/main.nf @@ -15,6 +15,9 @@ process BANDAGE_IMAGE { tuple val(meta), path('*.svg'), emit: svg path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bbmap/align/main.nf b/modules/bbmap/align/main.nf index ac839497..914399c5 100644 --- a/modules/bbmap/align/main.nf +++ b/modules/bbmap/align/main.nf @@ -16,6 +16,9 @@ process BBMAP_ALIGN { tuple val(meta), path("*.log"), emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bbmap/bbduk/main.nf b/modules/bbmap/bbduk/main.nf index 79c3c306..0ae005e4 100644 --- a/modules/bbmap/bbduk/main.nf +++ b/modules/bbmap/bbduk/main.nf @@ -16,6 +16,9 @@ process BBMAP_BBDUK { tuple val(meta), path('*.log') , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bbmap/bbsplit/main.nf b/modules/bbmap/bbsplit/main.nf index 0c916dfe..b55929ce 100644 --- a/modules/bbmap/bbsplit/main.nf +++ b/modules/bbmap/bbsplit/main.nf @@ -20,6 +20,9 @@ process BBMAP_BBSPLIT { tuple val(meta), path('*txt') , optional:true, emit: stats path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bbmap/index/main.nf b/modules/bbmap/index/main.nf index 4c02f84e..fdd6d102 100644 --- a/modules/bbmap/index/main.nf +++ b/modules/bbmap/index/main.nf @@ -14,6 +14,9 @@ process BBMAP_INDEX { path 'ref' , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/bcftools/concat/main.nf b/modules/bcftools/concat/main.nf index d02e7605..c0633ef7 100644 --- a/modules/bcftools/concat/main.nf +++ b/modules/bcftools/concat/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_CONCAT { tuple val(meta), path("*.gz"), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bcftools/consensus/main.nf b/modules/bcftools/consensus/main.nf index 040e6534..a0c436e2 100644 --- a/modules/bcftools/consensus/main.nf +++ b/modules/bcftools/consensus/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_CONSENSUS { tuple val(meta), path('*.fa'), emit: fasta path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bcftools/filter/main.nf b/modules/bcftools/filter/main.nf index 98b422b1..82961e32 100644 --- a/modules/bcftools/filter/main.nf +++ b/modules/bcftools/filter/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_FILTER { tuple val(meta), path("*.gz"), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bcftools/index/main.nf b/modules/bcftools/index/main.nf index e5275003..548a9277 100644 --- a/modules/bcftools/index/main.nf +++ b/modules/bcftools/index/main.nf @@ -15,6 +15,9 @@ process BCFTOOLS_INDEX { tuple val(meta), path("*.tbi"), optional:true, emit: tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bcftools/isec/main.nf b/modules/bcftools/isec/main.nf index fdde3022..c8f89753 100644 --- a/modules/bcftools/isec/main.nf +++ b/modules/bcftools/isec/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_ISEC { tuple val(meta), path("${prefix}"), emit: results path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bcftools/merge/main.nf b/modules/bcftools/merge/main.nf index f1c02e8d..7bee5a9b 100644 --- a/modules/bcftools/merge/main.nf +++ b/modules/bcftools/merge/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_MERGE { tuple val(meta), path("*.gz"), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bcftools/mpileup/main.nf b/modules/bcftools/mpileup/main.nf index cdd38eec..676eae7a 100644 --- a/modules/bcftools/mpileup/main.nf +++ b/modules/bcftools/mpileup/main.nf @@ -19,6 +19,9 @@ process BCFTOOLS_MPILEUP { tuple val(meta), path("*.mpileup") , emit: mpileup, optional: true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/bcftools/norm/main.nf b/modules/bcftools/norm/main.nf index e8bf6324..cd681f21 100644 --- a/modules/bcftools/norm/main.nf +++ b/modules/bcftools/norm/main.nf @@ -15,6 +15,9 @@ process BCFTOOLS_NORM { tuple val(meta), path("*.gz") , emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bcftools/query/main.nf b/modules/bcftools/query/main.nf index 5f4135f4..8921abdd 100644 --- a/modules/bcftools/query/main.nf +++ b/modules/bcftools/query/main.nf @@ -8,30 +8,32 @@ process BCFTOOLS_QUERY { 'quay.io/biocontainers/bcftools:1.14--h88f3f91_0' }" input: - tuple val(meta), path(vcf), path(index) - path(regions) - path(targets) - path(samples) + tuple val(meta), path(vcf), path(tbi) + path regions + path targets + path samples output: - tuple val(meta), path("*.gz") , emit: vcf + tuple val(meta), path("*.txt"), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def regions_file = regions ? "--regions-file ${regions}" : "" + def regions_file = regions ? "--regions-file ${regions}" : "" def targets_file = targets ? "--targets-file ${targets}" : "" def samples_file = samples ? "--samples-file ${samples}" : "" - """ bcftools query \\ - --output ${prefix}.vcf.gz \\ - ${regions_file} \\ - ${targets_file} \\ - ${samples_file} \\ + --output ${prefix}.txt \\ + $regions_file \\ + $targets_file \\ + $samples_file \\ $args \\ - ${vcf} + $vcf cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/bcftools/query/meta.yml b/modules/bcftools/query/meta.yml index e450f73e..e49f13c8 100644 --- a/modules/bcftools/query/meta.yml +++ b/modules/bcftools/query/meta.yml @@ -23,22 +23,20 @@ input: type: file description: | The vcf file to be qeuried. - e.g. 'file.vcf' - - index: + pattern: "*.{vcf.gz, vcf}" + - tbi: type: file description: | The tab index for the VCF file to be inspected. - e.g. 'file.tbi' + pattern: "*.tbi" - regions: type: file description: | Optionally, restrict the operation to regions listed in this file. - e.g. 'file.vcf' - targets: type: file description: | Optionally, restrict the operation to regions listed in this file (doesn't rely upon index files) - e.g. 'file.vcf' - samples: type: file description: | @@ -50,13 +48,14 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - vcf: + - txt: type: file - description: VCF query output file - pattern: "*.{vcf.gz}" + description: BCFTools query output file + pattern: "*.txt" - versions: type: file description: File containing software versions pattern: "versions.yml" authors: - "@abhi18av" + - "@drpatelh" diff --git a/modules/bcftools/reheader/main.nf b/modules/bcftools/reheader/main.nf index e6d9025d..7d2abecf 100644 --- a/modules/bcftools/reheader/main.nf +++ b/modules/bcftools/reheader/main.nf @@ -16,6 +16,9 @@ process BCFTOOLS_REHEADER { tuple val(meta), path("*.vcf.gz"), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bcftools/sort/main.nf b/modules/bcftools/sort/main.nf index 2fcadc98..8478fe25 100644 --- a/modules/bcftools/sort/main.nf +++ b/modules/bcftools/sort/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_SORT { tuple val(meta), path("*.gz"), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bcftools/stats/main.nf b/modules/bcftools/stats/main.nf index 54a28bce..7e150d1f 100644 --- a/modules/bcftools/stats/main.nf +++ b/modules/bcftools/stats/main.nf @@ -14,6 +14,9 @@ process BCFTOOLS_STATS { tuple val(meta), path("*stats.txt"), emit: stats path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bcftools/view/main.nf b/modules/bcftools/view/main.nf index 7056ecdb..2a240f4a 100644 --- a/modules/bcftools/view/main.nf +++ b/modules/bcftools/view/main.nf @@ -17,6 +17,9 @@ process BCFTOOLS_VIEW { tuple val(meta), path("*.gz") , emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bedtools/bamtobed/main.nf b/modules/bedtools/bamtobed/main.nf index 98d9ea2f..fd782dec 100644 --- a/modules/bedtools/bamtobed/main.nf +++ b/modules/bedtools/bamtobed/main.nf @@ -14,6 +14,9 @@ process BEDTOOLS_BAMTOBED { tuple val(meta), path("*.bed"), emit: bed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bedtools/complement/main.nf b/modules/bedtools/complement/main.nf index 3146827c..8c8e7efa 100644 --- a/modules/bedtools/complement/main.nf +++ b/modules/bedtools/complement/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_COMPLEMENT { tuple val(meta), path('*.bed'), emit: bed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bedtools/genomecov/main.nf b/modules/bedtools/genomecov/main.nf index ca491e75..4804d40a 100644 --- a/modules/bedtools/genomecov/main.nf +++ b/modules/bedtools/genomecov/main.nf @@ -16,6 +16,9 @@ process BEDTOOLS_GENOMECOV { tuple val(meta), path("*.${extension}"), emit: genomecov path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args_list = args.tokenize() diff --git a/modules/bedtools/getfasta/main.nf b/modules/bedtools/getfasta/main.nf index 5a283e94..4ce8c01e 100644 --- a/modules/bedtools/getfasta/main.nf +++ b/modules/bedtools/getfasta/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_GETFASTA { path "*.fa" , emit: fasta path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${bed.baseName}" diff --git a/modules/bedtools/intersect/main.nf b/modules/bedtools/intersect/main.nf index afb0d056..29f16adb 100644 --- a/modules/bedtools/intersect/main.nf +++ b/modules/bedtools/intersect/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_INTERSECT { tuple val(meta), path("*.${extension}"), emit: intersect path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bedtools/makewindows/main.nf b/modules/bedtools/makewindows/main.nf index 2414393c..2a19226c 100644 --- a/modules/bedtools/makewindows/main.nf +++ b/modules/bedtools/makewindows/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_MAKEWINDOWS { tuple val(meta), path("*.tab"), emit: tab path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bedtools/maskfasta/main.nf b/modules/bedtools/maskfasta/main.nf index 7eeb4c7d..04ba116b 100644 --- a/modules/bedtools/maskfasta/main.nf +++ b/modules/bedtools/maskfasta/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_MASKFASTA { tuple val(meta), path("*.fa"), emit: fasta path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bedtools/merge/main.nf b/modules/bedtools/merge/main.nf index 5f1da95b..6d1daa03 100644 --- a/modules/bedtools/merge/main.nf +++ b/modules/bedtools/merge/main.nf @@ -14,6 +14,9 @@ process BEDTOOLS_MERGE { tuple val(meta), path('*.bed'), emit: bed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bedtools/slop/main.nf b/modules/bedtools/slop/main.nf index 9d8633ec..ae4f81cc 100644 --- a/modules/bedtools/slop/main.nf +++ b/modules/bedtools/slop/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_SLOP { tuple val(meta), path("*.bed"), emit: bed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bedtools/sort/main.nf b/modules/bedtools/sort/main.nf index 1ed95a57..43dc9bda 100644 --- a/modules/bedtools/sort/main.nf +++ b/modules/bedtools/sort/main.nf @@ -15,6 +15,9 @@ process BEDTOOLS_SORT { tuple val(meta), path("*.${extension}"), emit: sorted path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bedtools/subtract/main.nf b/modules/bedtools/subtract/main.nf index b2efefe5..8e2b42c5 100644 --- a/modules/bedtools/subtract/main.nf +++ b/modules/bedtools/subtract/main.nf @@ -14,6 +14,9 @@ process BEDTOOLS_SUBTRACT { tuple val(meta), path("*.bed"), emit: bed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bismark/align/main.nf b/modules/bismark/align/main.nf index e490b48c..eeddcabb 100644 --- a/modules/bismark/align/main.nf +++ b/modules/bismark/align/main.nf @@ -17,6 +17,9 @@ process BISMARK_ALIGN { tuple val(meta), path("*fq.gz") , optional:true, emit: unmapped path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bismark/deduplicate/main.nf b/modules/bismark/deduplicate/main.nf index 16c624f1..ea763774 100644 --- a/modules/bismark/deduplicate/main.nf +++ b/modules/bismark/deduplicate/main.nf @@ -15,6 +15,9 @@ process BISMARK_DEDUPLICATE { tuple val(meta), path("*.deduplication_report.txt"), emit: report path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bismark/genomepreparation/main.nf b/modules/bismark/genomepreparation/main.nf index e096b2b8..59c495c5 100644 --- a/modules/bismark/genomepreparation/main.nf +++ b/modules/bismark/genomepreparation/main.nf @@ -14,6 +14,9 @@ process BISMARK_GENOMEPREPARATION { path "BismarkIndex" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/bismark/methylationextractor/main.nf b/modules/bismark/methylationextractor/main.nf index d99c2b5e..5543ab7e 100644 --- a/modules/bismark/methylationextractor/main.nf +++ b/modules/bismark/methylationextractor/main.nf @@ -19,6 +19,9 @@ process BISMARK_METHYLATIONEXTRACTOR { tuple val(meta), path("*.M-bias.txt") , emit: mbias path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def seqtype = meta.single_end ? '-s' : '-p' diff --git a/modules/bismark/report/main.nf b/modules/bismark/report/main.nf index f828ecd8..bec3de99 100644 --- a/modules/bismark/report/main.nf +++ b/modules/bismark/report/main.nf @@ -14,6 +14,9 @@ process BISMARK_REPORT { tuple val(meta), path("*report.{html,txt}"), emit: report path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/bismark/summary/main.nf b/modules/bismark/summary/main.nf index 72dba72e..49fec53e 100644 --- a/modules/bismark/summary/main.nf +++ b/modules/bismark/summary/main.nf @@ -17,6 +17,9 @@ process BISMARK_SUMMARY { path "*report.{html,txt}", emit: summary path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/blast/blastn/main.nf b/modules/blast/blastn/main.nf index 3a0bafe0..b85f6c8e 100644 --- a/modules/blast/blastn/main.nf +++ b/modules/blast/blastn/main.nf @@ -15,6 +15,9 @@ process BLAST_BLASTN { tuple val(meta), path('*.blastn.txt'), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/blast/makeblastdb/main.nf b/modules/blast/makeblastdb/main.nf index b4c426a4..12208ea8 100644 --- a/modules/blast/makeblastdb/main.nf +++ b/modules/blast/makeblastdb/main.nf @@ -14,6 +14,9 @@ process BLAST_MAKEBLASTDB { path 'blast_db' , emit: db path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/bowtie/align/main.nf b/modules/bowtie/align/main.nf index b25b5e21..ba82b67d 100644 --- a/modules/bowtie/align/main.nf +++ b/modules/bowtie/align/main.nf @@ -17,6 +17,9 @@ process BOWTIE_ALIGN { path "versions.yml" , emit: versions tuple val(meta), path('*fastq.gz'), optional:true, emit: fastq + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/bowtie/build/main.nf b/modules/bowtie/build/main.nf index dbbc8efa..e01d9855 100644 --- a/modules/bowtie/build/main.nf +++ b/modules/bowtie/build/main.nf @@ -14,6 +14,9 @@ process BOWTIE_BUILD { path 'bowtie' , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/bowtie2/align/main.nf b/modules/bowtie2/align/main.nf index 20b08f72..7e8a9659 100644 --- a/modules/bowtie2/align/main.nf +++ b/modules/bowtie2/align/main.nf @@ -18,6 +18,9 @@ process BOWTIE2_ALIGN { tuple val(meta), path('*fastq.gz'), emit: fastq, optional:true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/bowtie2/build/main.nf b/modules/bowtie2/build/main.nf index da2e9ed5..a4da62d0 100644 --- a/modules/bowtie2/build/main.nf +++ b/modules/bowtie2/build/main.nf @@ -14,6 +14,9 @@ process BOWTIE2_BUILD { path 'bowtie2' , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/bwa/aln/main.nf b/modules/bwa/aln/main.nf index 992e25de..741c0159 100644 --- a/modules/bwa/aln/main.nf +++ b/modules/bwa/aln/main.nf @@ -15,6 +15,9 @@ process BWA_ALN { tuple val(meta), path("*.sai"), emit: sai path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bwa/index/main.nf b/modules/bwa/index/main.nf index 89102737..3affbf16 100644 --- a/modules/bwa/index/main.nf +++ b/modules/bwa/index/main.nf @@ -14,6 +14,9 @@ process BWA_INDEX { path "bwa" , emit: index path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/bwa/mem/main.nf b/modules/bwa/mem/main.nf index 9695bd2d..9a91c77f 100644 --- a/modules/bwa/mem/main.nf +++ b/modules/bwa/mem/main.nf @@ -16,6 +16,9 @@ process BWA_MEM { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/bwa/sampe/main.nf b/modules/bwa/sampe/main.nf index 0b5ec255..e781679e 100644 --- a/modules/bwa/sampe/main.nf +++ b/modules/bwa/sampe/main.nf @@ -15,6 +15,9 @@ process BWA_SAMPE { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bwa/samse/main.nf b/modules/bwa/samse/main.nf index bee06bc8..ac04c739 100644 --- a/modules/bwa/samse/main.nf +++ b/modules/bwa/samse/main.nf @@ -15,6 +15,9 @@ process BWA_SAMSE { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/bwamem2/index/main.nf b/modules/bwamem2/index/main.nf index e00538c9..0e9cc2f8 100644 --- a/modules/bwamem2/index/main.nf +++ b/modules/bwamem2/index/main.nf @@ -14,6 +14,9 @@ process BWAMEM2_INDEX { path "bwamem2" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/bwamem2/mem/main.nf b/modules/bwamem2/mem/main.nf index 6d4d8028..56f595ec 100644 --- a/modules/bwamem2/mem/main.nf +++ b/modules/bwamem2/mem/main.nf @@ -16,6 +16,9 @@ process BWAMEM2_MEM { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/bwameth/align/main.nf b/modules/bwameth/align/main.nf index 0bcd9bac..6d9c4431 100644 --- a/modules/bwameth/align/main.nf +++ b/modules/bwameth/align/main.nf @@ -15,6 +15,9 @@ process BWAMETH_ALIGN { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/bwameth/index/main.nf b/modules/bwameth/index/main.nf index f5b8ff59..4c106826 100644 --- a/modules/bwameth/index/main.nf +++ b/modules/bwameth/index/main.nf @@ -14,6 +14,9 @@ process BWAMETH_INDEX { path "bwameth" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/cat/cat/main.nf b/modules/cat/cat/main.nf index 2efe20a5..4ee44599 100644 --- a/modules/cat/cat/main.nf +++ b/modules/cat/cat/main.nf @@ -14,6 +14,9 @@ process CAT_CAT { path "${file_out}*" , emit: file_out path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/cat/fastq/main.nf b/modules/cat/fastq/main.nf index d02598e1..bf0877c3 100644 --- a/modules/cat/fastq/main.nf +++ b/modules/cat/fastq/main.nf @@ -14,6 +14,9 @@ process CAT_FASTQ { tuple val(meta), path("*.merged.fastq.gz"), emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/cellranger/.gitignore b/modules/cellranger/.gitignore index 9f8cb0f5..a283a282 100644 --- a/modules/cellranger/.gitignore +++ b/modules/cellranger/.gitignore @@ -1 +1,2 @@ cellranger-*.tar.gz +bcl2fastq2-*.zip diff --git a/modules/cellranger/Dockerfile b/modules/cellranger/Dockerfile index e9437bf6..3e52ca6a 100644 --- a/modules/cellranger/Dockerfile +++ b/modules/cellranger/Dockerfile @@ -1,15 +1,22 @@ +# Dockerfile to create container with Cell Ranger v6.1.2 +# Push to nfcore/cellranger: + FROM continuumio/miniconda3:4.8.2 LABEL authors="Gisela Gabernet " \ description="Docker image containing Cell Ranger" -# Disclaimer: this container is not provided nor supported by 10x Genomics. +# Disclaimer: this container is not provided nor supported by Illumina or 10x Genomics. # Install procps and clean apt cache RUN apt-get update --allow-releaseinfo-change \ - && apt-get install -y procps \ + && apt-get install -y \ + cpio \ + procps \ + rpm2cpio \ + unzip \ && apt-get clean -y && rm -rf /var/lib/apt/lists/* # Copy pre-downloaded cellranger file -ENV CELLRANGER_VER 6.0.2 +ENV CELLRANGER_VER=6.1.2 COPY cellranger-$CELLRANGER_VER.tar.gz /opt/cellranger-$CELLRANGER_VER.tar.gz # Install cellranger diff --git a/modules/cellranger/README.md b/modules/cellranger/README.md index ed8ccb73..d31735cb 100644 --- a/modules/cellranger/README.md +++ b/modules/cellranger/README.md @@ -1,18 +1,24 @@ # Updating the docker container and making a new module release -Cell Ranger is a commercial tool by 10X Genomics. The container provided for the cellranger nf-core module is not provided nor supported by 10x Genomics. Updating the Cell Ranger version in the container and pushing the update to Dockerhub needs to be done manually. +Cell Ranger is a commercial tool from 10X Genomics. The container provided for the cellranger nf-core module is not provided nor supported by 10x Genomics. Updating the Cell Ranger versions in the container and pushing the update to Dockerhub needs to be done manually. -1. Navigate to the [Cell Ranger download page](https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/latest) and download the tar ball of the desired Cell Ranger version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies. +1. Navigate to the appropriate download page. + - [Cell Ranger](https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/latest): download the tar ball of the desired Cell Ranger version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies. -2. Edit the Dockerfile: update the Cell Ranger version in this line: +2. Edit the Dockerfile. Update the Cell Ranger versions in this line: ```bash - ENV CELLRANGER_VER + ENV CELLRANGER_VER= ``` -3. Create the container: +3. Create and test the container: ```bash docker build . -t nfcore/cellranger: + ``` + +4. Access rights are needed to push the container to the Dockerhub nfcore organization, please ask a core team member to do so. + + ```bash docker push nfcore/cellranger: ``` diff --git a/modules/cellranger/count/main.nf b/modules/cellranger/count/main.nf index be3f512a..6a206b6e 100644 --- a/modules/cellranger/count/main.nf +++ b/modules/cellranger/count/main.nf @@ -5,7 +5,7 @@ process CELLRANGER_COUNT { if (params.enable_conda) { exit 1, "Conda environments cannot be used when using the Cell Ranger tool. Please use docker or singularity containers." } - container "nfcore/cellranger:6.0.2" + container "nfcore/cellranger:6.1.2" input: tuple val(meta), path(reads) @@ -15,6 +15,9 @@ process CELLRANGER_COUNT { path("sample-${meta.gem}/outs/*"), emit: outs path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def sample_arg = meta.samples.unique().join(",") diff --git a/modules/cellranger/mkfastq/Dockerfile b/modules/cellranger/mkfastq/Dockerfile new file mode 100644 index 00000000..8660293a --- /dev/null +++ b/modules/cellranger/mkfastq/Dockerfile @@ -0,0 +1,40 @@ +# Dockerfile to create container with Cell Ranger v6.1.2 and bcl2fastq v2.20.0 +# Push to nfcore/cellrangermkfastq: + +FROM continuumio/miniconda3:4.8.2 +LABEL authors="Regina Reynolds, Gisela Gabernet " \ + description="Docker image containing bcl2fastq2 and Cell Ranger" +# Disclaimer: this container is not provided nor supported by Illumina or 10x Genomics. + +# Install procps and clean apt cache +RUN apt-get update --allow-releaseinfo-change \ + && apt-get install -y \ + cpio \ + procps \ + rpm2cpio \ + unzip \ + && apt-get clean -y && rm -rf /var/lib/apt/lists/* + +# Copy pre-downloaded bcl2fastq2 and cellranger file +ENV BCL2FASTQ2_VER=v2-20-0-linux-x86-64 \ + CELLRANGER_VER=6.1.2 +COPY bcl2fastq2-$BCL2FASTQ2_VER.zip /tmp/bcl2fastq2-$BCL2FASTQ2_VER.zip +COPY cellranger-$CELLRANGER_VER.tar.gz /opt/cellranger-$CELLRANGER_VER.tar.gz + +# Install bcl2fastq2 +RUN \ + cd /tmp && \ + unzip bcl2fastq2-$BCL2FASTQ2_VER.zip && \ + mv *.rpm bcl2fastq2-$BCL2FASTQ2_VER.rpm && \ + rpm2cpio ./bcl2fastq2-$BCL2FASTQ2_VER.rpm | cpio -idmv && \ + export PATH=/tmp/usr/local/bin/:$PATH && \ + ln -s /tmp/usr/local/bin/bcl2fastq /usr/bin/bcl2fastq && \ + rm -rf bcl2fastq2-$BCL2FASTQ2_VER.* + +# Install cellranger +RUN \ + cd /opt && \ + tar -xzvf cellranger-$CELLRANGER_VER.tar.gz && \ + export PATH=/opt/cellranger-$CELLRANGER_VER:$PATH && \ + ln -s /opt/cellranger-$CELLRANGER_VER/cellranger /usr/bin/cellranger && \ + rm -rf /opt/cellranger-$CELLRANGER_VER.tar.gz diff --git a/modules/cellranger/mkfastq/README.md b/modules/cellranger/mkfastq/README.md new file mode 100644 index 00000000..07c3919b --- /dev/null +++ b/modules/cellranger/mkfastq/README.md @@ -0,0 +1,26 @@ +# Updating the docker container and making a new module release + +Bcl2fastq2 and Cell Ranger are commercial tools from Illumina and 10X Genomics, respectively. The container provided for the cellranger nf-core module is not provided nor supported by either Illumina or 10x Genomics. Updating the bcl2fastq2 or Cell Ranger versions in the container and pushing the update to Dockerhub needs to be done manually. + +1. Navigate to the appropriate download pages. + - [bcl2fastq2](https://emea.support.illumina.com/sequencing/sequencing_software/bcl2fastq-conversion-software.html): download the linux rpm installer of the desired bcl2fastq2 version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies. + - [Cell Ranger](https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/latest): download the tar ball of the desired Cell Ranger version with `curl` or `wget`. Place this file in the same folder where the Dockerfile lies. + +2. Edit the Dockerfile. Update the bcl2fastq2 and Cell Ranger versions in this line: + + ```bash + ENV BCL2FASTQ2_VER= \ + CELLRANGER_VER= + ``` + +3. Create and test the container: + + ```bash + docker build . -t nfcore/cellrangermkfastq: + ``` + +4. Access rights are needed to push the container to the Dockerhub nfcore organization, please ask a core team member to do so. + + ```bash + docker push nfcore/cellrangermkfastq: + ``` diff --git a/modules/cellranger/mkfastq/main.nf b/modules/cellranger/mkfastq/main.nf index 14d68665..9c023bca 100644 --- a/modules/cellranger/mkfastq/main.nf +++ b/modules/cellranger/mkfastq/main.nf @@ -5,7 +5,7 @@ process CELLRANGER_MKFASTQ { if (params.enable_conda) { exit 1, "Conda environments cannot be used when using the Cell Ranger tool. Please use docker or singularity containers." } - container "litd/docker-cellranger:v6.1.1" // FIXME Add bcl2fastq to nf-core docker image + container "nfcore/cellrangermkfastq:6.1.2" input: path bcl @@ -13,14 +13,17 @@ process CELLRANGER_MKFASTQ { output: path "versions.yml", emit: versions - path "*.fastq.gz" , emit: fastq + path "${bcl.getSimpleName()}/outs/fastq_path/*.fastq.gz" , emit: fastq + + when: + task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' """ cellranger mkfastq --id=${bcl.getSimpleName()} \ --run=$bcl \ - --csv=$csv + --csv=$csv \ $args cat <<-END_VERSIONS > versions.yml @@ -28,4 +31,15 @@ process CELLRANGER_MKFASTQ { cellranger: \$(echo \$( cellranger --version 2>&1) | sed 's/^.*[^0-9]\\([0-9]*\\.[0-9]*\\.[0-9]*\\).*\$/\\1/' ) END_VERSIONS """ + + stub: + """ + mkdir -p "${bcl.getSimpleName()}/outs/fastq_path/" + touch ${bcl.getSimpleName()}/outs/fastq_path/fake_file.fastq.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cellranger: \$(echo \$( cellranger --version 2>&1) | sed 's/^.*[^0-9]\\([0-9]*\\.[0-9]*\\.[0-9]*\\).*\$/\\1/' ) + END_VERSIONS + """ } diff --git a/modules/cellranger/mkgtf/main.nf b/modules/cellranger/mkgtf/main.nf index 4db274d7..9dc2fe1a 100644 --- a/modules/cellranger/mkgtf/main.nf +++ b/modules/cellranger/mkgtf/main.nf @@ -5,7 +5,7 @@ process CELLRANGER_MKGTF { if (params.enable_conda) { exit 1, "Conda environments cannot be used when using the Cell Ranger tool. Please use docker or singularity containers." } - container "nfcore/cellranger:6.0.2" + container "nfcore/cellranger:6.1.2" input: path gtf @@ -14,6 +14,9 @@ process CELLRANGER_MKGTF { path "*.filtered.gtf", emit: gtf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/cellranger/mkref/main.nf b/modules/cellranger/mkref/main.nf index c5d83ac9..11cf80e3 100644 --- a/modules/cellranger/mkref/main.nf +++ b/modules/cellranger/mkref/main.nf @@ -5,7 +5,7 @@ process CELLRANGER_MKREF { if (params.enable_conda) { exit 1, "Conda environments cannot be used when using the Cell Ranger tool. Please use docker or singularity containers." } - container "nfcore/cellranger:6.0.2" + container "nfcore/cellranger:6.1.2" input: path fasta @@ -16,6 +16,9 @@ process CELLRANGER_MKREF { path "${reference_name}", emit: reference path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/checkm/lineagewf/main.nf b/modules/checkm/lineagewf/main.nf index 992b165e..d92f2c78 100644 --- a/modules/checkm/lineagewf/main.nf +++ b/modules/checkm/lineagewf/main.nf @@ -16,6 +16,9 @@ process CHECKM_LINEAGEWF { tuple val(meta), path("${prefix}.tsv"), emit: checkm_tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/chromap/chromap/main.nf b/modules/chromap/chromap/main.nf index 67384b0c..cdbf6049 100644 --- a/modules/chromap/chromap/main.nf +++ b/modules/chromap/chromap/main.nf @@ -23,6 +23,9 @@ process CHROMAP_CHROMAP { tuple val(meta), path("*.pairs.gz") , optional:true, emit: pairs path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/chromap/index/main.nf b/modules/chromap/index/main.nf index 61bcee10..52deaf06 100644 --- a/modules/chromap/index/main.nf +++ b/modules/chromap/index/main.nf @@ -15,6 +15,9 @@ process CHROMAP_INDEX { path "*.index" , emit: index path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = fasta.baseName diff --git a/modules/clonalframeml/main.nf b/modules/clonalframeml/main.nf index db647a38..24502796 100644 --- a/modules/clonalframeml/main.nf +++ b/modules/clonalframeml/main.nf @@ -19,6 +19,9 @@ process CLONALFRAMEML { tuple val(meta), path("*.position_cross_reference.txt"), emit: pos_ref path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/cmseq/polymut/main.nf b/modules/cmseq/polymut/main.nf index 47e86f0c..a02551c8 100644 --- a/modules/cmseq/polymut/main.nf +++ b/modules/cmseq/polymut/main.nf @@ -16,6 +16,9 @@ process CMSEQ_POLYMUT { tuple val(meta), path("*.txt"), emit: polymut path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/cnvkit/batch/main.nf b/modules/cnvkit/batch/main.nf index 811cb409..7c44d9f6 100644 --- a/modules/cnvkit/batch/main.nf +++ b/modules/cnvkit/batch/main.nf @@ -20,6 +20,9 @@ process CNVKIT_BATCH { tuple val(meta), path("*.cns"), emit: cns, optional: true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def normal_args = normal ? "--normal $normal" : "" diff --git a/modules/cooler/cload/main.nf b/modules/cooler/cload/main.nf index d8bdc031..52964b8d 100644 --- a/modules/cooler/cload/main.nf +++ b/modules/cooler/cload/main.nf @@ -16,6 +16,9 @@ process COOLER_CLOAD { tuple val(meta), val(cool_bin), path("*.cool"), emit: cool path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/cooler/digest/main.nf b/modules/cooler/digest/main.nf index 9658ec31..7e8e36f0 100644 --- a/modules/cooler/digest/main.nf +++ b/modules/cooler/digest/main.nf @@ -16,6 +16,9 @@ process COOLER_DIGEST { path "*.bed" , emit: bed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/cooler/dump/main.nf b/modules/cooler/dump/main.nf index a438acc8..996e9b5b 100644 --- a/modules/cooler/dump/main.nf +++ b/modules/cooler/dump/main.nf @@ -15,6 +15,9 @@ process COOLER_DUMP { tuple val(meta), path("*.bedpe"), emit: bedpe path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/cooler/merge/main.nf b/modules/cooler/merge/main.nf index b1814b68..1e439caf 100644 --- a/modules/cooler/merge/main.nf +++ b/modules/cooler/merge/main.nf @@ -14,6 +14,9 @@ process COOLER_MERGE { tuple val(meta), path("*.cool"), emit: cool path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/cooler/zoomify/main.nf b/modules/cooler/zoomify/main.nf index 226d4114..942282c0 100644 --- a/modules/cooler/zoomify/main.nf +++ b/modules/cooler/zoomify/main.nf @@ -14,6 +14,9 @@ process COOLER_ZOOMIFY { tuple val(meta), path("*.mcool"), emit: mcool path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/csvtk/concat/main.nf b/modules/csvtk/concat/main.nf index 94b1925a..f30e8332 100644 --- a/modules/csvtk/concat/main.nf +++ b/modules/csvtk/concat/main.nf @@ -16,6 +16,9 @@ process CSVTK_CONCAT { tuple val(meta), path("${prefix}.${out_extension}"), emit: csv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/csvtk/split/main.nf b/modules/csvtk/split/main.nf index 52ab7ec7..5653d192 100644 --- a/modules/csvtk/split/main.nf +++ b/modules/csvtk/split/main.nf @@ -16,6 +16,9 @@ process CSVTK_SPLIT { tuple val(meta), path("*.${out_extension}"), emit: split_csv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/custom/dumpsoftwareversions/main.nf b/modules/custom/dumpsoftwareversions/main.nf index 934bb467..327d5100 100644 --- a/modules/custom/dumpsoftwareversions/main.nf +++ b/modules/custom/dumpsoftwareversions/main.nf @@ -15,6 +15,9 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { path "software_versions_mqc.yml", emit: mqc_yml path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' template 'dumpsoftwareversions.py' diff --git a/modules/custom/getchromsizes/main.nf b/modules/custom/getchromsizes/main.nf index 270b3f48..39da7d34 100644 --- a/modules/custom/getchromsizes/main.nf +++ b/modules/custom/getchromsizes/main.nf @@ -15,6 +15,9 @@ process CUSTOM_GETCHROMSIZES { path '*.fai' , emit: fai path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/cutadapt/main.nf b/modules/cutadapt/main.nf index 74c42768..9b310c0e 100644 --- a/modules/cutadapt/main.nf +++ b/modules/cutadapt/main.nf @@ -15,6 +15,9 @@ process CUTADAPT { tuple val(meta), path('*.log') , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/damageprofiler/main.nf b/modules/damageprofiler/main.nf index 23eb9397..4b146e7f 100644 --- a/modules/damageprofiler/main.nf +++ b/modules/damageprofiler/main.nf @@ -17,6 +17,9 @@ process DAMAGEPROFILER { tuple val(meta), path("${prefix}"), emit: results path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/dastool/dastool/main.nf b/modules/dastool/dastool/main.nf index 722f6c55..53dfea19 100644 --- a/modules/dastool/dastool/main.nf +++ b/modules/dastool/dastool/main.nf @@ -26,6 +26,9 @@ process DASTOOL_DASTOOL { tuple val(meta), path("*.seqlength") , optional: true, emit: seqlength path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/dastool/scaffolds2bin/main.nf b/modules/dastool/scaffolds2bin/main.nf index 09f800bb..6e9fcdc2 100644 --- a/modules/dastool/scaffolds2bin/main.nf +++ b/modules/dastool/scaffolds2bin/main.nf @@ -15,6 +15,9 @@ process DASTOOL_SCAFFOLDS2BIN { tuple val(meta), path("*.tsv"), emit: scaffolds2bin path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/dedup/main.nf b/modules/dedup/main.nf index 8b4bdc37..c612ec14 100644 --- a/modules/dedup/main.nf +++ b/modules/dedup/main.nf @@ -17,6 +17,9 @@ process DEDUP { tuple val(meta), path("*log") , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/deeparg/downloaddata/main.nf b/modules/deeparg/downloaddata/main.nf new file mode 100644 index 00000000..aacdc778 --- /dev/null +++ b/modules/deeparg/downloaddata/main.nf @@ -0,0 +1,33 @@ +def VERSION='1.0.2' + +process DEEPARG_DOWNLOADDATA { + label 'process_low' + + conda (params.enable_conda ? "bioconda::deeparg=1.0.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/deeparg:1.0.2--pyhdfd78af_1' : + 'quay.io/biocontainers/deeparg:1.0.2--pyhdfd78af_1' }" + + input: + + output: + path "db/" , emit: db + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + deeparg \\ + download_data \\ + $args \\ + -o db/ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deeparg: $VERSION + END_VERSIONS + """ +} diff --git a/modules/deeparg/downloaddata/meta.yml b/modules/deeparg/downloaddata/meta.yml new file mode 100644 index 00000000..6cfa192e --- /dev/null +++ b/modules/deeparg/downloaddata/meta.yml @@ -0,0 +1,33 @@ +name: deeparg_downloaddata +description: A deep learning based approach to predict Antibiotic Resistance Genes (ARGs) from metagenomes +keywords: + - download + - database + - deeparg + - antimicrobial resistance genes + - deep learning + - prediction +tools: + - deeparg: + description: A deep learning based approach to predict Antibiotic Resistance Genes (ARGs) from metagenomes + homepage: https://bench.cs.vt.edu/deeparg + documentation: https://bitbucket.org/gusphdproj/deeparg-ss/src/master/ + tool_dev_url: https://bitbucket.org/gusphdproj/deeparg-ss/src/master/ + doi: "10.1186/s40168-018-0401-z" + licence: ['MIT'] + +input: + - none: There is no input. This module downloads a pre-built database for use with deepARG. + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - db: + type: directory + description: Directory containing database required for deepARG. + pattern: "db/" + +authors: + - "@jfy133" diff --git a/modules/deeparg/predict/main.nf b/modules/deeparg/predict/main.nf new file mode 100644 index 00000000..3e478e59 --- /dev/null +++ b/modules/deeparg/predict/main.nf @@ -0,0 +1,43 @@ +def VERSION="1.0.2" + +process DEEPARG_PREDICT { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::deeparg=1.0.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity//deeparg:1.0.2--pyhdfd78af_1' : + 'quay.io/biocontainers/deeparg:1.0.2--pyhdfd78af_1' }" + + input: + tuple val(meta), path(fasta), val(model) + path(db) + + output: + tuple val(meta), path("*.align.daa") , emit: daa + tuple val(meta), path("*.align.daa.tsv") , emit: daa_tsv + tuple val(meta), path("*.mapping.ARG") , emit: arg + tuple val(meta), path("*.mapping.potential.ARG"), emit: potential_arg + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + deeparg \\ + predict \\ + $args \\ + -i $fasta \\ + -o ${prefix} \\ + -d $db \\ + --model $model + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + deeparg: $VERSION + END_VERSIONS + """ +} diff --git a/modules/deeparg/predict/meta.yml b/modules/deeparg/predict/meta.yml new file mode 100644 index 00000000..244b9df7 --- /dev/null +++ b/modules/deeparg/predict/meta.yml @@ -0,0 +1,68 @@ +name: deeparg_predict +description: A deep learning based approach to predict Antibiotic Resistance Genes (ARGs) from metagenomes +keywords: + - deeparg + - antimicrobial resistance + - antimicrobial resistance genes + - arg + - deep learning + - prediction + - contigs + - metagenomes +tools: + - deeparg: + description: A deep learning based approach to predict Antibiotic Resistance Genes (ARGs) from metagenomes + homepage: https://bench.cs.vt.edu/deeparg + documentation: https://bitbucket.org/gusphdproj/deeparg-ss/src/master/ + tool_dev_url: https://bitbucket.org/gusphdproj/deeparg-ss/src/master/ + doi: "10.1186/s40168-018-0401-z" + licence: ['MIT'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - fasta: + type: file + description: FASTA file containing gene-like sequences + pattern: "*.{fasta,fa,fna}" + - model: + type: string + description: Which model to use, depending on input data. Either 'LS' or 'SS' for long or short sequences respectively + pattern: "LS|LS" + - db: + type: directory + description: Path to a directory containing the deepARG pre-built models + pattern: "*/" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - daa: + type: file + description: Sequences of ARG-like sequences from DIAMOND alignment + pattern: "*.align.daa" + - daa_tsv: + type: file + description: Alignments scores against ARG-like sequences from DIAMOND alignment + pattern: "*.align.daa.tsv" + - arg: + type: file + description: Table containing sequences with an ARG-like probability of more than specified thresholds + pattern: "*.mapping.ARG" + - potential_arg: + type: file + description: Table containing sequences with an ARG-like probability of less than specified thresholds, and requires manual inspection + pattern: "*.mapping.potential.ARG" + +authors: + - "@jfy133" diff --git a/modules/deeptools/computematrix/main.nf b/modules/deeptools/computematrix/main.nf index 70be934b..96dfef3c 100644 --- a/modules/deeptools/computematrix/main.nf +++ b/modules/deeptools/computematrix/main.nf @@ -16,6 +16,9 @@ process DEEPTOOLS_COMPUTEMATRIX { tuple val(meta), path("*.mat.tab"), emit: table path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/deeptools/plotfingerprint/main.nf b/modules/deeptools/plotfingerprint/main.nf index 7925c9a9..83613be7 100644 --- a/modules/deeptools/plotfingerprint/main.nf +++ b/modules/deeptools/plotfingerprint/main.nf @@ -16,6 +16,9 @@ process DEEPTOOLS_PLOTFINGERPRINT { tuple val(meta), path("*.qcmetrics.txt"), emit: metrics path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/deeptools/plotheatmap/main.nf b/modules/deeptools/plotheatmap/main.nf index 992c9058..1e402e39 100644 --- a/modules/deeptools/plotheatmap/main.nf +++ b/modules/deeptools/plotheatmap/main.nf @@ -15,6 +15,9 @@ process DEEPTOOLS_PLOTHEATMAP { tuple val(meta), path("*.tab"), emit: table path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/deeptools/plotprofile/main.nf b/modules/deeptools/plotprofile/main.nf index 60184fa6..d83a9493 100644 --- a/modules/deeptools/plotprofile/main.nf +++ b/modules/deeptools/plotprofile/main.nf @@ -15,6 +15,9 @@ process DEEPTOOLS_PLOTPROFILE { tuple val(meta), path("*.tab"), emit: table path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/deepvariant/main.nf b/modules/deepvariant/main.nf index 98345c83..c5e81997 100644 --- a/modules/deepvariant/main.nf +++ b/modules/deepvariant/main.nf @@ -21,6 +21,9 @@ process DEEPVARIANT { tuple val(meta), path("*g.vcf.gz"), emit: gvcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/delly/call/main.nf b/modules/delly/call/main.nf index fc04cda7..d639ee16 100644 --- a/modules/delly/call/main.nf +++ b/modules/delly/call/main.nf @@ -17,6 +17,9 @@ process DELLY_CALL { tuple val(meta), path("*.csi"), emit: csi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index c7342767..955952dc 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -17,6 +17,9 @@ process DIAMOND_BLASTP { tuple val(meta), path('*.txt'), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index bd7d1dd9..3700bd36 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -17,6 +17,9 @@ process DIAMOND_BLASTX { tuple val(meta), path('*.txt'), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/diamond/makedb/main.nf b/modules/diamond/makedb/main.nf index cccfcce9..e3d62f00 100644 --- a/modules/diamond/makedb/main.nf +++ b/modules/diamond/makedb/main.nf @@ -16,6 +16,9 @@ process DIAMOND_MAKEDB { path "${fasta}.dmnd", emit: db path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/dragmap/align/main.nf b/modules/dragmap/align/main.nf index 8a6f082a..9f261cc2 100644 --- a/modules/dragmap/align/main.nf +++ b/modules/dragmap/align/main.nf @@ -17,6 +17,9 @@ process DRAGMAP_ALIGN { tuple val(meta), path('*.log'), emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/dragmap/hashtable/main.nf b/modules/dragmap/hashtable/main.nf index ab55364b..81333dfd 100644 --- a/modules/dragmap/hashtable/main.nf +++ b/modules/dragmap/hashtable/main.nf @@ -14,6 +14,9 @@ process DRAGMAP_HASHTABLE { path "dragmap" , emit: hashmap path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/dragonflye/main.nf b/modules/dragonflye/main.nf index 8ca98832..14597143 100644 --- a/modules/dragonflye/main.nf +++ b/modules/dragonflye/main.nf @@ -18,6 +18,9 @@ process DRAGONFLYE { tuple val(meta), path("flye-info.txt"), optional:true , emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def memory = task.memory.toGiga() diff --git a/modules/dshbio/exportsegments/main.nf b/modules/dshbio/exportsegments/main.nf index 0a1920a6..49442f81 100644 --- a/modules/dshbio/exportsegments/main.nf +++ b/modules/dshbio/exportsegments/main.nf @@ -14,6 +14,9 @@ process DSHBIO_EXPORTSEGMENTS { tuple val(meta), path("*.fa.gz"), emit: fasta path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/dshbio/filterbed/main.nf b/modules/dshbio/filterbed/main.nf index 6efe07e8..7e3da24e 100644 --- a/modules/dshbio/filterbed/main.nf +++ b/modules/dshbio/filterbed/main.nf @@ -14,6 +14,9 @@ process DSHBIO_FILTERBED { tuple val(meta), path("*.bed.gz"), emit: bed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/dshbio/filtergff3/main.nf b/modules/dshbio/filtergff3/main.nf index 5214ce23..0539bbe0 100644 --- a/modules/dshbio/filtergff3/main.nf +++ b/modules/dshbio/filtergff3/main.nf @@ -14,6 +14,9 @@ process DSHBIO_FILTERGFF3 { tuple val(meta), path("*.gff3.gz"), emit: gff3 path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/dshbio/splitbed/main.nf b/modules/dshbio/splitbed/main.nf index c0ca6a8b..824c7e4d 100644 --- a/modules/dshbio/splitbed/main.nf +++ b/modules/dshbio/splitbed/main.nf @@ -14,6 +14,9 @@ process DSHBIO_SPLITBED { tuple val(meta), path("*.bed.gz"), emit: bed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/dshbio/splitgff3/main.nf b/modules/dshbio/splitgff3/main.nf index 012afec7..424bc368 100644 --- a/modules/dshbio/splitgff3/main.nf +++ b/modules/dshbio/splitgff3/main.nf @@ -14,6 +14,9 @@ process DSHBIO_SPLITGFF3 { tuple val(meta), path("*.gff3.gz"), emit: gff3 path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/ectyper/main.nf b/modules/ectyper/main.nf index 0e040958..34973ee6 100644 --- a/modules/ectyper/main.nf +++ b/modules/ectyper/main.nf @@ -16,6 +16,9 @@ process ECTYPER { tuple val(meta), path("*.txt"), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/emmtyper/main.nf b/modules/emmtyper/main.nf index 70dabfb7..955cc308 100644 --- a/modules/emmtyper/main.nf +++ b/modules/emmtyper/main.nf @@ -14,6 +14,9 @@ process EMMTYPER { tuple val(meta), path("*.tsv"), emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/ensemblvep/main.nf b/modules/ensemblvep/main.nf index e3d0c286..c2bd055f 100644 --- a/modules/ensemblvep/main.nf +++ b/modules/ensemblvep/main.nf @@ -19,6 +19,9 @@ process ENSEMBLVEP { path "*.summary.html" , emit: report path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/expansionhunter/main.nf b/modules/expansionhunter/main.nf index 4db78230..4e62b2a6 100644 --- a/modules/expansionhunter/main.nf +++ b/modules/expansionhunter/main.nf @@ -16,6 +16,9 @@ process EXPANSIONHUNTER { tuple val(meta), path("*.vcf"), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/fargene/main.nf b/modules/fargene/main.nf index 73bdd411..029f6065 100644 --- a/modules/fargene/main.nf +++ b/modules/fargene/main.nf @@ -31,6 +31,9 @@ process FARGENE { tuple val(meta), path("${prefix}/tmpdir/*.out") , optional: true, emit: tmp path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/fastani/main.nf b/modules/fastani/main.nf index cc1c4902..e6b44a82 100644 --- a/modules/fastani/main.nf +++ b/modules/fastani/main.nf @@ -15,6 +15,9 @@ process FASTANI { tuple val(meta), path("*.ani.txt"), emit: ani path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/fastp/main.nf b/modules/fastp/main.nf index a406036a..d8218350 100644 --- a/modules/fastp/main.nf +++ b/modules/fastp/main.nf @@ -21,6 +21,9 @@ process FASTP { tuple val(meta), path('*.fail.fastq.gz') , optional:true, emit: reads_fail tuple val(meta), path('*.merged.fastq.gz'), optional:true, emit: reads_merged + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' // Added soft-links to original fastqs for consistent naming in MultiQC diff --git a/modules/fastqc/main.nf b/modules/fastqc/main.nf index 9c728e24..c116020e 100644 --- a/modules/fastqc/main.nf +++ b/modules/fastqc/main.nf @@ -16,6 +16,9 @@ process FASTQC { tuple val(meta), path("*.zip") , emit: zip path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' // Add soft-links to original FastQs for consistent naming in pipeline diff --git a/modules/fastqscan/main.nf b/modules/fastqscan/main.nf index a0dcc46a..4cca0317 100644 --- a/modules/fastqscan/main.nf +++ b/modules/fastqscan/main.nf @@ -14,6 +14,9 @@ process FASTQSCAN { tuple val(meta), path("*.json"), emit: json path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/fasttree/main.nf b/modules/fasttree/main.nf index 5e57aae9..ce65846a 100644 --- a/modules/fasttree/main.nf +++ b/modules/fasttree/main.nf @@ -13,6 +13,9 @@ process FASTTREE { path "*.tre", emit: phylogeny path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/fgbio/callmolecularconsensusreads/main.nf b/modules/fgbio/callmolecularconsensusreads/main.nf index 3aab935b..347dc269 100644 --- a/modules/fgbio/callmolecularconsensusreads/main.nf +++ b/modules/fgbio/callmolecularconsensusreads/main.nf @@ -14,6 +14,9 @@ process FGBIO_CALLMOLECULARCONSENSUSREADS { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/fgbio/fastqtobam/main.nf b/modules/fgbio/fastqtobam/main.nf index 3060d715..329aff33 100644 --- a/modules/fgbio/fastqtobam/main.nf +++ b/modules/fgbio/fastqtobam/main.nf @@ -15,6 +15,9 @@ process FGBIO_FASTQTOBAM { tuple val(meta), path("*_umi_converted.bam"), emit: umibam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/fgbio/groupreadsbyumi/main.nf b/modules/fgbio/groupreadsbyumi/main.nf index 47f000a5..31250d23 100644 --- a/modules/fgbio/groupreadsbyumi/main.nf +++ b/modules/fgbio/groupreadsbyumi/main.nf @@ -16,6 +16,9 @@ process FGBIO_GROUPREADSBYUMI { tuple val(meta), path("*_umi_histogram.txt"), emit: histogram path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/fgbio/sortbam/main.nf b/modules/fgbio/sortbam/main.nf index c542f3df..5026987c 100644 --- a/modules/fgbio/sortbam/main.nf +++ b/modules/fgbio/sortbam/main.nf @@ -14,6 +14,9 @@ process FGBIO_SORTBAM { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/filtlong/main.nf b/modules/filtlong/main.nf index bb1c1eb3..0e6fdd53 100644 --- a/modules/filtlong/main.nf +++ b/modules/filtlong/main.nf @@ -14,6 +14,9 @@ process FILTLONG { tuple val(meta), path("${meta.id}_lr_filtlong.fastq.gz"), emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/flash/main.nf b/modules/flash/main.nf index 7bc38c97..bb6f2499 100644 --- a/modules/flash/main.nf +++ b/modules/flash/main.nf @@ -13,6 +13,9 @@ process FLASH { tuple val(meta), path("*.fastq.gz"), emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/freebayes/main.nf b/modules/freebayes/main.nf index 1dd91fef..e67e4c72 100644 --- a/modules/freebayes/main.nf +++ b/modules/freebayes/main.nf @@ -20,6 +20,9 @@ process FREEBAYES { tuple val(meta), path("*.vcf.gz"), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -41,7 +44,7 @@ process FREEBAYES { $args \\ $input > ${prefix}.vcf - gzip --no-name ${prefix}.vcf + bgzip ${prefix}.vcf cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -60,7 +63,7 @@ process FREEBAYES { $args \\ $input > ${prefix}.vcf - gzip --no-name ${prefix}.vcf + bgzip ${prefix}.vcf cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/gatk4/applybqsr/main.nf b/modules/gatk4/applybqsr/main.nf index c246190a..672e93e0 100644 --- a/modules/gatk4/applybqsr/main.nf +++ b/modules/gatk4/applybqsr/main.nf @@ -18,6 +18,9 @@ process GATK4_APPLYBQSR { tuple val(meta), path("*.cram"), emit: cram, optional: true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/applyvqsr/main.nf b/modules/gatk4/applyvqsr/main.nf index 99233975..006840b3 100644 --- a/modules/gatk4/applyvqsr/main.nf +++ b/modules/gatk4/applyvqsr/main.nf @@ -21,6 +21,9 @@ process GATK4_APPLYVQSR { tuple val(meta), path("*.tbi") , emit: tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/baserecalibrator/main.nf b/modules/gatk4/baserecalibrator/main.nf index 42391d62..48c127f0 100644 --- a/modules/gatk4/baserecalibrator/main.nf +++ b/modules/gatk4/baserecalibrator/main.nf @@ -19,6 +19,9 @@ process GATK4_BASERECALIBRATOR { tuple val(meta), path("*.table"), emit: table path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/bedtointervallist/main.nf b/modules/gatk4/bedtointervallist/main.nf index 37f46f48..9f2b2dfe 100644 --- a/modules/gatk4/bedtointervallist/main.nf +++ b/modules/gatk4/bedtointervallist/main.nf @@ -15,6 +15,9 @@ process GATK4_BEDTOINTERVALLIST { tuple val(meta), path('*.interval_list'), emit: interval_list path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/calculatecontamination/main.nf b/modules/gatk4/calculatecontamination/main.nf index f4e98f64..177f4878 100644 --- a/modules/gatk4/calculatecontamination/main.nf +++ b/modules/gatk4/calculatecontamination/main.nf @@ -16,6 +16,9 @@ process GATK4_CALCULATECONTAMINATION { tuple val(meta), path('*.segmentation.table') , emit: segmentation, optional:true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/createsequencedictionary/main.nf b/modules/gatk4/createsequencedictionary/main.nf index 2cbd8948..714843c2 100644 --- a/modules/gatk4/createsequencedictionary/main.nf +++ b/modules/gatk4/createsequencedictionary/main.nf @@ -14,6 +14,9 @@ process GATK4_CREATESEQUENCEDICTIONARY { path "*.dict" , emit: dict path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def avail_mem = 6 diff --git a/modules/gatk4/createsomaticpanelofnormals/main.nf b/modules/gatk4/createsomaticpanelofnormals/main.nf index 8ab578c4..a82c24d8 100644 --- a/modules/gatk4/createsomaticpanelofnormals/main.nf +++ b/modules/gatk4/createsomaticpanelofnormals/main.nf @@ -18,6 +18,9 @@ process GATK4_CREATESOMATICPANELOFNORMALS { tuple val(meta), path("*.tbi") , emit: tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/estimatelibrarycomplexity/main.nf b/modules/gatk4/estimatelibrarycomplexity/main.nf index 744ebf21..2894e305 100644 --- a/modules/gatk4/estimatelibrarycomplexity/main.nf +++ b/modules/gatk4/estimatelibrarycomplexity/main.nf @@ -17,6 +17,9 @@ process GATK4_ESTIMATELIBRARYCOMPLEXITY { tuple val(meta), path('*.metrics'), emit: metrics path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/fastqtosam/main.nf b/modules/gatk4/fastqtosam/main.nf index f0116b41..631c0394 100644 --- a/modules/gatk4/fastqtosam/main.nf +++ b/modules/gatk4/fastqtosam/main.nf @@ -14,6 +14,9 @@ process GATK4_FASTQTOSAM { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/filtermutectcalls/main.nf b/modules/gatk4/filtermutectcalls/main.nf index 2f5f8dcb..a7dd9a61 100644 --- a/modules/gatk4/filtermutectcalls/main.nf +++ b/modules/gatk4/filtermutectcalls/main.nf @@ -19,6 +19,9 @@ process GATK4_FILTERMUTECTCALLS { tuple val(meta), path("*.filteringStats.tsv"), emit: stats path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/gatherbqsrreports/main.nf b/modules/gatk4/gatherbqsrreports/main.nf index b084ab00..f8d91a92 100644 --- a/modules/gatk4/gatherbqsrreports/main.nf +++ b/modules/gatk4/gatherbqsrreports/main.nf @@ -14,6 +14,9 @@ process GATK4_GATHERBQSRREPORTS { tuple val(meta), path("*.table"), emit: table path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/genomicsdbimport/main.nf b/modules/gatk4/genomicsdbimport/main.nf index 94a589cd..e88471e1 100644 --- a/modules/gatk4/genomicsdbimport/main.nf +++ b/modules/gatk4/genomicsdbimport/main.nf @@ -19,6 +19,9 @@ process GATK4_GENOMICSDBIMPORT { tuple val(meta), path("*.interval_list"), optional:true, emit: intervallist path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/genotypegvcfs/main.nf b/modules/gatk4/genotypegvcfs/main.nf index 016da1f5..c3e41229 100644 --- a/modules/gatk4/genotypegvcfs/main.nf +++ b/modules/gatk4/genotypegvcfs/main.nf @@ -20,6 +20,9 @@ process GATK4_GENOTYPEGVCFS { tuple val(meta), path("*.tbi") , emit: tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/getpileupsummaries/main.nf b/modules/gatk4/getpileupsummaries/main.nf index a81ae635..3667a210 100644 --- a/modules/gatk4/getpileupsummaries/main.nf +++ b/modules/gatk4/getpileupsummaries/main.nf @@ -17,6 +17,9 @@ process GATK4_GETPILEUPSUMMARIES { tuple val(meta), path('*.pileups.table'), emit: table path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/haplotypecaller/main.nf b/modules/gatk4/haplotypecaller/main.nf index 8c22da68..6f03ffd2 100644 --- a/modules/gatk4/haplotypecaller/main.nf +++ b/modules/gatk4/haplotypecaller/main.nf @@ -20,6 +20,9 @@ process GATK4_HAPLOTYPECALLER { tuple val(meta), path("*.tbi") , emit: tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/indexfeaturefile/main.nf b/modules/gatk4/indexfeaturefile/main.nf index ecd24173..b5add0e0 100644 --- a/modules/gatk4/indexfeaturefile/main.nf +++ b/modules/gatk4/indexfeaturefile/main.nf @@ -14,6 +14,9 @@ process GATK4_INDEXFEATUREFILE { tuple val(meta), path("*.{tbi,idx}"), emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def avail_mem = 3 diff --git a/modules/gatk4/intervallisttools/main.nf b/modules/gatk4/intervallisttools/main.nf index 17412160..40c7fb19 100644 --- a/modules/gatk4/intervallisttools/main.nf +++ b/modules/gatk4/intervallisttools/main.nf @@ -14,6 +14,9 @@ process GATK4_INTERVALLISTTOOLS { tuple val(meta), path("*_split/*/*.interval_list"), emit: interval_list path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/learnreadorientationmodel/main.nf b/modules/gatk4/learnreadorientationmodel/main.nf index d1bce19f..7d96c27e 100644 --- a/modules/gatk4/learnreadorientationmodel/main.nf +++ b/modules/gatk4/learnreadorientationmodel/main.nf @@ -14,6 +14,9 @@ process GATK4_LEARNREADORIENTATIONMODEL { tuple val(meta), path("*.tar.gz"), emit: artifactprior path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/markduplicates/main.nf b/modules/gatk4/markduplicates/main.nf index c101d042..735b093e 100644 --- a/modules/gatk4/markduplicates/main.nf +++ b/modules/gatk4/markduplicates/main.nf @@ -16,6 +16,9 @@ process GATK4_MARKDUPLICATES { tuple val(meta), path("*.metrics"), emit: metrics path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/mergebamalignment/main.nf b/modules/gatk4/mergebamalignment/main.nf index b0b9daa1..e636e1cd 100644 --- a/modules/gatk4/mergebamalignment/main.nf +++ b/modules/gatk4/mergebamalignment/main.nf @@ -8,8 +8,7 @@ process GATK4_MERGEBAMALIGNMENT { 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: - tuple val(meta), path(aligned) - path unmapped + tuple val(meta), path(aligned), path(unmapped) path fasta path dict @@ -17,6 +16,9 @@ process GATK4_MERGEBAMALIGNMENT { tuple val(meta), path('*.bam'), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -28,10 +30,10 @@ process GATK4_MERGEBAMALIGNMENT { } """ gatk --java-options "-Xmx${avail_mem}g" MergeBamAlignment \\ - ALIGNED=$aligned \\ - UNMAPPED=$unmapped \\ - R=$fasta \\ - O=${prefix}.bam \\ + -ALIGNED $aligned \\ + -UNMAPPED $unmapped \\ + -R $fasta \\ + -O ${prefix}.bam \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/gatk4/mergevcfs/main.nf b/modules/gatk4/mergevcfs/main.nf index b2e584a8..3e9973e7 100644 --- a/modules/gatk4/mergevcfs/main.nf +++ b/modules/gatk4/mergevcfs/main.nf @@ -16,6 +16,9 @@ process GATK4_MERGEVCFS { tuple val(meta), path('*.vcf.gz'), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/mutect2/main.nf b/modules/gatk4/mutect2/main.nf index c33cee18..1c8c3993 100644 --- a/modules/gatk4/mutect2/main.nf +++ b/modules/gatk4/mutect2/main.nf @@ -28,6 +28,9 @@ process GATK4_MUTECT2 { tuple val(meta), path("*.f1r2.tar.gz"), optional:true, emit: f1r2 path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/revertsam/main.nf b/modules/gatk4/revertsam/main.nf index 5a13d61d..23f99ab4 100644 --- a/modules/gatk4/revertsam/main.nf +++ b/modules/gatk4/revertsam/main.nf @@ -14,6 +14,9 @@ process GATK4_REVERTSAM { tuple val(meta), path('*.bam'), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/samtofastq/main.nf b/modules/gatk4/samtofastq/main.nf index 0a75f604..2da40b6c 100644 --- a/modules/gatk4/samtofastq/main.nf +++ b/modules/gatk4/samtofastq/main.nf @@ -14,6 +14,9 @@ process GATK4_SAMTOFASTQ { tuple val(meta), path('*.fastq.gz'), emit: fastq path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/splitncigarreads/main.nf b/modules/gatk4/splitncigarreads/main.nf index 29483fb5..6d0a35fd 100644 --- a/modules/gatk4/splitncigarreads/main.nf +++ b/modules/gatk4/splitncigarreads/main.nf @@ -17,6 +17,9 @@ process GATK4_SPLITNCIGARREADS { tuple val(meta), path('*.bam'), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/variantfiltration/main.nf b/modules/gatk4/variantfiltration/main.nf index beaec0c0..3a41d20c 100644 --- a/modules/gatk4/variantfiltration/main.nf +++ b/modules/gatk4/variantfiltration/main.nf @@ -18,6 +18,9 @@ process GATK4_VARIANTFILTRATION { tuple val(meta), path("*.tbi") , emit: tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gatk4/variantrecalibrator/main.nf b/modules/gatk4/variantrecalibrator/main.nf index c4aa5535..df8a9599 100644 --- a/modules/gatk4/variantrecalibrator/main.nf +++ b/modules/gatk4/variantrecalibrator/main.nf @@ -25,6 +25,9 @@ process GATK4_VARIANTRECALIBRATOR { tuple val(meta), path("*plots.R") , emit: plots, optional:true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/genmap/index/main.nf b/modules/genmap/index/main.nf index 943f1a31..a19c6619 100644 --- a/modules/genmap/index/main.nf +++ b/modules/genmap/index/main.nf @@ -14,6 +14,9 @@ process GENMAP_INDEX { path "genmap" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/genmap/mappability/main.nf b/modules/genmap/mappability/main.nf index 94083f14..50a17493 100644 --- a/modules/genmap/mappability/main.nf +++ b/modules/genmap/mappability/main.nf @@ -16,6 +16,9 @@ process GENMAP_MAPPABILITY { path "*.txt" , optional:true, emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/genrich/main.nf b/modules/genrich/main.nf index d9deea3c..d276c410 100644 --- a/modules/genrich/main.nf +++ b/modules/genrich/main.nf @@ -24,6 +24,9 @@ process GENRICH { tuple val(meta), path("*duplicates.txt") , optional:true, emit: duplicates path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gffread/main.nf b/modules/gffread/main.nf index e7893f8b..7c575c97 100644 --- a/modules/gffread/main.nf +++ b/modules/gffread/main.nf @@ -14,6 +14,9 @@ process GFFREAD { path "*.gtf" , emit: gtf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${gff.baseName}" diff --git a/modules/glnexus/main.nf b/modules/glnexus/main.nf index b8afca22..84da95a0 100644 --- a/modules/glnexus/main.nf +++ b/modules/glnexus/main.nf @@ -14,6 +14,9 @@ process GLNEXUS { tuple val(meta), path("*.bcf"), emit: bcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/graphmap2/align/main.nf b/modules/graphmap2/align/main.nf index 554e585b..8834cc0a 100644 --- a/modules/graphmap2/align/main.nf +++ b/modules/graphmap2/align/main.nf @@ -17,6 +17,9 @@ process GRAPHMAP2_ALIGN { tuple val(meta), path("*.sam"), emit: sam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/graphmap2/index/main.nf b/modules/graphmap2/index/main.nf index fffc7bcb..ef240b6c 100644 --- a/modules/graphmap2/index/main.nf +++ b/modules/graphmap2/index/main.nf @@ -13,6 +13,9 @@ process GRAPHMAP2_INDEX { path "*.gmidx" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/gstama/collapse/main.nf b/modules/gstama/collapse/main.nf index 1c06692d..36d8a311 100644 --- a/modules/gstama/collapse/main.nf +++ b/modules/gstama/collapse/main.nf @@ -24,6 +24,9 @@ process GSTAMA_COLLAPSE { tuple val(meta), path("*_varcov.txt") , emit: varcov , optional: true tuple val(meta), path("*_variants.txt") , emit: variants, optional: true + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gstama/merge/main.nf b/modules/gstama/merge/main.nf index 53ff93e4..221ec3c9 100644 --- a/modules/gstama/merge/main.nf +++ b/modules/gstama/merge/main.nf @@ -18,6 +18,9 @@ process GSTAMA_MERGE { tuple val(meta), path("*_trans_report.txt"), emit: trans_report path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gtdbtk/classifywf/main.nf b/modules/gtdbtk/classifywf/main.nf index 009efa8d..bf83c2ad 100644 --- a/modules/gtdbtk/classifywf/main.nf +++ b/modules/gtdbtk/classifywf/main.nf @@ -25,6 +25,9 @@ process GTDBTK_CLASSIFYWF { path "gtdbtk.${meta.assembler}-${meta.id}.failed_genomes.tsv" , emit: failed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def pplacer_scratch = params.gtdbtk_pplacer_scratch ? "--scratch_dir pplacer_tmp" : "" diff --git a/modules/gubbins/main.nf b/modules/gubbins/main.nf index b4c6dc23..17a271d8 100644 --- a/modules/gubbins/main.nf +++ b/modules/gubbins/main.nf @@ -21,6 +21,9 @@ process GUBBINS { path "*.node_labelled.final_tree.tre" , emit: tree_labelled path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/gunc/downloaddb/main.nf b/modules/gunc/downloaddb/main.nf index 430b862b..00638693 100644 --- a/modules/gunc/downloaddb/main.nf +++ b/modules/gunc/downloaddb/main.nf @@ -14,6 +14,9 @@ process GUNC_DOWNLOADDB { path "*.dmnd" , emit: db path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/gunc/run/main.nf b/modules/gunc/run/main.nf index 8508c9f0..ce9bd7c6 100644 --- a/modules/gunc/run/main.nf +++ b/modules/gunc/run/main.nf @@ -16,6 +16,9 @@ process GUNC_RUN { tuple val(meta), path("*all_levels.tsv") , optional: true, emit: all_levels_tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/gunzip/main.nf b/modules/gunzip/main.nf index 77a4e546..9d4b0666 100644 --- a/modules/gunzip/main.nf +++ b/modules/gunzip/main.nf @@ -14,6 +14,9 @@ process GUNZIP { tuple val(meta), path("$gunzip"), emit: gunzip path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' gunzip = archive.toString() - '.gz' diff --git a/modules/hicap/main.nf b/modules/hicap/main.nf index a96343f6..51fe0b83 100644 --- a/modules/hicap/main.nf +++ b/modules/hicap/main.nf @@ -18,6 +18,9 @@ process HICAP { tuple val(meta), path("*.tsv"), emit: tsv, optional: true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/hifiasm/main.nf b/modules/hifiasm/main.nf index 208554d6..ea7c4976 100644 --- a/modules/hifiasm/main.nf +++ b/modules/hifiasm/main.nf @@ -25,6 +25,9 @@ process HIFIASM { tuple val(meta), path("*.hap2.p_ctg.gfa") , emit: maternal_contigs , optional: true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/hisat2/align/main.nf b/modules/hisat2/align/main.nf index ae888616..7f680018 100644 --- a/modules/hisat2/align/main.nf +++ b/modules/hisat2/align/main.nf @@ -20,6 +20,9 @@ process HISAT2_ALIGN { tuple val(meta), path("*fastq.gz"), optional:true, emit: fastq path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/hisat2/build/main.nf b/modules/hisat2/build/main.nf index 4e8cd02b..50f65e3a 100644 --- a/modules/hisat2/build/main.nf +++ b/modules/hisat2/build/main.nf @@ -19,6 +19,9 @@ process HISAT2_BUILD { path "hisat2" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def avail_mem = 0 diff --git a/modules/hisat2/extractsplicesites/main.nf b/modules/hisat2/extractsplicesites/main.nf index 302c35f1..94135977 100644 --- a/modules/hisat2/extractsplicesites/main.nf +++ b/modules/hisat2/extractsplicesites/main.nf @@ -16,6 +16,9 @@ process HISAT2_EXTRACTSPLICESITES { path "*.splice_sites.txt", emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/hmmcopy/gccounter/main.nf b/modules/hmmcopy/gccounter/main.nf index a1de8b97..3911df6b 100644 --- a/modules/hmmcopy/gccounter/main.nf +++ b/modules/hmmcopy/gccounter/main.nf @@ -15,6 +15,9 @@ process HMMCOPY_GCCOUNTER { path "*.gc.wig" , emit: wig path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/hmmcopy/generatemap/main.nf b/modules/hmmcopy/generatemap/main.nf index 1d248853..c6c08725 100644 --- a/modules/hmmcopy/generatemap/main.nf +++ b/modules/hmmcopy/generatemap/main.nf @@ -16,6 +16,9 @@ process HMMCOPY_GENERATEMAP { path "*.map.bw" , emit: bigwig path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' diff --git a/modules/hmmcopy/mapcounter/main.nf b/modules/hmmcopy/mapcounter/main.nf index ab20868e..b369d12b 100644 --- a/modules/hmmcopy/mapcounter/main.nf +++ b/modules/hmmcopy/mapcounter/main.nf @@ -15,6 +15,9 @@ process HMMCOPY_MAPCOUNTER { path "*.map.wig" , emit: wig path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' diff --git a/modules/hmmcopy/readcounter/main.nf b/modules/hmmcopy/readcounter/main.nf index a6e89f91..ff13770d 100644 --- a/modules/hmmcopy/readcounter/main.nf +++ b/modules/hmmcopy/readcounter/main.nf @@ -16,6 +16,9 @@ process HMMCOPY_READCOUNTER { tuple val(meta), path("*.wig"), emit: wig path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/hmmer/hmmalign/main.nf b/modules/hmmer/hmmalign/main.nf index e6d04044..d3df3c89 100644 --- a/modules/hmmer/hmmalign/main.nf +++ b/modules/hmmer/hmmalign/main.nf @@ -15,6 +15,9 @@ process HMMER_HMMALIGN { tuple val(meta), path("*.sthlm.gz"), emit: sthlm path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/homer/annotatepeaks/main.nf b/modules/homer/annotatepeaks/main.nf index 84e0241a..c9da82ed 100644 --- a/modules/homer/annotatepeaks/main.nf +++ b/modules/homer/annotatepeaks/main.nf @@ -18,6 +18,9 @@ process HOMER_ANNOTATEPEAKS { tuple val(meta), path("*annotatePeaks.txt"), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/homer/findpeaks/main.nf b/modules/homer/findpeaks/main.nf index 66de06b6..b9947774 100644 --- a/modules/homer/findpeaks/main.nf +++ b/modules/homer/findpeaks/main.nf @@ -16,6 +16,9 @@ process HOMER_FINDPEAKS { tuple val(meta), path("*peaks.txt"), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/homer/maketagdirectory/main.nf b/modules/homer/maketagdirectory/main.nf index 72e2091f..262998d5 100644 --- a/modules/homer/maketagdirectory/main.nf +++ b/modules/homer/maketagdirectory/main.nf @@ -17,6 +17,9 @@ process HOMER_MAKETAGDIRECTORY { tuple val(meta), path("tag_dir"), emit: tagdir path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/homer/makeucscfile/main.nf b/modules/homer/makeucscfile/main.nf index 17e86947..c82435ea 100644 --- a/modules/homer/makeucscfile/main.nf +++ b/modules/homer/makeucscfile/main.nf @@ -16,6 +16,9 @@ process HOMER_MAKEUCSCFILE { tuple val(meta), path("tag_dir/*ucsc.bedGraph.gz"), emit: bedGraph path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/idr/main.nf b/modules/idr/main.nf index 7e377878..d18ef2eb 100644 --- a/modules/idr/main.nf +++ b/modules/idr/main.nf @@ -18,6 +18,9 @@ process IDR { path "*.png" , emit: png path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' if (peaks.toList().size < 2) { diff --git a/modules/imputeme/vcftoprs/main.nf b/modules/imputeme/vcftoprs/main.nf index 5fee90c2..8ce3f73d 100644 --- a/modules/imputeme/vcftoprs/main.nf +++ b/modules/imputeme/vcftoprs/main.nf @@ -14,6 +14,9 @@ process IMPUTEME_VCFTOPRS { tuple val(meta), path("*.json"), emit: json path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/iqtree/main.nf b/modules/iqtree/main.nf index 54a6486d..db394bd2 100644 --- a/modules/iqtree/main.nf +++ b/modules/iqtree/main.nf @@ -15,6 +15,9 @@ process IQTREE { path "*.treefile", emit: phylogeny path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def fconst_args = constant_sites ? "-fconst $constant_sites" : '' diff --git a/modules/ismapper/main.nf b/modules/ismapper/main.nf index a51cc01e..a2c79115 100644 --- a/modules/ismapper/main.nf +++ b/modules/ismapper/main.nf @@ -14,6 +14,9 @@ process ISMAPPER { tuple val(meta), path("results/*"), emit: results path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/isoseq3/cluster/main.nf b/modules/isoseq3/cluster/main.nf index fdd47971..fe1b10d4 100644 --- a/modules/isoseq3/cluster/main.nf +++ b/modules/isoseq3/cluster/main.nf @@ -24,6 +24,9 @@ process ISOSEQ3_CLUSTER { tuple val(meta), path("*.transcripts.singletons.bam.pbi"), optional: true, emit: singletons_pbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/isoseq3/refine/main.nf b/modules/isoseq3/refine/main.nf index 5044cba2..25014811 100644 --- a/modules/isoseq3/refine/main.nf +++ b/modules/isoseq3/refine/main.nf @@ -19,6 +19,9 @@ process ISOSEQ3_REFINE { tuple val(meta), path("*.report.csv") , emit: report path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/ivar/consensus/main.nf b/modules/ivar/consensus/main.nf index 96d00ce2..db6301e9 100644 --- a/modules/ivar/consensus/main.nf +++ b/modules/ivar/consensus/main.nf @@ -18,6 +18,9 @@ process IVAR_CONSENSUS { tuple val(meta), path("*.mpileup") , optional:true, emit: mpileup path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/ivar/trim/main.nf b/modules/ivar/trim/main.nf index 4d0c70a2..819aa5dd 100644 --- a/modules/ivar/trim/main.nf +++ b/modules/ivar/trim/main.nf @@ -16,6 +16,9 @@ process IVAR_TRIM { tuple val(meta), path('*.log'), emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/ivar/variants/main.nf b/modules/ivar/variants/main.nf index bb6e402b..85c4cacd 100644 --- a/modules/ivar/variants/main.nf +++ b/modules/ivar/variants/main.nf @@ -18,6 +18,9 @@ process IVAR_VARIANTS { tuple val(meta), path("*.mpileup"), optional:true, emit: mpileup path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/jupyternotebook/main.nf b/modules/jupyternotebook/main.nf index 871d6ccd..baed502c 100644 --- a/modules/jupyternotebook/main.nf +++ b/modules/jupyternotebook/main.nf @@ -22,6 +22,9 @@ process JUPYTERNOTEBOOK { tuple val(meta), path("artifacts/"), emit: artifacts, optional: true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/kallisto/index/main.nf b/modules/kallisto/index/main.nf index 4dc9c6d0..0f10e564 100644 --- a/modules/kallisto/index/main.nf +++ b/modules/kallisto/index/main.nf @@ -14,6 +14,9 @@ process KALLISTO_INDEX { path "kallisto" , emit: idx path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/kallistobustools/count/main.nf b/modules/kallistobustools/count/main.nf index d67eba31..d674aece 100644 --- a/modules/kallistobustools/count/main.nf +++ b/modules/kallistobustools/count/main.nf @@ -20,6 +20,9 @@ process KALLISTOBUSTOOLS_COUNT { tuple val(meta), path ("*.count"), emit: count path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/kallistobustools/ref/main.nf b/modules/kallistobustools/ref/main.nf index 1e496f67..1e789615 100644 --- a/modules/kallistobustools/ref/main.nf +++ b/modules/kallistobustools/ref/main.nf @@ -21,6 +21,9 @@ process KALLISTOBUSTOOLS_REF { path "cdna_t2c.txt" , optional:true, emit: cdna_t2c path "intron_t2c.txt" , optional:true, emit: intron_t2c + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' if (workflow_mode == "standard") { diff --git a/modules/khmer/normalizebymedian/main.nf b/modules/khmer/normalizebymedian/main.nf index 50b3d603..f89b2585 100644 --- a/modules/khmer/normalizebymedian/main.nf +++ b/modules/khmer/normalizebymedian/main.nf @@ -16,6 +16,9 @@ process KHMER_NORMALIZEBYMEDIAN { path "${name}.fastq.gz", emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' pe_args = pe_reads ? "--paired" : "" diff --git a/modules/kleborate/main.nf b/modules/kleborate/main.nf index 4a793793..88cbc951 100644 --- a/modules/kleborate/main.nf +++ b/modules/kleborate/main.nf @@ -14,6 +14,9 @@ process KLEBORATE { tuple val(meta), path("*.txt"), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/kraken2/kraken2/main.nf b/modules/kraken2/kraken2/main.nf index eaabb229..3ec5df52 100644 --- a/modules/kraken2/kraken2/main.nf +++ b/modules/kraken2/kraken2/main.nf @@ -17,6 +17,9 @@ process KRAKEN2_KRAKEN2 { tuple val(meta), path('*report.txt') , emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/krona/kronadb/main.nf b/modules/krona/kronadb/main.nf index d8156035..afcb0694 100644 --- a/modules/krona/kronadb/main.nf +++ b/modules/krona/kronadb/main.nf @@ -12,6 +12,9 @@ process KRONA_KRONADB { path 'taxonomy/taxonomy.tab', emit: db path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/krona/ktimporttaxonomy/main.nf b/modules/krona/ktimporttaxonomy/main.nf index bc79c98c..7837bb87 100644 --- a/modules/krona/ktimporttaxonomy/main.nf +++ b/modules/krona/ktimporttaxonomy/main.nf @@ -17,6 +17,9 @@ process KRONA_KTIMPORTTAXONOMY { tuple val(meta), path ('*.html'), emit: html path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/last/dotplot/main.nf b/modules/last/dotplot/main.nf index e8857403..a71d001a 100644 --- a/modules/last/dotplot/main.nf +++ b/modules/last/dotplot/main.nf @@ -16,6 +16,9 @@ process LAST_DOTPLOT { tuple val(meta), path("*.png"), optional:true, emit: png path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/last/lastal/main.nf b/modules/last/lastal/main.nf index b5ac8bfe..882b16cd 100644 --- a/modules/last/lastal/main.nf +++ b/modules/last/lastal/main.nf @@ -15,6 +15,9 @@ process LAST_LASTAL { tuple val(meta), path("*.maf.gz"), emit: maf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/last/lastdb/main.nf b/modules/last/lastdb/main.nf index e9895c5c..0747ba4d 100644 --- a/modules/last/lastdb/main.nf +++ b/modules/last/lastdb/main.nf @@ -14,6 +14,9 @@ process LAST_LASTDB { tuple val(meta), path("lastdb"), emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/last/mafconvert/main.nf b/modules/last/mafconvert/main.nf index ca60e7fe..8ffec2f9 100644 --- a/modules/last/mafconvert/main.nf +++ b/modules/last/mafconvert/main.nf @@ -23,6 +23,9 @@ process LAST_MAFCONVERT { tuple val(meta), path("*.tab.gz"), optional:true, emit: tab_gz path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/last/mafswap/main.nf b/modules/last/mafswap/main.nf index 0a58b027..55f6a1a9 100644 --- a/modules/last/mafswap/main.nf +++ b/modules/last/mafswap/main.nf @@ -14,6 +14,9 @@ process LAST_MAFSWAP { tuple val(meta), path("*.maf.gz"), emit: maf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/last/postmask/main.nf b/modules/last/postmask/main.nf index ca981e1c..6bc64930 100644 --- a/modules/last/postmask/main.nf +++ b/modules/last/postmask/main.nf @@ -14,6 +14,9 @@ process LAST_POSTMASK { tuple val(meta), path("*.maf.gz"), emit: maf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/last/split/main.nf b/modules/last/split/main.nf index 60ed135b..433eff0c 100644 --- a/modules/last/split/main.nf +++ b/modules/last/split/main.nf @@ -14,6 +14,9 @@ process LAST_SPLIT { tuple val(meta), path("*.maf.gz"), emit: maf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/last/train/main.nf b/modules/last/train/main.nf index 471db7c1..23f4f36b 100644 --- a/modules/last/train/main.nf +++ b/modules/last/train/main.nf @@ -15,6 +15,9 @@ process LAST_TRAIN { tuple val(meta), path("*.par"), emit: param_file path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/leehom/main.nf b/modules/leehom/main.nf index b5cb2dcb..906d094e 100644 --- a/modules/leehom/main.nf +++ b/modules/leehom/main.nf @@ -23,6 +23,9 @@ process LEEHOM { tuple val(meta), path("*.log") , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/lima/main.nf b/modules/lima/main.nf index 691e43f2..e98fd157 100644 --- a/modules/lima/main.nf +++ b/modules/lima/main.nf @@ -28,6 +28,9 @@ process LIMA { tuple val(meta), path("*.clips") , optional: true, emit: clips tuple val(meta), path("*.guess") , optional: true, emit: guess + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/lissero/main.nf b/modules/lissero/main.nf index 667697ef..29995db8 100644 --- a/modules/lissero/main.nf +++ b/modules/lissero/main.nf @@ -14,6 +14,9 @@ process LISSERO { tuple val(meta), path("*.tsv"), emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/lofreq/call/main.nf b/modules/lofreq/call/main.nf index d7fd078b..773bc212 100644 --- a/modules/lofreq/call/main.nf +++ b/modules/lofreq/call/main.nf @@ -15,6 +15,9 @@ process LOFREQ_CALL { tuple val(meta), path("*.vcf.gz"), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/lofreq/callparallel/main.nf b/modules/lofreq/callparallel/main.nf index 764efcc5..4dffc302 100644 --- a/modules/lofreq/callparallel/main.nf +++ b/modules/lofreq/callparallel/main.nf @@ -16,6 +16,9 @@ process LOFREQ_CALLPARALLEL { tuple val(meta), path("*.vcf.gz"), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/lofreq/filter/main.nf b/modules/lofreq/filter/main.nf index 34a5aef8..bddc012f 100644 --- a/modules/lofreq/filter/main.nf +++ b/modules/lofreq/filter/main.nf @@ -14,6 +14,9 @@ process LOFREQ_FILTER { tuple val(meta), path("*.gz"), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/lofreq/indelqual/main.nf b/modules/lofreq/indelqual/main.nf index 5e5b8f44..ac53d70f 100644 --- a/modules/lofreq/indelqual/main.nf +++ b/modules/lofreq/indelqual/main.nf @@ -15,6 +15,9 @@ process LOFREQ_INDELQUAL { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/macrel/contigs/main.nf b/modules/macrel/contigs/main.nf index 558ef6e8..65db4d3e 100644 --- a/modules/macrel/contigs/main.nf +++ b/modules/macrel/contigs/main.nf @@ -18,6 +18,9 @@ process MACREL_CONTIGS { tuple val(meta), path("*/*_log.txt") , emit: log_file path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/macs2/callpeak/main.nf b/modules/macs2/callpeak/main.nf index c5c88f8e..9aaf97a9 100644 --- a/modules/macs2/callpeak/main.nf +++ b/modules/macs2/callpeak/main.nf @@ -20,6 +20,9 @@ process MACS2_CALLPEAK { tuple val(meta), path("*.bed") , optional:true, emit: bed tuple val(meta), path("*.bdg") , optional:true, emit: bdg + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/malt/build/main.nf b/modules/malt/build/main.nf index d1b0c427..8eeb304b 100644 --- a/modules/malt/build/main.nf +++ b/modules/malt/build/main.nf @@ -18,6 +18,9 @@ process MALT_BUILD { path "versions.yml" , emit: versions path "malt-build.log", emit: log + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def avail_mem = 6 diff --git a/modules/malt/run/main.nf b/modules/malt/run/main.nf index 5e81667e..99657305 100644 --- a/modules/malt/run/main.nf +++ b/modules/malt/run/main.nf @@ -17,6 +17,9 @@ process MALT_RUN { path "*.log" , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def avail_mem = 6 diff --git a/modules/maltextract/main.nf b/modules/maltextract/main.nf index e3a42016..75710141 100644 --- a/modules/maltextract/main.nf +++ b/modules/maltextract/main.nf @@ -16,6 +16,9 @@ process MALTEXTRACT { path "results" , emit: results path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/manta/germline/main.nf b/modules/manta/germline/main.nf index 2a8c0acc..fab789ec 100644 --- a/modules/manta/germline/main.nf +++ b/modules/manta/germline/main.nf @@ -23,6 +23,9 @@ process MANTA_GERMLINE { tuple val(meta), path("*diploid_sv.vcf.gz.tbi") , emit: diploid_sv_vcf_tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/manta/somatic/main.nf b/modules/manta/somatic/main.nf index 1d62635b..886a8fb9 100644 --- a/modules/manta/somatic/main.nf +++ b/modules/manta/somatic/main.nf @@ -25,6 +25,9 @@ process MANTA_SOMATIC { tuple val(meta), path("*.somatic_sv.vcf.gz.tbi") , emit: somatic_sv_vcf_tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/manta/tumoronly/main.nf b/modules/manta/tumoronly/main.nf index 63f7a840..3d52b16e 100644 --- a/modules/manta/tumoronly/main.nf +++ b/modules/manta/tumoronly/main.nf @@ -23,6 +23,9 @@ process MANTA_TUMORONLY { tuple val(meta), path("*tumor_sv.vcf.gz.tbi") , emit: tumor_sv_vcf_tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/mapdamage2/main.nf b/modules/mapdamage2/main.nf index e3668fda..53007115 100644 --- a/modules/mapdamage2/main.nf +++ b/modules/mapdamage2/main.nf @@ -32,6 +32,9 @@ process MAPDAMAGE2 { tuple val(meta), path("*/"), optional: true ,emit: folder path "versions.yml",emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/mash/dist/main.nf b/modules/mash/dist/main.nf index 323bd339..270767b5 100644 --- a/modules/mash/dist/main.nf +++ b/modules/mash/dist/main.nf @@ -15,6 +15,9 @@ process MASH_DIST { tuple val(meta), path("*.txt"), emit: dist path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/mash/sketch/main.nf b/modules/mash/sketch/main.nf index d93641f7..54263af7 100644 --- a/modules/mash/sketch/main.nf +++ b/modules/mash/sketch/main.nf @@ -14,6 +14,9 @@ process MASH_SKETCH { tuple val(meta), path("*.mash_stats") , emit: stats path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/mashtree/main.nf b/modules/mashtree/main.nf index 5da2f805..4cd9af19 100644 --- a/modules/mashtree/main.nf +++ b/modules/mashtree/main.nf @@ -15,6 +15,9 @@ process MASHTREE { tuple val(meta), path("*.tsv"), emit: matrix path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/maxbin2/main.nf b/modules/maxbin2/main.nf index 4d384391..7b818d00 100644 --- a/modules/maxbin2/main.nf +++ b/modules/maxbin2/main.nf @@ -21,6 +21,9 @@ process MAXBIN2 { tuple val(meta), path("*_gene.tar.gz"), emit: marker_genes, optional: true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/medaka/main.nf b/modules/medaka/main.nf index 761b1c34..da77d0f0 100644 --- a/modules/medaka/main.nf +++ b/modules/medaka/main.nf @@ -14,6 +14,9 @@ process MEDAKA { tuple val(meta), path("*.fa.gz"), emit: assembly path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/megahit/main.nf b/modules/megahit/main.nf index 7b511883..6e6a1ad1 100644 --- a/modules/megahit/main.nf +++ b/modules/megahit/main.nf @@ -18,6 +18,9 @@ process MEGAHIT { tuple val(meta), path("megahit_out/intermediate_contigs/k*.final.contigs.fa.gz"), emit: kfinal_contigs path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/meningotype/main.nf b/modules/meningotype/main.nf index c3b65b9d..24c30029 100644 --- a/modules/meningotype/main.nf +++ b/modules/meningotype/main.nf @@ -14,6 +14,9 @@ process MENINGOTYPE { tuple val(meta), path("*.tsv"), emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/metabat2/jgisummarizebamcontigdepths/main.nf b/modules/metabat2/jgisummarizebamcontigdepths/main.nf index 4a5869b6..7125eeb2 100644 --- a/modules/metabat2/jgisummarizebamcontigdepths/main.nf +++ b/modules/metabat2/jgisummarizebamcontigdepths/main.nf @@ -14,6 +14,9 @@ process METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS { tuple val(meta), path("*.txt.gz"), emit: depth path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/metabat2/metabat2/main.nf b/modules/metabat2/metabat2/main.nf index a8af0ae9..23ebe19a 100644 --- a/modules/metabat2/metabat2/main.nf +++ b/modules/metabat2/metabat2/main.nf @@ -18,6 +18,9 @@ process METABAT2_METABAT2 { tuple val(meta), path("bins/*.fa.gz") , optional:true , emit: fasta path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/metaphlan3/main.nf b/modules/metaphlan3/main.nf index 64965af3..3fc6b277 100644 --- a/modules/metaphlan3/main.nf +++ b/modules/metaphlan3/main.nf @@ -17,6 +17,9 @@ process METAPHLAN3 { tuple val(meta), path('*.bowtie2out.txt'), optional:true, emit: bt2out path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/methyldackel/extract/main.nf b/modules/methyldackel/extract/main.nf index a39c0305..b4242073 100644 --- a/modules/methyldackel/extract/main.nf +++ b/modules/methyldackel/extract/main.nf @@ -16,6 +16,9 @@ process METHYLDACKEL_EXTRACT { tuple val(meta), path("*.bedGraph"), emit: bedgraph path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/methyldackel/mbias/main.nf b/modules/methyldackel/mbias/main.nf index 021f76f1..755e62f8 100644 --- a/modules/methyldackel/mbias/main.nf +++ b/modules/methyldackel/mbias/main.nf @@ -16,6 +16,9 @@ process METHYLDACKEL_MBIAS { tuple val(meta), path("*.mbias.txt"), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/minia/main.nf b/modules/minia/main.nf index 968cafa5..87dd74f9 100644 --- a/modules/minia/main.nf +++ b/modules/minia/main.nf @@ -16,6 +16,9 @@ process MINIA { tuple val(meta), path('*.h5') , emit: h5 path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/miniasm/main.nf b/modules/miniasm/main.nf index b0db6925..f77b10f2 100644 --- a/modules/miniasm/main.nf +++ b/modules/miniasm/main.nf @@ -15,6 +15,9 @@ process MINIASM { tuple val(meta), path("*.fasta.gz"), emit: assembly path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/minimap2/align/main.nf b/modules/minimap2/align/main.nf index 500250e9..fe06f14d 100644 --- a/modules/minimap2/align/main.nf +++ b/modules/minimap2/align/main.nf @@ -15,6 +15,9 @@ process MINIMAP2_ALIGN { tuple val(meta), path("*.paf"), emit: paf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/minimap2/index/main.nf b/modules/minimap2/index/main.nf index 10cdd142..3dfeb861 100644 --- a/modules/minimap2/index/main.nf +++ b/modules/minimap2/index/main.nf @@ -13,6 +13,9 @@ process MINIMAP2_INDEX { path "*.mmi" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/mlst/main.nf b/modules/mlst/main.nf index b2983b82..65396548 100644 --- a/modules/mlst/main.nf +++ b/modules/mlst/main.nf @@ -14,6 +14,9 @@ process MLST { tuple val(meta), path("*.tsv"), emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/mosdepth/main.nf b/modules/mosdepth/main.nf index d2669b7e..cc7bc86b 100644 --- a/modules/mosdepth/main.nf +++ b/modules/mosdepth/main.nf @@ -22,6 +22,9 @@ process MOSDEPTH { tuple val(meta), path('*.regions.bed.gz.csi') , emit: regions_csi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/msisensor/msi/main.nf b/modules/msisensor/msi/main.nf index 398b34a6..954c5bec 100644 --- a/modules/msisensor/msi/main.nf +++ b/modules/msisensor/msi/main.nf @@ -17,6 +17,9 @@ process MSISENSOR_MSI { tuple val(meta), path("${prefix}_somatic") , emit: output_somatic path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/msisensor/scan/main.nf b/modules/msisensor/scan/main.nf index 223b4f44..399513ce 100644 --- a/modules/msisensor/scan/main.nf +++ b/modules/msisensor/scan/main.nf @@ -14,6 +14,9 @@ process MSISENSOR_SCAN { tuple val(meta), path("*.tab"), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/mtnucratio/main.nf b/modules/mtnucratio/main.nf index 83d6ea2b..cb8d27e3 100644 --- a/modules/mtnucratio/main.nf +++ b/modules/mtnucratio/main.nf @@ -16,6 +16,9 @@ process MTNUCRATIO { tuple val(meta), path("*.json") , emit: json path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/multiqc/main.nf b/modules/multiqc/main.nf index 3dceb162..0ff7cac1 100644 --- a/modules/multiqc/main.nf +++ b/modules/multiqc/main.nf @@ -15,6 +15,9 @@ process MULTIQC { path "*_plots" , optional:true, emit: plots path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/mummer/main.nf b/modules/mummer/main.nf index 39ad3e8b..1fe91404 100644 --- a/modules/mummer/main.nf +++ b/modules/mummer/main.nf @@ -16,6 +16,9 @@ process MUMMER { tuple val(meta), path("*.coords"), emit: coords path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/muscle/main.nf b/modules/muscle/main.nf index 6d549aaa..b2a1a131 100644 --- a/modules/muscle/main.nf +++ b/modules/muscle/main.nf @@ -21,6 +21,9 @@ process MUSCLE { path "*.log" , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/nanolyse/main.nf b/modules/nanolyse/main.nf index 0ad0f799..2b4f0928 100644 --- a/modules/nanolyse/main.nf +++ b/modules/nanolyse/main.nf @@ -16,6 +16,9 @@ process NANOLYSE { path "*.log" , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/nanoplot/main.nf b/modules/nanoplot/main.nf index c3fb8a37..083e2374 100644 --- a/modules/nanoplot/main.nf +++ b/modules/nanoplot/main.nf @@ -17,6 +17,9 @@ process NANOPLOT { tuple val(meta), path("*.log") , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def input_file = ("$ontfile".endsWith(".fastq.gz")) ? "--fastq ${ontfile}" : diff --git a/modules/ncbigenomedownload/main.nf b/modules/ncbigenomedownload/main.nf index 9897c861..60323dc8 100644 --- a/modules/ncbigenomedownload/main.nf +++ b/modules/ncbigenomedownload/main.nf @@ -27,6 +27,9 @@ process NCBIGENOMEDOWNLOAD { tuple val(meta), path("*_assembly_stats.txt") , emit: stats , optional: true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/nextclade/datasetget/main.nf b/modules/nextclade/datasetget/main.nf index 55371168..4dd82ee3 100644 --- a/modules/nextclade/datasetget/main.nf +++ b/modules/nextclade/datasetget/main.nf @@ -2,10 +2,10 @@ process NEXTCLADE_DATASETGET { tag "$dataset" label 'process_low' - conda (params.enable_conda ? "bioconda::nextclade=1.9.0" : null) + conda (params.enable_conda ? "bioconda::nextclade=1.10.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/nextclade:1.9.0--h9ee0642_0' : - 'quay.io/biocontainers/nextclade:1.9.0--h9ee0642_0' }" + 'https://depot.galaxyproject.org/singularity/nextclade:1.10.2--h9ee0642_0' : + 'quay.io/biocontainers/nextclade:1.10.2--h9ee0642_0' }" input: val dataset @@ -16,6 +16,9 @@ process NEXTCLADE_DATASETGET { path "$prefix" , emit: dataset path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${dataset}" diff --git a/modules/nextclade/run/main.nf b/modules/nextclade/run/main.nf index e29dd8ce..4d4bdb88 100644 --- a/modules/nextclade/run/main.nf +++ b/modules/nextclade/run/main.nf @@ -2,10 +2,10 @@ process NEXTCLADE_RUN { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::nextclade=1.9.0" : null) + conda (params.enable_conda ? "bioconda::nextclade=1.10.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/nextclade:1.9.0--h9ee0642_0' : - 'quay.io/biocontainers/nextclade:1.9.0--h9ee0642_0' }" + 'https://depot.galaxyproject.org/singularity/nextclade:1.10.2--h9ee0642_0' : + 'quay.io/biocontainers/nextclade:1.10.2--h9ee0642_0' }" input: tuple val(meta), path(fasta) @@ -18,6 +18,9 @@ process NEXTCLADE_RUN { tuple val(meta), path("${prefix}.tree.json"), emit: json_tree path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/ngmaster/main.nf b/modules/ngmaster/main.nf index 7d04031c..ef288e8f 100644 --- a/modules/ngmaster/main.nf +++ b/modules/ngmaster/main.nf @@ -14,6 +14,9 @@ process NGMASTER { tuple val(meta), path("*.tsv"), emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/nucmer/main.nf b/modules/nucmer/main.nf index 4e296515..5b70abd9 100644 --- a/modules/nucmer/main.nf +++ b/modules/nucmer/main.nf @@ -15,6 +15,9 @@ process NUCMER { tuple val(meta), path("*.coords"), emit: coords path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/optitype/main.nf b/modules/optitype/main.nf index d27f7f9f..984d4669 100644 --- a/modules/optitype/main.nf +++ b/modules/optitype/main.nf @@ -14,6 +14,9 @@ process OPTITYPE { tuple val(meta), path("${prefix}"), emit: output path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/pairix/main.nf b/modules/pairix/main.nf index c1b9658c..0b8c63c6 100644 --- a/modules/pairix/main.nf +++ b/modules/pairix/main.nf @@ -14,6 +14,9 @@ process PAIRIX { tuple val(meta), path(pair), path("*.px2"), emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/pairtools/dedup/main.nf b/modules/pairtools/dedup/main.nf index fe59e155..2c171e7a 100644 --- a/modules/pairtools/dedup/main.nf +++ b/modules/pairtools/dedup/main.nf @@ -15,6 +15,9 @@ process PAIRTOOLS_DEDUP { tuple val(meta), path("*.pairs.stat"), emit: stat path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/pairtools/flip/main.nf b/modules/pairtools/flip/main.nf index 376191ce..4959c4ee 100644 --- a/modules/pairtools/flip/main.nf +++ b/modules/pairtools/flip/main.nf @@ -15,6 +15,9 @@ process PAIRTOOLS_FLIP { tuple val(meta), path("*.flip.gz"), emit: flip path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/pairtools/parse/main.nf b/modules/pairtools/parse/main.nf index 7bd778c9..190346b1 100644 --- a/modules/pairtools/parse/main.nf +++ b/modules/pairtools/parse/main.nf @@ -16,6 +16,9 @@ process PAIRTOOLS_PARSE { tuple val(meta), path("*.pairsam.stat"), emit: stat path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/pairtools/restrict/main.nf b/modules/pairtools/restrict/main.nf index 8759f709..59e18648 100644 --- a/modules/pairtools/restrict/main.nf +++ b/modules/pairtools/restrict/main.nf @@ -15,6 +15,9 @@ process PAIRTOOLS_RESTRICT { tuple val(meta), path("*.pairs.gz"), emit: restrict path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/pairtools/select/main.nf b/modules/pairtools/select/main.nf index a6d62ba7..9d434884 100644 --- a/modules/pairtools/select/main.nf +++ b/modules/pairtools/select/main.nf @@ -15,6 +15,9 @@ process PAIRTOOLS_SELECT { tuple val(meta), path("*.unselected.pairs.gz"), emit: unselected path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/pairtools/sort/main.nf b/modules/pairtools/sort/main.nf index d5996dd0..15ed56d1 100644 --- a/modules/pairtools/sort/main.nf +++ b/modules/pairtools/sort/main.nf @@ -14,6 +14,9 @@ process PAIRTOOLS_SORT { tuple val(meta), path("*.pairs.gz"), emit: sorted path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/pangolin/main.nf b/modules/pangolin/main.nf index 40d6d78e..9fbc69b8 100644 --- a/modules/pangolin/main.nf +++ b/modules/pangolin/main.nf @@ -2,10 +2,10 @@ process PANGOLIN { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::pangolin=3.1.17' : null) + conda (params.enable_conda ? 'bioconda::pangolin=3.1.19' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pangolin:3.1.17--pyhdfd78af_0' : - 'quay.io/biocontainers/pangolin:3.1.17--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/pangolin:3.1.19--pyhdfd78af_0' : + 'quay.io/biocontainers/pangolin:3.1.19--pyhdfd78af_0' }" input: tuple val(meta), path(fasta) @@ -14,6 +14,9 @@ process PANGOLIN { tuple val(meta), path('*.csv'), emit: report path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/paraclu/main.nf b/modules/paraclu/main.nf index cc16674e..1dcc4f90 100644 --- a/modules/paraclu/main.nf +++ b/modules/paraclu/main.nf @@ -17,6 +17,9 @@ process PARACLU { tuple val(meta), path("*.bed"), emit: bed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/pbbam/pbmerge/main.nf b/modules/pbbam/pbmerge/main.nf index e0525cb1..aa0ca788 100644 --- a/modules/pbbam/pbmerge/main.nf +++ b/modules/pbbam/pbmerge/main.nf @@ -15,6 +15,9 @@ process PBBAM_PBMERGE { tuple val(meta), path("*.pbi"), emit: pbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/pbccs/main.nf b/modules/pbccs/main.nf index 440fbc72..5bfae1bf 100644 --- a/modules/pbccs/main.nf +++ b/modules/pbccs/main.nf @@ -20,6 +20,9 @@ process PBCCS { tuple val(meta), path("*.metrics.json.gz"), emit: metrics path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/peddy/main.nf b/modules/peddy/main.nf index d64c3762..50cdc698 100644 --- a/modules/peddy/main.nf +++ b/modules/peddy/main.nf @@ -15,9 +15,12 @@ process PEDDY { tuple val(meta), path("*.html") , emit: html tuple val(meta), path("*.csv") , emit: csv tuple val(meta), path("*.peddy.ped"), emit: ped - tuple val(meta), path("*.png") , emit: png + tuple val(meta), path("*.png") , optional: true, emit: png path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" @@ -34,4 +37,17 @@ process PEDDY { peddy: \$( peddy --version 2>&1 | sed 's/peddy, version //' ) END_VERSIONS """ + + stub: + """ + filename=\$(basename $vcf) + touch \$filename.ped_check.csv + touch \$filename.vs.html + touch \$filename.het_check.csv + touch \$filename.sex_check.csv + touch \$filename.peddy.ped + touch \$filename.html + + touch versions.yml + """ } diff --git a/modules/phantompeakqualtools/main.nf b/modules/phantompeakqualtools/main.nf index 6fe34cc2..c8325b05 100644 --- a/modules/phantompeakqualtools/main.nf +++ b/modules/phantompeakqualtools/main.nf @@ -18,6 +18,9 @@ process PHANTOMPEAKQUALTOOLS { tuple val(meta), path("*.Rdata"), emit: rdata path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/phyloflash/main.nf b/modules/phyloflash/main.nf index 9ebc40de..23c38d56 100644 --- a/modules/phyloflash/main.nf +++ b/modules/phyloflash/main.nf @@ -16,6 +16,9 @@ process PHYLOFLASH { tuple val(meta), path("${meta.id}*/*"), emit: results path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/picard/collecthsmetrics/main.nf b/modules/picard/collecthsmetrics/main.nf index ae3e4d96..07e8504f 100644 --- a/modules/picard/collecthsmetrics/main.nf +++ b/modules/picard/collecthsmetrics/main.nf @@ -18,6 +18,9 @@ process PICARD_COLLECTHSMETRICS { tuple val(meta), path("*collecthsmetrics.txt"), emit: hs_metrics path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/picard/collectmultiplemetrics/main.nf b/modules/picard/collectmultiplemetrics/main.nf index 9511f7a4..e023ea3c 100644 --- a/modules/picard/collectmultiplemetrics/main.nf +++ b/modules/picard/collectmultiplemetrics/main.nf @@ -16,6 +16,9 @@ process PICARD_COLLECTMULTIPLEMETRICS { tuple val(meta), path("*.pdf") , emit: pdf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index dd9da1b6..f4efaa4c 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -15,6 +15,9 @@ process PICARD_COLLECTWGSMETRICS { tuple val(meta), path("*_metrics"), emit: metrics path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/picard/filtersamreads/main.nf b/modules/picard/filtersamreads/main.nf index 6a9c9c72..ab75abfa 100644 --- a/modules/picard/filtersamreads/main.nf +++ b/modules/picard/filtersamreads/main.nf @@ -15,6 +15,9 @@ process PICARD_FILTERSAMREADS { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index 7990d7e6..5196b6ed 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -16,6 +16,9 @@ process PICARD_MARKDUPLICATES { tuple val(meta), path("*.metrics.txt"), emit: metrics path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/picard/mergesamfiles/main.nf b/modules/picard/mergesamfiles/main.nf index 96616a44..ef5c3980 100644 --- a/modules/picard/mergesamfiles/main.nf +++ b/modules/picard/mergesamfiles/main.nf @@ -14,6 +14,9 @@ process PICARD_MERGESAMFILES { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/picard/sortsam/main.nf b/modules/picard/sortsam/main.nf index 6676eed6..adec17cb 100644 --- a/modules/picard/sortsam/main.nf +++ b/modules/picard/sortsam/main.nf @@ -15,6 +15,9 @@ process PICARD_SORTSAM { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/pirate/main.nf b/modules/pirate/main.nf index c7d7476c..20544a1b 100644 --- a/modules/pirate/main.nf +++ b/modules/pirate/main.nf @@ -15,6 +15,9 @@ process PIRATE { tuple val(meta), path("results/core_alignment.fasta"), optional: true, emit: aln path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/plasmidid/main.nf b/modules/plasmidid/main.nf index 7404a678..7911d806 100644 --- a/modules/plasmidid/main.nf +++ b/modules/plasmidid/main.nf @@ -22,6 +22,9 @@ process PLASMIDID { tuple val(meta), path("${prefix}/kmer/") , emit: kmer path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/plink/extract/main.nf b/modules/plink/extract/main.nf index 688ada67..fa22b527 100644 --- a/modules/plink/extract/main.nf +++ b/modules/plink/extract/main.nf @@ -16,6 +16,9 @@ process PLINK_EXTRACT { tuple val(meta), path("*.fam"), emit: fam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/plink/vcf/main.nf b/modules/plink/vcf/main.nf index 719e90d2..0a69a021 100644 --- a/modules/plink/vcf/main.nf +++ b/modules/plink/vcf/main.nf @@ -17,6 +17,9 @@ process PLINK_VCF { path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/plink2/extract/main.nf b/modules/plink2/extract/main.nf new file mode 100644 index 00000000..89cffdc3 --- /dev/null +++ b/modules/plink2/extract/main.nf @@ -0,0 +1,40 @@ +process PLINK2_EXTRACT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::plink2=2.00a2.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/plink2:2.00a2.3--h712d239_1' : + 'quay.io/biocontainers/plink2:2.00a2.3--h712d239_1' }" + + input: + tuple val(meta), path(pgen), path(psam), path(pvar), path(variants) + + output: + tuple val(meta), path("*.pgen") , emit: extract_pgen + tuple val(meta), path("*.psam") , emit: extract_psam + tuple val(meta), path("*.pvar.zst"), emit: extract_pvar + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + if( "$pgen" == "${prefix}.pgen" ) error "Input and output names are the same, use \"task.ext.prefix\" in modules.config to disambiguate!" + """ + plink2 \\ + --pfile ${pgen.baseName} \\ + $args \\ + --threads $task.cpus \\ + --extract $variants \\ + --make-pgen vzs \\ + --out ${prefix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + plink2: \$(plink2 --version 2>&1 | sed 's/^PLINK v//; s/ 64.*\$//' ) + END_VERSIONS + """ +} diff --git a/modules/plink2/extract/meta.yml b/modules/plink2/extract/meta.yml new file mode 100644 index 00000000..2323dbc7 --- /dev/null +++ b/modules/plink2/extract/meta.yml @@ -0,0 +1,64 @@ +name: plink2_extract +description: Subset plink pfiles with a text file of variant identifiers +keywords: + - plink2 + - extract +tools: + - plink2: + description: | + Whole genome association analysis toolset, designed to perform a range + of basic, large-scale analyses in a computationally efficient manner + homepage: http://www.cog-genomics.org/plink/2.0/ + documentation: http://www.cog-genomics.org/plink/2.0/general_usage + tool_dev_url: None + doi: "10.1186/s13742-015-0047-8" + licence: ['GPL v3'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - pgen: + type: file + description: PLINK 2 binary genotype table + pattern: "*.{pgen}" + - psam: + type: file + description: PLINK 2 sample information file + pattern: "*.{psam}" + - pvar: + type: file + description: PLINK 2 variant information file + pattern: "*.{pvar}" + - variants: + type: file + description: A text file containing variant identifiers to keep (one per line) + pattern: "*.{keep}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - extract_pgen: + type: file + description: PLINK 2 binary genotype table, containing extracted variants + pattern: "*.{pgen}" + - extract_psam: + type: file + description: PLINK 2 sample information file associated with the extracted data + pattern: "*.{psam}" + - extract_pvar: + type: file + description: PLINK 2 variant information file, containing extracted variants + pattern: "*.{pvar.zst}" + +authors: + - "@nebfield" diff --git a/modules/plink2/vcf/main.nf b/modules/plink2/vcf/main.nf index 078ece1e..041cb4b9 100644 --- a/modules/plink2/vcf/main.nf +++ b/modules/plink2/vcf/main.nf @@ -16,6 +16,9 @@ process PLINK2_VCF { tuple val(meta), path("*.pvar"), emit: pvar path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/pmdtools/filter/main.nf b/modules/pmdtools/filter/main.nf index b647b6d3..2d9d6eb3 100644 --- a/modules/pmdtools/filter/main.nf +++ b/modules/pmdtools/filter/main.nf @@ -16,6 +16,9 @@ process PMDTOOLS_FILTER { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/porechop/main.nf b/modules/porechop/main.nf index f5ad93f8..65982b8b 100644 --- a/modules/porechop/main.nf +++ b/modules/porechop/main.nf @@ -14,6 +14,9 @@ process PORECHOP { tuple val(meta), path("*.fastq.gz"), emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/preseq/lcextrap/main.nf b/modules/preseq/lcextrap/main.nf index b5bd0620..d6dd19e2 100644 --- a/modules/preseq/lcextrap/main.nf +++ b/modules/preseq/lcextrap/main.nf @@ -16,6 +16,9 @@ process PRESEQ_LCEXTRAP { tuple val(meta), path("*.log") , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/prodigal/main.nf b/modules/prodigal/main.nf index 184b17bb..5768952b 100644 --- a/modules/prodigal/main.nf +++ b/modules/prodigal/main.nf @@ -2,27 +2,30 @@ process PRODIGAL { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::prodigal=2.6.3" : null) + conda (params.enable_conda ? "prodigal=2.6.3 pigz=2.6" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/prodigal:2.6.3--h516909a_2' : - 'quay.io/biocontainers/prodigal:2.6.3--h516909a_2' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-2e442ba7b07bfa102b9cf8fac6221263cd746ab8:57f05cfa73f769d6ed6d54144cb3aa2a6a6b17e0-0' : + 'quay.io/biocontainers/mulled-v2-2e442ba7b07bfa102b9cf8fac6221263cd746ab8:57f05cfa73f769d6ed6d54144cb3aa2a6a6b17e0-0' }" input: tuple val(meta), path(genome) val(output_format) output: - tuple val(meta), path("${prefix}.${output_format}"), emit: gene_annotations - tuple val(meta), path("${prefix}.fna"), emit: nucleotide_fasta - tuple val(meta), path("${prefix}.faa"), emit: amino_acid_fasta - tuple val(meta), path("${prefix}_all.txt"), emit: all_gene_annotations - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}.${output_format}"), emit: gene_annotations + tuple val(meta), path("${prefix}.fna"), emit: nucleotide_fasta + tuple val(meta), path("${prefix}.faa"), emit: amino_acid_fasta + tuple val(meta), path("${prefix}_all.txt"), emit: all_gene_annotations + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" """ - prodigal -i "${genome}" \\ + pigz -cdf ${genome} | prodigal \\ $args \\ -f $output_format \\ -d "${prefix}.fna" \\ @@ -33,6 +36,7 @@ process PRODIGAL { cat <<-END_VERSIONS > versions.yml "${task.process}": prodigal: \$(prodigal -v 2>&1 | sed -n 's/Prodigal V\\(.*\\):.*/\\1/p') + pigz: \$(pigz -V 2>&1 | sed 's/pigz //g') END_VERSIONS """ } diff --git a/modules/prodigal/meta.yml b/modules/prodigal/meta.yml index 5bcc4e77..3062ccce 100644 --- a/modules/prodigal/meta.yml +++ b/modules/prodigal/meta.yml @@ -5,10 +5,10 @@ keywords: tools: - prodigal: description: Prodigal (Prokaryotic Dynamic Programming Genefinding Algorithm) is a microbial (bacterial and archaeal) gene finding program - homepage: {} - documentation: {} + homepage: {https://github.com/hyattpd/Prodigal} + documentation: {https://github.com/hyattpd/prodigal/wiki} tool_dev_url: {} - doi: "" + doi: "10.1186/1471-2105-11-119" licence: ["GPL v3"] input: @@ -17,10 +17,12 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - bam: + - genome: type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: fasta/fasta.gz file + - output_format: + type: string + description: Output format ("gbk"/"gff"/"sqn"/"sco") output: - meta: @@ -32,10 +34,22 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - bam: + - nucleotide_fasta: type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: nucleotide sequences file + pattern: "*.{fna}" + - amino_acid_fasta: + type: file + description: protein translations file + pattern: "*.{faa}" + - all_gene_annotations: + type: file + description: complete starts file + pattern: "*.{_all.txt}" + - gene_annotations: + type: file + description: gene annotations in output_format given as input + pattern: "*.{output_format}" authors: - "@grst" diff --git a/modules/prokka/main.nf b/modules/prokka/main.nf index 551a17b9..3e46d1a1 100644 --- a/modules/prokka/main.nf +++ b/modules/prokka/main.nf @@ -27,6 +27,9 @@ process PROKKA { tuple val(meta), path("${prefix}/*.tsv"), emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/pycoqc/main.nf b/modules/pycoqc/main.nf index e966b31c..a5e6fcb2 100644 --- a/modules/pycoqc/main.nf +++ b/modules/pycoqc/main.nf @@ -15,6 +15,9 @@ process PYCOQC { path "*.json" , emit: json path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/pydamage/analyze/main.nf b/modules/pydamage/analyze/main.nf index c06c592c..39e01fa1 100644 --- a/modules/pydamage/analyze/main.nf +++ b/modules/pydamage/analyze/main.nf @@ -14,6 +14,9 @@ process PYDAMAGE_ANALYZE { tuple val(meta), path("pydamage_results/pydamage_results.csv"), emit: csv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/pydamage/filter/main.nf b/modules/pydamage/filter/main.nf index ab0b2115..a748875a 100644 --- a/modules/pydamage/filter/main.nf +++ b/modules/pydamage/filter/main.nf @@ -14,6 +14,9 @@ process PYDAMAGE_FILTER { tuple val(meta), path("pydamage_results/pydamage_filtered_results.csv"), emit: csv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/qcat/main.nf b/modules/qcat/main.nf index 7d81952d..4c75b003 100644 --- a/modules/qcat/main.nf +++ b/modules/qcat/main.nf @@ -15,6 +15,9 @@ process QCAT { tuple val(meta), path("fastq/*.fastq.gz"), emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/qualimap/bamqc/main.nf b/modules/qualimap/bamqc/main.nf index 973fd6a4..4bff0254 100644 --- a/modules/qualimap/bamqc/main.nf +++ b/modules/qualimap/bamqc/main.nf @@ -16,6 +16,9 @@ process QUALIMAP_BAMQC { tuple val(meta), path("${prefix}"), emit: results path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/qualimap/rnaseq/main.nf b/modules/qualimap/rnaseq/main.nf index d83fcd99..3b2f88ad 100644 --- a/modules/qualimap/rnaseq/main.nf +++ b/modules/qualimap/rnaseq/main.nf @@ -15,6 +15,9 @@ process QUALIMAP_RNASEQ { tuple val(meta), path("${prefix}"), emit: results path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/quast/main.nf b/modules/quast/main.nf index e88051b5..beb797d4 100644 --- a/modules/quast/main.nf +++ b/modules/quast/main.nf @@ -18,6 +18,9 @@ process QUAST { path '*.tsv' , emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: 'quast' diff --git a/modules/racon/main.nf b/modules/racon/main.nf index 9be5ce63..6f844896 100644 --- a/modules/racon/main.nf +++ b/modules/racon/main.nf @@ -14,6 +14,9 @@ process RACON { tuple val(meta), path('*_assembly_consensus.fasta.gz') , emit: improved_assembly path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/rapidnj/main.nf b/modules/rapidnj/main.nf index 04a08227..952bae4c 100644 --- a/modules/rapidnj/main.nf +++ b/modules/rapidnj/main.nf @@ -16,6 +16,9 @@ process RAPIDNJ { path "*.tre" , emit: phylogeny path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/rasusa/main.nf b/modules/rasusa/main.nf index c2893d18..47c8ece6 100644 --- a/modules/rasusa/main.nf +++ b/modules/rasusa/main.nf @@ -15,6 +15,9 @@ process RASUSA { tuple val(meta), path('*.fastq.gz'), emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/raven/main.nf b/modules/raven/main.nf new file mode 100644 index 00000000..8bcf6bb1 --- /dev/null +++ b/modules/raven/main.nf @@ -0,0 +1,42 @@ +process RAVEN { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::raven-assembler=1.6.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/raven-assembler:1.6.1--h2e03b76_0' : + 'quay.io/biocontainers/raven-assembler:1.6.1--h2e03b76_0' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*.fasta.gz"), emit: fasta + tuple val(meta), path("*.gfa.gz") , emit: gfa + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + # run tool + raven \\ + -t $task.cpus \\ + --graphical-fragment-assembly ${prefix}.gfa \\ + $args \\ + $reads | \\ + gzip -c > ${prefix}.fasta.gz + + # compress assembly graph + gzip -c ${prefix}.gfa > ${prefix}.gfa.gz + + # get tool version + cat <<-END_VERSIONS > versions.yml + "${task.process}": + raven: \$( raven --version ) + END_VERSIONS + """ +} diff --git a/modules/raven/meta.yml b/modules/raven/meta.yml new file mode 100644 index 00000000..644907a9 --- /dev/null +++ b/modules/raven/meta.yml @@ -0,0 +1,47 @@ +name: raven +description: De novo genome assembler for long uncorrected reads. +keywords: + - de novo + - assembly + - genome + - genome assembler + - long uncorrected reads +tools: + - raven: + description: Raven is a de novo genome assembler for long uncorrected reads. + homepage: https://github.com/lbcb-sci/raven + documentation: https://github.com/lbcb-sci/raven#usage + tool_dev_url: https://github.com/lbcb-sci/raven + doi: doi.org/10.1038/s43588-021-00073-4 + licence: ['MIT'] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', suffix:'bacteria' ] + - reads: + type: file + description: Input file in FASTA/FASTQ format. + pattern: "*.{fasta,fastq,fasta.gz,fastq.gz,fa,fq,fa.gz,fq.gz}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', suffix:'bacteria' ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - fasta: + type: file + description: Assembled FASTA file + pattern: "*.fasta.gz" + - gfa: + type: file + description: Repeat graph + pattern: "*.gfa.gz" + +authors: + - "@fmalmeida" diff --git a/modules/raxmlng/main.nf b/modules/raxmlng/main.nf index 62b6c78a..e872a4e6 100644 --- a/modules/raxmlng/main.nf +++ b/modules/raxmlng/main.nf @@ -14,6 +14,9 @@ process RAXMLNG { path "*.raxml.support" , optional:true, emit: phylogeny_bootstrapped path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/rmarkdownnotebook/main.nf b/modules/rmarkdownnotebook/main.nf index 18d8e150..336b0af0 100644 --- a/modules/rmarkdownnotebook/main.nf +++ b/modules/rmarkdownnotebook/main.nf @@ -23,6 +23,9 @@ process RMARKDOWNNOTEBOOK { tuple val(meta), path ("session_info.log"), emit: session_info path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/roary/main.nf b/modules/roary/main.nf index edda3281..fabb3234 100644 --- a/modules/roary/main.nf +++ b/modules/roary/main.nf @@ -15,6 +15,9 @@ process ROARY { tuple val(meta), path("results/*.aln"), optional: true, emit: aln path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/rsem/calculateexpression/main.nf b/modules/rsem/calculateexpression/main.nf index 4b2ada47..cf147a63 100644 --- a/modules/rsem/calculateexpression/main.nf +++ b/modules/rsem/calculateexpression/main.nf @@ -22,6 +22,9 @@ process RSEM_CALCULATEEXPRESSION { tuple val(meta), path("${prefix}.genome.bam") , optional:true, emit: bam_genome tuple val(meta), path("${prefix}.transcript.bam"), optional:true, emit: bam_transcript + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/rsem/preparereference/main.nf b/modules/rsem/preparereference/main.nf index a5b8922a..2d2ca205 100644 --- a/modules/rsem/preparereference/main.nf +++ b/modules/rsem/preparereference/main.nf @@ -16,6 +16,9 @@ process RSEM_PREPAREREFERENCE { path "*transcripts.fa", emit: transcript_fasta path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/rseqc/bamstat/main.nf b/modules/rseqc/bamstat/main.nf index 1141a13f..958221fd 100644 --- a/modules/rseqc/bamstat/main.nf +++ b/modules/rseqc/bamstat/main.nf @@ -14,6 +14,9 @@ process RSEQC_BAMSTAT { tuple val(meta), path("*.bam_stat.txt"), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/rseqc/inferexperiment/main.nf b/modules/rseqc/inferexperiment/main.nf index 2243c43e..23c1b688 100644 --- a/modules/rseqc/inferexperiment/main.nf +++ b/modules/rseqc/inferexperiment/main.nf @@ -15,6 +15,9 @@ process RSEQC_INFEREXPERIMENT { tuple val(meta), path("*.infer_experiment.txt"), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/rseqc/innerdistance/main.nf b/modules/rseqc/innerdistance/main.nf index 425737d6..b05661de 100644 --- a/modules/rseqc/innerdistance/main.nf +++ b/modules/rseqc/innerdistance/main.nf @@ -19,6 +19,9 @@ process RSEQC_INNERDISTANCE { tuple val(meta), path("*.r") , optional:true, emit: rscript path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/rseqc/junctionannotation/main.nf b/modules/rseqc/junctionannotation/main.nf index d2562e5c..c3401dc5 100644 --- a/modules/rseqc/junctionannotation/main.nf +++ b/modules/rseqc/junctionannotation/main.nf @@ -21,6 +21,9 @@ process RSEQC_JUNCTIONANNOTATION { tuple val(meta), path("*events.pdf") , optional:true, emit: events_pdf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/rseqc/junctionsaturation/main.nf b/modules/rseqc/junctionsaturation/main.nf index 695762b5..11b62904 100644 --- a/modules/rseqc/junctionsaturation/main.nf +++ b/modules/rseqc/junctionsaturation/main.nf @@ -16,6 +16,9 @@ process RSEQC_JUNCTIONSATURATION { tuple val(meta), path("*.r") , emit: rscript path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/rseqc/readdistribution/main.nf b/modules/rseqc/readdistribution/main.nf index 333193e3..3198c5c6 100644 --- a/modules/rseqc/readdistribution/main.nf +++ b/modules/rseqc/readdistribution/main.nf @@ -15,6 +15,9 @@ process RSEQC_READDISTRIBUTION { tuple val(meta), path("*.read_distribution.txt"), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/rseqc/readduplication/main.nf b/modules/rseqc/readduplication/main.nf index 134f2e8d..cb989a5f 100644 --- a/modules/rseqc/readduplication/main.nf +++ b/modules/rseqc/readduplication/main.nf @@ -17,6 +17,9 @@ process RSEQC_READDUPLICATION { tuple val(meta), path("*.r") , emit: rscript path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/rseqc/tin/main.nf b/modules/rseqc/tin/main.nf index b7bff0f3..da58fc06 100644 --- a/modules/rseqc/tin/main.nf +++ b/modules/rseqc/tin/main.nf @@ -16,6 +16,9 @@ process RSEQC_TIN { tuple val(meta), path("*.xls"), emit: xls path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/salmon/index/main.nf b/modules/salmon/index/main.nf index b0a2f973..737087f9 100644 --- a/modules/salmon/index/main.nf +++ b/modules/salmon/index/main.nf @@ -15,6 +15,9 @@ process SALMON_INDEX { path "salmon" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def get_decoy_ids = "grep '^>' $genome_fasta | cut -d ' ' -f 1 > decoys.txt" diff --git a/modules/salmon/quant/main.nf b/modules/salmon/quant/main.nf index 6cae4f72..bd4792c5 100644 --- a/modules/salmon/quant/main.nf +++ b/modules/salmon/quant/main.nf @@ -19,6 +19,9 @@ process SALMON_QUANT { tuple val(meta), path("${prefix}"), emit: results path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/samblaster/main.nf b/modules/samblaster/main.nf index 4627b978..c881389a 100644 --- a/modules/samblaster/main.nf +++ b/modules/samblaster/main.nf @@ -14,6 +14,9 @@ process SAMBLASTER { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/samtools/ampliconclip/main.nf b/modules/samtools/ampliconclip/main.nf index e553f218..69c2ff7b 100644 --- a/modules/samtools/ampliconclip/main.nf +++ b/modules/samtools/ampliconclip/main.nf @@ -19,6 +19,9 @@ process SAMTOOLS_AMPLICONCLIP { tuple val(meta), path("*.cliprejects.bam"), optional:true, emit: rejects_bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/samtools/bam2fq/main.nf b/modules/samtools/bam2fq/main.nf index 32588dd7..4b78a46e 100644 --- a/modules/samtools/bam2fq/main.nf +++ b/modules/samtools/bam2fq/main.nf @@ -15,6 +15,9 @@ process SAMTOOLS_BAM2FQ { tuple val(meta), path("*.fq.gz"), emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/samtools/depth/main.nf b/modules/samtools/depth/main.nf index 50b2ed5d..d68c5adf 100644 --- a/modules/samtools/depth/main.nf +++ b/modules/samtools/depth/main.nf @@ -14,6 +14,9 @@ process SAMTOOLS_DEPTH { tuple val(meta), path("*.tsv"), emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/samtools/faidx/main.nf b/modules/samtools/faidx/main.nf index 58c445d8..b83a4952 100644 --- a/modules/samtools/faidx/main.nf +++ b/modules/samtools/faidx/main.nf @@ -14,6 +14,9 @@ process SAMTOOLS_FAIDX { tuple val(meta), path ("*.fai"), emit: fai path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/samtools/fastq/main.nf b/modules/samtools/fastq/main.nf index a2dae087..7eb60117 100644 --- a/modules/samtools/fastq/main.nf +++ b/modules/samtools/fastq/main.nf @@ -14,6 +14,9 @@ process SAMTOOLS_FASTQ { tuple val(meta), path("*.fastq.gz"), emit: fastq path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/samtools/fixmate/main.nf b/modules/samtools/fixmate/main.nf index 89ac666d..c1a8164b 100644 --- a/modules/samtools/fixmate/main.nf +++ b/modules/samtools/fixmate/main.nf @@ -14,6 +14,9 @@ process SAMTOOLS_FIXMATE { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/samtools/flagstat/main.nf b/modules/samtools/flagstat/main.nf index 119adf77..c267922b 100644 --- a/modules/samtools/flagstat/main.nf +++ b/modules/samtools/flagstat/main.nf @@ -14,6 +14,9 @@ process SAMTOOLS_FLAGSTAT { tuple val(meta), path("*.flagstat"), emit: flagstat path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/samtools/idxstats/main.nf b/modules/samtools/idxstats/main.nf index fc54e676..8a057413 100644 --- a/modules/samtools/idxstats/main.nf +++ b/modules/samtools/idxstats/main.nf @@ -14,6 +14,9 @@ process SAMTOOLS_IDXSTATS { tuple val(meta), path("*.idxstats"), emit: idxstats path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/samtools/index/main.nf b/modules/samtools/index/main.nf index c4fa2c63..dfe0234f 100644 --- a/modules/samtools/index/main.nf +++ b/modules/samtools/index/main.nf @@ -16,6 +16,9 @@ process SAMTOOLS_INDEX { tuple val(meta), path("*.crai"), optional:true, emit: crai path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/samtools/merge/main.nf b/modules/samtools/merge/main.nf index a318bfc4..be6fe32e 100644 --- a/modules/samtools/merge/main.nf +++ b/modules/samtools/merge/main.nf @@ -16,6 +16,9 @@ process SAMTOOLS_MERGE { tuple val(meta), path("${prefix}.cram"), optional:true, emit: cram path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/samtools/mpileup/main.nf b/modules/samtools/mpileup/main.nf index c40f46d1..77afae60 100644 --- a/modules/samtools/mpileup/main.nf +++ b/modules/samtools/mpileup/main.nf @@ -15,6 +15,9 @@ process SAMTOOLS_MPILEUP { tuple val(meta), path("*.mpileup"), emit: mpileup path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/samtools/sort/main.nf b/modules/samtools/sort/main.nf index 42c7bbf4..0f2237cc 100644 --- a/modules/samtools/sort/main.nf +++ b/modules/samtools/sort/main.nf @@ -14,6 +14,9 @@ process SAMTOOLS_SORT { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/samtools/stats/main.nf b/modules/samtools/stats/main.nf index 7209070d..f6fe3bfe 100644 --- a/modules/samtools/stats/main.nf +++ b/modules/samtools/stats/main.nf @@ -15,6 +15,9 @@ process SAMTOOLS_STATS { tuple val(meta), path("*.stats"), emit: stats path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def reference = fasta ? "--reference ${fasta}" : "" diff --git a/modules/samtools/view/main.nf b/modules/samtools/view/main.nf index cb205d0b..aee21a4e 100644 --- a/modules/samtools/view/main.nf +++ b/modules/samtools/view/main.nf @@ -16,6 +16,9 @@ process SAMTOOLS_VIEW { tuple val(meta), path("*.cram"), emit: cram, optional: true path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/scoary/main.nf b/modules/scoary/main.nf index ca33041d..cfa58ab2 100644 --- a/modules/scoary/main.nf +++ b/modules/scoary/main.nf @@ -15,6 +15,9 @@ process SCOARY { tuple val(meta), path("*.csv"), emit: csv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/seacr/callpeak/main.nf b/modules/seacr/callpeak/main.nf index 12b9205f..340c0eef 100644 --- a/modules/seacr/callpeak/main.nf +++ b/modules/seacr/callpeak/main.nf @@ -17,6 +17,9 @@ process SEACR_CALLPEAK { tuple val(meta), path("*.bed"), emit: bed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/seqkit/split2/main.nf b/modules/seqkit/split2/main.nf index 5bed1dae..ff91d86b 100644 --- a/modules/seqkit/split2/main.nf +++ b/modules/seqkit/split2/main.nf @@ -14,6 +14,9 @@ process SEQKIT_SPLIT2 { tuple val(meta), path("**/*.gz"), emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/seqsero2/main.nf b/modules/seqsero2/main.nf index 0a7aa6ad..a5393cf6 100644 --- a/modules/seqsero2/main.nf +++ b/modules/seqsero2/main.nf @@ -16,6 +16,9 @@ process SEQSERO2 { tuple val(meta), path("results/*_result.txt"), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/seqtk/mergepe/main.nf b/modules/seqtk/mergepe/main.nf index 299c9ea4..519a4ab9 100644 --- a/modules/seqtk/mergepe/main.nf +++ b/modules/seqtk/mergepe/main.nf @@ -14,6 +14,9 @@ process SEQTK_MERGEPE { tuple val(meta), path("*.fastq.gz"), emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/seqtk/sample/main.nf b/modules/seqtk/sample/main.nf index 96e08fd4..a9a89370 100644 --- a/modules/seqtk/sample/main.nf +++ b/modules/seqtk/sample/main.nf @@ -15,6 +15,9 @@ process SEQTK_SAMPLE { tuple val(meta), path("*.fastq.gz"), emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/seqtk/subseq/main.nf b/modules/seqtk/subseq/main.nf index abfe4faa..9dd58686 100644 --- a/modules/seqtk/subseq/main.nf +++ b/modules/seqtk/subseq/main.nf @@ -15,6 +15,9 @@ process SEQTK_SUBSEQ { path "*.gz" , emit: sequences path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: '' diff --git a/modules/sequenzautils/bam2seqz/main.nf b/modules/sequenzautils/bam2seqz/main.nf index ce9d1962..f150e0bd 100644 --- a/modules/sequenzautils/bam2seqz/main.nf +++ b/modules/sequenzautils/bam2seqz/main.nf @@ -16,6 +16,9 @@ process SEQUENZAUTILS_BAM2SEQZ { tuple val(meta), path("*.gz"), emit: seqz path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/sequenzautils/gcwiggle/main.nf b/modules/sequenzautils/gcwiggle/main.nf index a6fcb559..23cc75b6 100644 --- a/modules/sequenzautils/gcwiggle/main.nf +++ b/modules/sequenzautils/gcwiggle/main.nf @@ -14,6 +14,9 @@ process SEQUENZAUTILS_GCWIGGLE { tuple val(meta), path("*.wig.gz"), emit: wig path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/seqwish/induce/main.nf b/modules/seqwish/induce/main.nf index 6d6b33e7..529629ac 100644 --- a/modules/seqwish/induce/main.nf +++ b/modules/seqwish/induce/main.nf @@ -17,6 +17,9 @@ process SEQWISH_INDUCE { tuple val(meta), path("*.gfa"), emit: gfa path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/shovill/main.nf b/modules/shovill/main.nf index 1a56df27..20a4548f 100644 --- a/modules/shovill/main.nf +++ b/modules/shovill/main.nf @@ -18,6 +18,9 @@ process SHOVILL { tuple val(meta), path("contigs.{fastg,gfa,LastGraph}") , optional:true, emit: gfa path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def memory = task.memory.toGiga() diff --git a/modules/snpdists/main.nf b/modules/snpdists/main.nf index c8d61161..29febc68 100644 --- a/modules/snpdists/main.nf +++ b/modules/snpdists/main.nf @@ -14,6 +14,9 @@ process SNPDISTS { tuple val(meta), path("*.tsv"), emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/snpeff/main.nf b/modules/snpeff/main.nf index 6248fee3..1b4d5f43 100644 --- a/modules/snpeff/main.nf +++ b/modules/snpeff/main.nf @@ -17,6 +17,9 @@ process SNPEFF { path "*.csv" , emit: report path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def avail_mem = 6 diff --git a/modules/snpsift/split/main.nf b/modules/snpsift/split/main.nf index a83052ad..8531b4cb 100644 --- a/modules/snpsift/split/main.nf +++ b/modules/snpsift/split/main.nf @@ -14,6 +14,9 @@ process SNPSIFT_SPLIT { tuple val(meta), path("*.vcf"), emit: out_vcfs path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/snpsites/main.nf b/modules/snpsites/main.nf index 60e694ac..33b1a2c9 100644 --- a/modules/snpsites/main.nf +++ b/modules/snpsites/main.nf @@ -15,6 +15,9 @@ process SNPSITES { path "versions.yml" , emit: versions env CONSTANT_SITES, emit: constant_sites_string + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/sortmerna/main.nf b/modules/sortmerna/main.nf index 5c0950d8..419d2914 100644 --- a/modules/sortmerna/main.nf +++ b/modules/sortmerna/main.nf @@ -16,6 +16,9 @@ process SORTMERNA { tuple val(meta), path("*.log") , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/spades/main.nf b/modules/spades/main.nf index ba690d35..b7ece6f6 100644 --- a/modules/spades/main.nf +++ b/modules/spades/main.nf @@ -20,6 +20,9 @@ process SPADES { tuple val(meta), path('*.log') , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/spatyper/main.nf b/modules/spatyper/main.nf index d04fd265..2a116f09 100644 --- a/modules/spatyper/main.nf +++ b/modules/spatyper/main.nf @@ -16,6 +16,9 @@ process SPATYPER { tuple val(meta), path("*.tsv"), emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/sratools/fasterqdump/main.nf b/modules/sratools/fasterqdump/main.nf index 73e3673d..1980ffeb 100644 --- a/modules/sratools/fasterqdump/main.nf +++ b/modules/sratools/fasterqdump/main.nf @@ -14,6 +14,9 @@ process SRATOOLS_FASTERQDUMP { tuple val(meta), path(output), emit: reads path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/sratools/prefetch/main.nf b/modules/sratools/prefetch/main.nf index 1e1eb802..2233d0aa 100644 --- a/modules/sratools/prefetch/main.nf +++ b/modules/sratools/prefetch/main.nf @@ -15,6 +15,9 @@ process SRATOOLS_PREFETCH { tuple val(meta), path("$id"), emit: sra path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def config = "/LIBS/GUID = \"${UUID.randomUUID().toString()}\"\\n/libs/cloud/report_instance_identity = \"true\"\\n" diff --git a/modules/staphopiasccmec/main.nf b/modules/staphopiasccmec/main.nf index dbb61a27..dd173c2f 100644 --- a/modules/staphopiasccmec/main.nf +++ b/modules/staphopiasccmec/main.nf @@ -14,6 +14,9 @@ process STAPHOPIASCCMEC { tuple val(meta), path("*.tsv"), emit: tsv path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/star/align/main.nf b/modules/star/align/main.nf index 9725496f..7c965d07 100644 --- a/modules/star/align/main.nf +++ b/modules/star/align/main.nf @@ -30,6 +30,9 @@ process STAR_ALIGN { tuple val(meta), path('*.tab') , optional:true, emit: tab tuple val(meta), path('*.out.junction') , optional:true, emit: junction + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/star/genomegenerate/main.nf b/modules/star/genomegenerate/main.nf index ad32c0dd..50d280dd 100644 --- a/modules/star/genomegenerate/main.nf +++ b/modules/star/genomegenerate/main.nf @@ -16,6 +16,9 @@ process STAR_GENOMEGENERATE { path "star" , emit: index path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args_list = args.tokenize() diff --git a/modules/strelka/germline/main.nf b/modules/strelka/germline/main.nf index 324be6df..1ce0da31 100644 --- a/modules/strelka/germline/main.nf +++ b/modules/strelka/germline/main.nf @@ -21,6 +21,9 @@ process STRELKA_GERMLINE { tuple val(meta), path("*genome.vcf.gz.tbi") , emit: genome_vcf_tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/strelka/somatic/main.nf b/modules/strelka/somatic/main.nf index a9766d01..22cce8cb 100644 --- a/modules/strelka/somatic/main.nf +++ b/modules/strelka/somatic/main.nf @@ -21,6 +21,9 @@ process STRELKA_SOMATIC { tuple val(meta), path("*.somatic_snvs.vcf.gz.tbi") , emit: vcf_snvs_tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/stringtie/merge/main.nf b/modules/stringtie/merge/main.nf index 756dc6ec..aa11eb36 100644 --- a/modules/stringtie/merge/main.nf +++ b/modules/stringtie/merge/main.nf @@ -15,6 +15,9 @@ process STRINGTIE_MERGE { path "stringtie.merged.gtf", emit: gtf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/stringtie/stringtie/main.nf b/modules/stringtie/stringtie/main.nf index 9d62a966..f37e347a 100644 --- a/modules/stringtie/stringtie/main.nf +++ b/modules/stringtie/stringtie/main.nf @@ -18,6 +18,9 @@ process STRINGTIE { tuple val(meta), path("*.ballgown") , emit: ballgown path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/subread/featurecounts/main.nf b/modules/subread/featurecounts/main.nf index 53eb279e..18e2a92b 100644 --- a/modules/subread/featurecounts/main.nf +++ b/modules/subread/featurecounts/main.nf @@ -15,6 +15,9 @@ process SUBREAD_FEATURECOUNTS { tuple val(meta), path("*featureCounts.txt.summary"), emit: summary path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/svdb/merge/main.nf b/modules/svdb/merge/main.nf new file mode 100644 index 00000000..1f479ea4 --- /dev/null +++ b/modules/svdb/merge/main.nf @@ -0,0 +1,52 @@ +process SVDB_MERGE { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::svdb=2.5.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/svdb:2.5.0--py39hcbe4a3b_0': + 'quay.io/biocontainers/svdb:2.5.0--py39hcbe4a3b_0' }" + + input: + tuple val(meta), path(vcfs) + val (priority) + + output: + tuple val(meta), path("*_sv_merge.vcf"), emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def input = "" + for (int index = 0; index < vcfs.size(); index++) { + input += " ${vcfs[index]}:${priority[index]}" + } + """ + svdb \\ + --merge \\ + $args \\ + --priority ${priority.join(',')} \\ + --vcf $input \\ + > ${prefix}_sv_merge.vcf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + svdb: \$( echo \$(svdb) | head -1 | sed 's/usage: SVDB-\\([0-9]\\.[0-9]\\.[0-9]\\).*/\\1/' ) + END_VERSIONS + """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}_sv_merge.vcf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + svdb: \$( echo \$(svdb) | head -1 | sed 's/usage: SVDB-\\([0-9]\\.[0-9]\\.[0-9]\\).*/\\1/' ) + END_VERSIONS + """ +} diff --git a/modules/svdb/merge/meta.yml b/modules/svdb/merge/meta.yml new file mode 100644 index 00000000..2092ddd9 --- /dev/null +++ b/modules/svdb/merge/meta.yml @@ -0,0 +1,39 @@ +name: svdb_merge +description: The merge module merges structural variants within one or more vcf files. +keywords: + - structural variants +tools: + - svdb: + description: structural variant database software + homepage: https://github.com/J35P312/SVDB + documentation: https://github.com/J35P312/SVDB/blob/master/README.md + licence: ['MIT'] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - priority: + type: list + description: prioritise the input vcf files according to this list, e.g ['tiddit','cnvnator'] + - vcfs: + type: list + description: Two or more VCF files. Order of files should correspond to the order of tags used for priority. + pattern: "*.{vcf,vcf.gz}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - vcf: + type: file + description: merged VCF file + pattern: "*_sv_merge.vcf" +authors: + - "@ramprasadn" diff --git a/modules/svdb/query/main.nf b/modules/svdb/query/main.nf new file mode 100644 index 00000000..292fe4ce --- /dev/null +++ b/modules/svdb/query/main.nf @@ -0,0 +1,37 @@ +process SVDB_QUERY { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::svdb=2.5.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/svdb:2.5.0--py39hcbe4a3b_0': + 'quay.io/biocontainers/svdb:2.5.0--py39hcbe4a3b_0' }" + + input: + tuple val(meta), path(vcf) + path (vcf_db) + + output: + tuple val(meta), path("*_ann_svdbq.vcf"), emit: vcf + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + svdb \\ + --query \\ + $args \\ + --db $vcf_db \\ + --query_vcf $vcf \\ + >${prefix}_ann_svdbq.vcf + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + svdb: \$( echo \$(svdb) | head -1 | sed 's/usage: SVDB-\\([0-9]\\.[0-9]\\.[0-9]\\).*/\\1/' ) + END_VERSIONS + """ +} diff --git a/modules/svdb/query/meta.yml b/modules/svdb/query/meta.yml new file mode 100644 index 00000000..264b1904 --- /dev/null +++ b/modules/svdb/query/meta.yml @@ -0,0 +1,43 @@ +name: svdb_query +description: Query a structural variant database, using a vcf file as query +keywords: + - structural variants +tools: + - svdb: + description: structural variant database software + homepage: https://github.com/J35P312/SVDB + documentation: https://github.com/J35P312/SVDB/blob/master/README.md + licence: ['MIT'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: query vcf file + pattern: "*.{vcf,vcf.gz}" + - vcf_db: + type: file + description: database vcf file + pattern: "*.{vcf,vcf.gz}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - vcf: + type: file + description: Annotated output VCF file + pattern: "*_ann_svdbq.vcf" + +authors: + - "@ramprasadn" diff --git a/modules/tabix/bgzip/main.nf b/modules/tabix/bgzip/main.nf index ed9362b2..90940a5d 100644 --- a/modules/tabix/bgzip/main.nf +++ b/modules/tabix/bgzip/main.nf @@ -14,6 +14,9 @@ process TABIX_BGZIP { tuple val(meta), path("*.gz"), emit: gz path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/tabix/bgziptabix/main.nf b/modules/tabix/bgziptabix/main.nf index e419d153..3f42ad21 100644 --- a/modules/tabix/bgziptabix/main.nf +++ b/modules/tabix/bgziptabix/main.nf @@ -14,6 +14,9 @@ process TABIX_BGZIPTABIX { tuple val(meta), path("*.gz"), path("*.tbi"), emit: gz_tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/tabix/tabix/main.nf b/modules/tabix/tabix/main.nf index c721a554..5f516261 100644 --- a/modules/tabix/tabix/main.nf +++ b/modules/tabix/tabix/main.nf @@ -14,6 +14,9 @@ process TABIX_TABIX { tuple val(meta), path("*.tbi"), emit: tbi path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' """ diff --git a/modules/tbprofiler/profile/main.nf b/modules/tbprofiler/profile/main.nf index 87175a39..17c94a34 100644 --- a/modules/tbprofiler/profile/main.nf +++ b/modules/tbprofiler/profile/main.nf @@ -18,6 +18,9 @@ process TBPROFILER_PROFILE { tuple val(meta), path("vcf/*.vcf.gz") , emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/tiddit/cov/main.nf b/modules/tiddit/cov/main.nf index c5a1ca0f..a5f8c649 100644 --- a/modules/tiddit/cov/main.nf +++ b/modules/tiddit/cov/main.nf @@ -16,6 +16,9 @@ process TIDDIT_COV { tuple val(meta), path("*.wig"), optional: true, emit: wig path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index 08eecc01..454dfc54 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -18,6 +18,9 @@ process TIDDIT_SV { tuple val(meta), path("*.signals.tab"), emit: signals path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/transdecoder/longorf/main.nf b/modules/transdecoder/longorf/main.nf new file mode 100644 index 00000000..9d5c20f2 --- /dev/null +++ b/modules/transdecoder/longorf/main.nf @@ -0,0 +1,40 @@ +process TRANSDECODER_LONGORF { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::transdecoder=5.5.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/transdecoder:5.5.0--pl5262hdfd78af_4' : + 'quay.io/comp-bio-aging/transdecoder' }" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("${meta.id}/*.pep") , emit: pep + tuple val(meta), path("${meta.id}/*.gff3"), emit: gff3 + tuple val(meta), path("${meta.id}/*.cds") , emit: cds + tuple val(meta), path("${meta.id}/*.dat") , emit: dat + path("${meta.id}/") , emit: folder + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + TransDecoder.LongOrfs \\ + $args \\ + -O $prefix \\ + -t \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + transdecoder: \$(echo \$(TransDecoder.LongOrfs --version) | sed -e "s/TransDecoder.LongOrfs //g") + END_VERSIONS + """ +} diff --git a/modules/transdecoder/longorf/meta.yml b/modules/transdecoder/longorf/meta.yml new file mode 100644 index 00000000..d4749f4b --- /dev/null +++ b/modules/transdecoder/longorf/meta.yml @@ -0,0 +1,57 @@ +name: transdecoder_longorf +description: TransDecoder itentifies candidate coding regions within transcript sequences. it is used to build gff file. +keywords: + - eucaryotes + - gff +tools: + - transdecoder: + description: TransDecoder identifies candidate coding regions within transcript sequences, such as those generated by de novo RNA-Seq transcript assembly using Trinity, or constructed based on RNA-Seq alignments to the genome using Tophat and Cufflinks. + homepage: https://github.com/TransDecoder + documentation: https://github.com/TransDecoder/TransDecoder/wiki + tool_dev_url: https://github.com/TransDecoder/TransDecoder + doi: "" + licence: ['Broad Institute'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: fasta file + pattern: "*.{fasta}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - pep: + type: Amino acids fasta file + description: all ORFs meeting the minimum length criteria, regardless of coding potential. file + pattern: "*.{pep}" + - gff3: + type: gff file + description: positions of all ORFs as found in the target transcripts. file + pattern: "*.{gff3}" + - cds: + type: fasta file + description: the nucleotide coding sequence for all detected ORFs. file + pattern: "*{cds}" + - dat: + type: tsv file + description: nucleotide frequencies + pattern: "*{dat}" + - folder: + type: folder + description: contains all the files from the run + +authors: + - "@Danilo2771" diff --git a/modules/transdecoder/predict/main.nf b/modules/transdecoder/predict/main.nf new file mode 100644 index 00000000..dccc031c --- /dev/null +++ b/modules/transdecoder/predict/main.nf @@ -0,0 +1,40 @@ +process TRANSDECODER_PREDICT { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::transdecoder=5.5.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/transdecoder:5.5.0--pl5262hdfd78af_4': + 'quay.io/comp-bio-aging/transdecoder' }" + + input: + tuple val(meta), path(fasta) + path(fold) + + output: + tuple val(meta), path("*.transdecoder.pep") , emit: pep + tuple val(meta), path("*.transdecoder.gff3") , emit: gff3 + tuple val(meta), path("*.transdecoder.cds") , emit: cds + tuple val(meta), path("*.transdecoder.bed") , emit: bed + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + TransDecoder.Predict \\ + $args \\ + -O ${prefix} \\ + -t \\ + $fasta + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + transdecoder: \$(echo \$(TransDecoder.Predict --version) | sed -e "s/TransDecoder.Predict //g") + END_VERSIONS + """ +} diff --git a/modules/transdecoder/predict/meta.yml b/modules/transdecoder/predict/meta.yml new file mode 100644 index 00000000..e25ce3a2 --- /dev/null +++ b/modules/transdecoder/predict/meta.yml @@ -0,0 +1,59 @@ +name: transdecoder_predict +description: TransDecoder identifies candidate coding regions within transcript sequences. It is used to build gff file. You can use this module after transdecoder_longorf +keywords: + - eukaryotes + - gff + +tools: + - transdecoder: + description: TransDecoder identifies candidate coding regions within transcript sequences, such as those generated by de novo RNA-Seq transcript assembly using Trinity, or constructed based on RNA-Seq alignments to the genome using Tophat and Cufflinks. + homepage: https://github.com/TransDecoder + documentation: https://github.com/TransDecoder/TransDecoder/wiki + tool_dev_url: https://github.com/TransDecoder/TransDecoder + doi: "" + licence: ['Broad Institute'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: fasta file + pattern: "*.{fasta}" + - fold: + type: folder + description: Output from the module transdecoder_longorf + pattern: "*" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - pep: + type: amino acids fasta file + description: All ORFs meeting the minimum length criteria, regardless of coding potential + pattern: "*.{pep}" + - gff3: + type: gff3 file + description: Positions of all ORFs as found in the target transcripts + pattern: "*.{gff3}" + - cds: + type: nucleotide fasta file + description: the nucleotide coding sequence for all detected ORFs + pattern: "*{cds}" + - bed: + type: bed file + description: bed file + pattern: "*{bed}" + +authors: + - "@Danilo2771" diff --git a/modules/trimgalore/main.nf b/modules/trimgalore/main.nf index ee40b780..9487c799 100644 --- a/modules/trimgalore/main.nf +++ b/modules/trimgalore/main.nf @@ -18,6 +18,9 @@ process TRIMGALORE { tuple val(meta), path("*.html"), emit: html optional true tuple val(meta), path("*.zip") , emit: zip optional true + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' // Calculate number of --cores for TrimGalore based on value of task.cpus diff --git a/modules/ucsc/bed12tobigbed/main.nf b/modules/ucsc/bed12tobigbed/main.nf index 742798b3..0c84cfe7 100644 --- a/modules/ucsc/bed12tobigbed/main.nf +++ b/modules/ucsc/bed12tobigbed/main.nf @@ -17,6 +17,9 @@ process UCSC_BED12TOBIGBED { tuple val(meta), path("*.bigBed"), emit: bigbed path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/ucsc/bedclip/main.nf b/modules/ucsc/bedclip/main.nf index dacd7260..969a8f73 100755 --- a/modules/ucsc/bedclip/main.nf +++ b/modules/ucsc/bedclip/main.nf @@ -17,6 +17,9 @@ process UCSC_BEDCLIP { tuple val(meta), path("*.bedGraph"), emit: bedgraph path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/ucsc/bedgraphtobigwig/main.nf b/modules/ucsc/bedgraphtobigwig/main.nf index 9ba306ab..ef0ca088 100644 --- a/modules/ucsc/bedgraphtobigwig/main.nf +++ b/modules/ucsc/bedgraphtobigwig/main.nf @@ -17,6 +17,9 @@ process UCSC_BEDGRAPHTOBIGWIG { tuple val(meta), path("*.bigWig"), emit: bigwig path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/ucsc/bigwigaverageoverbed/main.nf b/modules/ucsc/bigwigaverageoverbed/main.nf index 1e97c83d..51d63de8 100644 --- a/modules/ucsc/bigwigaverageoverbed/main.nf +++ b/modules/ucsc/bigwigaverageoverbed/main.nf @@ -17,6 +17,9 @@ process UCSC_BIGWIGAVERAGEOVERBED { tuple val(meta), path("*.tab"), emit: tab path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/ucsc/liftover/main.nf b/modules/ucsc/liftover/main.nf index 3dd9531e..be8fad3e 100644 --- a/modules/ucsc/liftover/main.nf +++ b/modules/ucsc/liftover/main.nf @@ -18,6 +18,9 @@ process UCSC_LIFTOVER { tuple val(meta), path("*.unlifted.bed"), emit: unlifted path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/ucsc/wigtobigwig/main.nf b/modules/ucsc/wigtobigwig/main.nf index 6a1847b6..d07e7ec1 100644 --- a/modules/ucsc/wigtobigwig/main.nf +++ b/modules/ucsc/wigtobigwig/main.nf @@ -17,6 +17,9 @@ process UCSC_WIGTOBIGWIG { tuple val(meta), path("*.bw"), emit: bw path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/ultra/pipeline/main.nf b/modules/ultra/pipeline/main.nf index f2dcb543..c86a5802 100644 --- a/modules/ultra/pipeline/main.nf +++ b/modules/ultra/pipeline/main.nf @@ -16,6 +16,9 @@ process ULTRA_PIPELINE { tuple val(meta), path("*.sam"), emit: sam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/umitools/dedup/main.nf b/modules/umitools/dedup/main.nf index ce21437d..1e46a612 100644 --- a/modules/umitools/dedup/main.nf +++ b/modules/umitools/dedup/main.nf @@ -14,6 +14,9 @@ process UMITOOLS_DEDUP { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/umitools/extract/main.nf b/modules/umitools/extract/main.nf index fba8f054..22a405b9 100644 --- a/modules/umitools/extract/main.nf +++ b/modules/umitools/extract/main.nf @@ -15,6 +15,9 @@ process UMITOOLS_EXTRACT { tuple val(meta), path("*.log") , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/unicycler/main.nf b/modules/unicycler/main.nf index 1ccc72a9..4d3721b0 100644 --- a/modules/unicycler/main.nf +++ b/modules/unicycler/main.nf @@ -16,6 +16,9 @@ process UNICYCLER { tuple val(meta), path('*.log') , emit: log path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/untar/main.nf b/modules/untar/main.nf index 6d1996e7..01205e60 100644 --- a/modules/untar/main.nf +++ b/modules/untar/main.nf @@ -14,6 +14,9 @@ process UNTAR { path "$untar" , emit: untar path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' diff --git a/modules/unzip/main.nf b/modules/unzip/main.nf index 294ac0b0..1ce4b89b 100644 --- a/modules/unzip/main.nf +++ b/modules/unzip/main.nf @@ -14,6 +14,9 @@ process UNZIP { path "${archive.baseName}/", emit: unzipped_archive path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' if ( archive instanceof List && archive.name.size > 1 ) { exit 1, "[UNZIP] error: 7za only accepts a single archive as input. Please check module input." } diff --git a/modules/variantbam/main.nf b/modules/variantbam/main.nf index 11059a9a..3370ca8f 100644 --- a/modules/variantbam/main.nf +++ b/modules/variantbam/main.nf @@ -16,6 +16,9 @@ process VARIANTBAM { tuple val(meta), path("*.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/vcfanno/main.nf b/modules/vcfanno/main.nf index 421fc0fa..77275963 100644 --- a/modules/vcfanno/main.nf +++ b/modules/vcfanno/main.nf @@ -15,6 +15,9 @@ process VCFANNO { tuple val(meta), path("*.vcf"), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/vcflib/vcfuniq/main.nf b/modules/vcflib/vcfuniq/main.nf index 37fc51bc..a01e8485 100644 --- a/modules/vcflib/vcfuniq/main.nf +++ b/modules/vcflib/vcfuniq/main.nf @@ -16,6 +16,9 @@ process VCFLIB_VCFUNIQ { tuple val(meta), path("*.gz"), emit: vcf path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/vcftools/main.nf b/modules/vcftools/main.nf index fbe646ca..78b95fae 100644 --- a/modules/vcftools/main.nf +++ b/modules/vcftools/main.nf @@ -81,6 +81,9 @@ process VCFTOOLS { tuple val(meta), path("*.diff.switch") , optional:true, emit: diff_switch_error path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/yara/index/main.nf b/modules/yara/index/main.nf index 77122c78..0fa5f00b 100644 --- a/modules/yara/index/main.nf +++ b/modules/yara/index/main.nf @@ -14,6 +14,9 @@ process YARA_INDEX { path "yara" , emit: index path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' diff --git a/modules/yara/mapper/main.nf b/modules/yara/mapper/main.nf index 4539033d..9c993ac7 100644 --- a/modules/yara/mapper/main.nf +++ b/modules/yara/mapper/main.nf @@ -15,6 +15,9 @@ process YARA_MAPPER { tuple val(meta), path("*.mapped.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 967b7d9f..203005da 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -46,6 +46,14 @@ bamaligncleaner: - modules/bamaligncleaner/** - tests/modules/bamaligncleaner/** +bamcmp: + - modules/bamcmp/** + - tests/modules/bamcmp/** + +bamtools/convert: + - modules/bamtools/convert/** + - tests/modules/bamtools/convert/** + bamtools/split: - modules/bamtools/split/** - tests/modules/bamtools/split/** @@ -380,6 +388,14 @@ dedup: - modules/dedup/** - tests/modules/dedup/** +deeparg/downloaddata: + - modules/deeparg/downloaddata/** + - tests/modules/deeparg/downloaddata/** + +deeparg/predict: + - modules/deeparg/predict/** + - tests/modules/deeparg/predict/** + deeptools/computematrix: - modules/deeptools/computematrix/** - tests/modules/deeptools/computematrix/** @@ -1133,6 +1149,10 @@ plink/vcf: - modules/plink/vcf/** - tests/modules/plink/vcf/** +plink2/extract: + - modules/plink2/extract/** + - tests/modules/plink2/extract/** + plink2/vcf: - modules/plink2/vcf/** - tests/modules/plink2/vcf/** @@ -1193,6 +1213,10 @@ rasusa: - modules/rasusa/** - tests/modules/rasusa/** +raven: + - modules/raven/** + - tests/modules/raven/** + raxmlng: - modules/raxmlng/** - tests/modules/raxmlng/** @@ -1421,6 +1445,14 @@ subread/featurecounts: - modules/subread/featurecounts/** - tests/modules/subread/featurecounts/** +svdb/merge: + - modules/svdb/merge/** + - tests/modules/svdb/merge/** + +svdb/query: + - modules/svdb/query/** + - tests/modules/svdb/query/** + tabix/bgzip: - modules/tabix/bgzip/** - tests/modules/tabix/bgzip/** @@ -1437,6 +1469,10 @@ tbprofiler/profile: - modules/tbprofiler/profile/** - tests/modules/tbprofiler/profile/** +test/template: + - modules/test/template/** + - tests/modules/test/template/** + tiddit/cov: - modules/tiddit/cov/** - tests/modules/tiddit/cov/** @@ -1445,6 +1481,14 @@ tiddit/sv: - modules/tiddit/sv/** - tests/modules/tiddit/sv/** +transdecoder/longorf: + - modules/transdecoder/longorf/** + - tests/modules/transdecoder/longorf/** + +transdecoder/predict: + - modules/transdecoder/predict/** + - tests/modules/transdecoder/predict/** + trimgalore: - modules/trimgalore/** - tests/modules/trimgalore/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index f453baa6..7d0d3efa 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -131,6 +131,7 @@ params { mills_and_1000g_indels_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/mills_and_1000G.indels.vcf.gz.tbi" syntheticvcf_short_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.vcf.gz" syntheticvcf_short_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/syntheticvcf_short.vcf.gz.tbi" + gnomad_r2_1_1_sv_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/gnomAD.r2.1.1-sv.vcf.gz" hapmap_3_3_hg38_21_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz" hapmap_3_3_hg38_21_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/germlineresources/hapmap_3.3.hg38.vcf.gz.tbi" @@ -277,6 +278,7 @@ params { cutandrun_bedgraph_test_2 = "${test_data_dir}/genomics/homo_sapiens/illumina/bedgraph/cutandtag_igg_test_1.bedGraph" test_rnaseq_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.rnaseq.vcf" + test_sv_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/sv_query.vcf.gz" } 'pacbio' { primers = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/primers.fasta" diff --git a/tests/modules/bamcmp/main.nf b/tests/modules/bamcmp/main.nf new file mode 100644 index 00000000..cf796406 --- /dev/null +++ b/tests/modules/bamcmp/main.nf @@ -0,0 +1,36 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BWA_INDEX } from '../../../modules/bwa/index/main.nf' +include { BWA_MEM } from '../../../modules/bwa/mem/main.nf' +include { BWA_INDEX as BWA_INDEX_COV2 } from '../../../modules/bwa/index/main.nf' +include { BWA_MEM as BWA_MEM_COV2 } from '../../../modules/bwa/mem/main.nf' + +include { SAMTOOLS_SORT } from '../../../modules/samtools/sort/main.nf' +include { SAMTOOLS_SORT as SAMTOOLS_SORT_COV2 } from '../../../modules/samtools/sort/main.nf' + +include { BAMCMP } from '../../../modules/bamcmp/main.nf' + +workflow test_bamcmp { + + input = [ + [ id:'test'], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + + fasta1 = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fasta2 = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BWA_INDEX ( fasta1 ) + BWA_MEM ( input, BWA_INDEX.out.index, false ) + SAMTOOLS_SORT (BWA_MEM.out.bam) + + + BWA_INDEX_COV2 ( fasta2 ) + BWA_MEM_COV2 ( input, BWA_INDEX_COV2.out.index, false ) + SAMTOOLS_SORT_COV2 (BWA_MEM_COV2.out.bam) + + BAMCMP (SAMTOOLS_SORT.out.bam.join(SAMTOOLS_SORT_COV2.out.bam, by: [0])) + +} diff --git a/tests/modules/bamcmp/nextflow.config b/tests/modules/bamcmp/nextflow.config new file mode 100644 index 00000000..d3c4858e --- /dev/null +++ b/tests/modules/bamcmp/nextflow.config @@ -0,0 +1,27 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: BWA_MEM { + ext.prefix = "human" + } + + withName: BWA_MEM_COV2 { + ext.prefix = "cov2" + } + + withName: SAMTOOLS_SORT { + ext.args = '-n' + ext.prefix = "sorted" + } + + withName: SAMTOOLS_SORT_COV2 { + ext.args = '-n' + ext.prefix = "sorted_cov2" + } + + withName: BAMCMP { + ext.args = '-s "as"' + } + +} diff --git a/tests/modules/bamcmp/test.yml b/tests/modules/bamcmp/test.yml new file mode 100644 index 00000000..58fba458 --- /dev/null +++ b/tests/modules/bamcmp/test.yml @@ -0,0 +1,11 @@ +- name: bamcmp test_bamcmp + command: nextflow run tests/modules/bamcmp -entry test_bamcmp -c tests/config/nextflow.config + tags: + - bamcmp + files: + - path: output/bamcmp/test_contamination.bam + md5sum: 1fe730936d489c637479c1e51dd8ca55 + - path: output/bamcmp/test_primary.bam + md5sum: 80b9abd8ef83e63548a9b8b82be2a034 + - path: output/bamcmp/versions.yml + md5sum: 34d569665ff0459e84114e966dd3483b diff --git a/tests/modules/bamtools/convert/main.nf b/tests/modules/bamtools/convert/main.nf new file mode 100644 index 00000000..bf57f248 --- /dev/null +++ b/tests/modules/bamtools/convert/main.nf @@ -0,0 +1,104 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_EXT_ERROR } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_NOEXT_ERROR } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_BED } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_FASTA } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_FASTQ } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_JSON } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_PILEUP } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_SAM } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_YAML } from '../../../../modules/bamtools/convert/main.nf' + +workflow test_bamtools_convert_ext_error { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_EXT_ERROR ( input ) +} + +workflow test_bamtools_convert_noext_error { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_NOEXT_ERROR ( input ) +} + +workflow test_bamtools_convert_bed { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_BED ( input ) +} + +workflow test_bamtools_convert_fasta { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_FASTA ( input ) +} + +workflow test_bamtools_convert_fastq { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_FASTQ ( input ) +} + +workflow test_bamtools_convert_json { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_JSON ( input ) +} + +workflow test_bamtools_convert_pileup { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_PILEUP ( input ) +} + +workflow test_bamtools_convert_sam { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_SAM ( input ) +} + +workflow test_bamtools_convert_yaml { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_YAML ( input ) +} + diff --git a/tests/modules/bamtools/convert/nextflow.config b/tests/modules/bamtools/convert/nextflow.config new file mode 100644 index 00000000..ae8fe345 --- /dev/null +++ b/tests/modules/bamtools/convert/nextflow.config @@ -0,0 +1,41 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: BAMTOOLS_CONVERT_EXT_ERROR { + ext.args = "-format vcf" + } + + withName: BAMTOOLS_CONVERT_NOEXT_ERROR { + ext.args = "" + } + + withName: BAMTOOLS_CONVERT_BED { + ext.args = "-format bed" + } + + withName: BAMTOOLS_CONVERT_FASTA { + ext.args = "-format fasta" + } + + withName: BAMTOOLS_CONVERT_FASTQ { + ext.args = "-format fastq" + } + + withName: BAMTOOLS_CONVERT_JSON { + ext.args = "-format json" + } + + withName: BAMTOOLS_CONVERT_PILEUP { + ext.args = "-format pileup" + } + + withName: BAMTOOLS_CONVERT_SAM { + ext.args = "-format sam" + } + + withName: BAMTOOLS_CONVERT_YAML { + ext.args = "-format yaml" + } + +} diff --git a/tests/modules/bamtools/convert/test.yml b/tests/modules/bamtools/convert/test.yml new file mode 100644 index 00000000..3922ece2 --- /dev/null +++ b/tests/modules/bamtools/convert/test.yml @@ -0,0 +1,90 @@ +- name: bamtools convert test_bamtools_convert_ext_error + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_ext_error -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + exit_code: 1 + +- name: bamtools convert test_bamtools_convert_noext_error + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_noext_error -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + exit_code: 1 + +- name: bamtools convert test_bamtools_convert_bed + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_bed -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.bed + md5sum: 4e34cc15bf31e700f5f3a9f8fffb6c81 + - path: output/bamtools/versions.yml + md5sum: eb7a144b8a97965d3482f6f96b8a8243 + +- name: bamtools convert test_bamtools_convert_fasta + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_fasta -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.fasta + md5sum: 52aeacf78571862b7e97c7d44ac8f827 + - path: output/bamtools/versions.yml + md5sum: 42d19a2b2b07f05edb82b34369dfd754 + +- name: bamtools convert test_bamtools_convert_fastq + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_fastq -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.fastq + md5sum: e591c48daad2c56638e5d6f21f1f71c5 + - path: output/bamtools/versions.yml + md5sum: 13f0bf8a3e1f8f527f96dabaa5c8051e + +- name: bamtools convert test_bamtools_convert_json + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_json -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.json + md5sum: 04afed696f9f14da85a460353645d1f5 + - path: output/bamtools/versions.yml + md5sum: 33d633dbd6209cb93c9b071f8c0ed3b3 + +- name: bamtools convert test_bamtools_convert_pileup + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_pileup -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.pileup + md5sum: e5a3cb4a3e1bf980a575fafce6a2826f + - path: output/bamtools/versions.yml + md5sum: fd3ad0edd1e085b1a002e0593d1d5814 + +- name: bamtools convert test_bamtools_convert_sam + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_sam -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.sam + md5sum: 61ab3d0de16a9da8b651f9c692e19d5e + - path: output/bamtools/versions.yml + md5sum: 4be470ce3cc0143ae5ae415b612a4965 + +- name: bamtools convert test_bamtools_convert_yaml + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_yaml -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.yaml + md5sum: 68b56f198da036fef33e150eb773dc3b + - path: output/bamtools/versions.yml + md5sum: 1116abc088c5edf11bee393961c18b3e diff --git a/tests/modules/bcftools/query/main.nf b/tests/modules/bcftools/query/main.nf index 733cae17..f40cb0fa 100644 --- a/tests/modules/bcftools/query/main.nf +++ b/tests/modules/bcftools/query/main.nf @@ -6,26 +6,24 @@ include { BCFTOOLS_QUERY } from '../../../../modules/bcftools/query/main.nf' workflow test_bcftools_query { - regions = [] - targets = [] - samples = [] - input = [ [ id:'out' ], // meta map file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)] + regions = [] + targets = [] + samples = [] BCFTOOLS_QUERY ( input, regions, targets, samples ) } workflow test_bcftools_query_with_optional_files { + input = [ [ id:'out' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)] regions = file(params.test_data['sarscov2']['illumina']['test3_vcf_gz'], checkIfExists: true) targets = file(params.test_data['sarscov2']['illumina']['test2_vcf_targets_tsv_gz'], checkIfExists: true) samples = [] - input = [ [ id:'out' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)] - BCFTOOLS_QUERY ( input, regions, targets, samples ) } diff --git a/tests/modules/bcftools/query/test.yml b/tests/modules/bcftools/query/test.yml index aaa9af7b..647c62bb 100644 --- a/tests/modules/bcftools/query/test.yml +++ b/tests/modules/bcftools/query/test.yml @@ -4,7 +4,7 @@ - bcftools - bcftools/query files: - - path: output/bcftools/out.vcf.gz + - path: output/bcftools/out.txt md5sum: c32a6d28f185822d8fe1eeb7e42ec155 - name: bcftools query with optional files @@ -13,5 +13,5 @@ - bcftools - bcftools/query files: - - path: output/bcftools/out.vcf.gz + - path: output/bcftools/out.txt md5sum: 6bb5df49bfb5af39f7037cdf95032aac diff --git a/tests/modules/cellranger/count/test.yml b/tests/modules/cellranger/count/test.yml index 6b151a2a..121d9eea 100644 --- a/tests/modules/cellranger/count/test.yml +++ b/tests/modules/cellranger/count/test.yml @@ -8,12 +8,12 @@ - path: output/cellranger/sample-123/outs/metrics_summary.csv md5sum: 707df0f101d479d93f412ca74f9c4131 - path: output/cellranger/sample-123/outs/molecule_info.h5 - md5sum: cf03b2b3ca776a1c37aa3518e91268ba + md5sum: 0e56836ef0725f2ab05f56ca5a71e55b - path: output/cellranger/sample-123/outs/possorted_genome_bam.bam md5sum: 15441da9cfceea0bb48c8b66b1b860df - path: output/cellranger/sample-123/outs/possorted_genome_bam.bam.bai md5sum: 7c3d49c77016a09535aff61a027f750c - path: output/cellranger/sample-123/outs/raw_feature_bc_matrix - path: output/cellranger/sample-123/outs/raw_feature_bc_matrix.h5 - md5sum: 40c8df814eb8723b7317b234dc8222e9 + md5sum: cdad1cd7b215d7137cf92515e81a8525 - path: output/cellranger/sample-123/outs/web_summary.html diff --git a/tests/modules/cellranger/mkfastq/nextflow.config b/tests/modules/cellranger/mkfastq/nextflow.config index 8730f1c4..9cdfc075 100644 --- a/tests/modules/cellranger/mkfastq/nextflow.config +++ b/tests/modules/cellranger/mkfastq/nextflow.config @@ -2,4 +2,8 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: CELLRANGER_MKFASTQ { + ext.args = "--tiles 1101" + } + } diff --git a/tests/modules/cellranger/mkfastq/test.yml b/tests/modules/cellranger/mkfastq/test.yml index bdd32187..890f2557 100644 --- a/tests/modules/cellranger/mkfastq/test.yml +++ b/tests/modules/cellranger/mkfastq/test.yml @@ -1,13 +1,16 @@ - name: cellranger mkfastq test_cellranger_mkfastq_simple - command: nextflow run tests/modules/cellranger/mkfastq -entry test_cellranger_mkfastq_simple -c tests/config/nextflow.config -c ./tests/modules/cellranger/mkfastq/nextflow.config + command: nextflow run tests/modules/cellranger/mkfastq -entry test_cellranger_mkfastq_simple -c tests/config/nextflow.config -c ./tests/modules/cellranger/mkfastq/nextflow.config -stub-run tags: - cellranger - cellranger/mkfastq - # files: - # - path: output/cellranger/genome.filtered.gtf - # md5sum: a8b8a7b5039e05d3a9cf9151ea138b5b + files: + - path: output/cellranger/cellranger-tiny-bcl-1/outs/fastq_path/fake_file.fastq.gz + md5sum: d41d8cd98f00b204e9800998ecf8427e - name: cellranger mkfastq test_cellranger_mkfastq_illumina - command: nextflow run tests/modules/cellranger/mkfastq -entry test_cellranger_mkfastq_illumina -c tests/config/nextflow.config -c ./tests/modules/cellranger/mkfastq/nextflow.config + command: nextflow run tests/modules/cellranger/mkfastq -entry test_cellranger_mkfastq_illumina -c tests/config/nextflow.config -c ./tests/modules/cellranger/mkfastq/nextflow.config -stub-run tags: - cellranger - cellranger/mkfastq + files: + - path: output/cellranger/cellranger-tiny-bcl-1/outs/fastq_path/fake_file.fastq.gz + md5sum: d41d8cd98f00b204e9800998ecf8427e diff --git a/tests/modules/cellranger/mkref/test.yml b/tests/modules/cellranger/mkref/test.yml index eb01e9e2..e40592bb 100644 --- a/tests/modules/cellranger/mkref/test.yml +++ b/tests/modules/cellranger/mkref/test.yml @@ -11,7 +11,7 @@ - path: output/cellranger/homo_sapiens_chr22_reference/genes/genes.gtf.gz md5sum: 6d9b5f409bfea95022bc25b9590e194e - path: output/cellranger/homo_sapiens_chr22_reference/reference.json - md5sum: a4e2b9bbf016c55b0d4d7bc1fa53896f + md5sum: 5d8d1669cd251433505f183e1c9ed6bc - path: output/cellranger/homo_sapiens_chr22_reference/star/Genome md5sum: 22102926fadf5890e905ca71b2da3f35 - path: output/cellranger/homo_sapiens_chr22_reference/star/SA diff --git a/tests/modules/deeparg/downloaddata/main.nf b/tests/modules/deeparg/downloaddata/main.nf new file mode 100644 index 00000000..ed2d48bb --- /dev/null +++ b/tests/modules/deeparg/downloaddata/main.nf @@ -0,0 +1,9 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { DEEPARG_DOWNLOADDATA } from '../../../../modules/deeparg/downloaddata/main.nf' + +workflow test_deeparg_downloaddata { + DEEPARG_DOWNLOADDATA () +} diff --git a/tests/modules/deeparg/downloaddata/nextflow.config b/tests/modules/deeparg/downloaddata/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/deeparg/downloaddata/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/deeparg/downloaddata/test.yml b/tests/modules/deeparg/downloaddata/test.yml new file mode 100644 index 00000000..c5c99de2 --- /dev/null +++ b/tests/modules/deeparg/downloaddata/test.yml @@ -0,0 +1,9 @@ +- name: deeparg downloaddata test_deeparg_downloaddata + command: nextflow run tests/modules/deeparg/downloaddata -entry test_deeparg_downloaddata -c tests/config/nextflow.config + tags: + - deeparg + - deeparg/downloaddata + files: + - path: output/deeparg/db/ + - path: output/deeparg/db/data/gg13/dataset.rev.2.bt2 + md5sum: 99d90f132fc2795d5a527ce31f1c4d30 diff --git a/tests/modules/deeparg/predict/main.nf b/tests/modules/deeparg/predict/main.nf new file mode 100644 index 00000000..2758ab58 --- /dev/null +++ b/tests/modules/deeparg/predict/main.nf @@ -0,0 +1,19 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { DEEPARG_DOWNLOADDATA } from '../../../../modules/deeparg/downloaddata/main.nf' +include { DEEPARG_PREDICT } from '../../../../modules/deeparg/predict/main.nf' + +workflow test_deeparg_predict { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true), + 'LS' + ] + + DEEPARG_DOWNLOADDATA() + DEEPARG_PREDICT ( input, DEEPARG_DOWNLOADDATA.out.db ) + +} diff --git a/tests/modules/deeparg/predict/nextflow.config b/tests/modules/deeparg/predict/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/deeparg/predict/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/deeparg/predict/test.yml b/tests/modules/deeparg/predict/test.yml new file mode 100644 index 00000000..e3a15411 --- /dev/null +++ b/tests/modules/deeparg/predict/test.yml @@ -0,0 +1,17 @@ +- name: deeparg predict test_deeparg_predict + command: nextflow run tests/modules/deeparg/predict -entry test_deeparg_predict -c tests/config/nextflow.config + tags: + - deeparg/predict + - deeparg + files: + - path: output/deeparg/test.align.daa + md5sum: c52d0af8362244f214da25bc45f2bf42 + - path: output/deeparg/test.align.daa.tsv + md5sum: a4aa1da2db98274ede2b927fa8227e5a + - path: output/deeparg/test.mapping.ARG + md5sum: 0e049e99eab4c55666062df21707d5b9 + - path: output/deeparg/test.mapping.potential.ARG + contains: + - "#ARG" + - path: output/deeparg/versions.yml + md5sum: e848ddab324e8c6fd18eaa6b2656f195 diff --git a/tests/modules/freebayes/test.yml b/tests/modules/freebayes/test.yml index c9aa78da..6cca692e 100644 --- a/tests/modules/freebayes/test.yml +++ b/tests/modules/freebayes/test.yml @@ -1,34 +1,49 @@ - name: freebayes test_freebayes - command: nextflow run ./tests/modules/freebayes -entry test_freebayes -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: 81d3e6ce7b6343d088b779567c3803eb + - path: output/freebayes/versions.yml + md5sum: 53651eb835af65df829241257584a7d2 - name: freebayes test_freebayes_bed - command: nextflow run ./tests/modules/freebayes -entry test_freebayes_bed -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes_bed -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: 02645d014a63485162a7789007373b2a + - path: output/freebayes/versions.yml + md5sum: becc93c8a0be580c09d55b955d60a5e1 - name: freebayes test_freebayes_cram - command: nextflow run ./tests/modules/freebayes -entry test_freebayes_cram -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes_cram -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: 3d0bfcd2129c62f8863952fa4c1054db + - path: output/freebayes/versions.yml + md5sum: 2e5b266edfc6cab81353cfc72c00f67c - name: freebayes test_freebayes_somatic - command: nextflow run ./tests/modules/freebayes -entry test_freebayes_somatic -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes_somatic -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: 22fec868210ba3baf685b214bfd8e74b + - path: output/freebayes/versions.yml + md5sum: 8fbdb4c052fb3e42b5508a966125fa05 - name: freebayes test_freebayes_somatic_cram_intervals - command: nextflow run ./tests/modules/freebayes -entry test_freebayes_somatic_cram_intervals -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes_somatic_cram_intervals -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: 527cf2937067bbd4117d95fd472bb928 + - path: output/freebayes/versions.yml + md5sum: af97e3dfdc086188739907c3460e49e0 diff --git a/tests/modules/gatk4/mergebamalignment/main.nf b/tests/modules/gatk4/mergebamalignment/main.nf index 59bd833b..8a38c129 100644 --- a/tests/modules/gatk4/mergebamalignment/main.nf +++ b/tests/modules/gatk4/mergebamalignment/main.nf @@ -6,11 +6,11 @@ include { GATK4_MERGEBAMALIGNMENT } from '../../../../modules/gatk4/mergebamalig workflow test_gatk4_mergebamalignment { input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_unaligned_bam'], checkIfExists: true) ] - unmapped = file(params.test_data['sarscov2']['illumina']['test_unaligned_bam'], checkIfExists: true) fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) - GATK4_MERGEBAMALIGNMENT ( input, unmapped, fasta, dict ) + GATK4_MERGEBAMALIGNMENT ( input, fasta, dict ) } diff --git a/tests/modules/nextclade/datasetget/main.nf b/tests/modules/nextclade/datasetget/main.nf index 0fc38a5b..8f4fa87b 100644 --- a/tests/modules/nextclade/datasetget/main.nf +++ b/tests/modules/nextclade/datasetget/main.nf @@ -8,7 +8,8 @@ workflow test_nextclade_datasetget { dataset = 'sars-cov-2' reference = 'MN908947' - tag = '2022-01-05T19:54:31Z' + tag = '2022-01-18T12:00:00Z' NEXTCLADE_DATASETGET ( dataset, reference, tag ) + } diff --git a/tests/modules/nextclade/datasetget/test.yml b/tests/modules/nextclade/datasetget/test.yml index 7e798a11..d610b428 100644 --- a/tests/modules/nextclade/datasetget/test.yml +++ b/tests/modules/nextclade/datasetget/test.yml @@ -9,12 +9,14 @@ - path: output/nextclade/sars-cov-2/primers.csv md5sum: 5990c3483bf66ce607aeb90a44e7ef2e - path: output/nextclade/sars-cov-2/qc.json - md5sum: 018fa0c0b0d2e824954e37e01495d549 + md5sum: c512f51fda0212b21ffff05779180963 - path: output/nextclade/sars-cov-2/reference.fasta md5sum: c7ce05f28e4ec0322c96f24e064ef55c - path: output/nextclade/sars-cov-2/sequences.fasta md5sum: 41129d255b99e0e92bdf20e866b99a1b - path: output/nextclade/sars-cov-2/tag.json - md5sum: 2f6d8e806d9064571ee4188ef1304c9c + md5sum: 402ac2b87e2a6a64a3fbf5ad16497af3 - path: output/nextclade/sars-cov-2/tree.json - md5sum: f8fb33ed62b59142ac20998eb599df6c \ No newline at end of file + md5sum: b8f32f547ff9e2131d6fc66b68fc54b1 + - path: output/nextclade/sars-cov-2/virus_properties.json + md5sum: 5f2de3949e07cb633f3d9e4a7654dc81 diff --git a/tests/modules/nextclade/run/main.nf b/tests/modules/nextclade/run/main.nf index 35b52317..ed674a0d 100644 --- a/tests/modules/nextclade/run/main.nf +++ b/tests/modules/nextclade/run/main.nf @@ -9,7 +9,7 @@ workflow test_nextclade_run { dataset = 'sars-cov-2' reference = 'MN908947' - tag = '2022-01-05T19:54:31Z' + tag = '2022-01-18T12:00:00Z' NEXTCLADE_DATASETGET ( dataset, reference, tag ) @@ -20,3 +20,4 @@ workflow test_nextclade_run { NEXTCLADE_RUN ( input, NEXTCLADE_DATASETGET.out.dataset ) } + diff --git a/tests/modules/nextclade/run/test.yml b/tests/modules/nextclade/run/test.yml index 37f7d8ae..ea846378 100644 --- a/tests/modules/nextclade/run/test.yml +++ b/tests/modules/nextclade/run/test.yml @@ -6,8 +6,8 @@ files: - path: output/nextclade/test.json - path: output/nextclade/test.csv - md5sum: 3b87a4da190ba2e1fdc8418dc3a7ffdb + md5sum: 570c1aa2d5fd25c23d0042c1b06108e1 - path: output/nextclade/test.tsv - md5sum: 449393288e8734a02def139c550a8d9b + md5sum: dd76e1a4c760785489be4e4a860b4d00 - path: output/nextclade/test.tree.json - md5sum: 9c6e33cb7ff860bee6194847bd2c855c + md5sum: 3591b4dc1542995a7ffcffcb1f52b524 diff --git a/tests/modules/pangolin/test.yml b/tests/modules/pangolin/test.yml index 15be6973..11f715bf 100644 --- a/tests/modules/pangolin/test.yml +++ b/tests/modules/pangolin/test.yml @@ -4,4 +4,4 @@ - pangolin files: - path: ./output/pangolin/test.pangolin.csv - md5sum: 2563856ee31ba2a4a05705ff940a28cc + md5sum: d92ede51bf3886f696f2089e86189125 diff --git a/tests/modules/plink2/extract/main.nf b/tests/modules/plink2/extract/main.nf new file mode 100644 index 00000000..a72e153c --- /dev/null +++ b/tests/modules/plink2/extract/main.nf @@ -0,0 +1,30 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PLINK2_VCF } from '../../../../modules/plink2/vcf/main.nf' +include { PLINK2_EXTRACT } from '../../../../modules/plink2/extract/main.nf' + +workflow test_plink2_extract { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['genome']['syntheticvcf_short_vcf_gz'], checkIfExists: true) + ] + PLINK2_VCF ( input ) + + PLINK2_VCF.out.pvar + .splitText(file: 'variants.keep', keepHeader: false, by: 10) + .last() + .set { ch_variants } + + ch_variants.view() + + PLINK2_VCF.out.pgen + .concat(PLINK2_VCF.out.psam, PLINK2_VCF.out.pvar.concat(ch_variants)) + .groupTuple() + .map{ meta, paths -> [meta, paths[0], paths[1], paths[2], paths[3]] } + .set { ch_extract } + + PLINK2_EXTRACT ( ch_extract ) +} diff --git a/tests/modules/plink2/extract/nextflow.config b/tests/modules/plink2/extract/nextflow.config new file mode 100644 index 00000000..2a541c99 --- /dev/null +++ b/tests/modules/plink2/extract/nextflow.config @@ -0,0 +1,12 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: PLINK2_VCF { + ext.args = '--make-pgen --set-missing-var-ids @:#:\\$1:\\$2' + } + + withName: PLINK2_EXTRACT { + ext.prefix = { "${meta.id}.extract" } + } +} diff --git a/tests/modules/plink2/extract/test.yml b/tests/modules/plink2/extract/test.yml new file mode 100644 index 00000000..737ca215 --- /dev/null +++ b/tests/modules/plink2/extract/test.yml @@ -0,0 +1,20 @@ +- name: plink2 extract test_plink2_extract + command: nextflow run tests/modules/plink2/extract -entry test_plink2_extract -c tests/config/nextflow.config + tags: + - plink2/extract + - plink2 + files: + - path: output/plink2/test.extract.pgen + md5sum: 785e729a293ecabb0d39394865316bda + - path: output/plink2/test.extract.psam + md5sum: e6c714488754cb8448c3dfda08c4c0ea + - path: output/plink2/test.extract.pvar.zst + md5sum: 076767e6695e681115eabb924a447ee9 + - path: output/plink2/test.pgen + md5sum: fac12ca9041d6950f6b7d60ac2120721 + - path: output/plink2/test.psam + md5sum: e6c714488754cb8448c3dfda08c4c0ea + - path: output/plink2/test.pvar + md5sum: ff9e44f8e5f4035d8cf2bfe7be6755b3 + - path: output/plink2/versions.yml + md5sum: c477b7c9f6e39b89710fe1a0bceee50d diff --git a/tests/modules/raven/main.nf b/tests/modules/raven/main.nf new file mode 100644 index 00000000..01b04519 --- /dev/null +++ b/tests/modules/raven/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { RAVEN } from '../../../modules/raven/main.nf' + +workflow test_raven { + + input = [ + [ id:'test', single_end:false ], // meta map + [ file(params.test_data['bacteroides_fragilis']['nanopore']['test_fastq_gz'], checkIfExists: true) ] + ] + + RAVEN ( input ) +} diff --git a/tests/modules/raven/nextflow.config b/tests/modules/raven/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/raven/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/raven/test.yml b/tests/modules/raven/test.yml new file mode 100644 index 00000000..bbede642 --- /dev/null +++ b/tests/modules/raven/test.yml @@ -0,0 +1,9 @@ +- name: raven test_raven + command: nextflow run ./tests/modules/raven -entry test_raven -c ./tests/config/nextflow.config -c ./tests/modules/raven/nextflow.config + tags: + - raven + files: + - path: output/raven/test.fasta.gz + md5sum: b026b6aba793a9f2bbfb17f732c91926 + - path: output/raven/test.gfa.gz + md5sum: 09053490495f6deb7a3941e559cda626 diff --git a/tests/modules/svdb/merge/main.nf b/tests/modules/svdb/merge/main.nf new file mode 100644 index 00000000..f417c3f7 --- /dev/null +++ b/tests/modules/svdb/merge/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SVDB_MERGE } from '../../../../modules/svdb/merge/main.nf' + +workflow test_svdb_merge { + + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf'], checkIfExists: true) ] + ] + priority = [ 'tiddit', 'cnvnator'] + + SVDB_MERGE ( input, priority ) +} diff --git a/tests/modules/svdb/merge/nextflow.config b/tests/modules/svdb/merge/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/svdb/merge/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/svdb/merge/test.yml b/tests/modules/svdb/merge/test.yml new file mode 100644 index 00000000..8d16562f --- /dev/null +++ b/tests/modules/svdb/merge/test.yml @@ -0,0 +1,7 @@ +- name: svdb merge + command: nextflow run ./tests/modules/svdb/merge -entry test_svdb_merge -c ./tests/config/nextflow.config -c ./tests/modules/svdb/merge/nextflow.config + tags: + - svdb + - svdb/merge + files: + - path: output/svdb/test_sv_merge.vcf diff --git a/tests/modules/svdb/query/main.nf b/tests/modules/svdb/query/main.nf new file mode 100644 index 00000000..972f99e1 --- /dev/null +++ b/tests/modules/svdb/query/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SVDB_QUERY } from '../../../../modules/svdb/query/main.nf' + +workflow test_svdb_query { + + input = [ [ id:'test' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_sv_vcf'], checkIfExists: true) ] + ] + + vcf_db = [ + file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_sv_vcf_gz'], checkIfExists: true) + ] + + SVDB_QUERY ( input, vcf_db ) +} diff --git a/tests/modules/svdb/query/nextflow.config b/tests/modules/svdb/query/nextflow.config new file mode 100644 index 00000000..2a6c9d90 --- /dev/null +++ b/tests/modules/svdb/query/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: SVDB_QUERY { + ext.args = '--in_occ AC --out_occ gnomad_svAC --in_frq AF --out_frq gnomad_svAF' + } + +} diff --git a/tests/modules/svdb/query/test.yml b/tests/modules/svdb/query/test.yml new file mode 100644 index 00000000..b95ecafe --- /dev/null +++ b/tests/modules/svdb/query/test.yml @@ -0,0 +1,7 @@ +- name: svdb query + command: nextflow run ./tests/modules/svdb/query -entry test_svdb_query -c ./tests/config/nextflow.config -c ./tests/modules/svdb/query/nextflow.config + tags: + - svdb + - svdb/query + files: + - path: output/svdb/test_ann_svdbq.vcf diff --git a/tests/modules/transdecoder/longorf/main.nf b/tests/modules/transdecoder/longorf/main.nf new file mode 100644 index 00000000..90f75d19 --- /dev/null +++ b/tests/modules/transdecoder/longorf/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { TRANSDECODER_LONGORF } from '../../../../modules/transdecoder/longorf/main.nf' + +workflow test_transdecoder_longorf { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + TRANSDECODER_LONGORF ( input ) +} diff --git a/tests/modules/transdecoder/longorf/nextflow.config b/tests/modules/transdecoder/longorf/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/transdecoder/longorf/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/transdecoder/longorf/test.yml b/tests/modules/transdecoder/longorf/test.yml new file mode 100644 index 00000000..4e88f0e8 --- /dev/null +++ b/tests/modules/transdecoder/longorf/test.yml @@ -0,0 +1,16 @@ +- name: transdecoder longorf test_transdecoder_longorf + command: nextflow run tests/modules/transdecoder/longorf -entry test_transdecoder_longorf -c tests/config/nextflow.config + tags: + - transdecoder + - transdecoder/longorf + files: + - path: output/transdecoder/versions.yml + md5sum: 15cffd5b1119e63d52dc754caf0f2d3c + - path: output/transdecoder/test/base_freqs.dat + md5sum: 5226ef383532e9b16c16b03e35ce181e + - path: output/transdecoder/test/longest_orfs.cds + md5sum: 041ac609e4c4ffb38676b1f88365be0f + - path: output/transdecoder/test/longest_orfs.gff3 + md5sum: 96062ef88364f6bf1368d65cd1aad350 + - path: output/transdecoder/test/longest_orfs.pep + md5sum: 0b903d36040676efeb2c50ab5ba46bbd diff --git a/tests/modules/transdecoder/predict/main.nf b/tests/modules/transdecoder/predict/main.nf new file mode 100644 index 00000000..02026a37 --- /dev/null +++ b/tests/modules/transdecoder/predict/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { TRANSDECODER_PREDICT } from '../../../../modules/transdecoder/predict/main.nf' +include { TRANSDECODER_LONGORF } from '../../../../modules/transdecoder/longorf/main.nf' + +workflow test_transdecoder_predict { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] + + TRANSDECODER_LONGORF ( input ) + TRANSDECODER_PREDICT ( input, TRANSDECODER_LONGORF.out.folder ) + +} + diff --git a/tests/modules/transdecoder/predict/nextflow.config b/tests/modules/transdecoder/predict/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/transdecoder/predict/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/transdecoder/predict/test.yml b/tests/modules/transdecoder/predict/test.yml new file mode 100644 index 00000000..cf2c0d07 --- /dev/null +++ b/tests/modules/transdecoder/predict/test.yml @@ -0,0 +1,12 @@ +- name: transdecoder predict test_transdecoder_predict + command: nextflow run tests/modules/transdecoder/predict -entry test_transdecoder_predict -c tests/config/nextflow.config + tags: + - transdecoder + - transdecoder/predict + files: + - path: output/transdecoder/genome.fasta.transdecoder.bed + - path: output/transdecoder/genome.fasta.transdecoder.cds + - path: output/transdecoder/genome.fasta.transdecoder.gff3 + - path: output/transdecoder/genome.fasta.transdecoder.pep + - path: output/transdecoder/versions.yml + md5sum: 2847cc159dc93e9014b57d76987623ea diff --git a/tests/test_versions_yml.py b/tests/test_versions_yml.py index 2f78ab2e..5d0bb39e 100644 --- a/tests/test_versions_yml.py +++ b/tests/test_versions_yml.py @@ -16,7 +16,10 @@ def _get_workflow_names(): # test_config = yaml.safe_load(f.read_text()) test_config = yaml.load(f.read_text(), Loader=yaml.BaseLoader) for workflow in test_config: - yield workflow["name"] + # https://github.com/nf-core/modules/pull/1242 - added to cover tests + # that expect an error and therefore will not generate a versions.yml + if 'exit_code' not in workflow: + yield workflow["name"] @pytest.mark.workflow(*_get_workflow_names())