From 72adfbff7285cb2604ab06dac6002c76f42ed4c7 Mon Sep 17 00:00:00 2001 From: Michael L Heuer Date: Mon, 26 Sep 2022 04:41:33 -0500 Subject: [PATCH 01/11] Update dsh-bio to 2.1 (#2100) Update dsh-bio to 2.1. --- modules/dshbio/exportsegments/main.nf | 6 +++--- modules/dshbio/filterbed/main.nf | 6 +++--- modules/dshbio/filtergff3/main.nf | 6 +++--- modules/dshbio/splitbed/main.nf | 6 +++--- modules/dshbio/splitgff3/main.nf | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/dshbio/exportsegments/main.nf b/modules/dshbio/exportsegments/main.nf index 03d0e91a6b3..d2e83a9e756 100644 --- a/modules/dshbio/exportsegments/main.nf +++ b/modules/dshbio/exportsegments/main.nf @@ -2,10 +2,10 @@ process DSHBIO_EXPORTSEGMENTS { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.1--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.1--hdfd78af_0' }" input: tuple val(meta), path(gfa) diff --git a/modules/dshbio/filterbed/main.nf b/modules/dshbio/filterbed/main.nf index 7a0a4d86ff6..74dba7c4ec0 100644 --- a/modules/dshbio/filterbed/main.nf +++ b/modules/dshbio/filterbed/main.nf @@ -2,10 +2,10 @@ process DSHBIO_FILTERBED { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.1--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.1--hdfd78af_0' }" input: tuple val(meta), path(bed) diff --git a/modules/dshbio/filtergff3/main.nf b/modules/dshbio/filtergff3/main.nf index c6736a49956..155ec399b76 100644 --- a/modules/dshbio/filtergff3/main.nf +++ b/modules/dshbio/filtergff3/main.nf @@ -2,10 +2,10 @@ process DSHBIO_FILTERGFF3 { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.1--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.1--hdfd78af_0' }" input: tuple val(meta), path(gff3) diff --git a/modules/dshbio/splitbed/main.nf b/modules/dshbio/splitbed/main.nf index 9268b5dcecc..409df2e8247 100644 --- a/modules/dshbio/splitbed/main.nf +++ b/modules/dshbio/splitbed/main.nf @@ -2,10 +2,10 @@ process DSHBIO_SPLITBED { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.1--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.1--hdfd78af_0' }" input: tuple val(meta), path(bed) diff --git a/modules/dshbio/splitgff3/main.nf b/modules/dshbio/splitgff3/main.nf index db887bd664c..4e92306944d 100644 --- a/modules/dshbio/splitgff3/main.nf +++ b/modules/dshbio/splitgff3/main.nf @@ -2,10 +2,10 @@ process DSHBIO_SPLITGFF3 { tag "${meta.id}" label 'process_medium' - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.8" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/dsh-bio:2.0.8--hdfd78af_0' : - 'quay.io/biocontainers/dsh-bio:2.0.8--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/dsh-bio:2.1--hdfd78af_0' : + 'quay.io/biocontainers/dsh-bio:2.1--hdfd78af_0' }" input: tuple val(meta), path(gff3) From 29568f72ca66fe56d81bde3a97ac2a8c2824926a Mon Sep 17 00:00:00 2001 From: Benedetto Polimeni <34317613+bepoli@users.noreply.github.com> Date: Mon, 26 Sep 2022 15:26:53 +0200 Subject: [PATCH 02/11] Make stringtie/merge arguments configurable (#2049) Added $args to command line and made using a reference annotation optional. Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- modules/stringtie/merge/main.nf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/stringtie/merge/main.nf b/modules/stringtie/merge/main.nf index f2628da380e..4cdaafe202a 100644 --- a/modules/stringtie/merge/main.nf +++ b/modules/stringtie/merge/main.nf @@ -19,12 +19,14 @@ process STRINGTIE_MERGE { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def args = task.ext.args ?: '' + def reference = annotation_gtf ? "-G $annotation_gtf" : "" """ stringtie \\ --merge $stringtie_gtf \\ - -G $annotation_gtf \\ - -o stringtie.merged.gtf + $reference \\ + -o stringtie.merged.gtf \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": From 32ad1746d172dfe7e1d3e7bd091d1469bd294512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jeanette=20T=C3=A5ngrot?= Date: Mon, 26 Sep 2022 15:45:01 +0200 Subject: [PATCH 03/11] New module: Vsearch sintax (#2094) * Add vsearch sintax process * Add tests for vsearch sintax * Add vsearch sintax process * Add tests for vsearch sintax * Update format with prettier * Remove trailing whitespace Co-authored-by: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> --- modules/vsearch/sintax/main.nf | 38 +++++++++++++++++++ modules/vsearch/sintax/meta.yml | 39 ++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/vsearch/sintax/main.nf | 13 +++++++ tests/modules/vsearch/sintax/nextflow.config | 5 +++ tests/modules/vsearch/sintax/test.yml | 8 ++++ 6 files changed, 107 insertions(+) create mode 100644 modules/vsearch/sintax/main.nf create mode 100644 modules/vsearch/sintax/meta.yml create mode 100644 tests/modules/vsearch/sintax/main.nf create mode 100644 tests/modules/vsearch/sintax/nextflow.config create mode 100644 tests/modules/vsearch/sintax/test.yml diff --git a/modules/vsearch/sintax/main.nf b/modules/vsearch/sintax/main.nf new file mode 100644 index 00000000000..e2ffbe8357a --- /dev/null +++ b/modules/vsearch/sintax/main.nf @@ -0,0 +1,38 @@ +process VSEARCH_SINTAX { + tag "${meta.id}" + label 'process_low' + + conda (params.enable_conda ? "bioconda::vsearch=2.21.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/vsearch:2.21.1--h95f258a_0': + 'quay.io/biocontainers/vsearch:2.21.1--h95f258a_0' }" + + input: + tuple val(meta), path(queryfasta) + path db + + output: + tuple val(meta), path('*.tsv') , optional: true, 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}" + + """ + vsearch \\ + --sintax $queryfasta \\ + --db $db \\ + --threads $task.cpus \\ + $args \\ + --tabbedout ${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + vsearch: \$(vsearch --version 2>&1 | head -n 1 | sed 's/vsearch //g' | sed 's/,.*//g' | sed 's/^v//' | sed 's/_.*//') + END_VERSIONS + """ +} diff --git a/modules/vsearch/sintax/meta.yml b/modules/vsearch/sintax/meta.yml new file mode 100644 index 00000000000..549c5060f51 --- /dev/null +++ b/modules/vsearch/sintax/meta.yml @@ -0,0 +1,39 @@ +name: "vsearch_sintax" +description: Taxonomic classification using the sintax algorithm. +keywords: + - vsearch + - sintax +tools: + - "vsearch": + description: "VSEARCH is a versatile open-source tool for microbiome analysis, including chimera detection, clustering, dereplication and rereplication, extraction, FASTA/FASTQ/SFF file processing, masking, orienting, pair-wise alignment, restriction site cutting, searching, shuffling, sorting, subsampling, and taxonomic classification of amplicon sequences for metagenomics, genomics, and population genetics. (USEARCH alternative)" + homepage: "https://github.com/torognes/vsearch" + documentation: "None" + tool_dev_url: "https://github.com/torognes/vsearch" + doi: "doi: 10.7717/peerj.2584" + licence: "['GPL v3-or-later OR BSD-2-clause']" + +input: + - meta: + type: map + description: Groovy Map containing query file information e.g. [ id:'test' ] + - queryfasta: + type: file + description: Query sequences in FASTA or FASTQ format + pattern: "*.{fasta,fa,fna,faa,fastq,fq}" + - db: + type: file + description: Reference database file in FASTA or UDB format + pattern: "*" + +output: + - tsv: + type: file + description: Results written to tab-delimited file + pattern: "*.{tsv}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@jtangrot" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 58c4997df2e..1e3f2812177 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2452,6 +2452,10 @@ vcftools: - modules/vcftools/** - tests/modules/vcftools/** +vsearch/sintax: + - modules/vsearch/sintax/** + - tests/modules/vsearch/sintax/** + vsearch/usearchglobal: - modules/vsearch/usearchglobal/** - tests/modules/vsearch/usearchglobal/** diff --git a/tests/modules/vsearch/sintax/main.nf b/tests/modules/vsearch/sintax/main.nf new file mode 100644 index 00000000000..14112f0bf9c --- /dev/null +++ b/tests/modules/vsearch/sintax/main.nf @@ -0,0 +1,13 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { VSEARCH_SINTAX } from '../../../../modules/vsearch/sintax/main.nf' + +workflow test_vsearch_sintax { + + query = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + db = file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) + + VSEARCH_SINTAX ( [[id:'test'], query], db ) +} diff --git a/tests/modules/vsearch/sintax/nextflow.config b/tests/modules/vsearch/sintax/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/vsearch/sintax/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/vsearch/sintax/test.yml b/tests/modules/vsearch/sintax/test.yml new file mode 100644 index 00000000000..5c5abd0a6c6 --- /dev/null +++ b/tests/modules/vsearch/sintax/test.yml @@ -0,0 +1,8 @@ +- name: vsearch sintax test_vsearch_sintax + command: nextflow run ./tests/modules/vsearch/sintax -entry test_vsearch_sintax -c ./tests/config/nextflow.config -c ./tests/modules/vsearch/sintax/nextflow.config + tags: + - vsearch + - vsearch/sintax + files: + - path: output/vsearch/test.tsv + md5sum: 93bc75fb89343e23fbae971df157b14a From 876bb807af00d19faca36c355d00ed4c6f8c65a8 Mon Sep 17 00:00:00 2001 From: Rafal Stepien <43926522+rafalstepien@users.noreply.github.com> Date: Mon, 26 Sep 2022 10:10:49 -0400 Subject: [PATCH 04/11] Update container version (#2060) Co-authored-by: James A. Fellows Yates From 6d6e3a018fc901f8b78bf148395c7368262bc6fe Mon Sep 17 00:00:00 2001 From: "Robert A. Petit III" Date: Mon, 26 Sep 2022 08:18:04 -0600 Subject: [PATCH 05/11] add module for mykrobe predict and genotyphi parse (#1818) * add module for mykrobe predict and genotyphi parse * Update meta.yml Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- modules/genotyphi/parse/main.nf | 33 ++++++++++++ modules/genotyphi/parse/meta.yml | 42 +++++++++++++++ modules/mykrobe/predict/main.nf | 41 +++++++++++++++ modules/mykrobe/predict/meta.yml | 51 +++++++++++++++++++ tests/config/pytest_modules.yml | 8 +++ tests/modules/genotyphi/parse/main.nf | 17 +++++++ tests/modules/genotyphi/parse/nextflow.config | 5 ++ tests/modules/genotyphi/parse/test.yml | 12 +++++ tests/modules/mykrobe/predict/main.nf | 15 ++++++ tests/modules/mykrobe/predict/nextflow.config | 5 ++ tests/modules/mykrobe/predict/test.yml | 10 ++++ 11 files changed, 239 insertions(+) create mode 100644 modules/genotyphi/parse/main.nf create mode 100644 modules/genotyphi/parse/meta.yml create mode 100644 modules/mykrobe/predict/main.nf create mode 100644 modules/mykrobe/predict/meta.yml create mode 100644 tests/modules/genotyphi/parse/main.nf create mode 100644 tests/modules/genotyphi/parse/nextflow.config create mode 100644 tests/modules/genotyphi/parse/test.yml create mode 100644 tests/modules/mykrobe/predict/main.nf create mode 100644 tests/modules/mykrobe/predict/nextflow.config create mode 100644 tests/modules/mykrobe/predict/test.yml diff --git a/modules/genotyphi/parse/main.nf b/modules/genotyphi/parse/main.nf new file mode 100644 index 00000000000..83da02bed11 --- /dev/null +++ b/modules/genotyphi/parse/main.nf @@ -0,0 +1,33 @@ +process GENOTYPHI_PARSE { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::genotyphi=1.9.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/genotyphi:1.9.1--hdfd78af_1': + 'quay.io/biocontainers/genotyphi:1.9.1--hdfd78af_1' }" + + input: + tuple val(meta), path(json) + + output: + 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}" + """ + parse_typhi_mykrobe.py \\ + --jsons $json \\ + --prefix ${prefix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + genotyphi: \$(echo \$(genotyphi --version 2>&1) | sed 's/^.*GenoTyphi v//;' ) + END_VERSIONS + """ +} diff --git a/modules/genotyphi/parse/meta.yml b/modules/genotyphi/parse/meta.yml new file mode 100644 index 00000000000..b2dcee0d535 --- /dev/null +++ b/modules/genotyphi/parse/meta.yml @@ -0,0 +1,42 @@ +name: "genotyphi_parse" +description: Genotype Salmonella Typhi from Mykrobe results +keywords: + - genotype + - Salmonella Typhi +tools: + - "genotyphi": + description: "Assign genotypes to Salmonella Typhi genomes based on VCF files (mapped to Typhi CT18 reference genome)" + homepage: "https://github.com/katholt/genotyphi" + documentation: "https://github.com/katholt/genotyphi" + tool_dev_url: "https://github.com/katholt/genotyphi" + doi: "https://github.com/katholt/genotyphi" + licence: "['GPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - json: + type: file + description: JSON formatted file of Mykrobe results + pattern: "*.json" + +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" + - tsv: + type: file + description: A tab-delimited file of predicted genotypes + pattern: "*.tsv" + +authors: + - "@rpetit3" diff --git a/modules/mykrobe/predict/main.nf b/modules/mykrobe/predict/main.nf new file mode 100644 index 00000000000..f5e2ccf271a --- /dev/null +++ b/modules/mykrobe/predict/main.nf @@ -0,0 +1,41 @@ +process MYKROBE_PREDICT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::mykrobe=0.11.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/mykrobe:0.11.0--py39h2add14b_1': + 'quay.io/biocontainers/mykrobe:0.11.0--py39h2add14b_1' }" + + input: + tuple val(meta), path(seqs) + val species + + output: + tuple val(meta), path("${prefix}.csv") , emit: csv + tuple val(meta), path("${prefix}.json"), 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}" + """ + mykrobe \\ + predict \\ + $args \\ + --species $species \\ + --threads $task.cpus \\ + --sample $prefix \\ + --format json_and_csv \\ + --output ${prefix} \\ + --seq $seqs + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mykrobe: \$(echo \$(mykrobe --version 2>&1) | sed 's/^.*mykrobe v//' ) + END_VERSIONS + """ +} diff --git a/modules/mykrobe/predict/meta.yml b/modules/mykrobe/predict/meta.yml new file mode 100644 index 00000000000..dd45525cf79 --- /dev/null +++ b/modules/mykrobe/predict/meta.yml @@ -0,0 +1,51 @@ +name: "mykrobe_predict" +description: AMR predictions for supported species +keywords: + - fastq + - bam + - antimicrobial resistance +tools: + - "mykrobe": + description: "Antibiotic resistance prediction in minutes" + homepage: "http://www.mykrobe.com/" + documentation: "https://github.com/Mykrobe-tools/mykrobe/wiki" + tool_dev_url: "https://github.com/Mykrobe-tools/mykrobe" + doi: "10.1038/ncomms10063" + licence: "['MIT']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - seqs: + type: file + description: BAM or FASTQ file + pattern: "*.{bam,fastq.gz,fq.gz}" + - species: + type: string + description: Species to make AMR prediction against + 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" + - csv: + type: file + description: AMR predictions in CSV format + pattern: "*.csv" + - json: + type: file + description: AMR predictions in JSON format + pattern: "*.json" + +authors: + - "@rpetit3" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 1e3f2812177..daa6ffab312 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1063,6 +1063,10 @@ genomescope2: - modules/genomescope2/** - tests/modules/genomescope2/** +genotyphi/parse: + - modules/genotyphi/parse/** + - tests/modules/genotyphi/parse/** + genrich: - modules/genrich/** - tests/modules/genrich/** @@ -1675,6 +1679,10 @@ muscle: - modules/muscle/** - tests/modules/muscle/** +mykrobe/predict: + - modules/mykrobe/predict/** + - tests/modules/mykrobe/predict/** + nanolyse: - modules/nanolyse/** - tests/modules/nanolyse/** diff --git a/tests/modules/genotyphi/parse/main.nf b/tests/modules/genotyphi/parse/main.nf new file mode 100644 index 00000000000..761d18c1029 --- /dev/null +++ b/tests/modules/genotyphi/parse/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MYKROBE_PREDICT } from '../../../../modules/mykrobe/predict/main.nf' +include { GENOTYPHI_PARSE } from '../../../../modules/genotyphi/parse/main.nf' + +workflow test_mykrobe_predict { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + MYKROBE_PREDICT ( input, "typhi" ) + GENOTYPHI_PARSE ( MYKROBE_PREDICT.out.json ) +} diff --git a/tests/modules/genotyphi/parse/nextflow.config b/tests/modules/genotyphi/parse/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/genotyphi/parse/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/genotyphi/parse/test.yml b/tests/modules/genotyphi/parse/test.yml new file mode 100644 index 00000000000..8d7e54fdc4c --- /dev/null +++ b/tests/modules/genotyphi/parse/test.yml @@ -0,0 +1,12 @@ +- name: genotyphi parse test_mykrobe_predict + command: nextflow run ./tests/modules/genotyphi/parse -entry test_mykrobe_predict -c ./tests/config/nextflow.config -c ./tests/modules/genotyphi/parse/nextflow.config + tags: + - genotyphi/parse + - genotyphi + files: + - path: output/genotyphi/test_predictResults.tsv + contains: ["genome", "confidence", "supported", "test", "NA"] + - path: output/mykrobe/test.csv + contains: ["susceptibility", "genotype_model", "variants", "test.paired_end.bam"] + - path: output/mykrobe/test.json + contains: ["susceptibility", "kmer_count", "files", "test.paired_end.bam"] diff --git a/tests/modules/mykrobe/predict/main.nf b/tests/modules/mykrobe/predict/main.nf new file mode 100644 index 00000000000..384add1e3e3 --- /dev/null +++ b/tests/modules/mykrobe/predict/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MYKROBE_PREDICT } from '../../../../modules/mykrobe/predict/main.nf' + +workflow test_mykrobe_predict { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + MYKROBE_PREDICT ( input, "typhi" ) +} diff --git a/tests/modules/mykrobe/predict/nextflow.config b/tests/modules/mykrobe/predict/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/mykrobe/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/mykrobe/predict/test.yml b/tests/modules/mykrobe/predict/test.yml new file mode 100644 index 00000000000..9116bde4383 --- /dev/null +++ b/tests/modules/mykrobe/predict/test.yml @@ -0,0 +1,10 @@ +- name: mykrobe predict test_mykrobe_predict + command: nextflow run ./tests/modules/mykrobe/predict -entry test_mykrobe_predict -c ./tests/config/nextflow.config -c ./tests/modules/mykrobe/predict/nextflow.config + tags: + - mykrobe/predict + - mykrobe + files: + - path: output/mykrobe/test.csv + contains: ["susceptibility", "genotype_model", "variants", "test.paired_end.bam"] + - path: output/mykrobe/test.json + contains: ["susceptibility", "kmer_count", "files", "test.paired_end.bam"] From 0a59baf2933982fe6cd6a7379813cc9767ec0e46 Mon Sep 17 00:00:00 2001 From: Petros <70012389+petroslk@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:48:35 +0200 Subject: [PATCH 06/11] Add args to mlst (#1962) Update main.nf Add args in main command to allow for parsing of arguments from config file Co-authored-by: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> --- modules/mlst/main.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/mlst/main.nf b/modules/mlst/main.nf index 65396548be5..ca86fba834f 100644 --- a/modules/mlst/main.nf +++ b/modules/mlst/main.nf @@ -22,6 +22,7 @@ process MLST { def prefix = task.ext.prefix ?: "${meta.id}" """ mlst \\ + $args \\ --threads $task.cpus \\ $fasta \\ > ${prefix}.tsv From e3e61068c1ca1f6b27a4a723a2fa65ac00499971 Mon Sep 17 00:00:00 2001 From: "Robert A. Petit III" Date: Mon, 26 Sep 2022 09:06:08 -0600 Subject: [PATCH 07/11] add module for seroba (#1816) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add module for seroba * fix lint * Update modules/seroba/run/meta.yml Co-authored-by: Sébastien Guizard * Update modules/seroba/run/main.nf Co-authored-by: Sébastien Guizard --- modules/seroba/run/main.nf | 39 ++++++++++++++++++++ modules/seroba/run/meta.yml | 47 ++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/seroba/run/main.nf | 15 ++++++++ tests/modules/seroba/run/nextflow.config | 5 +++ tests/modules/seroba/run/test.yml | 8 ++++ 6 files changed, 118 insertions(+) create mode 100644 modules/seroba/run/main.nf create mode 100644 modules/seroba/run/meta.yml create mode 100644 tests/modules/seroba/run/main.nf create mode 100644 tests/modules/seroba/run/nextflow.config create mode 100644 tests/modules/seroba/run/test.yml diff --git a/modules/seroba/run/main.nf b/modules/seroba/run/main.nf new file mode 100644 index 00000000000..2179eb47a97 --- /dev/null +++ b/modules/seroba/run/main.nf @@ -0,0 +1,39 @@ +process SEROBA_RUN { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::seroba=1.0.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/seroba:1.0.2--pyhdfd78af_1': + 'quay.io/biocontainers/seroba:1.0.2--pyhdfd78af_1' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("${prefix}/${prefix}.tsv") , emit: tsv + tuple val(meta), path("${prefix}/detailed_serogroup_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 ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + """ + seroba \\ + runSerotyping \\ + $reads \\ + $prefix \\ + $args + + # Avoid name collisions + mv ${prefix}/pred.tsv ${prefix}/${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + seroba: \$(seroba version) + END_VERSIONS + """ +} diff --git a/modules/seroba/run/meta.yml b/modules/seroba/run/meta.yml new file mode 100644 index 00000000000..7d2daad76a3 --- /dev/null +++ b/modules/seroba/run/meta.yml @@ -0,0 +1,47 @@ +name: "seroba_run" +description: Determine Streptococcus pneumoniae serotype from Illumina paired-end reads +keywords: + - fastq + - serotype + - Streptococcus pneumoniae +tools: + - "seroba": + description: "SeroBA is a k-mer based pipeline to identify the Serotype from Illumina NGS reads for given references." + homepage: "https://sanger-pathogens.github.io/seroba/" + documentation: "https://sanger-pathogens.github.io/seroba/" + tool_dev_url: "https://github.com/sanger-pathogens/seroba" + doi: "10.1099/mgen.0.000186" + licence: "['GPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: Input Illunina paired-end FASTQ files + pattern: "*.{fq.gz,fastq.gz}" + +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" + - tsv: + type: file + description: The predicted serotype in tab-delimited format + pattern: "*.tsv" + - txt: + type: file + description: A detailed description of the predicted serotype + pattern: "*.txt" + +authors: + - "@rpetit3" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index daa6ffab312..c09ac79d869 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -2183,6 +2183,10 @@ seqwish/induce: - modules/seqwish/induce/** - tests/modules/seqwish/induce/** +seroba/run: + - modules/seroba/run/** + - tests/modules/seroba/run/** + sexdeterrmine: - modules/sexdeterrmine/** - tests/modules/sexdeterrmine/** diff --git a/tests/modules/seroba/run/main.nf b/tests/modules/seroba/run/main.nf new file mode 100644 index 00000000000..62df1d3ff75 --- /dev/null +++ b/tests/modules/seroba/run/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SEROBA_RUN } from '../../../../modules/seroba/run/main.nf' + +workflow test_seroba_run { + + input = [ [ id:'test', single_end:false ], // meta map + [ file("https://github.com/nf-core/test-datasets/raw/bacass/ERR044595_1M_1.fastq.gz", checkIfExists: true), + file("https://github.com/nf-core/test-datasets/raw/bacass/ERR044595_1M_2.fastq.gz", checkIfExists: true) ] + ] + + SEROBA_RUN ( input ) +} diff --git a/tests/modules/seroba/run/nextflow.config b/tests/modules/seroba/run/nextflow.config new file mode 100644 index 00000000000..50f50a7a357 --- /dev/null +++ b/tests/modules/seroba/run/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/seroba/run/test.yml b/tests/modules/seroba/run/test.yml new file mode 100644 index 00000000000..2aa6f81488e --- /dev/null +++ b/tests/modules/seroba/run/test.yml @@ -0,0 +1,8 @@ +- name: seroba run test_seroba_run + command: nextflow run ./tests/modules/seroba/run -entry test_seroba_run -c ./tests/config/nextflow.config -c ./tests/modules/seroba/run/nextflow.config + tags: + - seroba + - seroba/run + files: + - path: output/seroba/test/test.tsv + md5sum: 28b2ce33df270172e6a39db4429e684b From d1c8bddaaa5e44d9b9dbd645c8bb365b4e29ed67 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Mon, 26 Sep 2022 11:21:45 -0400 Subject: [PATCH 08/11] fix typo in tag of genmap_mappability (#1527) fix tyop in tag of genmap_mappability --- modules/genmap/mappability/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/genmap/mappability/main.nf b/modules/genmap/mappability/main.nf index 50a174931b4..0233a271578 100644 --- a/modules/genmap/mappability/main.nf +++ b/modules/genmap/mappability/main.nf @@ -1,5 +1,5 @@ process GENMAP_MAPPABILITY { - tag '$fasta' + tag '$index' label 'process_high' conda (params.enable_conda ? "bioconda::genmap=1.3.0" : null) From 8e21005d53b6d4675d5245ba30695c915665982a Mon Sep 17 00:00:00 2001 From: Guoying Qi <729395+gq1@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:43:41 +0100 Subject: [PATCH 09/11] Add blast/tblastn module (#2092) * cherry pick the module files from sanger-tol branch and update the test data from official nf-core test datasets * Update modules/blast/tblastn/main.nf, align the emit Co-authored-by: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Co-authored-by: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> --- modules/blast/tblastn/main.nf | 37 +++++++++++++++++++ modules/blast/tblastn/meta.yml | 41 +++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/blast/tblastn/main.nf | 15 ++++++++ tests/modules/blast/tblastn/nextflow.config | 12 ++++++ tests/modules/blast/tblastn/test.yml | 25 +++++++++++++ 6 files changed, 134 insertions(+) create mode 100644 modules/blast/tblastn/main.nf create mode 100644 modules/blast/tblastn/meta.yml create mode 100644 tests/modules/blast/tblastn/main.nf create mode 100644 tests/modules/blast/tblastn/nextflow.config create mode 100644 tests/modules/blast/tblastn/test.yml diff --git a/modules/blast/tblastn/main.nf b/modules/blast/tblastn/main.nf new file mode 100644 index 00000000000..7eafb321958 --- /dev/null +++ b/modules/blast/tblastn/main.nf @@ -0,0 +1,37 @@ +process BLAST_TBLASTN { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? 'bioconda::blast=2.12.0' : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/blast:2.12.0--pl5262h3289130_0' : + 'quay.io/biocontainers/blast:2.12.0--pl5262h3289130_0' }" + + input: + tuple val(meta), path(fasta) + path db + + output: + tuple val(meta), path('*.tblastn.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}" + """ + DB=`find -L ./ -name "*.nsq" | sed 's/.nsq//'` + tblastn \\ + -num_threads $task.cpus \\ + -db \$DB \\ + -query $fasta \\ + $args \\ + -out ${prefix}.tblastn.txt + cat <<-END_VERSIONS > versions.yml + "${task.process}": + blast: \$(tblastn -version 2>&1 | sed 's/^.*tblastn: //; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/blast/tblastn/meta.yml b/modules/blast/tblastn/meta.yml new file mode 100644 index 00000000000..2359cae6b7b --- /dev/null +++ b/modules/blast/tblastn/meta.yml @@ -0,0 +1,41 @@ +name: blast_tblastn +description: Queries a BLAST DNA database +keywords: + - fasta + - blast + - tblastn + - DNA sequence +tools: + - blast: + description: | + Protein to Translated Nucleotide BLAST. + homepage: https://blast.ncbi.nlm.nih.gov/Blast.cgi + documentation: https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=Blastdocs + doi: 10.1016/S0022-2836(05)80360-2 + licence: ["US-Government-Work"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input fasta file containing queries sequences + pattern: "*.{fa,fasta}" + - db: + type: directory + description: Directory containing blast database + pattern: "*" +output: + - txt: + type: file + description: File containing blastn hits + pattern: "*.{tblastn.txt}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@yumisims" + - "@gq2" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index c09ac79d869..40a58294088 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -379,6 +379,10 @@ blast/makeblastdb: - modules/blast/makeblastdb/** - tests/modules/blast/makeblastdb/** +blast/tblastn: + - modules/blast/tblastn/** + - tests/modules/blast/tblastn/** + bowtie/align: - modules/bowtie/align/** - modules/bowtie/build/** diff --git a/tests/modules/blast/tblastn/main.nf b/tests/modules/blast/tblastn/main.nf new file mode 100644 index 00000000000..6d343660193 --- /dev/null +++ b/tests/modules/blast/tblastn/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BLAST_TBLASTN } from '../../../../modules/blast/tblastn/main.nf' +include { BLAST_MAKEBLASTDB } from '../../../../modules/blast/makeblastdb/main.nf' + +workflow test_blast_tblastn { + + input = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + input_pep = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + + BLAST_MAKEBLASTDB ( input ) + BLAST_TBLASTN ( [ [id:'test'], input_pep ], BLAST_MAKEBLASTDB.out.db ) +} diff --git a/tests/modules/blast/tblastn/nextflow.config b/tests/modules/blast/tblastn/nextflow.config new file mode 100644 index 00000000000..c4596a08399 --- /dev/null +++ b/tests/modules/blast/tblastn/nextflow.config @@ -0,0 +1,12 @@ +process { + + withName: BLAST_MAKEBLASTDB { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + ext.args = '-dbtype nucl' + } + + withName: BLAST_TBLASTN { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + ext.args = '-outfmt 6 -task tblastn -evalue 0.001 -qcov_hsp_perc 60 -max_target_seqs 1' + } +} diff --git a/tests/modules/blast/tblastn/test.yml b/tests/modules/blast/tblastn/test.yml new file mode 100644 index 00000000000..b545edbe2c7 --- /dev/null +++ b/tests/modules/blast/tblastn/test.yml @@ -0,0 +1,25 @@ +- name: blast tblastn + command: nextflow run ./tests/modules/blast/tblastn -entry test_blast_tblastn -c ./tests/config/nextflow.config -c ./tests/modules/blast/tblastn/nextflow.config + tags: + - blast + - blast/tblastn + files: + - path: ./output/blast/test.tblastn.txt + md5sum: c26ccfa5ceae82fc6affdc77f5505b62 + - path: ./output/blast/versions.yml + md5sum: 6d23563b8d75e2fe1e03d3fbe10098a9 + - path: ./output/blast/blast_db/genome.fasta.nsq + md5sum: 982cbc7d9e38743b9b1037588862b9da + - path: ./output/blast/blast_db/genome.fasta.nin + - path: ./output/blast/blast_db/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 + - path: ./output/blast/blast_db/genome.fasta.nhr + md5sum: f4b4ddb034fd3dd7b25c89e9d50c004e + - path: ./output/blast/blast_db/genome.fasta.ndb + md5sum: 0d553c830656469211de113c5022f06d + - path: ./output/blast/blast_db/genome.fasta.not + md5sum: 1e53e9d08f1d23af0299cfa87478a7bb + - path: ./output/blast/blast_db/genome.fasta.nto + md5sum: 33cdeccccebe80329f1fdbee7f5874cb + - path: ./output/blast/blast_db/genome.fasta.ntf + md5sum: de1250813f0c7affc6d12dac9d0fb6bb From 1d668eefa246e93ffdf2ef169d01b5d11cd8b436 Mon Sep 17 00:00:00 2001 From: Simon Heumos Date: Mon, 26 Sep 2022 18:01:21 +0200 Subject: [PATCH 10/11] Bump `seqwish/induce` to v0.7.6 (#2083) * Update seqwish to version 0.7.2 * seqwish can work with a comma-separated list of PAFs * level with nf-core/modules master branch * update seqwish/induce to v0.7.6 * add pangenome test data * test seqwish/induce v0.7.6 with pangenomics test data * we already have pointed to the pangenomics test data sets * update paths to test data * add path to bgzipped fa, gzi, fai * remove one tab * remove one tab * actually execute the 2nd test * try to fix versions.yml * pangenomic tests can be run in their own subworkflow * maybe the csv input is the problem * remove space as suggested by Rike * csv input was not the problem * update test.yml * typo * enable pangenome tests * add md5sum for pangenomic test * Update tests/modules/seqwish/induce/test.yml Co-authored-by: Gisela Gabernet * PAF input is a list of files * beautify comment Co-authored-by: Michael L Heuer Co-authored-by: Gisela Gabernet Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- modules/seqwish/induce/main.nf | 19 ++++++++++++------- modules/seqwish/induce/meta.yml | 6 +++--- tests/config/test_data.config | 4 +++- tests/modules/seqwish/induce/main.nf | 11 ++++++++++- tests/modules/seqwish/induce/test.yml | 13 +++++++++++-- 5 files changed, 39 insertions(+), 14 deletions(-) diff --git a/modules/seqwish/induce/main.nf b/modules/seqwish/induce/main.nf index 88c4a9dc752..405bfd33bb1 100644 --- a/modules/seqwish/induce/main.nf +++ b/modules/seqwish/induce/main.nf @@ -2,11 +2,11 @@ process SEQWISH_INDUCE { tag "$meta.id" label 'process_medium' - // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. - conda (params.enable_conda ? 'bioconda::seqwish=0.7.2' : null) + conda (params.enable_conda ? 'bioconda::seqwish=0.7.6' : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/seqwish:0.7.2--h2e03b76_0' : - 'quay.io/biocontainers/seqwish:0.7.2--h2e03b76_0' }" + 'https://depot.galaxyproject.org/singularity/seqwish:0.7.6--h5b5514e_1' : + 'quay.io/biocontainers/seqwish:0.7.6--h5b5514e_1' }" input: tuple val(meta), path(paf), path(fasta) @@ -21,18 +21,23 @@ process SEQWISH_INDUCE { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '0.7.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions. + def input = paf.join(',') // this ensures that we can actually input a + // comma-separated list of PAF files as required by + // https://github.com/nf-core/pangenome. If one wants to use this, + // ensure that you put a ".collect()" behind your channel. + // See https://github.com/nf-core/pangenome/blob/34149c6cdc19bce3a7b99f97c769d8986a8d429b/main.nf#L543 + // for an example. """ seqwish \\ --threads $task.cpus \\ - --paf-alns=$paf \\ + --paf-alns=$input \\ --seqs=$fasta \\ --gfa=${prefix}.gfa \\ $args cat <<-END_VERSIONS > versions.yml "${task.process}": - seqwish: $VERSION + seqwish: \$(echo \$(seqwish --version 2>&1) | cut -f 1 -d '-' | cut -f 2 -d 'v') END_VERSIONS """ } diff --git a/modules/seqwish/induce/meta.yml b/modules/seqwish/induce/meta.yml index b40360c64b2..f6b922366d6 100644 --- a/modules/seqwish/induce/meta.yml +++ b/modules/seqwish/induce/meta.yml @@ -21,9 +21,9 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - paf: - type: file - description: PAF file of alignments - pattern: "*.{paf,paf.gz}" + type: list + description: comma-separated PAF file(s) of alignments, single entry allowed + pattern: "[*.{paf,paf.gz},*.{paf,paf.gz},...]" - fasta: type: file description: FASTA file used to generate alignments diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 9487bc1c83a..68c2e56d397 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -194,7 +194,9 @@ params { } 'pangenome' { pangenome_fa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa" - pangenome_fa_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz" + pangenome_fa_bgzip = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz" + pangenome_fa_bgzip_fai = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz.fai" + pangenome_fa_bgzip_gzi = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz.gzi" pangenome_paf = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf" pangenome_paf_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.paf.gz" pangenome_seqwish_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.seqwish.gfa" diff --git a/tests/modules/seqwish/induce/main.nf b/tests/modules/seqwish/induce/main.nf index 6388fea2a95..b83a904f2ff 100644 --- a/tests/modules/seqwish/induce/main.nf +++ b/tests/modules/seqwish/induce/main.nf @@ -4,7 +4,7 @@ nextflow.enable.dsl = 2 include { SEQWISH_INDUCE } from '../../../../modules/seqwish/induce/main.nf' -workflow test_seqwish_induce { +workflow test_seqwish_induce_transcriptome { input = [ [ id:'test' ], // meta map [ file(params.test_data['sarscov2']['genome']['transcriptome_paf'], checkIfExists: true)], [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] @@ -12,3 +12,12 @@ workflow test_seqwish_induce { SEQWISH_INDUCE ( input ) } + +workflow test_seqwish_induce_pangenome { + input = [ [ id:'test' ], // meta map + [ file(params.test_data['homo_sapiens']['pangenome']['pangenome_paf'], checkIfExists: true)], + [ file(params.test_data['homo_sapiens']['pangenome']['pangenome_fa'], checkIfExists: true) ] + ] + + SEQWISH_INDUCE ( input ) +} diff --git a/tests/modules/seqwish/induce/test.yml b/tests/modules/seqwish/induce/test.yml index d5a8a7cde88..8a700f3e8af 100644 --- a/tests/modules/seqwish/induce/test.yml +++ b/tests/modules/seqwish/induce/test.yml @@ -1,8 +1,17 @@ -- name: seqwish induce - command: nextflow run ./tests/modules/seqwish/induce -entry test_seqwish_induce -c ./tests/config/nextflow.config -c ./tests/modules/seqwish/induce/nextflow.config +- name: seqwish induce transcriptome + command: nextflow run ./tests/modules/seqwish/induce -entry test_seqwish_induce_transcriptome -c ./tests/config/nextflow.config -c ./tests/modules/seqwish/induce/nextflow.config tags: - seqwish - seqwish/induce files: - path: output/seqwish/test.gfa md5sum: 216a02d3aca322a457c31a62c628548e + +- name: seqwish induce pangenome + command: nextflow run ./tests/modules/seqwish/induce -entry test_seqwish_induce_pangenome -c ./tests/config/nextflow.config -c ./tests/modules/seqwish/induce/nextflow.config + tags: + - seqwish + - seqwish/induce + files: + - path: output/seqwish/test.gfa + md5sum: a73e998dc13a75d86d4685b12625d784 From f0a86eaf5bf6ca73c5571193edd00c25bfa308f5 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Mon, 26 Sep 2022 17:44:36 +0100 Subject: [PATCH 11/11] Multithreaded samtools commands (#2080) * Multithreaded samtools commands * Updated the checksums since the BAM files include the actual command line Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> --- modules/samtools/ampliconclip/main.nf | 1 + modules/samtools/depth/main.nf | 1 + modules/samtools/idxstats/main.nf | 1 + tests/modules/samtools/ampliconclip/test.yml | 12 ++++++------ 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/samtools/ampliconclip/main.nf b/modules/samtools/ampliconclip/main.nf index 2b90c9538ed..3a3bb8522be 100644 --- a/modules/samtools/ampliconclip/main.nf +++ b/modules/samtools/ampliconclip/main.nf @@ -31,6 +31,7 @@ process SAMTOOLS_AMPLICONCLIP { """ samtools \\ ampliconclip \\ + --threads ${task.cpus-1} \\ $args \\ $rejects \\ $stats \\ diff --git a/modules/samtools/depth/main.nf b/modules/samtools/depth/main.nf index e508a5f711c..d5f2ba60c9b 100644 --- a/modules/samtools/depth/main.nf +++ b/modules/samtools/depth/main.nf @@ -23,6 +23,7 @@ process SAMTOOLS_DEPTH { """ samtools \\ depth \\ + --threads ${task.cpus-1} \\ $args \\ -o ${prefix}.tsv \\ $bam diff --git a/modules/samtools/idxstats/main.nf b/modules/samtools/idxstats/main.nf index 4b2454198e5..87618e5f38b 100644 --- a/modules/samtools/idxstats/main.nf +++ b/modules/samtools/idxstats/main.nf @@ -24,6 +24,7 @@ process SAMTOOLS_IDXSTATS { """ samtools \\ idxstats \\ + --threads ${task.cpus-1} \\ $bam \\ > ${prefix}.idxstats diff --git a/tests/modules/samtools/ampliconclip/test.yml b/tests/modules/samtools/ampliconclip/test.yml index cfc10dd1c7c..dd9fdbb74c4 100644 --- a/tests/modules/samtools/ampliconclip/test.yml +++ b/tests/modules/samtools/ampliconclip/test.yml @@ -5,7 +5,7 @@ - samtools/ampliconclip files: - path: output/samtools/test.bam - md5sum: d270363a7fb3d96be2df211099efc75b + md5sum: 69e4ba713447864231f6cbbaf036c51d - name: samtools ampliconclip no stats with rejects command: nextflow run ./tests/modules/samtools/ampliconclip -entry test_samtools_ampliconclip_no_stats_with_rejects -c ./tests/config/nextflow.config -c ./tests/modules/samtools/ampliconclip/nextflow.config @@ -14,9 +14,9 @@ - samtools/ampliconclip files: - path: output/samtools/test.bam - md5sum: e7c4e64c259212e1670f6de96a5549b4 + md5sum: dd2ed9d7cc4ddc070ece2dccc577f94b - path: output/samtools/test.cliprejects.bam - md5sum: b7c057b11950c2271a0c92236bee94b7 + md5sum: 7d641f6da838f41d75eaabbd897f60bd - name: samtools ampliconclip with stats with rejects command: nextflow run ./tests/modules/samtools/ampliconclip -entry test_samtools_ampliconclip_with_stats_with_rejects -c ./tests/config/nextflow.config -c ./tests/modules/samtools/ampliconclip/nextflow.config @@ -25,8 +25,8 @@ - samtools/ampliconclip files: - path: output/samtools/test.bam - md5sum: e75992d4ff69cbaed9a089231be86b5e + md5sum: 6c19afc0873fba2f4e530eabf61c0735 - path: output/samtools/test.cliprejects.bam - md5sum: 729f03e7a2801d2c56c32bef8f3d6ead + md5sum: 1dfb61aa80d8e90add324ed61ed17061 - path: output/samtools/test.clipstats.txt - md5sum: fc23355e1743d47f2541f2cb1a7a0cda + md5sum: 05ead360a98fab6a678056e326c4f1f3