From 38b450d0be865af4f60dd4674a4fc47ddbf1e6e1 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sidorov Date: Tue, 16 Mar 2021 09:54:29 +0000 Subject: [PATCH 001/313] hifiasm copied from fastqc --- software/hifiasm/functions.nf | 59 ++++++++++++++++++++++++++++ software/hifiasm/main.nf | 47 +++++++++++++++++++++++ software/hifiasm/meta.yml | 72 +++++++++++++++++++++++++++++++++++ 3 files changed, 178 insertions(+) create mode 100644 software/hifiasm/functions.nf create mode 100644 software/hifiasm/main.nf create mode 100644 software/hifiasm/meta.yml diff --git a/software/hifiasm/functions.nf b/software/hifiasm/functions.nf new file mode 100644 index 00000000..d25eea86 --- /dev/null +++ b/software/hifiasm/functions.nf @@ -0,0 +1,59 @@ +/* + * ----------------------------------------------------- + * Utility functions used in nf-core DSL2 module files + * ----------------------------------------------------- + */ + +/* + * Extract name of software tool from process name using $task.process + */ +def getSoftwareName(task_process) { + return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase() +} + +/* + * Function to initialise default values and to generate a Groovy Map of available options for nf-core modules + */ +def initOptions(Map args) { + def Map options = [:] + options.args = args.args ?: '' + options.args2 = args.args2 ?: '' + options.publish_by_id = args.publish_by_id ?: false + options.publish_dir = args.publish_dir ?: '' + options.publish_files = args.publish_files + options.suffix = args.suffix ?: '' + return options +} + +/* + * Tidy up and join elements of a list to return a path string + */ +def getPathFromList(path_list) { + def paths = path_list.findAll { item -> !item?.trim().isEmpty() } // Remove empty entries + paths = paths.collect { it.trim().replaceAll("^[/]+|[/]+\$", "") } // Trim whitespace and trailing slashes + return paths.join('/') +} + +/* + * Function to save/publish module results + */ +def saveFiles(Map args) { + if (!args.filename.endsWith('.version.txt')) { + def ioptions = initOptions(args.options) + def path_list = [ ioptions.publish_dir ?: args.publish_dir ] + if (ioptions.publish_by_id) { + path_list.add(args.publish_id) + } + if (ioptions.publish_files instanceof Map) { + for (ext in ioptions.publish_files) { + if (args.filename.endsWith(ext.key)) { + def ext_list = path_list.collect() + ext_list.add(ext.value) + return "${getPathFromList(ext_list)}/$args.filename" + } + } + } else if (ioptions.publish_files == null) { + return "${getPathFromList(path_list)}/$args.filename" + } + } +} diff --git a/software/hifiasm/main.nf b/software/hifiasm/main.nf new file mode 100644 index 00000000..4e847876 --- /dev/null +++ b/software/hifiasm/main.nf @@ -0,0 +1,47 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process FASTQC { + tag "$meta.id" + label 'process_medium' + publishDir "${params.outdir}", + mode: params.publish_dir_mode, + saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } + + conda (params.enable_conda ? "bioconda::fastqc=0.11.9" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0" + } else { + container "quay.io/biocontainers/fastqc:0.11.9--0" + } + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*.html"), emit: html + tuple val(meta), path("*.zip") , emit: zip + path "*.version.txt" , emit: version + + script: + // Add soft-links to original FastQs for consistent naming in pipeline + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}.${options.suffix}" : "${meta.id}" + if (meta.single_end) { + """ + [ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz + fastqc $options.args --threads $task.cpus ${prefix}.fastq.gz + fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt + """ + } else { + """ + [ ! -f ${prefix}_1.fastq.gz ] && ln -s ${reads[0]} ${prefix}_1.fastq.gz + [ ! -f ${prefix}_2.fastq.gz ] && ln -s ${reads[1]} ${prefix}_2.fastq.gz + fastqc $options.args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz + fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt + """ + } +} diff --git a/software/hifiasm/meta.yml b/software/hifiasm/meta.yml new file mode 100644 index 00000000..413aad8d --- /dev/null +++ b/software/hifiasm/meta.yml @@ -0,0 +1,72 @@ +name: fastqc +description: Run FastQC on sequenced reads +keywords: + - quality control + - qc + - adapters + - fastq +tools: + - fastqc: + description: | + FastQC gives general quality metrics about your reads. + It provides information about the quality score distribution + across your reads, the per base sequence content (%A/C/G/T). + You get information about adapter contamination and other + overrepresented sequences. + homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ + documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/ +params: + - outdir: + type: string + description: | + The pipeline's output directory. By default, the module will + output files into `$params.outdir/` + - publish_dir_mode: + type: string + description: | + Value for the Nextflow `publishDir` mode parameter. + Available: symlink, rellink, link, copy, copyNoFollow, move. + - enable_conda: + type: boolean + description: | + Run the module with Conda using the software specified + via the `conda` directive + - singularity_pull_docker_container: + type: boolean + description: | + Instead of directly downloading Singularity images for use with Singularity, + force the workflow to pull and convert Docker containers instead. +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - html: + type: file + description: FastQC report + pattern: "*_{fastqc.html}" + - zip: + type: file + description: FastQC report archive + pattern: "*_{fastqc.zip}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" +authors: + - "@drpatelh" + - "@grst" + - "@ewels" + - "@FelixKrueger" From 2f675fbe7c60a67649dd4a02e72e2f1ee79f24d3 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sidorov Date: Tue, 16 Mar 2021 11:37:06 +0000 Subject: [PATCH 002/313] hifiasm tests init from fastqc --- tests/software/hifiasm/main.nf | 28 ++++++++++++++++++++++++++++ tests/software/hifiasm/test.yml | 19 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 tests/software/hifiasm/main.nf create mode 100644 tests/software/hifiasm/test.yml diff --git a/tests/software/hifiasm/main.nf b/tests/software/hifiasm/main.nf new file mode 100644 index 00000000..f10b2357 --- /dev/null +++ b/tests/software/hifiasm/main.nf @@ -0,0 +1,28 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { FASTQC } from '../../../software/fastqc/main.nf' addParams( options: [:] ) + +/* + * Test with single-end data + */ +workflow test_fastqc_single_end { + + def input = [] + input = [ [ id:'test', single_end:true ], // meta map + [ file("${launchDir}/tests/data/genomics/sarscov2/fastq/test_1.fastq.gz", checkIfExists: true) ] ] + FASTQC ( input ) +} + +/* + * Test with paired-end data + */ +workflow test_fastqc_paired_end { + + def input = [] + input = [[id: 'test', single_end: false], // meta map + [file("${launchDir}/tests/data/genomics/sarscov2/fastq/test_1.fastq.gz", checkIfExists: true), + file("${launchDir}/tests/data/genomics/sarscov2/fastq/test_2.fastq.gz", checkIfExists: true)]] + FASTQC (input) +} diff --git a/tests/software/hifiasm/test.yml b/tests/software/hifiasm/test.yml new file mode 100644 index 00000000..0fe0ebe0 --- /dev/null +++ b/tests/software/hifiasm/test.yml @@ -0,0 +1,19 @@ +- name: fastqc single-end + command: nextflow run ./tests/software/fastqc/ -entry test_fastqc_single_end -c tests/config/nextflow.config + tags: + - fastqc + - fastqc_single_end + files: + - path: ./output/fastqc/test_fastqc.html + - path: ./output/fastqc/test_fastqc.zip + +- name: fastqc paired-end + command: nextflow run ./tests/software/fastqc/ -entry test_fastqc_paired_end -c tests/config/nextflow.config + tags: + - fastqc + - fastqc_paired_end + files: + - path: ./output/fastqc/test_1_fastqc.html + - path: ./output/fastqc/test_2_fastqc.html + - path: ./output/fastqc/test_2_fastqc.zip + - path: ./output/fastqc/test_1_fastqc.zip From 390c835f9fc47574654aa0bfd55556bf376e98f2 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sidorov Date: Tue, 16 Mar 2021 11:54:42 +0000 Subject: [PATCH 003/313] meta.yml init; test.yml and main.nf for printing version --- software/hifiasm/meta.yml | 23 ++++++++++------------- tests/software/hifiasm/main.nf | 18 +++++++++--------- tests/software/hifiasm/test.yml | 22 +++++----------------- 3 files changed, 24 insertions(+), 39 deletions(-) diff --git a/software/hifiasm/meta.yml b/software/hifiasm/meta.yml index 413aad8d..9ef62628 100644 --- a/software/hifiasm/meta.yml +++ b/software/hifiasm/meta.yml @@ -1,20 +1,17 @@ -name: fastqc -description: Run FastQC on sequenced reads +name: hifiasm +description: Run hifiasm on Pacbio HiFi reads keywords: - - quality control - - qc - - adapters + - genome assembly + - pacbaio + - hifi + - long reads - fastq tools: - - fastqc: + - hifiasm: description: | - FastQC gives general quality metrics about your reads. - It provides information about the quality score distribution - across your reads, the per base sequence content (%A/C/G/T). - You get information about adapter contamination and other - overrepresented sequences. - homepage: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/ - documentation: https://www.bioinformatics.babraham.ac.uk/projects/fastqc/Help/ + hifiasm generates a genome assembly from long Pacbio HiFi reads. ...Haplotype resolution ...Using short reads. + homepage: https://github.com/chhylp123/hifiasm + documentation: https://github.com/chhylp123/hifiasm params: - outdir: type: string diff --git a/tests/software/hifiasm/main.nf b/tests/software/hifiasm/main.nf index f10b2357..66824584 100644 --- a/tests/software/hifiasm/main.nf +++ b/tests/software/hifiasm/main.nf @@ -2,27 +2,27 @@ nextflow.enable.dsl = 2 -include { FASTQC } from '../../../software/fastqc/main.nf' addParams( options: [:] ) +include { HIFIASM } from '../../../software/hifiasm/main.nf' addParams( options: [:] ) -/* +/* * Test with single-end data */ -workflow test_fastqc_single_end { +/* workflow test_fastqc_single_end { def input = [] input = [ [ id:'test', single_end:true ], // meta map [ file("${launchDir}/tests/data/genomics/sarscov2/fastq/test_1.fastq.gz", checkIfExists: true) ] ] FASTQC ( input ) -} +} */ /* - * Test with paired-end data + * Test version printing */ -workflow test_fastqc_paired_end { +workflow test_hifiasm_version { - def input = [] +/* def input = [] input = [[id: 'test', single_end: false], // meta map [file("${launchDir}/tests/data/genomics/sarscov2/fastq/test_1.fastq.gz", checkIfExists: true), - file("${launchDir}/tests/data/genomics/sarscov2/fastq/test_2.fastq.gz", checkIfExists: true)]] - FASTQC (input) + file("${launchDir}/tests/data/genomics/sarscov2/fastq/test_2.fastq.gz", checkIfExists: true)]] */ + HIFIASM () } diff --git a/tests/software/hifiasm/test.yml b/tests/software/hifiasm/test.yml index 0fe0ebe0..3825b238 100644 --- a/tests/software/hifiasm/test.yml +++ b/tests/software/hifiasm/test.yml @@ -1,19 +1,7 @@ -- name: fastqc single-end - command: nextflow run ./tests/software/fastqc/ -entry test_fastqc_single_end -c tests/config/nextflow.config +- name: hifiasm + command: nextflow run ./tests/software/hifiasm/ -entry test_hifiasm_version -c tests/config/nextflow.config tags: - - fastqc - - fastqc_single_end + - hifiasm + - hifiasm_version files: - - path: ./output/fastqc/test_fastqc.html - - path: ./output/fastqc/test_fastqc.zip - -- name: fastqc paired-end - command: nextflow run ./tests/software/fastqc/ -entry test_fastqc_paired_end -c tests/config/nextflow.config - tags: - - fastqc - - fastqc_paired_end - files: - - path: ./output/fastqc/test_1_fastqc.html - - path: ./output/fastqc/test_2_fastqc.html - - path: ./output/fastqc/test_2_fastqc.zip - - path: ./output/fastqc/test_1_fastqc.zip + - path: ./output/hifiasm/VERSION.txt From b58233794b05b287d0887c6803c6c2f7abf10db4 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sidorov Date: Tue, 16 Mar 2021 13:14:43 +0000 Subject: [PATCH 004/313] Add hifiasm version printing --- software/hifiasm/main.nf | 33 +++++++++++++++++++-------------- tests/software/hifiasm/test.yml | 4 ++-- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/software/hifiasm/main.nf b/software/hifiasm/main.nf index 4e847876..7a364be2 100644 --- a/software/hifiasm/main.nf +++ b/software/hifiasm/main.nf @@ -4,33 +4,34 @@ include { initOptions; saveFiles; getSoftwareName } from './functions' params.options = [:] options = initOptions(params.options) -process FASTQC { - tag "$meta.id" - label 'process_medium' +process HIFIASM { + //tag "$meta.id" + label 'process_high' publishDir "${params.outdir}", mode: params.publish_dir_mode, - saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) } + saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') } // publish_id:meta.id) } - conda (params.enable_conda ? "bioconda::fastqc=0.11.9" : null) + conda (params.enable_conda ? "bioconda::hifiasm=0.14" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0" + container "https://depot.galaxyproject.org/singularity/hifiasm:0.14--h8b12597_0" } else { - container "quay.io/biocontainers/fastqc:0.11.9--0" + container "quay.io/biocontainers/hifiasm:0.14--h8b12597_0" } - input: - tuple val(meta), path(reads) +/* input: + tuple val(meta), path(reads) */ output: - tuple val(meta), path("*.html"), emit: html - tuple val(meta), path("*.zip") , emit: zip +/* tuple val(meta), path("*.html"), emit: html + tuple val(meta), path("*.zip") , emit: zip */ path "*.version.txt" , emit: version script: // Add soft-links to original FastQs for consistent naming in pipeline def software = getSoftwareName(task.process) - def prefix = options.suffix ? "${meta.id}.${options.suffix}" : "${meta.id}" - if (meta.single_end) { + //def prefix = options.suffix ? "${meta.id}.${options.suffix}" : "${meta.id}" + +/* if (meta.single_end) { """ [ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz fastqc $options.args --threads $task.cpus ${prefix}.fastq.gz @@ -43,5 +44,9 @@ process FASTQC { fastqc $options.args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt """ - } + } */ + + """ + hifiasm --version > ${software}.version.txt || exit 0 + """ } diff --git a/tests/software/hifiasm/test.yml b/tests/software/hifiasm/test.yml index 3825b238..e639f099 100644 --- a/tests/software/hifiasm/test.yml +++ b/tests/software/hifiasm/test.yml @@ -1,7 +1,7 @@ - name: hifiasm - command: nextflow run ./tests/software/hifiasm/ -entry test_hifiasm_version -c tests/config/nextflow.config + command: nextflow run ./tests/software/hifiasm -entry test_hifiasm_version -c tests/config/nextflow.config tags: - hifiasm - hifiasm_version files: - - path: ./output/hifiasm/VERSION.txt + - path: ./output/hifiasm/hifiasm.version.txt From 5a270c5ba7a0b382d2ca48ce42f7399a6003fa7d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sidorov Date: Tue, 16 Mar 2021 15:55:59 +0000 Subject: [PATCH 005/313] Removed spaced on an empty line --- software/hifiasm/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/hifiasm/main.nf b/software/hifiasm/main.nf index 7a364be2..8686b6bc 100644 --- a/software/hifiasm/main.nf +++ b/software/hifiasm/main.nf @@ -30,7 +30,7 @@ process HIFIASM { // Add soft-links to original FastQs for consistent naming in pipeline def software = getSoftwareName(task.process) //def prefix = options.suffix ? "${meta.id}.${options.suffix}" : "${meta.id}" - + /* if (meta.single_end) { """ [ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz From 7aaf0b72486a6948f8e93f5905e56339dbca9ee5 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sidorov Date: Sun, 2 May 2021 14:09:03 +0100 Subject: [PATCH 006/313] Reverted hifiasm from main --- software/hifiasm/functions.nf | 59 ---------------------------- software/hifiasm/main.nf | 52 ------------------------- software/hifiasm/meta.yml | 69 --------------------------------- tests/software/hifiasm/main.nf | 28 ------------- tests/software/hifiasm/test.yml | 7 ---- 5 files changed, 215 deletions(-) delete mode 100644 software/hifiasm/functions.nf delete mode 100644 software/hifiasm/main.nf delete mode 100644 software/hifiasm/meta.yml delete mode 100644 tests/software/hifiasm/main.nf delete mode 100644 tests/software/hifiasm/test.yml diff --git a/software/hifiasm/functions.nf b/software/hifiasm/functions.nf deleted file mode 100644 index d25eea86..00000000 --- a/software/hifiasm/functions.nf +++ /dev/null @@ -1,59 +0,0 @@ -/* - * ----------------------------------------------------- - * Utility functions used in nf-core DSL2 module files - * ----------------------------------------------------- - */ - -/* - * Extract name of software tool from process name using $task.process - */ -def getSoftwareName(task_process) { - return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase() -} - -/* - * Function to initialise default values and to generate a Groovy Map of available options for nf-core modules - */ -def initOptions(Map args) { - def Map options = [:] - options.args = args.args ?: '' - options.args2 = args.args2 ?: '' - options.publish_by_id = args.publish_by_id ?: false - options.publish_dir = args.publish_dir ?: '' - options.publish_files = args.publish_files - options.suffix = args.suffix ?: '' - return options -} - -/* - * Tidy up and join elements of a list to return a path string - */ -def getPathFromList(path_list) { - def paths = path_list.findAll { item -> !item?.trim().isEmpty() } // Remove empty entries - paths = paths.collect { it.trim().replaceAll("^[/]+|[/]+\$", "") } // Trim whitespace and trailing slashes - return paths.join('/') -} - -/* - * Function to save/publish module results - */ -def saveFiles(Map args) { - if (!args.filename.endsWith('.version.txt')) { - def ioptions = initOptions(args.options) - def path_list = [ ioptions.publish_dir ?: args.publish_dir ] - if (ioptions.publish_by_id) { - path_list.add(args.publish_id) - } - if (ioptions.publish_files instanceof Map) { - for (ext in ioptions.publish_files) { - if (args.filename.endsWith(ext.key)) { - def ext_list = path_list.collect() - ext_list.add(ext.value) - return "${getPathFromList(ext_list)}/$args.filename" - } - } - } else if (ioptions.publish_files == null) { - return "${getPathFromList(path_list)}/$args.filename" - } - } -} diff --git a/software/hifiasm/main.nf b/software/hifiasm/main.nf deleted file mode 100644 index 8686b6bc..00000000 --- a/software/hifiasm/main.nf +++ /dev/null @@ -1,52 +0,0 @@ -// Import generic module functions -include { initOptions; saveFiles; getSoftwareName } from './functions' - -params.options = [:] -options = initOptions(params.options) - -process HIFIASM { - //tag "$meta.id" - label 'process_high' - publishDir "${params.outdir}", - mode: params.publish_dir_mode, - saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:'') } // publish_id:meta.id) } - - conda (params.enable_conda ? "bioconda::hifiasm=0.14" : null) - if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/hifiasm:0.14--h8b12597_0" - } else { - container "quay.io/biocontainers/hifiasm:0.14--h8b12597_0" - } - -/* input: - tuple val(meta), path(reads) */ - - output: -/* tuple val(meta), path("*.html"), emit: html - tuple val(meta), path("*.zip") , emit: zip */ - path "*.version.txt" , emit: version - - script: - // Add soft-links to original FastQs for consistent naming in pipeline - def software = getSoftwareName(task.process) - //def prefix = options.suffix ? "${meta.id}.${options.suffix}" : "${meta.id}" - -/* if (meta.single_end) { - """ - [ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz - fastqc $options.args --threads $task.cpus ${prefix}.fastq.gz - fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt - """ - } else { - """ - [ ! -f ${prefix}_1.fastq.gz ] && ln -s ${reads[0]} ${prefix}_1.fastq.gz - [ ! -f ${prefix}_2.fastq.gz ] && ln -s ${reads[1]} ${prefix}_2.fastq.gz - fastqc $options.args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz - fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt - """ - } */ - - """ - hifiasm --version > ${software}.version.txt || exit 0 - """ -} diff --git a/software/hifiasm/meta.yml b/software/hifiasm/meta.yml deleted file mode 100644 index 9ef62628..00000000 --- a/software/hifiasm/meta.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: hifiasm -description: Run hifiasm on Pacbio HiFi reads -keywords: - - genome assembly - - pacbaio - - hifi - - long reads - - fastq -tools: - - hifiasm: - description: | - hifiasm generates a genome assembly from long Pacbio HiFi reads. ...Haplotype resolution ...Using short reads. - homepage: https://github.com/chhylp123/hifiasm - documentation: https://github.com/chhylp123/hifiasm -params: - - outdir: - type: string - description: | - The pipeline's output directory. By default, the module will - output files into `$params.outdir/` - - publish_dir_mode: - type: string - description: | - Value for the Nextflow `publishDir` mode parameter. - Available: symlink, rellink, link, copy, copyNoFollow, move. - - enable_conda: - type: boolean - description: | - Run the module with Conda using the software specified - via the `conda` directive - - singularity_pull_docker_container: - type: boolean - description: | - Instead of directly downloading Singularity images for use with Singularity, - force the workflow to pull and convert Docker containers instead. -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - html: - type: file - description: FastQC report - pattern: "*_{fastqc.html}" - - zip: - type: file - description: FastQC report archive - pattern: "*_{fastqc.zip}" - - version: - type: file - description: File containing software version - pattern: "*.{version.txt}" -authors: - - "@drpatelh" - - "@grst" - - "@ewels" - - "@FelixKrueger" diff --git a/tests/software/hifiasm/main.nf b/tests/software/hifiasm/main.nf deleted file mode 100644 index 66824584..00000000 --- a/tests/software/hifiasm/main.nf +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { HIFIASM } from '../../../software/hifiasm/main.nf' addParams( options: [:] ) - -/* - * Test with single-end data - */ -/* workflow test_fastqc_single_end { - - def input = [] - input = [ [ id:'test', single_end:true ], // meta map - [ file("${launchDir}/tests/data/genomics/sarscov2/fastq/test_1.fastq.gz", checkIfExists: true) ] ] - FASTQC ( input ) -} */ - -/* - * Test version printing - */ -workflow test_hifiasm_version { - -/* def input = [] - input = [[id: 'test', single_end: false], // meta map - [file("${launchDir}/tests/data/genomics/sarscov2/fastq/test_1.fastq.gz", checkIfExists: true), - file("${launchDir}/tests/data/genomics/sarscov2/fastq/test_2.fastq.gz", checkIfExists: true)]] */ - HIFIASM () -} diff --git a/tests/software/hifiasm/test.yml b/tests/software/hifiasm/test.yml deleted file mode 100644 index e639f099..00000000 --- a/tests/software/hifiasm/test.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: hifiasm - command: nextflow run ./tests/software/hifiasm -entry test_hifiasm_version -c tests/config/nextflow.config - tags: - - hifiasm - - hifiasm_version - files: - - path: ./output/hifiasm/hifiasm.version.txt From 21ecd68bfe415ee78173813667f1bb0d465f7f4b Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 27 Jan 2022 08:43:02 +0100 Subject: [PATCH 007/313] fix: remove left-over unnecessary code --- modules/deeparg/predict/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/deeparg/predict/main.nf b/modules/deeparg/predict/main.nf index 1af0fd40..9408fa3d 100644 --- a/modules/deeparg/predict/main.nf +++ b/modules/deeparg/predict/main.nf @@ -11,7 +11,7 @@ process DEEPARG_PREDICT { input: tuple val(meta), path(fasta), val(model) - tuple path(db) + path(db) output: tuple val(meta), path("*.align.daa") , emit: daa From b412e6dabc99ea1b1bae07e09a4dbcb6e92e5439 Mon Sep 17 00:00:00 2001 From: Priyanka Surana Date: Thu, 27 Jan 2022 14:36:18 +0000 Subject: [PATCH 008/313] Busco module commit with nf-core v2.2 c1 --- modules/busco/main.nf | 42 +++++++++++++++++++++++ modules/busco/meta.yml | 52 +++++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 +++ tests/modules/busco/main.nf | 26 +++++++++++++++ tests/modules/busco/nextflow.config | 5 +++ tests/modules/busco/test.yml | 20 +++++++++++ 6 files changed, 149 insertions(+) create mode 100644 modules/busco/main.nf create mode 100644 modules/busco/meta.yml create mode 100644 tests/modules/busco/main.nf create mode 100644 tests/modules/busco/nextflow.config create mode 100644 tests/modules/busco/test.yml diff --git a/modules/busco/main.nf b/modules/busco/main.nf new file mode 100644 index 00000000..445f8ed4 --- /dev/null +++ b/modules/busco/main.nf @@ -0,0 +1,42 @@ +process BUSCO { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::busco=5.2.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/busco:5.2.2--pyhdfd78af_0': + 'quay.io/biocontainers/busco:5.2.2--pyhdfd78af_0' }" + + input: + tuple val(meta), path(fasta) + path(augustus_config) + val(lineage) + + output: + tuple val(meta), path("${meta.id}/run_*/full_table.tsv"), emit: tsv + tuple val(meta), path("${meta.id}/run_*/short_summary.txt"), emit: txt + path "versions.yml" , emit: versions + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + if (lineage) args += " --lineage_dataset $lineage" + """ + # Ensure the input is uncompressed + gzip -cdf $fasta > __UNCOMPRESSED_FASTA_FILE__ + # Copy the image's AUGUSTUS config directory if it was not provided to the module + [ ! -e augustus_config ] && cp -a /usr/local/config augustus_config + AUGUSTUS_CONFIG_PATH=augustus_config \\ + busco \\ + $args \\ + --augustus \\ + --cpu $task.cpus \\ + --in __UNCOMPRESSED_FASTA_FILE__ \\ + --out $meta.id + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) + END_VERSIONS + """ +} diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml new file mode 100644 index 00000000..0cd9e402 --- /dev/null +++ b/modules/busco/meta.yml @@ -0,0 +1,52 @@ +name: busco +description: Benchmarking Universal Single Copy Orthologs +keywords: + - quality control + - genome + - transcriptome + - proteome +tools: + - busco: + description: BUSCO provides measures for quantitative assessment of genome assembly, gene set, and transcriptome completeness based on evolutionarily informed expectations of gene content from near-universal single-copy orthologs selected from OrthoDB. + homepage: https://busco.ezlab.org/ + documentation: https://busco.ezlab.org/busco_userguide.html + tool_dev_url: https://gitlab.com/ezlab/busco + doi: "10.1007/978-1-4939-9173-0_14" + licence: ['MIT'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Nucleic or amino acid sequence file in FASTA format + pattern: "*.{fasta}" + - augustus_config: + type: directory + description: AUGUSTUS config directory + +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: Full summary table + pattern: "*.{tsv}" + - txt: + type: file + description: Short summary text + pattern: "*.{txt}" + +authors: + - "@priyanka-surana" + - "@charles-plessy" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 2321c918..920b85bd 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -230,6 +230,10 @@ bowtie2/build: - modules/bowtie2/build/** - tests/modules/bowtie2/build_test/** +busco: + - modules/busco/** + - tests/modules/busco/** + bwa/aln: - modules/bwa/aln/** - tests/modules/bwa/aln/** diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf new file mode 100644 index 00000000..28a4921c --- /dev/null +++ b/tests/modules/busco/main.nf @@ -0,0 +1,26 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BUSCO as BUSCO_BACTE } from '../../../modules/busco/main.nf' +include { BUSCO as BUSCO_CHR22 } from '../../../modules/busco/main.nf' +include { UNTAR } from '../../../modules/untar/main.nf' + +// This tests genome decompression, empty input channels and data download +workflow test_busco_bacteroidales { + input = [ [ id:'test' ], file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) ] + BUSCO_BACTE ( input, + [], + [] ) +} + +// This tests uncompressed genome, BUSCO lineage file provided via input channel, and offline mode +workflow test_busco_chr22 { + input = [ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] + lineage_dataset = [ file(params.test_data['homo_sapiens']['genome']['chr22_odb10_tar_gz'], checkIfExists: true) ] + UNTAR(lineage_dataset) + BUSCO_CHR22 ( input, + [], + UNTAR.out.untar ) +} + diff --git a/tests/modules/busco/nextflow.config b/tests/modules/busco/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/busco/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/busco/test.yml b/tests/modules/busco/test.yml new file mode 100644 index 00000000..32553d2e --- /dev/null +++ b/tests/modules/busco/test.yml @@ -0,0 +1,20 @@ +- name: busco test_busco_bacteroidales + command: nextflow run ./tests/modules/busco -entry test_busco_bacteroidales -c ./tests/config/nextflow.config -c ./tests/modules/busco/nextflow.config + tags: + - busco + files: + - path: output/busco/test/run_bacteroidales_odb10/full_table.tsv + md5sum: 8d7b401d875ecd9291b01bf4485bf080 + - path: output/busco/test/run_bacteroidales_odb10/short_summary.txt + contains: ['Complete BUSCOs (C)'] + +- name: busco test_busco_chr22 + command: nextflow run ./tests/modules/busco -entry test_busco_chr22 -c ./tests/config/nextflow.config -c ./tests/modules/busco/nextflow.config + tags: + - busco + files: + - path: output/busco/test/run_chr22_odb10/full_table.tsv + md5sum: 83f20e8996c591338ada73b6ab0eb269 + - path: output/busco/test/run_chr22_odb10/short_summary.txt + contains: ['Complete BUSCOs (C)'] + From 1abcc938379595db0840dc32d1681cdebc268f74 Mon Sep 17 00:00:00 2001 From: Chris Cheshire Date: Fri, 28 Jan 2022 09:14:47 +0000 Subject: [PATCH 009/313] Ignores version file checking if testing for error --- tests/test_versions_yml.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_versions_yml.py b/tests/test_versions_yml.py index 2f78ab2e..19ba1cf9 100644 --- a/tests/test_versions_yml.py +++ b/tests/test_versions_yml.py @@ -16,7 +16,8 @@ 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"] + if 'exit_code' not in workflow: + yield workflow["name"] @pytest.mark.workflow(*_get_workflow_names()) From 70ea9ac9a863061e22e7b5a8dd3fe07a29ecf4c4 Mon Sep 17 00:00:00 2001 From: Chris Cheshire Date: Fri, 28 Jan 2022 09:27:28 +0000 Subject: [PATCH 010/313] Added comment --- tests/test_versions_yml.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_versions_yml.py b/tests/test_versions_yml.py index 19ba1cf9..5d0bb39e 100644 --- a/tests/test_versions_yml.py +++ b/tests/test_versions_yml.py @@ -16,7 +16,9 @@ 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: - if 'exit_code' not in workflow: + # 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"] From 3e6be5060007d3feb24e3dfb95d602a3fbd3eb58 Mon Sep 17 00:00:00 2001 From: Priyanka Surana Date: Fri, 25 Feb 2022 13:26:23 +0000 Subject: [PATCH 011/313] Adjusted Augustus Config Path settings. Suggested by @mahesh-panchal --- modules/busco/main.nf | 26 +++++++++++++++++++------- modules/busco/meta.yml | 3 +++ tests/modules/busco/main.nf | 15 ++------------- tests/modules/busco/test.yml | 14 ++------------ 4 files changed, 26 insertions(+), 32 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index 445f8ed4..6e526538 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -9,6 +9,7 @@ process BUSCO { input: tuple val(meta), path(fasta) + val(mode) path(augustus_config) val(lineage) @@ -24,15 +25,26 @@ process BUSCO { """ # Ensure the input is uncompressed gzip -cdf $fasta > __UNCOMPRESSED_FASTA_FILE__ + + # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) + # Check for container variable initialisation script and source it. + if [ -f "/usr/local/env-activate.sh" ]; then + # . "/usr/local/env-activate.sh" # Errors out because of various unbound variables + export PATH='/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' + export CONDA_PREFIX='/usr/local' + export CONDA_SHLVL='1' + export CONDA_DEFAULT_ENV='/usr/local' + export CONDA_PROMPT_MODIFIER='' + . "/usr/local/etc/conda/activate.d/activate-r-base.sh" + . "/usr/local/etc/conda/activate.d/augustus.sh" + . "/usr/local/etc/conda/activate.d/openjdk_activate.sh" + fi + # Copy the image's AUGUSTUS config directory if it was not provided to the module [ ! -e augustus_config ] && cp -a /usr/local/config augustus_config - AUGUSTUS_CONFIG_PATH=augustus_config \\ - busco \\ - $args \\ - --augustus \\ - --cpu $task.cpus \\ - --in __UNCOMPRESSED_FASTA_FILE__ \\ - --out $meta.id + + # Busco command + AUGUSTUS_CONFIG_PATH=augustus_config busco $args --augustus --mode $mode --cpu $task.cpus --in __UNCOMPRESSED_FASTA_FILE__ --out $meta.id cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index 0cd9e402..8f41f2f3 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -24,6 +24,9 @@ input: type: file description: Nucleic or amino acid sequence file in FASTA format pattern: "*.{fasta}" + - mode: + type: value + description: Sets the assessment MODE – genome, proteins, transcriptome - augustus_config: type: directory description: AUGUSTUS config directory diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index 28a4921c..d12abae9 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -3,24 +3,13 @@ nextflow.enable.dsl = 2 include { BUSCO as BUSCO_BACTE } from '../../../modules/busco/main.nf' -include { BUSCO as BUSCO_CHR22 } from '../../../modules/busco/main.nf' -include { UNTAR } from '../../../modules/untar/main.nf' // This tests genome decompression, empty input channels and data download -workflow test_busco_bacteroidales { +workflow test_busco { input = [ [ id:'test' ], file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) ] BUSCO_BACTE ( input, + "genome", [], [] ) } -// This tests uncompressed genome, BUSCO lineage file provided via input channel, and offline mode -workflow test_busco_chr22 { - input = [ [ id:'test' ], file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] - lineage_dataset = [ file(params.test_data['homo_sapiens']['genome']['chr22_odb10_tar_gz'], checkIfExists: true) ] - UNTAR(lineage_dataset) - BUSCO_CHR22 ( input, - [], - UNTAR.out.untar ) -} - diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index 32553d2e..d66bd305 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -1,5 +1,5 @@ -- name: busco test_busco_bacteroidales - command: nextflow run ./tests/modules/busco -entry test_busco_bacteroidales -c ./tests/config/nextflow.config -c ./tests/modules/busco/nextflow.config +- name: busco test_busco + command: nextflow run ./tests/modules/busco -entry test_busco -c ./tests/config/nextflow.config -c ./tests/modules/busco/nextflow.config tags: - busco files: @@ -8,13 +8,3 @@ - path: output/busco/test/run_bacteroidales_odb10/short_summary.txt contains: ['Complete BUSCOs (C)'] -- name: busco test_busco_chr22 - command: nextflow run ./tests/modules/busco -entry test_busco_chr22 -c ./tests/config/nextflow.config -c ./tests/modules/busco/nextflow.config - tags: - - busco - files: - - path: output/busco/test/run_chr22_odb10/full_table.tsv - md5sum: 83f20e8996c591338ada73b6ab0eb269 - - path: output/busco/test/run_chr22_odb10/short_summary.txt - contains: ['Complete BUSCOs (C)'] - From 0f7c04647747f535c94f63908bdd82c77f9a9ed1 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 13 Apr 2022 12:51:17 +0200 Subject: [PATCH 012/313] first commit --- modules/elprep/merge/main.nf | 44 ++++++++++++++++++++++ modules/elprep/merge/meta.yml | 44 ++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/elprep/merge/main.nf | 17 +++++++++ tests/modules/elprep/merge/nextflow.config | 5 +++ tests/modules/elprep/merge/test.yml | 11 ++++++ 6 files changed, 125 insertions(+) create mode 100644 modules/elprep/merge/main.nf create mode 100644 modules/elprep/merge/meta.yml create mode 100644 tests/modules/elprep/merge/main.nf create mode 100644 tests/modules/elprep/merge/nextflow.config create mode 100644 tests/modules/elprep/merge/test.yml diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf new file mode 100644 index 00000000..8312d35b --- /dev/null +++ b/modules/elprep/merge/main.nf @@ -0,0 +1,44 @@ +process ELPREP_MERGE { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::elprep=5.1.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/elprep:5.1.2--he881be0_0': + 'quay.io/biocontainers/elprep:5.1.2--he881be0_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("**.{bam,sam}"), 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}" + if (meta.single_end) { + args += " --single-end" + } + def suffix = args.contains("--output-type sam") ? "sam" : "bam" + + """ + # create directory and move all input so elprep can find and merge them before splitting + mkdir input + mv ${bam} input/ + + elprep merge \\ + input \\ + ${prefix}.${suffix} \\ + $args \\ + --nr-of-threads $task.cpus + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + elprep: \$(elprep 2>&1 | head -n2 | tail -n1 |sed 's/^.*version //;s/ compiled.*\$//') + END_VERSIONS + """ +} diff --git a/modules/elprep/merge/meta.yml b/modules/elprep/merge/meta.yml new file mode 100644 index 00000000..e157fddb --- /dev/null +++ b/modules/elprep/merge/meta.yml @@ -0,0 +1,44 @@ +name: "elprep_merge" +description: Merge split bam/sam chunks in one file +keywords: + - bam + - sam + - merge +tools: + - "elprep": + description: "elPrep is a high-performance tool for preparing .sam/.bam files for variant calling in sequencing pipelines. It can be used as a drop-in replacement for SAMtools/Picard/GATK4." + homepage: "None" + documentation: "None" + tool_dev_url: "None" + doi: "" + licence: "['AGPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: List of BAM/SAM chunks to merge + pattern: "*.{bam,sam}" + +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" + - bam: + type: file + description: Merged BAM/SAM file + pattern: "*.{bam,sam}" + +authors: + - "@matthdsm" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index cd4913cf..ea22a0d6 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -587,6 +587,10 @@ ectyper: - modules/ectyper/** - tests/modules/ectyper/** +elprep/merge: + - modules/elprep/merge/** + - tests/modules/elprep/merge/** + emmtyper: - modules/emmtyper/** - tests/modules/emmtyper/** diff --git a/tests/modules/elprep/merge/main.nf b/tests/modules/elprep/merge/main.nf new file mode 100644 index 00000000..b4a40ce3 --- /dev/null +++ b/tests/modules/elprep/merge/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ELPREP_SPLIT } from '../../../../modules/elprep/split/main.nf' +include { ELPREP_MERGE } from '../../../../modules/elprep/merge/main.nf' + +workflow test_elprep_merge { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + + ELPREP_SPLIT ( input ) + ELPREP_MERGE ( ELPREP_SPLIT.out.bam ) +} diff --git a/tests/modules/elprep/merge/nextflow.config b/tests/modules/elprep/merge/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/elprep/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/elprep/merge/test.yml b/tests/modules/elprep/merge/test.yml new file mode 100644 index 00000000..c66fe030 --- /dev/null +++ b/tests/modules/elprep/merge/test.yml @@ -0,0 +1,11 @@ +- name: "elprep merge" + command: nextflow run ./tests/modules/elprep/merge -entry test_elprep_merge -c ./tests/config/nextflow.config -c ./tests/modules/elprep/merge/nextflow.config + tags: + - "elprep" + # + - "elprep/merge" + # + files: + - path: "output/elprep/test.bam" + md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/elprep/versions.yml From c7def8707bccdbafa54c60be275dcb045e907dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20H=C3=B6rtenhuber?= Date: Thu, 14 Apr 2022 13:35:01 +0200 Subject: [PATCH 013/313] fix incorrect yaml formatting. (#1264) --- modules/allelecounter/meta.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/allelecounter/meta.yml b/modules/allelecounter/meta.yml index 7d921e12..0734512e 100644 --- a/modules/allelecounter/meta.yml +++ b/modules/allelecounter/meta.yml @@ -32,8 +32,8 @@ input: description: loci file pattern: "*.{tsv}" - fasta: - type: file - description: Input genome fasta file. Required when passing CRAM files. + type: file + description: Input genome fasta file. Required when passing CRAM files. output: - meta: From ee04fc27377391c39cacd79641301f87af48cc4d Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Thu, 14 Apr 2022 12:56:42 -0400 Subject: [PATCH 014/313] add module motus_downloaddb --- modules/motus/downloaddb/main.nf | 39 +++++++++++++++++++ modules/motus/downloaddb/meta.yml | 35 +++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/motus/downloaddb/main.nf | 12 ++++++ .../modules/motus/downloaddb/nextflow.config | 5 +++ tests/modules/motus/downloaddb/test.yml | 9 +++++ 6 files changed, 104 insertions(+) create mode 100644 modules/motus/downloaddb/main.nf create mode 100644 modules/motus/downloaddb/meta.yml create mode 100644 tests/modules/motus/downloaddb/main.nf create mode 100644 tests/modules/motus/downloaddb/nextflow.config create mode 100644 tests/modules/motus/downloaddb/test.yml diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf new file mode 100644 index 00000000..02e5c22d --- /dev/null +++ b/modules/motus/downloaddb/main.nf @@ -0,0 +1,39 @@ +process MOTUS_DOWNLOADDB { + label 'process_low' + + conda (params.enable_conda ? "bioconda::motus=3.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/motus:3.0.1--pyhdfd78af_0': + 'quay.io/biocontainers/motus:3.0.1--pyhdfd78af_0' }" + + input: + path motus_downloaddb + + output: + path "db_mOTU" , emit: db + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + ## must copy file to working directory, + ## otherwise the reference_db will be download to bin folder + ## other than current directory + cp $motus_downloaddb ${motus_downloaddb.simpleName}_copy.py + python ${motus_downloaddb.simpleName}_copy.py \\ + -t $task.cpus + ## clean up + rm ${motus_downloaddb.simpleName}_copy.py + + ## mOTUs version number is not available from command line. + ## mOTUs save the version number in index database folder. + ## mOTUs will check the database version is same version as exec version. + cat <<-END_VERSIONS > versions.yml + "${task.process}": + mOTUs: \$(grep motus db_mOTU/db_mOTU_versions | sed 's/motus\\t//g') + END_VERSIONS + """ +} diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml new file mode 100644 index 00000000..8557b2ed --- /dev/null +++ b/modules/motus/downloaddb/meta.yml @@ -0,0 +1,35 @@ +name: "motus_downloaddb" +description: Download the mOTUs database +keywords: + - classify + - metagenomics + - fastq + - taxonomic profiling +tools: + - "motus": + description: "The mOTU profiler is a computational tool that estimates relative taxonomic abundance of known and currently unknown microbial community members using metagenomic shotgun sequencing data." + homepage: "None" + documentation: "https://github.com/motu-tool/mOTUs/wiki" + tool_dev_url: "https://github.com/motu-tool/mOTUs" + doi: "10.1038/s41467-019-08844-4" + licence: "['GPL v3']" + +input: + - motus_downloaddb: + type: file + description: | + the mOTUs downloadDB source file + pattern: "*{.py}" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - db: + type: file + description: The mOTUs database + pattern: "db_mOTU" + +authors: + - "@jianhong" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index cd4913cf..b11f5516 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1194,6 +1194,10 @@ mosdepth: - modules/mosdepth/** - tests/modules/mosdepth/** +motus/downloaddb: + - modules/motus/downloaddb/** + - tests/modules/motus/downloaddb/** + msisensor/msi: - modules/msisensor/msi/** - tests/modules/msisensor/msi/** diff --git a/tests/modules/motus/downloaddb/main.nf b/tests/modules/motus/downloaddb/main.nf new file mode 100644 index 00000000..f7680ca9 --- /dev/null +++ b/tests/modules/motus/downloaddb/main.nf @@ -0,0 +1,12 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MOTUS_DOWNLOADDB } from '../../../../modules/motus/downloaddb/main.nf' + +workflow test_motus_downloaddb { + + input = file('https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py') + + MOTUS_DOWNLOADDB ( input ) +} diff --git a/tests/modules/motus/downloaddb/nextflow.config b/tests/modules/motus/downloaddb/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/motus/downloaddb/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/motus/downloaddb/test.yml b/tests/modules/motus/downloaddb/test.yml new file mode 100644 index 00000000..ada5383a --- /dev/null +++ b/tests/modules/motus/downloaddb/test.yml @@ -0,0 +1,9 @@ +- name: motus downloaddb test_motus_downloaddb + command: nextflow run tests/modules/motus/downloaddb -entry test_motus_downloaddb -c tests/config/nextflow.config + tags: + - motus + - motus/downloaddb + files: + - path: output/motus/db_mOTU/db_mOTU_versions + - path: output/motus/versions.yml + md5sum: b9b843b2435b01bb430ee8780b5c639e From f1f1df984c4213840546475af9bb9c204ae00def Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Sun, 17 Apr 2022 11:06:06 -0400 Subject: [PATCH 015/313] Update modules/motus/downloaddb/main.nf Co-authored-by: James A. Fellows Yates --- modules/motus/downloaddb/main.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 02e5c22d..406eb502 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -24,6 +24,7 @@ process MOTUS_DOWNLOADDB { ## other than current directory cp $motus_downloaddb ${motus_downloaddb.simpleName}_copy.py python ${motus_downloaddb.simpleName}_copy.py \\ + $args \\ -t $task.cpus ## clean up rm ${motus_downloaddb.simpleName}_copy.py From 2551201f4387dfcc12af3e896c331b917aeba63c Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Sun, 17 Apr 2022 11:10:48 -0400 Subject: [PATCH 016/313] Update modules/motus/downloaddb/main.nf Co-authored-by: James A. Fellows Yates --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 406eb502..6fbe96ec 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -7,7 +7,7 @@ process MOTUS_DOWNLOADDB { 'quay.io/biocontainers/motus:3.0.1--pyhdfd78af_0' }" input: - path motus_downloaddb + path motus_downloaddb_script output: path "db_mOTU" , emit: db From d247ef4a0deccb1c0f36268590f58bb0835cec76 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Sun, 17 Apr 2022 11:10:54 -0400 Subject: [PATCH 017/313] Update modules/motus/downloaddb/main.nf Co-authored-by: James A. Fellows Yates --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 6fbe96ec..0456b471 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -10,7 +10,7 @@ process MOTUS_DOWNLOADDB { path motus_downloaddb_script output: - path "db_mOTU" , emit: db + path "db_mOTU/" , emit: db path "versions.yml" , emit: versions when: From 32d5257defe4a6683d009dcf3d0ac0474df44300 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Sun, 17 Apr 2022 11:12:08 -0400 Subject: [PATCH 018/313] Update modules/motus/downloaddb/meta.yml Co-authored-by: James A. Fellows Yates --- modules/motus/downloaddb/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml index 8557b2ed..1fa5e220 100644 --- a/modules/motus/downloaddb/meta.yml +++ b/modules/motus/downloaddb/meta.yml @@ -18,7 +18,7 @@ input: - motus_downloaddb: type: file description: | - the mOTUs downloadDB source file + the mOTUs downloadDB script source file pattern: "*{.py}" output: From 51214d655b9e8ac930b36376adf9b9d3ce73e40e Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Sun, 17 Apr 2022 11:19:58 -0400 Subject: [PATCH 019/313] Update modules/motus/downloaddb/main.nf Co-authored-by: James A. Fellows Yates --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 0456b471..b4bcea23 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -19,7 +19,7 @@ process MOTUS_DOWNLOADDB { script: def args = task.ext.args ?: '' """ - ## must copy file to working directory, + ## must copy script file to working directory, ## otherwise the reference_db will be download to bin folder ## other than current directory cp $motus_downloaddb ${motus_downloaddb.simpleName}_copy.py From 407d0bb752da0b97f8596e39fe29c012dbd08fd5 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Sun, 17 Apr 2022 11:22:23 -0400 Subject: [PATCH 020/313] update motus_downloaddb --- modules/motus/downloaddb/main.nf | 11 ++++++----- modules/motus/downloaddb/meta.yml | 6 ++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 0456b471..928b1294 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -11,23 +11,24 @@ process MOTUS_DOWNLOADDB { output: path "db_mOTU/" , emit: db - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def args = task.ext.args ?: '' + def software = ${motus_downloaddb.simpleName}_copy.py """ ## must copy file to working directory, ## otherwise the reference_db will be download to bin folder ## other than current directory - cp $motus_downloaddb ${motus_downloaddb.simpleName}_copy.py - python ${motus_downloaddb.simpleName}_copy.py \\ + cp $motus_downloaddb ${software} + python ${software} \\ $args \\ -t $task.cpus ## clean up - rm ${motus_downloaddb.simpleName}_copy.py + rm ${software} ## mOTUs version number is not available from command line. ## mOTUs save the version number in index database folder. diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml index 1fa5e220..2d363cb1 100644 --- a/modules/motus/downloaddb/meta.yml +++ b/modules/motus/downloaddb/meta.yml @@ -5,6 +5,8 @@ keywords: - metagenomics - fastq - taxonomic profiling + - database + - download tools: - "motus": description: "The mOTU profiler is a computational tool that estimates relative taxonomic abundance of known and currently unknown microbial community members using metagenomic shotgun sequencing data." @@ -19,7 +21,7 @@ input: type: file description: | the mOTUs downloadDB script source file - pattern: "*{.py}" + pattern: "downloadDB.py" output: - versions: @@ -27,7 +29,7 @@ output: description: File containing software versions pattern: "versions.yml" - db: - type: file + type: directory description: The mOTUs database pattern: "db_mOTU" From ec23ebc7c5c2517d18128eac06306dcdcf701fdb Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Sun, 17 Apr 2022 21:17:59 +0200 Subject: [PATCH 021/313] Update modules/motus/downloaddb/main.nf --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index e2a0cec6..8162c664 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -18,7 +18,7 @@ process MOTUS_DOWNLOADDB { script: def args = task.ext.args ?: '' - def software = ${motus_downloaddb.simpleName}_copy.py + def software = ${motus_downloaddb.simplename}_copy.py """ ## must copy script file to working directory, ## otherwise the reference_db will be download to bin folder From 87005786e07eb3265aa011e5c1c34146cd4d9c0d Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Sun, 17 Apr 2022 21:18:55 +0200 Subject: [PATCH 022/313] Update modules/motus/downloaddb/main.nf --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 8162c664..e2a0cec6 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -18,7 +18,7 @@ process MOTUS_DOWNLOADDB { script: def args = task.ext.args ?: '' - def software = ${motus_downloaddb.simplename}_copy.py + def software = ${motus_downloaddb.simpleName}_copy.py """ ## must copy script file to working directory, ## otherwise the reference_db will be download to bin folder From a6cb75174bfbd131f3da14d8cd3e34c1a2e6e268 Mon Sep 17 00:00:00 2001 From: Anders Jemt Date: Tue, 19 Apr 2022 10:53:39 +0200 Subject: [PATCH 023/313] Add variant catalog ch to stranger (#1508) * Add optional variant catalog input * fix for no variant catalog test Co-authored-by: ljmesi <37740329+ljmesi@users.noreply.github.com> Co-authored-by: Lauri Mesilaakso --- modules/stranger/main.nf | 5 ++++- modules/stranger/meta.yml | 4 ++++ tests/modules/stranger/main.nf | 24 +++++++++++++++--------- tests/modules/stranger/test.yml | 16 +++++++++++++++- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/modules/stranger/main.nf b/modules/stranger/main.nf index 2e647627..55678bd3 100644 --- a/modules/stranger/main.nf +++ b/modules/stranger/main.nf @@ -9,6 +9,7 @@ process STRANGER { input: tuple val(meta), path(vcf) + path variant_catalog output: tuple val(meta), path("*.gz"), emit: vcf @@ -20,10 +21,12 @@ process STRANGER { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def options_variant_catalog = variant_catalog ? "--repeats-file $variant_catalog" : "" """ stranger \\ $args \\ - $vcf | gzip --no-name > ${prefix}.vcf.gz + $vcf \\ + $options_variant_catalog | gzip --no-name > ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/stranger/meta.yml b/modules/stranger/meta.yml index 61ebc7a9..0707d806 100644 --- a/modules/stranger/meta.yml +++ b/modules/stranger/meta.yml @@ -24,6 +24,10 @@ input: type: file description: VCF with repeat expansions pattern: "*.{vcf.gz,vcf}" + - variant_catalog: + type: file + description: json file with repeat expansion sites to genotype + pattern: "*.{json}" output: - meta: diff --git a/tests/modules/stranger/main.nf b/tests/modules/stranger/main.nf index bc4bd3ce..5bd6766b 100644 --- a/tests/modules/stranger/main.nf +++ b/tests/modules/stranger/main.nf @@ -5,15 +5,21 @@ nextflow.enable.dsl = 2 include { EXPANSIONHUNTER } from '../../../modules/expansionhunter/main.nf' include { STRANGER } from '../../../modules/stranger/main.nf' + +input = [ [ id:'test', gender:'male' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + ] +fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) +variant_catalog = file(params.test_data['homo_sapiens']['genome']['repeat_expansions'], checkIfExists: true) + + workflow test_stranger { - - input = [ [ id:'test', gender:'male' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), - ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - variant_catalog = file(params.test_data['homo_sapiens']['genome']['repeat_expansions'], checkIfExists: true) - EXPANSIONHUNTER ( input, fasta, variant_catalog ) - STRANGER ( EXPANSIONHUNTER.out.vcf ) + STRANGER ( EXPANSIONHUNTER.out.vcf, variant_catalog ) +} + +workflow test_stranger_without_optional_variant_catalog { + EXPANSIONHUNTER ( input, fasta, variant_catalog ) + STRANGER ( EXPANSIONHUNTER.out.vcf, [] ) } diff --git a/tests/modules/stranger/test.yml b/tests/modules/stranger/test.yml index 821928e8..c7a6972e 100644 --- a/tests/modules/stranger/test.yml +++ b/tests/modules/stranger/test.yml @@ -8,6 +8,20 @@ - path: output/expansionhunter/versions.yml md5sum: f3962a6eecfddf9682414c0f605a885a - path: output/stranger/test.vcf.gz - md5sum: bbe15159195681d5c18596d3ad85c78f + md5sum: 68b0ca1319851134ffa8793a4704dc11 - path: output/stranger/versions.yml md5sum: 5ec35fd835fb1be50bc3e7c004310fc0 + +- name: stranger test_stranger_without_optional_variant_catalog + command: nextflow run tests/modules/stranger -entry test_stranger_without_optional_variant_catalog -c tests/config/nextflow.config + tags: + - stranger + files: + - path: output/expansionhunter/test.vcf + md5sum: cfd4a1d35c0e469b99eb6aaa6d22de76 + - path: output/expansionhunter/versions.yml + md5sum: c95af9e6d8cd9bd2ce1090ca4e7a6020 + - path: output/stranger/test.vcf.gz + md5sum: bbe15159195681d5c18596d3ad85c78f + - path: output/stranger/versions.yml + md5sum: 8558542a007e90ea5dcdceed3f12585d From ccef7f857917189fe1c2563c4d68deb038bade4b Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 11:26:01 +0200 Subject: [PATCH 024/313] alignment --- modules/elprep/merge/main.nf | 4 ++-- tests/modules/elprep/merge/test.yml | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf index 8312d35b..010156f2 100644 --- a/modules/elprep/merge/main.nf +++ b/modules/elprep/merge/main.nf @@ -11,8 +11,8 @@ process ELPREP_MERGE { tuple val(meta), path(bam) output: - tuple val(meta), path("**.{bam,sam}"), emit: bam - path "versions.yml" , emit: versions + tuple val(meta), path("**.{bam,sam}") , emit: bam + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/tests/modules/elprep/merge/test.yml b/tests/modules/elprep/merge/test.yml index c66fe030..26c16f59 100644 --- a/tests/modules/elprep/merge/test.yml +++ b/tests/modules/elprep/merge/test.yml @@ -2,10 +2,7 @@ command: nextflow run ./tests/modules/elprep/merge -entry test_elprep_merge -c ./tests/config/nextflow.config -c ./tests/modules/elprep/merge/nextflow.config tags: - "elprep" - # - "elprep/merge" - # files: - path: "output/elprep/test.bam" - md5sum: e667c7caad0bc4b7ac383fd023c654fc - path: output/elprep/versions.yml From ad15d1b7922c8de1b4b84897e4a44182f5b52299 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 11:27:55 +0200 Subject: [PATCH 025/313] update label --- modules/elprep/merge/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf index 010156f2..00ed4d60 100644 --- a/modules/elprep/merge/main.nf +++ b/modules/elprep/merge/main.nf @@ -1,6 +1,6 @@ process ELPREP_MERGE { tag "$meta.id" - label 'process_medium' + label 'process_low' conda (params.enable_conda ? "bioconda::elprep=5.1.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? From 6723ca7f9068ecbdee31dcad07f3115dc5b40667 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 15:05:02 +0200 Subject: [PATCH 026/313] bump version, add merge before split --- modules/bamtools/split/main.nf | 22 +++++++++++++++------- modules/bamtools/split/meta.yml | 8 +++++++- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 014e5cdb..f6382d97 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -2,13 +2,14 @@ process BAMTOOLS_SPLIT { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::bamtools=2.5.1" : null) + conda (params.enable_conda ? "bioconda::bamtools=2.5.2" : 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' }" + 'https://depot.galaxyproject.org/singularity/bamtools:2.5.2--hd03093a_0' : + 'quay.io/biocontainers/bamtools:2.5.2--hd03093a_0' }" input: tuple val(meta), path(bam) + path(bam_list) output: tuple val(meta), path("*.bam"), emit: bam @@ -19,12 +20,19 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' + def args2 = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def input_list = bam.collect{"-in $it"}.join(' ') + if (bam_list) { + input += " -list $bam_list" + } + """ - bamtools \\ - split \\ - -in $bam \\ - $args + bamtools merge \\ + ${input_list} \\ + $args \\ + bamtools split \\ + $args2 cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index 0e848212..6c534281 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -23,8 +23,13 @@ input: e.g. [ id:'test', single_end:false ] - bam: type: file - description: A BAM file to split + description: A list of BAM files to merge and then split pattern: "*.bam" + - bam_list: + type: file + description: | + Input file containing bam files to merge before splitting, + one line per file output: - meta: @@ -43,3 +48,4 @@ output: authors: - "@sguizard" + - "@matthdsm" From b35264e9196d8f7c74c28a7bd5bc126a5e16afe8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 15:11:37 +0200 Subject: [PATCH 027/313] bugfixes --- modules/bamtools/split/main.nf | 6 ++---- modules/bamtools/split/meta.yml | 2 +- tests/modules/bamtools/split/main.nf | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index f6382d97..2f5ef09f 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -20,7 +20,6 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' - def args2 = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input_list = bam.collect{"-in $it"}.join(' ') if (bam_list) { @@ -30,9 +29,8 @@ process BAMTOOLS_SPLIT { """ bamtools merge \\ ${input_list} \\ - $args \\ - bamtools split \\ - $args2 + | bamtools split \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index 6c534281..0fd5d5ca 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -28,7 +28,7 @@ input: - bam_list: type: file description: | - Input file containing bam files to merge before splitting, + Optional input file containing bam files to merge before splitting, one line per file output: diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index eb0bed01..9f30c4f9 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -10,5 +10,5 @@ workflow test_bamtools_split { [ id:'test', single_end:false ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - BAMTOOLS_SPLIT ( input ) + BAMTOOLS_SPLIT ( input, [] ) } From 07982d6cb13649c308625bb3d215c39979e1207c Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Tue, 19 Apr 2022 15:31:39 +0200 Subject: [PATCH 028/313] fix command line, fix meta.yml --- modules/bamtools/split/main.nf | 5 ++++- tests/modules/bamtools/split/test.yml | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 2f5ef09f..f72d13be 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -23,7 +23,10 @@ process BAMTOOLS_SPLIT { def prefix = task.ext.prefix ?: "${meta.id}" def input_list = bam.collect{"-in $it"}.join(' ') if (bam_list) { - input += " -list $bam_list" + input_list += " -list $bam_list" + } + if (!args.contains("-stub")) { + args += " -stub ${prefix}" } """ diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index 4f52e9ce..b52cc9ee 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -1,10 +1,11 @@ - name: bamtools split test_bamtools_split - command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config + command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split -c tests/config/nextflow.config tags: - - bamtools/split - bamtools + - bamtools/split files: - - path: output/bamtools/test.paired_end.sorted.REF_chr22.bam + - path: output/bamtools/test.REF_chr22.bam md5sum: b7dc50e0edf9c6bfc2e3b0e6d074dc07 - - path: output/bamtools/test.paired_end.sorted.REF_unmapped.bam + - path: output/bamtools/test.REF_unmapped.bam md5sum: e0754bf72c51543b2d745d96537035fb + - path: output/bamtools/versions.yml From 7630e278f3aa9abe1c1b78bac783cf9db2e66c9d Mon Sep 17 00:00:00 2001 From: "Maxime U. Garcia" Date: Tue, 19 Apr 2022 16:51:59 +0200 Subject: [PATCH 029/313] update gatk4 yml for spark (#1538) --- tests/config/pytest_modules.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index cd4913cf..bbd47fe5 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -659,6 +659,10 @@ gatk4/applybqsr: - modules/gatk4/applybqsr/** - tests/modules/gatk4/applybqsr/** +gatk4/applybqsrspark: + - modules/gatk4/applybqsrspark/** + - tests/modules/gatk4/applybqsrspark/** + gatk4/applyvqsr: - modules/gatk4/applyvqsr/** - tests/modules/gatk4/applyvqsr/** @@ -667,6 +671,10 @@ gatk4/baserecalibrator: - modules/gatk4/baserecalibrator/** - tests/modules/gatk4/baserecalibrator/** +gatk4/baserecalibratorspark: + - modules/gatk4/baserecalibratorspark/** + - tests/modules/gatk4/baserecalibratorspark/** + gatk4/bedtointervallist: - modules/gatk4/bedtointervallist/** - tests/modules/gatk4/bedtointervallist/** @@ -743,6 +751,10 @@ gatk4/markduplicates: - modules/gatk4/markduplicates/** - tests/modules/gatk4/markduplicates/** +gatk4/markduplicatesspark: + - modules/gatk4/markduplicatesspark/** + - tests/modules/gatk4/markduplicatesspark/** + gatk4/mergebamalignment: - modules/gatk4/mergebamalignment/** - tests/modules/gatk4/mergebamalignment/** From 705f8c9ac4dfdf07666e71abde28f267e2dfd5eb Mon Sep 17 00:00:00 2001 From: "Maxime U. Garcia" Date: Wed, 20 Apr 2022 10:05:17 +0200 Subject: [PATCH 030/313] Add samtools/collatefastq module (#1536) * add samtools/collatefastq module * update yml file * improve output --- modules/samtools/collatefastq/main.nf | 47 ++++++++++++++++++ modules/samtools/collatefastq/meta.yml | 48 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/samtools/collatefastq/main.nf | 13 +++++ .../samtools/collatefastq/nextflow.config | 5 ++ tests/modules/samtools/collatefastq/test.yml | 14 ++++++ 6 files changed, 131 insertions(+) create mode 100644 modules/samtools/collatefastq/main.nf create mode 100644 modules/samtools/collatefastq/meta.yml create mode 100644 tests/modules/samtools/collatefastq/main.nf create mode 100644 tests/modules/samtools/collatefastq/nextflow.config create mode 100644 tests/modules/samtools/collatefastq/test.yml diff --git a/modules/samtools/collatefastq/main.nf b/modules/samtools/collatefastq/main.nf new file mode 100644 index 00000000..3d9becda --- /dev/null +++ b/modules/samtools/collatefastq/main.nf @@ -0,0 +1,47 @@ +process SAMTOOLS_COLLATEFASTQ { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + + input: + tuple val(meta), path(input) + + output: + //TODO might be good to have ordered output of the fastq files, so we can + // make sure the we get the right files + tuple val(meta), path("*_{1,2}.fq.gz"), path("*_other.fq.gz"), path("*_singleton.fq.gz"), 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.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + samtools collate \\ + $args \\ + --threads $task.cpus \\ + -O \\ + $input \\ + . | + + samtools fastq \\ + $args2 \\ + --threads $task.cpus \\ + -1 ${prefix}_1.fq.gz \\ + -2 ${prefix}_2.fq.gz \\ + -0 ${prefix}_other.fq.gz \\ + -s ${prefix}_singleton.fq.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/samtools/collatefastq/meta.yml b/modules/samtools/collatefastq/meta.yml new file mode 100644 index 00000000..d3a2e3af --- /dev/null +++ b/modules/samtools/collatefastq/meta.yml @@ -0,0 +1,48 @@ +name: samtools_collatefastq +description: | + The module uses collate and then fastq methods from samtools to + convert a SAM, BAM or CRAM file to FASTQ format +keywords: + - bam2fq + - samtools + - fastq +tools: + - samtools: + description: Tools for dealing with SAM, BAM and CRAM files + homepage: None + documentation: http://www.htslib.org/doc/1.1/samtools.html + tool_dev_url: None + doi: "" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + FASTQ files, which will be either a group of 4 files (read_1, read_2, other and singleton) + or a single interleaved .fq.gz file if the user chooses not to split the reads. + pattern: "*.fq.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@lescai" + - "@maxulysse" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index bbd47fe5..607981a0 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1567,6 +1567,10 @@ samtools/bam2fq: - modules/samtools/bam2fq/** - tests/modules/samtools/bam2fq/** +samtools/collatefastq: + - modules/samtools/collatefastq/** + - tests/modules/samtools/collatefastq/** + samtools/depth: - modules/samtools/depth/** - tests/modules/samtools/depth/** diff --git a/tests/modules/samtools/collatefastq/main.nf b/tests/modules/samtools/collatefastq/main.nf new file mode 100644 index 00000000..928742ac --- /dev/null +++ b/tests/modules/samtools/collatefastq/main.nf @@ -0,0 +1,13 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SAMTOOLS_COLLATEFASTQ } from '../../../../modules/samtools/collatefastq/main.nf' + +workflow test_samtools_collatefastq { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + SAMTOOLS_COLLATEFASTQ ( input ) +} diff --git a/tests/modules/samtools/collatefastq/nextflow.config b/tests/modules/samtools/collatefastq/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/samtools/collatefastq/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/samtools/collatefastq/test.yml b/tests/modules/samtools/collatefastq/test.yml new file mode 100644 index 00000000..2b001885 --- /dev/null +++ b/tests/modules/samtools/collatefastq/test.yml @@ -0,0 +1,14 @@ +- name: samtools fastq test_samtools_collatefastq + command: nextflow run ./tests/modules/samtools/collatefastq -entry test_samtools_collatefastq -c ./tests/config/nextflow.config -c ./tests/modules/samtools/collatefastq/nextflow.config + tags: + - samtools + - samtools/collatefastq + files: + - path: output/samtools/test_1.fq.gz + md5sum: 829732de4e937edca90f27b07e5b501a + - path: output/samtools/test_2.fq.gz + md5sum: ef27d3809e495620fd93df894280c03a + - path: output/samtools/test_other.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 + - path: output/samtools/test_singleton.fq.gz + md5sum: 709872fc2910431b1e8b7074bfe38c67 From 6c45773c0b7f4bdaa8c9716091b0e721a5ae96f3 Mon Sep 17 00:00:00 2001 From: louperelo <44900284+louperelo@users.noreply.github.com> Date: Wed, 20 Apr 2022 11:53:26 +0200 Subject: [PATCH 031/313] add module AMPlify (#1498) * add module AMPlify * Apply suggestions from code review Thanks for the review! Co-authored-by: Moritz E. Beber * removed trailing whitespaces * Apply suggestions from code review Thanks again! Co-authored-by: Moritz E. Beber * Apply suggestions from code review Thank you for the suggestions! Co-authored-by: Sateesh Peri <33637490+sateeshperi@users.noreply.github.com> Co-authored-by: James A. Fellows Yates * Apply suggestions from code review Co-authored-by: Sateesh Peri <33637490+sateeshperi@users.noreply.github.com> * including review suggestions * fix versions.yml * add model_dir input * add model_dir to meta.yml * complete faa pattern in meta.yml * add fa.gz to pattern Co-authored-by: Moritz E. Beber Co-authored-by: Sateesh Peri <33637490+sateeshperi@users.noreply.github.com> Co-authored-by: James A. Fellows Yates --- modules/amplify/predict/main.nf | 41 ++++++++++++++++ modules/amplify/predict/meta.yml | 47 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/amplify/predict/main.nf | 18 +++++++ tests/modules/amplify/predict/nextflow.config | 5 ++ tests/modules/amplify/predict/test.yml | 9 ++++ 6 files changed, 124 insertions(+) create mode 100644 modules/amplify/predict/main.nf create mode 100644 modules/amplify/predict/meta.yml create mode 100644 tests/modules/amplify/predict/main.nf create mode 100644 tests/modules/amplify/predict/nextflow.config create mode 100644 tests/modules/amplify/predict/test.yml diff --git a/modules/amplify/predict/main.nf b/modules/amplify/predict/main.nf new file mode 100644 index 00000000..d035516f --- /dev/null +++ b/modules/amplify/predict/main.nf @@ -0,0 +1,41 @@ +def VERSION = '1.0.3' // Version information not provided by tool + +process AMPLIFY_PREDICT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::amplify=1.0.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/amplify:1.0.3--py36hdfd78af_0': + 'quay.io/biocontainers/amplify:1.0.3--py36hdfd78af_0' }" + + input: + tuple val(meta), path(faa) + path(model_dir) + + 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}" + def custom_model_dir = model_dir ? "-md ${model_dir}" : "" + """ + AMPlify \\ + $args \\ + ${custom_model_dir} \\ + -s '${faa}' + + #rename output, because tool includes date and time in name + mv *.tsv ${prefix}.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + AMPlify: $VERSION + END_VERSIONS + """ +} diff --git a/modules/amplify/predict/meta.yml b/modules/amplify/predict/meta.yml new file mode 100644 index 00000000..c9ffe8a4 --- /dev/null +++ b/modules/amplify/predict/meta.yml @@ -0,0 +1,47 @@ +name: "amplify_predict" +description: AMPlify is an attentive deep learning model for antimicrobial peptide prediction. +keywords: + - antimicrobial peptides + - AMPs + - prediction + - model +tools: + - "amplify": + description: "Attentive deep learning model for antimicrobial peptide prediction" + homepage: "https://github.com/bcgsc/AMPlify" + documentation: "https://github.com/bcgsc/AMPlify" + tool_dev_url: "https://github.com/bcgsc/AMPlify" + doi: "https://doi.org/10.1186/s12864-022-08310-4" + licence: "['GPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - faa: + type: file + description: amino acid sequences fasta + pattern: "*.{fa,fa.gz,faa,faa.gz,fasta,fasta.gz}" + - model_dir: + type: directory + description: Directory of where models are stored (optional) + +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: amino acid sequences with prediction (AMP, non-AMP) and probability scores + pattern: "*.{tsv}" + +authors: + - "@louperelo" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 607981a0..f8db3e87 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -26,6 +26,10 @@ allelecounter: - modules/allelecounter/** - tests/modules/allelecounter/** +amplify/predict: + - modules/amplify/predict/** + - tests/modules/amplify/predict/** + amps: - modules/amps/** - tests/modules/amps/** diff --git a/tests/modules/amplify/predict/main.nf b/tests/modules/amplify/predict/main.nf new file mode 100644 index 00000000..05db4cdb --- /dev/null +++ b/tests/modules/amplify/predict/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PRODIGAL } from '../../../modules/prodigal/main.nf' addParams( options: [:] ) +include { AMPLIFY_PREDICT } from '../../../../modules/amplify/predict/main.nf' addParams( options: [:] ) + +workflow amplify_predict { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) + ] + model_dir = [] + + PRODIGAL ( input, "gff" ) + AMPLIFY_PREDICT ( PRODIGAL.out.amino_acid_fasta, model_dir) +} diff --git a/tests/modules/amplify/predict/nextflow.config b/tests/modules/amplify/predict/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/amplify/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/amplify/predict/test.yml b/tests/modules/amplify/predict/test.yml new file mode 100644 index 00000000..3bc92889 --- /dev/null +++ b/tests/modules/amplify/predict/test.yml @@ -0,0 +1,9 @@ +- name: amplify predict amplify_predict + command: nextflow run tests/modules/amplify/predict -entry amplify_predict -c tests/config/nextflow.config + tags: + - amplify/predict + - amplify + files: + - path: output/amplify/test.tsv + md5sum: 1951084ce1d410028be86754997e5852 + - path: output/amplify/versions.yml From 37bf3936f3665483d070a5e0e0b314311032af7c Mon Sep 17 00:00:00 2001 From: "Maxime U. Garcia" Date: Wed, 20 Apr 2022 16:26:56 +0200 Subject: [PATCH 032/313] add decompress possibilities to bgzip (#1540) * add decompress possibilities to bgzip * spacing --- modules/tabix/bgzip/main.nf | 11 +++++++---- modules/tabix/bgzip/meta.yml | 15 ++++++++------- tests/config/test_data.config | 2 +- tests/modules/tabix/bgzip/main.nf | 10 +++++++++- tests/modules/tabix/bgzip/test.yml | 12 ++++++++++-- 5 files changed, 35 insertions(+), 15 deletions(-) diff --git a/modules/tabix/bgzip/main.nf b/modules/tabix/bgzip/main.nf index 90940a5d..18e83c84 100644 --- a/modules/tabix/bgzip/main.nf +++ b/modules/tabix/bgzip/main.nf @@ -11,17 +11,20 @@ process TABIX_BGZIP { tuple val(meta), path(input) output: - tuple val(meta), path("*.gz"), emit: gz - path "versions.yml" , emit: versions + 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 prefix = task.ext.prefix ?: "${meta.id}" + prefix = task.ext.prefix ?: "${meta.id}" + in_bgzip = input.toString().endsWith(".gz") + command1 = in_bgzip ? '-d' : '-c' + command2 = in_bgzip ? '' : " > ${prefix}.${input.getExtension()}.gz" """ - bgzip -c $args $input > ${prefix}.${input.getExtension()}.gz + bgzip $command1 $args -@${task.cpus} $input $command2 cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/tabix/bgzip/meta.yml b/modules/tabix/bgzip/meta.yml index 207427e4..50070175 100644 --- a/modules/tabix/bgzip/meta.yml +++ b/modules/tabix/bgzip/meta.yml @@ -1,13 +1,14 @@ name: tabix_bgzip -description: Compresses files +description: Compresses/decompresses files keywords: - compress + - decompress - bgzip - tabix tools: - bgzip: description: | - Bgzip compresses files in a similar manner to, and compatible with, gzip. + Bgzip compresses or decompresses files in a similar manner to, and compatible with, gzip. homepage: https://www.htslib.org/doc/tabix.html documentation: http://www.htslib.org/doc/bgzip.html doi: 10.1093/bioinformatics/btp352 @@ -18,19 +19,19 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - file: + - input: type: file - description: text file + description: file to compress or to decompress output: - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - file: + - output: type: file - description: Output compressed file - pattern: "*.{gz}" + description: Output compressed/decompressed file + pattern: "*." - versions: type: file description: File containing software versions diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 97d22981..ea123732 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -397,7 +397,7 @@ params { hello = "${test_data_dir}/generic/txt/hello.txt" } 'cnn' { - reference = "${test_data_dir}/generic/cnn/reference.cnn" + reference = "${test_data_dir}/generic/cnn/reference.cnn" } 'cooler'{ test_pairix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz" diff --git a/tests/modules/tabix/bgzip/main.nf b/tests/modules/tabix/bgzip/main.nf index 4d349890..4e326d64 100644 --- a/tests/modules/tabix/bgzip/main.nf +++ b/tests/modules/tabix/bgzip/main.nf @@ -4,10 +4,18 @@ nextflow.enable.dsl = 2 include { TABIX_BGZIP } from '../../../../modules/tabix/bgzip/main.nf' -workflow test_tabix_bgzip { +workflow test_tabix_bgzip_compress { input = [ [ id:'test' ], // meta map [ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] ] TABIX_BGZIP ( input ) } + +workflow test_tabix_bgzip_decompress { + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['genome']['test_bed_gz'], checkIfExists: true) ] + ] + + TABIX_BGZIP ( input ) +} diff --git a/tests/modules/tabix/bgzip/test.yml b/tests/modules/tabix/bgzip/test.yml index 19357655..72819c90 100644 --- a/tests/modules/tabix/bgzip/test.yml +++ b/tests/modules/tabix/bgzip/test.yml @@ -1,8 +1,16 @@ -- name: tabix bgzip - command: nextflow run ./tests/modules/tabix/bgzip -entry test_tabix_bgzip -c ./tests/config/nextflow.config -c ./tests/modules/tabix/bgzip/nextflow.config +- name: tabix bgzip compress + command: nextflow run ./tests/modules/tabix/bgzip -entry test_tabix_bgzip_compress -c ./tests/config/nextflow.config -c ./tests/modules/tabix/bgzip/nextflow.config tags: - tabix - tabix/bgzip files: - path: ./output/tabix/test.vcf.gz md5sum: fc178eb342a91dc0d1d568601ad8f8e2 +- name: tabix bgzip decompress + command: nextflow run ./tests/modules/tabix/bgzip -entry test_tabix_bgzip_decompress -c ./tests/config/nextflow.config -c ./tests/modules/tabix/bgzip/nextflow.config + tags: + - tabix + - tabix/bgzip + files: + - path: ./output/tabix/test.bed + md5sum: fe4053cf4de3aebbdfc3be2efb125a74 From d07d270743f1433a0aff2c490db1b33360db8b79 Mon Sep 17 00:00:00 2001 From: Jasmin F <73216762+jasmezz@users.noreply.github.com> Date: Thu, 21 Apr 2022 10:38:17 +0200 Subject: [PATCH 033/313] Antismashlite download databases (#1426) * Create module antismashlitedownloaddatabases * Corrected user-specification of database directory * Updated test.yml * Apply suggestions from code review Co-authored-by: James A. Fellows Yates * Fix typo in test.yml * Feed database files via docker/singularity mount) * Add external db file mounts to the containers * Fixed docker command in main.nf * Apply prettier * Apply prettier and add PWD * Add more output to test.yml * Add more output paths to test.yml * Fixed test.yml * Apply suggestions from code review Add documentation of why we need to mount files to the containers. Co-authored-by: James A. Fellows Yates * Fix code linting errors (remove trailing whitespaces) * Fix code linting error (remove trailing whitespace) * Fix errors from Prettier linting Co-authored-by: James A. Fellows Yates --- .../antismashlitedownloaddatabases/main.nf | 46 ++++++++++++++++ .../antismashlitedownloaddatabases/meta.yml | 55 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ .../antismashlitedownloaddatabases/main.nf | 29 ++++++++++ .../nextflow.config | 5 ++ .../antismashlitedownloaddatabases/test.yml | 14 +++++ 6 files changed, 153 insertions(+) create mode 100644 modules/antismash/antismashlitedownloaddatabases/main.nf create mode 100644 modules/antismash/antismashlitedownloaddatabases/meta.yml create mode 100644 tests/modules/antismash/antismashlitedownloaddatabases/main.nf create mode 100644 tests/modules/antismash/antismashlitedownloaddatabases/nextflow.config create mode 100644 tests/modules/antismash/antismashlitedownloaddatabases/test.yml diff --git a/modules/antismash/antismashlitedownloaddatabases/main.nf b/modules/antismash/antismashlitedownloaddatabases/main.nf new file mode 100644 index 00000000..1853d80a --- /dev/null +++ b/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -0,0 +1,46 @@ +process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { + label 'process_low' + + conda (params.enable_conda ? "bioconda::antismash-lite=6.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/antismash-lite:6.0.1--pyhdfd78af_1' : + 'quay.io/biocontainers/antismash-lite:6.0.1--pyhdfd78af_1' }" + + /* + These files are normally downloaded by download-antismash-databases itself, and must be retrieved for input by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. This is solely for use for CI tests of the nf-core/module version of antiSMASH. + Reason: Upon execution, the tool checks if certain database files are present within the container and if not, it tries to create them in /usr/local/bin, for which only root user has write permissions. Mounting those database files with this module prevents the tool from trying to create them. + */ + + containerOptions { + workflow.containerEngine == 'singularity' ? + "-B $database_css:/usr/local/lib/python3.8/site-packages/antismash/outputs/html/css,$database_detection:/usr/local/lib/python3.8/site-packages/antismash/detection,$database_modules:/usr/local/lib/python3.8/site-packages/antismash/modules" : + workflow.containerEngine == 'docker' ? + "-v \$PWD/$database_css:/usr/local/lib/python3.8/site-packages/antismash/outputs/html/css -v \$PWD/$database_detection:/usr/local/lib/python3.8/site-packages/antismash/detection -v \$PWD/$database_modules:/usr/local/lib/python3.8/site-packages/antismash/modules" : + '' + } + + input: + path database_css + path database_detection + path database_modules + + output: + path("antismash_db") , emit: database + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + download-antismash-databases \\ + --database-dir antismash_db \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + antismash: \$(antismash --version | sed 's/antiSMASH //') + END_VERSIONS + """ +} diff --git a/modules/antismash/antismashlitedownloaddatabases/meta.yml b/modules/antismash/antismashlitedownloaddatabases/meta.yml new file mode 100644 index 00000000..ad393bae --- /dev/null +++ b/modules/antismash/antismashlitedownloaddatabases/meta.yml @@ -0,0 +1,55 @@ +name: antismash_antismashlitedownloaddatabases +description: antiSMASH allows the rapid genome-wide identification, annotation and analysis of secondary metabolite biosynthesis gene clusters. This module downloads the antiSMASH databases. +keywords: + - secondary metabolites + - BGC + - biosynthetic gene cluster + - genome mining + - NRPS + - RiPP + - antibiotics + - prokaryotes + - bacteria + - eukaryotes + - fungi + - antismash + - database +tools: + - antismash: + description: antiSMASH - the antibiotics and Secondary Metabolite Analysis SHell + homepage: https://docs.antismash.secondarymetabolites.org + documentation: https://docs.antismash.secondarymetabolites.org + tool_dev_url: https://github.com/antismash/antismash + doi: "10.1093/nar/gkab335" + licence: ["AGPL v3"] + +input: + - database_css: + type: directory + description: | + antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "css" + - database_detection: + type: directory + description: | + antismash/detection folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "detection" + - database_modules: + type: directory + description: | + antismash/modules folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "modules" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + + - database: + type: directory + description: Download directory for antiSMASH databases + pattern: "antismash_db" + +authors: + - "@jasmezz" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index f8db3e87..9a128bd4 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -42,6 +42,10 @@ amrfinderplus/update: - modules/amrfinderplus/update/** - tests/modules/amrfinderplus/update/** +antismash/antismashlitedownloaddatabases: + - modules/antismash/antismashlitedownloaddatabases/** + - tests/modules/antismash/antismashlitedownloaddatabases/** + arriba: - modules/arriba/** - tests/modules/arriba/** diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/main.nf b/tests/modules/antismash/antismashlitedownloaddatabases/main.nf new file mode 100644 index 00000000..d7289acc --- /dev/null +++ b/tests/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -0,0 +1,29 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR as UNTAR1 } from '../../../../modules/untar/main.nf' +include { UNTAR as UNTAR2 } from '../../../../modules/untar/main.nf' +include { UNTAR as UNTAR3 } from '../../../../modules/untar/main.nf' +include { ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES } from '../../../../modules/antismash/antismashlitedownloaddatabases/main.nf' + +workflow test_antismash_antismashlitedownloaddatabases { + input1 = [ + [], + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/css.tar.gz', checkIfExists: true) + ] + input2 = [ + [], + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/detection.tar.gz', checkIfExists: true) + ] + input3 = [ + [], + file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/antismash/modules.tar.gz', checkIfExists: true) + ] + + UNTAR1 ( input1 ) + UNTAR2 ( input2 ) + UNTAR3 ( input3 ) + + ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES ( UNTAR1.out.untar.map{ it[1] }, UNTAR2.out.untar.map{ it[1] }, UNTAR3.out.untar.map{ it[1] } ) +} diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/nextflow.config b/tests/modules/antismash/antismashlitedownloaddatabases/nextflow.config new file mode 100644 index 00000000..06a716aa --- /dev/null +++ b/tests/modules/antismash/antismashlitedownloaddatabases/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml new file mode 100644 index 00000000..3493bb4b --- /dev/null +++ b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml @@ -0,0 +1,14 @@ +- name: antismash antismashlitedownloaddatabases test_antismash_antismashlitedownloaddatabases + command: nextflow run tests/modules/antismash/antismashlitedownloaddatabases -entry test_antismash_antismashlitedownloaddatabases -c tests/config/nextflow.config + tags: + - antismash/antismashlitedownloaddatabases + - antismash + files: + - path: output/antismash/versions.yml + md5sum: e2656c8d2bcc7469eba40eb1ee5c91b3 + - path: output/antismash/antismash_db + - path: output/antismash/antismash_db/clusterblast + - path: output/antismash/antismash_db/clustercompare + - path: output/antismash/antismash_db/pfam + - path: output/antismash/antismash_db/resfam + - path: output/antismash/antismash_db/tigrfam From d85f9c7011a2539dc07582c1642f4255a3724b7c Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 21 Apr 2022 13:16:23 +0200 Subject: [PATCH 034/313] add subworkflow bam_qc_picard --- subworkflows/nf-core/bam_qc_picard/main.nf | 43 +++++++++++++ subworkflows/nf-core/bam_qc_picard/meta.yml | 64 +++++++++++++++++++ .../nf-core/bam_qc_picard/main.nf | 21 ++++++ .../nf-core/bam_qc_picard/test.yml | 33 ++++++++++ 4 files changed, 161 insertions(+) create mode 100644 subworkflows/nf-core/bam_qc_picard/main.nf create mode 100644 subworkflows/nf-core/bam_qc_picard/meta.yml create mode 100644 tests/subworkflows/nf-core/bam_qc_picard/main.nf create mode 100644 tests/subworkflows/nf-core/bam_qc_picard/test.yml diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf new file mode 100644 index 00000000..31edb2c3 --- /dev/null +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -0,0 +1,43 @@ +// +// Run QC steps on BAM/CRAM files using Picard +// + +params.options = [:] + +include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picardcollectmultiplemetrics/main' addParams( options: params.options ) +include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picardcollectwgsmetrics/main' addParams( options: params.options ) +include { PICARD_COLLECTHSMETRICS } from '../../../modules/picardcollecthsmetrics/main' addParams( options: params.options ) + +workflow BAM_QC_PICARD { + take: + ch_bam_bai // channel: [ val(meta), [ bam ], [bai/csi] ] + ch_fasta // channel: [ fasta ] + ch_bait_interval // channel: [ bait_interval ] + ch_target_interval // channel: [ target_interval ] + + main: + ch_versions = Channel.empty() + + PICARD_COLLECTMULTIPLEMETRICS( ch_bam_bai, ch_fasta] ) + ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) + if (!ch_bait_interval.isEmpty() || !ch_target_interval.isEmpty()) { + if (ch_bait_interval.isEmpty()) { + throw new Error("Bait interval channel is empty") + } + if (ch_target_interval.isEmpty()) { + throw new Error("Target interval channel is empty") + } + PICARD_COLLECTHSMETRICS( ch_bam_bai, ch_fasta, ch_bait_interval, ch_target_interval ) + ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) + } else { + PICARD_COLLECTWGSMETRICS( ch_bam_bai, ch_fasta ) + ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) + } + + emit: + hs_metrics = PICARD_COLLECTHSMETRICS.out.hs_metrics // channel: [ val(meta), [ hs_metrics ] ] + wgs_metrics = PICARD_COLLECTWGSMETRICS.out.metrics // channel: [ val(meta), [ wgs_metrics ] ] + multiple_metrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics // channel: [ val(meta), [ multiple_metrics ] ] + + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml new file mode 100644 index 00000000..77104e82 --- /dev/null +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -0,0 +1,64 @@ +name: bam_qc +description: Produces comprehensive statistics from BAM file +keywords: + - statistics + - counts + - hs_metrics + - wgs_metrics + - bam + - sam + - cram +modules: + - picard/collectmultiplemetrics + - picard/collectwgsmetrics + - picard/collecthsmetrics +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - bai: + type: file + description: Index for BAM/CRAM/SAM file + pattern: "*.{bai,crai,sai}" + - fasta: + type: optional file + description: Reference file the CRAM was created with + pattern: "*.{fasta,fa}" + - bait_intervals: + type: optional file + description: An interval list file that contains the locations of the baits used. + pattern: "baits.interval_list" + - target_intervals: + type: optional file + description: An interval list file that contains the locations of the targets. + pattern: "targets.interval_list" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - hs_metrics: + type: file + description: Alignment metrics files generated by picard CollectHsMetrics + pattern: "*_collecthsmetrics.txt" + - wgs_metrics: + type: file + description: Alignment metrics files generated by picard CollectWgsMetrics + pattern: "*_{metrics}" + - multiple_metrics: + type: file + description: Alignment metrics files generated by picard CollectMultipleMetrics + pattern: "*_{metrics}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" +authors: + - "@matthdsm" diff --git a/tests/subworkflows/nf-core/bam_qc_picard/main.nf b/tests/subworkflows/nf-core/bam_qc_picard/main.nf new file mode 100644 index 00000000..d88f2bf9 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_qc_picard/main.nf @@ -0,0 +1,21 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BAM_QC_PICARD } from '../../../../subworkflows/nf-core/bam_qc_picard/main' addParams([:]) + +workflow test_bam_qc_picard_wgs { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) + ] + + BAM_QC_PICARD ( input, [], [], [] ) +} + +workflow test_bam_qc_picard_targetted { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAM_QC_PICARD ( input, [], file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true), file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) ) +} diff --git a/tests/subworkflows/nf-core/bam_qc_picard/test.yml b/tests/subworkflows/nf-core/bam_qc_picard/test.yml new file mode 100644 index 00000000..af98230d --- /dev/null +++ b/tests/subworkflows/nf-core/bam_qc_picard/test.yml @@ -0,0 +1,33 @@ +- name: bam qc picard wgs + command: nextflow run ./tests/subworkflows/nf-core/bam_qc_picard -entry test_bam_qc_picard_wgs -c tests/config/nextflow.config + tags: + - subworkflows + # - subworkflows/bam_qc_picard + # Modules + # - picard + # - picard/collectmultiplemetrics + # - picard/collectwgsmetrics + files: + - path: ./output/picard/test.CollectMultipleMetrics.alignment_summary_metrics + - path: ./output/picard/test.CollectMultipleMetrics.insert_size_metrics + - path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics + - path: ./output/picard/test.CollectWgsMetrics.coverage_metrics + +- name: bam qc picard targetted + command: nextflow run ./tests/subworkflows/nf-core/bam_qc_picard -entry test_bam_qc_picard_targetted -c tests/config/nextflow.config + tags: + - subworkflows + # - subworkflows/bam_qc_picard + # Modules + # - picard + # - picard/collectmultiplemetrics + # - picard/collecthsmetrics + files: + - path: ./output/picard/test.CollectMultipleMetrics.alignment_summary_metrics + - path: ./output/picard/test.CollectMultipleMetrics.insert_size_metrics + - path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics + - path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics + - path: ./output/picard/test_collecthsmetrics.txt From abe025677cdd805cc93032341ab19885473c1a07 Mon Sep 17 00:00:00 2001 From: Francesco L <53608000+lescai@users.noreply.github.com> Date: Thu, 21 Apr 2022 14:33:59 +0200 Subject: [PATCH 035/313] update to kraken2: breaking change - output channels renamed (#1525) * updated kraken2 module to include optional classification of each input reads, and make fastq outputs optional NB: this is a breaking change, because the output channels have been renamed as a consequence of changes * updated yml * pigz command made optional, in order to be executed only if fastq of classified/unclassified reads are saved * updated test yaml file for kraken2 * fixed TODOs and renamed variables and outputs * untar in conda cannot keep same md5sum of version, and therefore md5sum check removed * improved description of the options Co-authored-by: James A. Fellows Yates --- modules/kraken2/kraken2/main.nf | 23 ++++++++++----- modules/kraken2/kraken2/meta.yml | 25 ++++++++++++---- tests/modules/kraken2/kraken2/main.nf | 14 +++++++-- tests/modules/kraken2/kraken2/test.yml | 40 +++++++++++++++++--------- 4 files changed, 75 insertions(+), 27 deletions(-) diff --git a/modules/kraken2/kraken2/main.nf b/modules/kraken2/kraken2/main.nf index 3ec5df52..d4000233 100644 --- a/modules/kraken2/kraken2/main.nf +++ b/modules/kraken2/kraken2/main.nf @@ -10,12 +10,15 @@ process KRAKEN2_KRAKEN2 { input: tuple val(meta), path(reads) path db + val save_output_fastqs + val save_reads_assignment output: - tuple val(meta), path('*classified*') , emit: classified - tuple val(meta), path('*unclassified*'), emit: unclassified - tuple val(meta), path('*report.txt') , emit: txt - path "versions.yml" , emit: versions + tuple val(meta), path('*classified*') , optional:true, emit: classified_reads_fastq + tuple val(meta), path('*unclassified*') , optional:true, emit: unclassified_reads_fastq + tuple val(meta), path('*classifiedreads*'), optional:true, emit: classified_reads_assignment + tuple val(meta), path('*report.txt') , emit: report + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -26,19 +29,25 @@ process KRAKEN2_KRAKEN2 { def paired = meta.single_end ? "" : "--paired" def classified = meta.single_end ? "${prefix}.classified.fastq" : "${prefix}.classified#.fastq" def unclassified = meta.single_end ? "${prefix}.unclassified.fastq" : "${prefix}.unclassified#.fastq" + def classified_command = save_output_fastqs ? "--classified-out ${classified}" : "" + def unclassified_command = save_output_fastqs ? "--unclassified-out ${unclassified}" : "" + def readclassification_command = save_reads_assignment ? "--output ${prefix}.kraken2.classifiedreads.txt" : "" + def compress_reads_command = save_output_fastqs ? "pigz -p $task.cpus *.fastq" : "" + """ kraken2 \\ --db $db \\ --threads $task.cpus \\ - --unclassified-out $unclassified \\ - --classified-out $classified \\ --report ${prefix}.kraken2.report.txt \\ --gzip-compressed \\ + $unclassified_command \\ + $classified_command \\ + $readclassification_command \\ $paired \\ $args \\ $reads - pigz -p $task.cpus *.fastq + $compress_reads_command cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/kraken2/kraken2/meta.yml b/modules/kraken2/kraken2/meta.yml index 9d6a3855..7129fe3a 100644 --- a/modules/kraken2/kraken2/meta.yml +++ b/modules/kraken2/kraken2/meta.yml @@ -27,25 +27,40 @@ input: - db: type: directory description: Kraken2 database + - save_output_fastqs: + type: boolean + description: | + If true, optional commands are added to save classified and unclassified reads + as fastq files + - save_reads_assignment: + type: boolean + description: | + If true, an optional command is added to save a file reporting the taxonomic + classification of each input read output: - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - classified: + - classified_reads_fastq: type: file description: | - Reads classified to belong to any of the taxa + Reads classified as belonging to any of the taxa on the Kraken2 database. pattern: "*{fastq.gz}" - - unclassified: + - unclassified_reads_fastq: type: file description: | - Reads not classified to belong to any of the taxa + Reads not classified to any of the taxa on the Kraken2 database. pattern: "*{fastq.gz}" - - txt: + - classified_reads_assignment: + type: file + description: | + Kraken2 output file indicating the taxonomic assignment of + each input read + - report: type: file description: | Kraken2 report containing stats about classified diff --git a/tests/modules/kraken2/kraken2/main.nf b/tests/modules/kraken2/kraken2/main.nf index 94f4db95..4a3593e4 100644 --- a/tests/modules/kraken2/kraken2/main.nf +++ b/tests/modules/kraken2/kraken2/main.nf @@ -12,7 +12,7 @@ workflow test_kraken2_kraken2_single_end { db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ] UNTAR ( db ) - KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] } ) + KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, true, false ) } workflow test_kraken2_kraken2_paired_end { @@ -23,5 +23,15 @@ workflow test_kraken2_kraken2_paired_end { db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ] UNTAR ( db ) - KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] } ) + KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, true, false ) +} + +workflow test_kraken2_kraken2_classifyreads { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + db = [ [], file(params.test_data['sarscov2']['genome']['kraken2_tar_gz'], checkIfExists: true) ] + + UNTAR ( db ) + KRAKEN2_KRAKEN2 ( input, UNTAR.out.untar.map{ it[1] }, false, true ) } diff --git a/tests/modules/kraken2/kraken2/test.yml b/tests/modules/kraken2/kraken2/test.yml index 1ec413bf..af1e6e0d 100644 --- a/tests/modules/kraken2/kraken2/test.yml +++ b/tests/modules/kraken2/kraken2/test.yml @@ -1,29 +1,43 @@ -- name: kraken2 kraken2 single-end - command: nextflow run ./tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_single_end -c ./tests/config/nextflow.config -c ./tests/modules/kraken2/kraken2/nextflow.config +- name: kraken2 kraken2 test_kraken2_kraken2_single_end + command: nextflow run tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_single_end -c tests/config/nextflow.config tags: - kraken2 - kraken2/kraken2 files: - path: output/kraken2/test.classified.fastq.gz - should_exist: true - - path: output/kraken2/test.unclassified.fastq.gz - should_exist: true - path: output/kraken2/test.kraken2.report.txt md5sum: 4227755fe40478b8d7dc8634b489761e + - path: output/kraken2/test.unclassified.fastq.gz + - path: output/kraken2/versions.yml + md5sum: 6e3ad947ac8dee841a89216071c181cc + - path: output/untar/versions.yml -- name: kraken2 kraken2 paired-end - command: nextflow run ./tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/kraken2/kraken2/nextflow.config +- name: kraken2 kraken2 test_kraken2_kraken2_paired_end + command: nextflow run tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_paired_end -c tests/config/nextflow.config tags: - kraken2 - kraken2/kraken2 files: - path: output/kraken2/test.classified_1.fastq.gz - should_exist: true - path: output/kraken2/test.classified_2.fastq.gz - should_exist: true - - path: output/kraken2/test.unclassified_1.fastq.gz - should_exist: true - - path: output/kraken2/test.unclassified_2.fastq.gz - should_exist: true - path: output/kraken2/test.kraken2.report.txt md5sum: 4227755fe40478b8d7dc8634b489761e + - path: output/kraken2/test.unclassified_1.fastq.gz + - path: output/kraken2/test.unclassified_2.fastq.gz + - path: output/kraken2/versions.yml + md5sum: 604482fe7a4519f890fae9c8beb1bd6e + - path: output/untar/versions.yml + +- name: kraken2 kraken2 test_kraken2_kraken2_classifyreads + command: nextflow run tests/modules/kraken2/kraken2 -entry test_kraken2_kraken2_classifyreads -c tests/config/nextflow.config + tags: + - kraken2 + - kraken2/kraken2 + files: + - path: output/kraken2/test.kraken2.classifiedreads.txt + md5sum: e7a90531f0d8d777316515c36fe4cae0 + - path: output/kraken2/test.kraken2.report.txt + md5sum: 4227755fe40478b8d7dc8634b489761e + - path: output/kraken2/versions.yml + md5sum: 3488c304259e83c5bea573403293fce9 + - path: output/untar/versions.yml From f4c69bc4270186ca5ec174833dbe26cc0e1860fc Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 21 Apr 2022 15:39:22 +0200 Subject: [PATCH 036/313] Module/bclconvert (#1485) * bclconvert: initial commit * add most of tool * attempt at adding testing stub * add dockerfile + instructions * add container to module * update readme * more attempts at making stubs work * finish stub run * fix ci issues * more fixes to stub * add read version check to stub * fix some tests * update readme * fix version number * syntax fix * revert edit to output directory * Update modules/bclconvert/meta.yml Co-authored-by: James A. Fellows Yates * Update modules/bclconvert/meta.yml Co-authored-by: James A. Fellows Yates * update meta.yaml * update thread usage * Update modules/bclconvert/main.nf Co-authored-by: Edmund Miller * Escape env variable * Update modules/bclconvert/Dockerfile Co-authored-by: Mark Whelan <7407040+MrMarkW@users.noreply.github.com> * fix comments by @Emiller88 * fix task.cpus Co-authored-by: James A. Fellows Yates Co-authored-by: Edmund Miller Co-authored-by: Mark Whelan <7407040+MrMarkW@users.noreply.github.com> --- modules/bclconvert/.gitignore | 2 + modules/bclconvert/Dockerfile | 15 +++++ modules/bclconvert/LICENSE | 30 +++++++++ modules/bclconvert/README.md | 17 +++++ modules/bclconvert/main.nf | 81 ++++++++++++++++++++++++ modules/bclconvert/meta.yml | 45 +++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/bclconvert/main.nf | 22 +++++++ tests/modules/bclconvert/nextflow.config | 5 ++ tests/modules/bclconvert/test.yml | 52 +++++++++++++++ 10 files changed, 273 insertions(+) create mode 100644 modules/bclconvert/.gitignore create mode 100644 modules/bclconvert/Dockerfile create mode 100644 modules/bclconvert/LICENSE create mode 100644 modules/bclconvert/README.md create mode 100644 modules/bclconvert/main.nf create mode 100644 modules/bclconvert/meta.yml create mode 100644 tests/modules/bclconvert/main.nf create mode 100644 tests/modules/bclconvert/nextflow.config create mode 100644 tests/modules/bclconvert/test.yml diff --git a/modules/bclconvert/.gitignore b/modules/bclconvert/.gitignore new file mode 100644 index 00000000..45b0ea3a --- /dev/null +++ b/modules/bclconvert/.gitignore @@ -0,0 +1,2 @@ +bcl-convert +*.rpm diff --git a/modules/bclconvert/Dockerfile b/modules/bclconvert/Dockerfile new file mode 100644 index 00000000..df3e1d0f --- /dev/null +++ b/modules/bclconvert/Dockerfile @@ -0,0 +1,15 @@ +# Dockerfile to create container with bcl-convert +# Push to nfcore/bclconvert: + +FROM debian:bullseye-slim +LABEL authors="Matthias De Smet " \ + description="Docker image containing bcl-convert" +# Disclaimer: this container is not provided nor supported by Illumina +# 'ps' command is need by some nextflow executions to collect system stats +# Install procps and clean apt cache +RUN apt-get update \ + && apt-get install -y \ + procps \ + && apt-get clean -y && rm -rf /var/lib/apt/lists/* +COPY bcl-convert /usr/local/bin/bcl-convert +RUN chmod +x /usr/local/bin/bcl-convert diff --git a/modules/bclconvert/LICENSE b/modules/bclconvert/LICENSE new file mode 100644 index 00000000..6f523227 --- /dev/null +++ b/modules/bclconvert/LICENSE @@ -0,0 +1,30 @@ +ILLUMINA END-USER SOFTWARE LICENSE AGREEMENT + +IMPORTANT-READ CAREFULLY. THIS IS A LICENSE AGREEMENT THAT YOU ARE REQUIRED TO ACCEPT BEFORE, DOWNLOADING, INSTALLING AND USING ANY SOFTWARE MADE AVAILABLE FROM THE ILLUMINA SUPPORT CENTER (https://support.illumina.com). + +CAREFULLY READ ALL THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT BEFORE PROCEEDING WITH DOWNLOADING, INSTALLING, AND/OR USING THE SOFTWARE. YOU ARE NOT PERMITTED TO DOWNLOAD, INSTALL, AND/OR USE THE SOFTWARE UNTIL YOU HAVE AGREED TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. YOU REPRESENT AND WARRANT THAT YOU ARE DULY AUTHORIZED TO ACCEPT THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT ON BEHALF OF YOUR EMPLOYER. + +Software made available through the Illumina Support Center is licensed, not sold, to you. Your license to each software program made available through the Illumina Support Center is subject to your prior acceptance of either this Illumina End-User Software License Agreement (“Agreement”), or a custom end user license agreement (“Custom EULA”), if one is provided with the software. Any software that is subject to this Agreement is referred to herein as the “Software.” By accepting this Agreement, you agree the terms and conditions of this Agreement will apply to and govern any and all of your downloads, installations, and uses of each Illumina software program made available through the Illumina Support Center, except that your download, installation, and use of any software provided with a Custom EULA will be governed by the terms and conditions of the Custom EULA. + +This Agreement is made and entered into by and between Illumina, Inc., a Delaware corporation, having offices at 5200 Illumina Way, San Diego, CA 92122 (“Illumina”) and you as the end-user of the Software (hereinafter, “Licensee” or “you”). All software, firmware, and associated media, printed materials, and online and electronic documentation, including any updates or upgrades thereof, made available through the Illumina Support Center (collectively, “Software”) provided to Licensee are for use solely by Licensee and the provisions herein WILL apply with respect to such Software. + +License Grant. Subject to the terms and conditions of this Agreement, Illumina grants to Licensee, under the following terms and conditions, a personal, non-exclusive, revocable, non-transferable, non-sublicensable license, for its internal end-use purposes only, in the ordinary course of Licensee’s business to use the Software in executable object code form only, solely at the Licensee’s facility to, install and use the Software on a single computer accessible only by Licensee (and not on any public network or server), where the single computer is owned, leased, or otherwise substantially controlled by Licensee, for the purpose of processing and analyzing data generated from an Illumina genetic sequencing instrument owned and operated solely by Licensee (the “Product”). In the case of Software provided by Illumina in non-compiled form, Illumina grants Licensee a personal, non-exclusive, non-sublicenseable, restricted right to compile, install, and use one copy of the Software solely for processing and analyzing data generated from the Product. +License Restrictions. Except as expressly permitted in Section 1, Licensee may not make, have made, import, use, copy, reproduce, distribute, display, publish, sell, re-sell, lease, or sub-license the Software, in whole or in part, except as expressly provided for in this Agreement. Licensee may not modify, improve, translate, reverse engineer, decompile, disassemble, or create derivative works of the Software or otherwise attempt to (a) defeat, avoid, by-pass, remove, deactivate, or otherwise circumvent any software protection mechanisms in the Software including, without limitation, any such mechanism used to restrict or control the functionality of the Software, or (b) derive the source code or the underlying ideas, algorithms, structure, or organization form of the Software. Licensee will not allow, at any time, including during and after the term of the license, the Software or any portions or copies thereof in any form to become available to any third parties. Licensee may use the Software solely with genomic data that is generated using the Product; Licensee may not use the Software with any data generated from other products or instruments. Licensee may not use the Software to perform any data analysis services for any third party. +Ownership. The Software is protected by United States and international intellectual property laws. All right, title, and interest in and to the Software (including associated intellectual property rights) are and will remain vested in Illumina or Illumina’s affiliated companies or licensors. Licensee acknowledges that no rights, license or interest to any Illumina trademarks are granted hereunder. Licensee acknowledges that unauthorized reproduction or distribution of the Software, or any portion of it, may result in severe civil and criminal penalties. Illumina reserves all rights in and to the Software not expressly granted to Licensee under this Agreement. +Upgrades/Updates. Illumina may, at its sole discretion, provide updates or upgrades to the Software. In that case, Licensee WILL have the same rights and obligations under such updates or upgrades as it has for the versions of the Software initially provided to Licensee hereunder. Licensee recognizes that Illumina is not obligated to provide any upgrades or updates to, or support for, the Software. +Data Integrity/Loss. Licensee is responsible for the integrity and availability, including preventing the loss of data that Licensee generates, uses, analyzes, manages, or stores in connection with or through its use of the Software, including without limitation, investigating and implementing industry appropriate policies and procedures regarding the provision of access to Licensee’s data, monitoring access and use of Licensee’s data, conducting routine backups and archiving of Licensee’s data, and ensuring the adequacy of anti-virus software. Accordingly, Licensee agrees that Illumina is not responsible for any inability to access, loss or corruption of data as a result of Licensee’s use of the Software, and Illumina has no liability to Licensee in connection with such inability to access, loss or corruption of data. +Term of License. This Agreement will be in effect from the time Licensee expressly accepts the terms and conditions of this license, or otherwise installs the Software, thereby accepting the terms and conditions contained herein, and will remain in effect until terminated. This license will otherwise terminate upon the conditions set forth in this Agreement, if revoked by Illumina, or if Licensee fails to comply with any term or condition of this Agreement including failure to pay any applicable license fee. Licensee agrees upon termination of this Agreement for any reason to immediately discontinue use of and un-install the Software and destroy all copies of the Software in its possession and/or under its control, and return or destroy, at Illumina’s option, any compact disks, floppy disks or other media provided by Illumina storing the Software thereon (together with any authorized copies thereof), as well as any documentation associated therewith +Limited Warranty. Illumina warrants that, for a period of 6 months from the date of download or installation of the Software by Licensee, the Software will perform in all material respects in accordance with the accompanying documentation available on the Illumina Support Center. EXCEPT AND TO THE EXTENT EXPRESSLY PROVIDED IN THE FOREGOING, AND TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, THE SOFTWARE IS PROVIDED “AS IS” AND ILLUMINA EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS REGARDING THE SOFTWARE AND RESULTS GENERATED BY THE SOFTWARE, INCLUDING WITHOUT LIMITATION, TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, ALL OTHER EXPRESS OR IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABLE QUALITY, NON-INFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE, AND THOSE ARISING BY STATUTE OR OTHERWISE IN LAW OR FROM A COURSE OF DEALING OR USAGE OF TRADE. ILLUMINA DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET LICENSEE"S REQUIREMENTS, OR THAT THE OPERATION OF THE SOFTWARE WILL BE ERROR FREE OR UNINTERRUPTED. +Limitation of Liability. +(a) ILLUMINA’S ENTIRE LIABILITY AND LICENSEE"S EXCLUSIVE REMEDY UNDER THE LIMITED WARRANTY PROVISION OF SECTION 7 ABOVE WILL BE, AT ILLUMINA’S OPTION, EITHER (i) RETURN OF THE PRICE PAID FOR THE SOFTWARE, OR (ii) REPAIR OR REPLACEMENT OF THE PORTIONS OF THE SOFTWARE THAT DO NOT COMPLY WITH ILLUMINA’S LIMITED WARRANTY. THIS LIMITED WARRANTY IS VOID AND ILLUMINA WILL HAVE NO LIABILITY AT ALL IF FAILURE OF THE SOFTWARE TO COMPLY WITH ILLUMINA LIMITED WARRANTY HAS RESULTED FROM: (w) FAILURE TO USE THE SOFTWARE IN ACCORDANCE WITH ILLUMINA’S THEN CURRENT USER MANUAL OR THIS AGREEMENT; (x) ACCIDENT, ABUSE, OR MISAPPLICATION; (y) PRODUCTS OR EQUIPMENT NOT SPECIFIED BY ILLUMINA AS BEING COMPATIBLE WITH THE SOFTWARE; OR (z) IF LICENSEE HAS NOT NOTIFIED ILLUMINA IN WRITING OF THE DEFECT WITHIN THE ABOVE WARRANTY PERIOD. + +(b) TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL ILLUMINA BE LIABLE UNDER ANY THEORY OF CONTRACT, TORT, STRICT LIABILITY OR OTHER LEGAL OR EQUITABLE THEORY FOR ANY PERSONAL INJURY OR ANY INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, EVEN IF ILLUMINA HAS BEEN ADVISED OF THE POSSIBILITY THEREOF INCLUDING, WITHOUT LIMITATION, LOST PROFITS, LOST DATA, INTERRUPTION OF BUSINESS, LOST BUSINESS REVENUE, OTHER ECONOMIC LOSS, OR ANY LOSS OF RECORDED DATA ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE. EXCEPT AND TO THE EXTENT EXPRESSLY PROVIDED IN SECTION 7 AND 8(a) ABOVE OR AS OTHERWISE PERMITTED BY LAW, IN NO EVENT WILL ILLUMINA’S TOTAL LIABILITY TO LICENSEE FOR ALL DAMAGES (OTHER THAN AS MAY BE REQUIRED BY APPLICABLE LAW IN CASES INVOLVING PERSONAL INJURY) EXCEED THE AMOUNT OF $500 USD. THE FOREGOING LIMITATIONS WILL APPLY EVEN IF THE ABOVE STATED REMEDY FAILS OF ITS ESSENTIAL PURPOSE. + +Survival. The limitations of liability and ownership rights of Illumina contained herein and Licensee’s obligations following termination of this Agreement WILL survive the termination of this Agreement for any reason. +Research Use Only. The Software is labeled with a For Research Use Only or similar labeling statement and the performance characteristics of the Software have not been established and the Software is not for use in diagnostic procedures. Licensee acknowledges and agrees that (i) the Software has not been approved, cleared, or licensed by the United States Food and Drug Administration or any other regulatory entity whether foreign or domestic for any specific intended use, whether research, commercial, diagnostic, or otherwise, and (ii) Licensee must ensure it has any regulatory approvals that are necessary for Licensee’s intended uses of the Software. Licensee will comply with all applicable laws and regulations when using and maintaining the Software. +General. Licensee may not sublicense, assign, share, pledge, rent or transfer any of its rights under this Agreement in relation to the Software or any portion thereof including documentation. Illumina reserves the right to change this Agreement at any time. When Illumina makes any changes, Illumina will provide the updated Agreement, or a link to it, on Illumina’s website (www.illumina.com) and such updated Agreement WILL become effective immediately. Licensee’s continued access to or use of the Software represents Licensee’s agreement to any revised Agreement. If one or more provisions of this Agreement are found to be invalid or unenforceable, this Agreement WILL not be rendered inoperative but the remaining provisions WILL continue in full force and effect. This Agreement constitutes the entire agreement between the parties with respect to the subject matter of this Agreement and merges all prior communications except that a “hard-copy” form of licensing agreement relating to the Software previously agreed to in writing by Illumina and Licensee WILL supersede and govern in the event of any conflicting provisions. +Governing Law. This Agreement WILL be governed by and construed in accordance with the laws of the state of California, USA, without regard to its conflicts of laws principles, and independent of where a suit or action hereunder may be filed. +U.S. Government End Users. If Licensee is a branch agency or instrumentality of the United States Government, the following provision applies. The Software is a “commercial item” as that term is defined at 48 C.F.R. 2.101, consisting of “commercial computer software” and “commercial computer software documentation,” as such terms are used in 48 C.F.R. 12.212 or 48 C.F.R. 227.7202 (as applicable). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4, all United States Government end users acquire the Software with only those rights set forth herein. +Contact. Any questions regarding legal rights, duties, obligations, or restrictions associated with the software hereunder should be directed to Illumina, Inc., 5200 Illumina Way, San Diego, CA 92122, Attention: Legal Department, Phone: (858) 202-4500, Fax: (858) 202-4599, web site: www.illumina.com . +Third Party Components. The Software may include third party software (“Third Party Programs”). Some of the Third Party Programs are available under open source or free software licenses. The License Agreement accompanying the Licensed Software does not alter any rights or obligations Licensee may have under those open source or free software licenses. The licenses that govern the terms and conditions of use of the Third Party Programs included in the Licensed Software are provided in the READ ME provided with the Software. The READ ME also contains copyright statements for the various open source software components (or portions thereof) that are distributed with the Licensed Software. +END OF END-USER SOFTWARE LICENSE AGREEMENT. diff --git a/modules/bclconvert/README.md b/modules/bclconvert/README.md new file mode 100644 index 00000000..4f8538d0 --- /dev/null +++ b/modules/bclconvert/README.md @@ -0,0 +1,17 @@ +# Updating the docker container and making a new module release + +bcl-convert is a commercial tool from Illumina. The container provided for the bcl-convert nf-core module is not provided nor supported by Illumina. Updating the bcl-convert versions in the container and pushing the update to Dockerhub needs to be done manually. + +1. Navigate to the appropriate download page. - [BCL Convert](https://support.illumina.com/sequencing/sequencing_software/bcl-convert/downloads.html): download the rpm of the desired bcl-convert version with `curl` or `wget`. +2. Unpack the RPM package using `rpm2cpio bcl-convert-*.rpm | cpio -i --make-directories`. Place the executable located in `/usr/bin/bcl-convert` in the same folder where the Dockerfile lies. +3. Create and test the container: + + ```bash + docker build . -t nfcore/bclconvert: + ``` + +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/bclconvert: + ``` diff --git a/modules/bclconvert/main.nf b/modules/bclconvert/main.nf new file mode 100644 index 00000000..e6925b50 --- /dev/null +++ b/modules/bclconvert/main.nf @@ -0,0 +1,81 @@ +process BCLCONVERT { + tag '$samplesheet' + label 'process_high' + + if (params.enable_conda) { + exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers." + } + container "nfcore/bclconvert:3.9.3" + + input: + path samplesheet + path run_dir + + output: + path "*.fastq.gz" ,emit: fastq + path "Reports/*.{csv,xml,bin}" ,emit: reports + path "Logs/*.{log,txt}" ,emit: logs + path "InterOp/*.bin" ,emit: interop + path "versions.yml" ,emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + + """ + bcl-convert \ + $args \\ + --output-directory . \\ + --bcl-input-directory ${run_dir} \\ + --sample-sheet ${samplesheet} \\ + --bcl-num-parallel-tiles ${task.cpus} + + mkdir InterOp + cp ${run_dir}/InterOp/*.bin InterOp/ + mv Reports/*.bin InterOp/ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //') + END_VERSIONS + """ + + stub: + """ + echo "sample1_S1_L001_R1_001" > sample1_S1_L001_R1_001.fastq.gz + echo "sample1_S1_L001_R2_001" > sample1_S1_L001_R2_001.fastq.gz + echo "sample1_S1_L002_R1_001" > sample1_S1_L002_R1_001.fastq.gz + echo "sample1_S1_L002_R2_001" > sample1_S1_L002_R2_001.fastq.gz + echo "sample2_S2_L001_R1_001" > sample2_S2_L001_R1_001.fastq.gz + echo "sample2_S2_L001_R2_001" > sample2_S2_L001_R2_001.fastq.gz + echo "sample2_S2_L002_R1_001" > sample2_S2_L002_R1_001.fastq.gz + echo "sample2_S2_L002_R2_001" > sample2_S2_L002_R2_001.fastq.gz + + mkdir Reports + echo "Adapter_Metrics" > Reports/Adapter_Metrics.csv + echo "Demultiplex_Stats" > Reports/Demultiplex_Stats.csv + echo "fastq_list" > Reports/fastq_list.csv + echo "Index_Hopping_Counts" > Reports/Index_Hopping_Counts.csv + echo "IndexMetricsOut" > Reports/IndexMetricsOut.bin + echo "Quality_Metrics" > Reports/Quality_Metrics.csv + echo "RunInfo" > Reports/RunInfo.xml + echo "SampleSheet" > Reports/SampleSheet.csv + echo "Top_Unknown_Barcodes" > Reports/Top_Unknown_Barcodes.csv + + mkdir Logs + echo "Errors" > Logs/Errors.log + echo "FastqComplete" > Logs/FastqComplete.txt + echo "Info" > Logs/Info.log + echo "Warnings" > Logs/Warnings.log + + mkdir InterOp/ + echo "InterOp" > InterOp/InterOp.bin + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //') + END_VERSIONS + """ +} diff --git a/modules/bclconvert/meta.yml b/modules/bclconvert/meta.yml new file mode 100644 index 00000000..5c59a978 --- /dev/null +++ b/modules/bclconvert/meta.yml @@ -0,0 +1,45 @@ +name: "bclconvert" +description: Demultiplex Illumina BCL files +keywords: + - demultiplex + - illumina + - fastq +tools: + - "bclconvert": + description: "Demultiplex Illumina BCL files" + homepage: "https://support.illumina.com/sequencing/sequencing_software/bcl-convert.html" + documentation: "https://support-docs.illumina.com/SW/BCL_Convert/Content/SW/FrontPages/BCL_Convert.htm" + licence: "ILLUMINA" + +input: + - samplesheet: + type: file + description: "Input samplesheet" + pattern: "*.{csv}" + - run_dir: + type: directory + description: "Input run directory containing RunInfo.xml and BCL data" + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - fastq: + type: file + description: Demultiplexed FASTQ files + pattern: "*.{fastq.gz}" + - reports: + type: file + description: Demultiplexing Reports + pattern: "Reports/*.{csv,xml}" + - logs: + type: file + description: Log files + pattern: "Logs/*.{log,txt}" + - interop: + type: file + description: Interop files + pattern: "Interop/*.{bin}" +authors: + - "@matthdsm" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 9a128bd4..786f87db 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -174,6 +174,10 @@ bcftools/view: - modules/bcftools/view/** - tests/modules/bcftools/view/** +bclconvert: + - modules/bclconvert/** + - tests/modules/bclconvert/** + bedtools/bamtobed: - modules/bedtools/bamtobed/** - tests/modules/bedtools/bamtobed/** diff --git a/tests/modules/bclconvert/main.nf b/tests/modules/bclconvert/main.nf new file mode 100644 index 00000000..e8a78e4f --- /dev/null +++ b/tests/modules/bclconvert/main.nf @@ -0,0 +1,22 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCLCONVERT } from '../../../modules/bclconvert/main.nf' + +process STUB_BCLCONVERT_INPUT { + output: + path "SampleSheet.csv" ,emit: samplesheet + path "DDMMYY_SERIAL_FLOWCELL" ,emit: run_dir + + stub: + """ + mkdir DDMMYY_SERIAL_FLOWCELL + echo "SampleSheet" > SampleSheet.csv + """ +} + +workflow test_bclconvert { + STUB_BCLCONVERT_INPUT () + BCLCONVERT (STUB_BCLCONVERT_INPUT.out.samplesheet, STUB_BCLCONVERT_INPUT.out.run_dir) +} diff --git a/tests/modules/bclconvert/nextflow.config b/tests/modules/bclconvert/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/bclconvert/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/bclconvert/test.yml b/tests/modules/bclconvert/test.yml new file mode 100644 index 00000000..65e71a59 --- /dev/null +++ b/tests/modules/bclconvert/test.yml @@ -0,0 +1,52 @@ +- name: bclconvert test_bclconvert + command: nextflow run tests/modules/bclconvert -entry test_bclconvert -c tests/config/nextflow.config -stub-run + tags: + - bclconvert + files: + - path: output/bclconvert/InterOp/InterOp.bin + md5sum: d3dea0bb4ab1c8754af324f40b001481 + - path: output/bclconvert/Logs/Errors.log + md5sum: 334645f09074b2597a692e395b716a9c + - path: output/bclconvert/Logs/FastqComplete.txt + md5sum: a4c4c6ce2d0de67d3b7ac7d1fcb512e4 + - path: output/bclconvert/Logs/Info.log + md5sum: d238822d379f2277cac950ca986cb660 + - path: output/bclconvert/Logs/Warnings.log + md5sum: aeefd2d631817e170f88f25ecaaf4664 + - path: output/bclconvert/Reports/Adapter_Metrics.csv + md5sum: af62e9c7b44940cfd8ea11064a1f42ae + - path: output/bclconvert/Reports/Demultiplex_Stats.csv + md5sum: d11313931fcaabb5ce159462ad3dd1da + - path: output/bclconvert/Reports/IndexMetricsOut.bin + md5sum: 6bcee11c8145e3b1059ceaa91d2f5be7 + - path: output/bclconvert/Reports/Index_Hopping_Counts.csv + md5sum: 697e40e0c0d48b4bd25f138ef60b0bde + - path: output/bclconvert/Reports/Quality_Metrics.csv + md5sum: 3902fd38f6b01f1ce0f0e8724238f8f2 + - path: output/bclconvert/Reports/RunInfo.xml + md5sum: 5bef7c7e76360231b0c4afdfc915fd44 + - path: output/bclconvert/Reports/SampleSheet.csv + md5sum: c579e7d2c9c917c4cfb875a0373c0936 + - path: output/bclconvert/Reports/Top_Unknown_Barcodes.csv + md5sum: 39a5e7f6d21c12d6051afdc8261b6330 + - path: output/bclconvert/Reports/fastq_list.csv + md5sum: 32c51ab10e013fd547928de57361ffcb + - path: output/bclconvert/sample1_S1_L001_R1_001.fastq.gz + md5sum: 9b831a39755935333f86f167527a094d + - path: output/bclconvert/sample1_S1_L001_R2_001.fastq.gz + md5sum: 082f4f767b7619f409ca7e752ef482bf + - path: output/bclconvert/sample1_S1_L002_R1_001.fastq.gz + md5sum: 837764c89db93dfb53cd663c4f26f3d7 + - path: output/bclconvert/sample1_S1_L002_R2_001.fastq.gz + md5sum: 1a42cf6ba0bb8fc7770f278e6d1ab676 + - path: output/bclconvert/sample2_S2_L001_R1_001.fastq.gz + md5sum: 475bc426b7cc48d0551d40e31457dc78 + - path: output/bclconvert/sample2_S2_L001_R2_001.fastq.gz + md5sum: f670ccd7d9352e0e67fe1c1232429d94 + - path: output/bclconvert/sample2_S2_L002_R1_001.fastq.gz + md5sum: ebd5ff6fa5603e7d704b5a10598de58c + - path: output/bclconvert/sample2_S2_L002_R2_001.fastq.gz + md5sum: 2f83b460f52620d2548c7ef8845b31d7 + - path: output/stub/SampleSheet.csv + md5sum: c579e7d2c9c917c4cfb875a0373c0936 + - path: output/bclconvert/versions.yml From 0095bc91f7d8b7a2154f321ba8567ddd8b39bf46 Mon Sep 17 00:00:00 2001 From: "Robert A. Petit III" Date: Thu, 21 Apr 2022 18:49:42 +0000 Subject: [PATCH 037/313] add module for shigatyper --- modules/shigatyper/main.nf | 64 ++++++++++++++++++++++++ modules/shigatyper/meta.yml | 47 +++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/shigatyper/main.nf | 36 +++++++++++++ tests/modules/shigatyper/nextflow.config | 5 ++ tests/modules/shigatyper/test.yml | 30 +++++++++++ 6 files changed, 186 insertions(+) create mode 100644 modules/shigatyper/main.nf create mode 100644 modules/shigatyper/meta.yml create mode 100644 tests/modules/shigatyper/main.nf create mode 100644 tests/modules/shigatyper/nextflow.config create mode 100644 tests/modules/shigatyper/test.yml diff --git a/modules/shigatyper/main.nf b/modules/shigatyper/main.nf new file mode 100644 index 00000000..3754743f --- /dev/null +++ b/modules/shigatyper/main.nf @@ -0,0 +1,64 @@ +process SHIGATYPER { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::shigatyper=2.0.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/shigatyper%3A2.0.1--pyhdfd78af_0': + 'quay.io/biocontainers/shigatyper:2.0.1--pyhdfd78af_0' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("${prefix}.tsv") , emit: tsv + tuple val(meta), path("${prefix}-hits.tsv"), emit: hits, optional: true + 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}" + + if (meta.is_ont) { + """ + shigatyper \\ + $args \\ + --SE $reads \\ + --ont \\ + --name $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + shigatyper: \$(echo \$(shigatyper --version 2>&1) | sed 's/^.*ShigaTyper //' ) + END_VERSIONS + """ + } else if (meta.single_end) { + """ + shigatyper \\ + $args \\ + --SE $reads \\ + --name $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + shigatyper: \$(echo \$(shigatyper --version 2>&1) | sed 's/^.*ShigaTyper //' ) + END_VERSIONS + """ + } else { + """ + shigatyper \\ + $args \\ + --R1 ${reads[0]} \\ + --R2 ${reads[1]} \\ + --name $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + shigatyper: \$(echo \$(shigatyper --version 2>&1) | sed 's/^.*ShigaTyper //' ) + END_VERSIONS + """ + } +} diff --git a/modules/shigatyper/meta.yml b/modules/shigatyper/meta.yml new file mode 100644 index 00000000..ebaded6b --- /dev/null +++ b/modules/shigatyper/meta.yml @@ -0,0 +1,47 @@ +name: "shigatyper" +description: Determine Shigella serotype from Illumina or Oxford Nanopore reads +keywords: + - fastq + - shigella + - serotype +tools: + - "shigatyper": + description: "Typing tool for Shigella spp. from WGS Illumina sequencing" + homepage: "https://github.com/CFSAN-Biostatistics/shigatyper" + documentation: "https://github.com/CFSAN-Biostatistics/shigatyper" + tool_dev_url: "https://github.com/CFSAN-Biostatistics/shigatyper" + doi: "10.1128/AEM.00165-19" + licence: "['Public Domain']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false, is_ont:false ] + - reads: + type: file + description: Illumina or Nanopore FASTQ file + pattern: "*.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: A TSV formatted file with ShigaTyper results + pattern: "*.tsv" + - hits: + type: file + description: A TSV formatted file with individual gene hits + pattern: "*-hits.tsv" + +authors: + - "@rpetit3" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 786f87db..4d7ba4fd 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1691,6 +1691,10 @@ seqwish/induce: - modules/seqwish/induce/** - tests/modules/seqwish/induce/** +shigatyper: + - modules/shigatyper/** + - tests/modules/shigatyper/** + shovill: - modules/shovill/** - tests/modules/shovill/** diff --git a/tests/modules/shigatyper/main.nf b/tests/modules/shigatyper/main.nf new file mode 100644 index 00000000..eb4df084 --- /dev/null +++ b/tests/modules/shigatyper/main.nf @@ -0,0 +1,36 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SHIGATYPER } from '../../../modules/shigatyper/main.nf' + +workflow test_shigatyper_pe { + + input = [ + [ id:'test', single_end:false, is_ont:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] + ] + + SHIGATYPER ( input ) +} + +workflow test_shigatyper_se { + + input = [ + [ id:'test', single_end:true, is_ont:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + + SHIGATYPER ( input ) +} + +workflow test_shigatyper_ont { + + input = [ + [ id:'test', single_end:true, is_ont:true ], // meta map + [ file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) ] + ] + + SHIGATYPER ( input ) +} diff --git a/tests/modules/shigatyper/nextflow.config b/tests/modules/shigatyper/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/shigatyper/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/shigatyper/test.yml b/tests/modules/shigatyper/test.yml new file mode 100644 index 00000000..69a7d408 --- /dev/null +++ b/tests/modules/shigatyper/test.yml @@ -0,0 +1,30 @@ + +- name: shigatyper test_shigatyper_pe + command: nextflow run tests/modules/shigatyper -entry test_shigatyper_pe -c tests/config/nextflow.config -c tests/modules/shigatyper/nextflow.config + tags: + - shigatyper + files: + - path: output/shigatyper/test.tsv + md5sum: 4f7d38c956993800546b9acb9881d717 + - path: output/shigatyper/versions.yml + md5sum: d8ca45ed88dfba9bc570c01e4b49773b + +- name: shigatyper test_shigatyper_se + command: nextflow run tests/modules/shigatyper -entry test_shigatyper_se -c tests/config/nextflow.config -c tests/modules/shigatyper/nextflow.config + tags: + - shigatyper + files: + - path: output/shigatyper/test.tsv + md5sum: 4f7d38c956993800546b9acb9881d717 + - path: output/shigatyper/versions.yml + md5sum: 8bbf165da5a5df3b7771a33aad197eec + +- name: shigatyper test_shigatyper_ont + command: nextflow run tests/modules/shigatyper -entry test_shigatyper_ont -c tests/config/nextflow.config -c tests/modules/shigatyper/nextflow.config + tags: + - shigatyper + files: + - path: output/shigatyper/test.tsv + md5sum: 4f7d38c956993800546b9acb9881d717 + - path: output/shigatyper/versions.yml + md5sum: 0da333e1178e9e7e84a9116ad5a5ff71 From 47d8d476b864a1d0a067a57faa99ae75f9004450 Mon Sep 17 00:00:00 2001 From: "Robert A. Petit III" Date: Thu, 21 Apr 2022 12:55:56 -0600 Subject: [PATCH 038/313] make prettier --- tests/modules/shigatyper/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/modules/shigatyper/test.yml b/tests/modules/shigatyper/test.yml index 69a7d408..9dda573b 100644 --- a/tests/modules/shigatyper/test.yml +++ b/tests/modules/shigatyper/test.yml @@ -1,4 +1,3 @@ - - name: shigatyper test_shigatyper_pe command: nextflow run tests/modules/shigatyper -entry test_shigatyper_pe -c tests/config/nextflow.config -c tests/modules/shigatyper/nextflow.config tags: From 12afb6b0faf3cabf769c9a2a7dd477e3f066eac0 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Fri, 22 Apr 2022 10:01:47 +0200 Subject: [PATCH 039/313] Update samtools view to add input path(index) (#1539) * feat added index as input, to allow module to be used for subsampling * fix test * feat added index to meta.yml * Update modules/samtools/view/meta.yml feat corrected description of idea pattern file in meta.yml Co-authored-by: James A. Fellows Yates Co-authored-by: James A. Fellows Yates --- modules/samtools/view/main.nf | 2 +- modules/samtools/view/meta.yml | 4 ++++ tests/modules/samtools/view/main.nf | 7 ++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/samtools/view/main.nf b/modules/samtools/view/main.nf index 5f14fbbf..11cfb74b 100644 --- a/modules/samtools/view/main.nf +++ b/modules/samtools/view/main.nf @@ -8,7 +8,7 @@ process SAMTOOLS_VIEW { 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: - tuple val(meta), path(input) + tuple val(meta), path(input), path(index) path fasta output: diff --git a/modules/samtools/view/meta.yml b/modules/samtools/view/meta.yml index 5604bfa7..a8b43ecc 100644 --- a/modules/samtools/view/meta.yml +++ b/modules/samtools/view/meta.yml @@ -25,6 +25,10 @@ input: type: file description: BAM/CRAM/SAM file pattern: "*.{bam,cram,sam}" + - index: + type: optional file + description: BAM.BAI/CRAM.CRAI file + pattern: "*.{.bai,.crai}" - fasta: type: optional file description: Reference file the CRAM was created with diff --git a/tests/modules/samtools/view/main.nf b/tests/modules/samtools/view/main.nf index 8ee27ef8..9c239066 100644 --- a/tests/modules/samtools/view/main.nf +++ b/tests/modules/samtools/view/main.nf @@ -6,7 +6,8 @@ include { SAMTOOLS_VIEW } from '../../../../modules/samtools/view/main.nf' workflow test_samtools_view { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + [] ] SAMTOOLS_VIEW ( input, [] ) @@ -14,8 +15,8 @@ workflow test_samtools_view { workflow test_samtools_view_cram { input = [ [ id: 'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_cram_crai'], checkIfExists: true) ] fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) From c7329a3a5730872dea512921217993cfa7acd959 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Fri, 22 Apr 2022 10:10:43 +0200 Subject: [PATCH 040/313] add stubs for stranger (#1543) --- modules/stranger/main.nf | 11 +++++++++++ tests/modules/stranger/main.nf | 5 +++++ tests/modules/stranger/test.yml | 10 ++++++++++ 3 files changed, 26 insertions(+) diff --git a/modules/stranger/main.nf b/modules/stranger/main.nf index 55678bd3..ddfa0070 100644 --- a/modules/stranger/main.nf +++ b/modules/stranger/main.nf @@ -33,4 +33,15 @@ process STRANGER { stranger: \$( stranger --version ) END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + stranger: \$( stranger --version ) + END_VERSIONS + """ } diff --git a/tests/modules/stranger/main.nf b/tests/modules/stranger/main.nf index 5bd6766b..4a930c19 100644 --- a/tests/modules/stranger/main.nf +++ b/tests/modules/stranger/main.nf @@ -23,3 +23,8 @@ workflow test_stranger_without_optional_variant_catalog { EXPANSIONHUNTER ( input, fasta, variant_catalog ) STRANGER ( EXPANSIONHUNTER.out.vcf, [] ) } + +workflow test_stranger_without_optional_variant_catalog_stubs { + EXPANSIONHUNTER ( input, fasta, variant_catalog ) + STRANGER ( EXPANSIONHUNTER.out.vcf, [] ) +} diff --git a/tests/modules/stranger/test.yml b/tests/modules/stranger/test.yml index c7a6972e..bf922c86 100644 --- a/tests/modules/stranger/test.yml +++ b/tests/modules/stranger/test.yml @@ -25,3 +25,13 @@ md5sum: bbe15159195681d5c18596d3ad85c78f - path: output/stranger/versions.yml md5sum: 8558542a007e90ea5dcdceed3f12585d + +- name: stranger test_stranger_without_optional_variant_catalog_stubs + command: nextflow run tests/modules/stranger -entry test_stranger_without_optional_variant_catalog -c tests/config/nextflow.config -stub-run + tags: + - stranger + files: + - path: output/expansionhunter/test.vcf + - path: output/expansionhunter/versions.yml + - path: output/stranger/test.vcf.gz + - path: output/stranger/versions.yml From 35231d394940dca2291ac2321c8f9b2e3b039905 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 10:13:57 +0200 Subject: [PATCH 041/313] update picard/collecthsmetrics (#1542) * update picard/collecthsmetrics * syntax fixes, bugfixes * add tests Co-authored-by: Jose Espinosa-Carrasco --- modules/picard/collecthsmetrics/main.nf | 9 +++++---- modules/picard/collecthsmetrics/meta.yml | 7 ++++--- tests/modules/picard/collecthsmetrics/main.nf | 2 +- tests/modules/picard/collecthsmetrics/test.yml | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/picard/collecthsmetrics/main.nf b/modules/picard/collecthsmetrics/main.nf index 3acf8bb8..ef7a9b9f 100644 --- a/modules/picard/collecthsmetrics/main.nf +++ b/modules/picard/collecthsmetrics/main.nf @@ -15,8 +15,8 @@ process PICARD_COLLECTHSMETRICS { path target_intervals output: - tuple val(meta), path("*collecthsmetrics.txt"), emit: hs_metrics - path "versions.yml" , emit: versions + tuple val(meta), path("*_metrics") , emit: metrics + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -41,7 +41,8 @@ process PICARD_COLLECTHSMETRICS { -BAIT_INTERVALS $bait_intervals \\ -TARGET_INTERVALS $target_intervals \\ -INPUT $bam \\ - -OUTPUT ${prefix}_collecthsmetrics.txt + -OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics + cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -52,7 +53,7 @@ process PICARD_COLLECTHSMETRICS { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}_collecthsmetrics.txt + touch ${prefix}.CollectHsMetrics.coverage_metrics cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/collecthsmetrics/meta.yml b/modules/picard/collecthsmetrics/meta.yml index 4b94909f..dc9d647a 100644 --- a/modules/picard/collecthsmetrics/meta.yml +++ b/modules/picard/collecthsmetrics/meta.yml @@ -57,10 +57,11 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - hs_metrics: + - metrics: type: file - description: The metrics file. - pattern: "*_collecthsmetrics.txt" + description: Alignment metrics files generated by picard + pattern: "*_{metrics}" authors: - "@projectoriented" + - "@matthdsm" diff --git a/tests/modules/picard/collecthsmetrics/main.nf b/tests/modules/picard/collecthsmetrics/main.nf index 2e8727b5..a28eb174 100644 --- a/tests/modules/picard/collecthsmetrics/main.nf +++ b/tests/modules/picard/collecthsmetrics/main.nf @@ -7,7 +7,7 @@ include { PICARD_COLLECTHSMETRICS } from '../../../../modules/picard/collecthsme workflow test_picard_collecthsmetrics { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) diff --git a/tests/modules/picard/collecthsmetrics/test.yml b/tests/modules/picard/collecthsmetrics/test.yml index 9232d508..9aa14f15 100644 --- a/tests/modules/picard/collecthsmetrics/test.yml +++ b/tests/modules/picard/collecthsmetrics/test.yml @@ -5,4 +5,4 @@ - picard/collecthsmetrics files: # The file can't be md5'd consistently - - path: output/picard/test_collecthsmetrics.txt + - path: output/picard/test.CollectHsMetrics.coverage_metrics From 90b203d3e915cce7434ed010b8a56a89f4142bdd Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 10:20:05 +0200 Subject: [PATCH 042/313] Tool/elprep split (#1533) * tool: elprep split * fixes for testing * fix tests * fix test outputs * create test-yaml * fix suggestions by @jfy133 Co-authored-by: James A. Fellows Yates --- modules/elprep/split/main.nf | 44 ++++++++++++++++++++++ modules/elprep/split/meta.yml | 43 +++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/elprep/split/main.nf | 15 ++++++++ tests/modules/elprep/split/nextflow.config | 9 +++++ tests/modules/elprep/split/test.yml | 10 +++++ 6 files changed, 125 insertions(+) create mode 100644 modules/elprep/split/main.nf create mode 100644 modules/elprep/split/meta.yml create mode 100644 tests/modules/elprep/split/main.nf create mode 100644 tests/modules/elprep/split/nextflow.config create mode 100644 tests/modules/elprep/split/test.yml diff --git a/modules/elprep/split/main.nf b/modules/elprep/split/main.nf new file mode 100644 index 00000000..8af558d4 --- /dev/null +++ b/modules/elprep/split/main.nf @@ -0,0 +1,44 @@ +process ELPREP_SPLIT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::elprep=5.1.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/elprep:5.1.2--he881be0_0': + 'quay.io/biocontainers/elprep:5.1.2--he881be0_0' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("**.{bam,sam}"), 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}" + meta.single_end ? args += " --single-end": "" + + """ + # create directory and move all input so elprep can find and merge them before splitting + mkdir input + mv ${bam} input/ + + mkdir ${prefix} + + elprep split \\ + input \\ + . \\ + $args \\ + --nr-of-threads $task.cpus \\ + --output-prefix $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + elprep: \$(elprep 2>&1 | head -n2 | tail -n1 |sed 's/^.*version //;s/ compiled.*\$//') + END_VERSIONS + """ +} diff --git a/modules/elprep/split/meta.yml b/modules/elprep/split/meta.yml new file mode 100644 index 00000000..b99562fa --- /dev/null +++ b/modules/elprep/split/meta.yml @@ -0,0 +1,43 @@ +name: "elprep_split" +description: Split bam file into manageable chunks +keywords: + - bam + - split by chromosome +tools: + - "elprep": + description: "elPrep is a high-performance tool for preparing .sam/.bam files for variant calling in sequencing pipelines. It can be used as a drop-in replacement for SAMtools/Picard/GATK4." + homepage: "https://github.com/ExaScience/elprep" + documentation: "https://github.com/ExaScience/elprep" + tool_dev_url: "https://github.com/ExaScience/elprep" + doi: "10.1371" + licence: "['AGPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: List of BAM/SAM files + pattern: "*.{bam,sam}" + +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" + - bam: + type: file + description: List of split BAM/SAM files + pattern: "*.{bam,sam}" + +authors: + - "@matthdsm" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 786f87db..19b51f3d 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -599,6 +599,10 @@ ectyper: - modules/ectyper/** - tests/modules/ectyper/** +elprep/split: + - modules/elprep/split/** + - tests/modules/elprep/split/** + emmtyper: - modules/emmtyper/** - tests/modules/emmtyper/** diff --git a/tests/modules/elprep/split/main.nf b/tests/modules/elprep/split/main.nf new file mode 100644 index 00000000..d5a111de --- /dev/null +++ b/tests/modules/elprep/split/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ELPREP_SPLIT } from '../../../../modules/elprep/split/main.nf' + +workflow test_elprep_split { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + + ELPREP_SPLIT ( input ) +} diff --git a/tests/modules/elprep/split/nextflow.config b/tests/modules/elprep/split/nextflow.config new file mode 100644 index 00000000..a3ae0169 --- /dev/null +++ b/tests/modules/elprep/split/nextflow.config @@ -0,0 +1,9 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName : ELPREP_SPLIT { + ext.args = "--contig-group-size 1 --output-type bam" + } + +} diff --git a/tests/modules/elprep/split/test.yml b/tests/modules/elprep/split/test.yml new file mode 100644 index 00000000..7ba139b1 --- /dev/null +++ b/tests/modules/elprep/split/test.yml @@ -0,0 +1,10 @@ +- name: elprep split test_elprep_split + command: nextflow run tests/modules/elprep/split -entry test_elprep_split -c tests/config/nextflow.config + tags: + - elprep + - elprep/split + files: + - path: output/elprep/splits/test-group00001.bam + - path: output/elprep/splits/test-unmapped.bam + - path: output/elprep/test-spread.bam + - path: output/elprep/versions.yml From 9e3daae8ef8cc1e830c9ef8af5336df7065d2823 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 11:08:03 +0200 Subject: [PATCH 043/313] New module: elprep filter (#1524) * first commit * syntax fix * fix input * output sam during test for md5sum * replace md5sum with contains * add new test data, add extra in/outputs * cli fixes * fix outputs * Update modules/elprep/filter/main.nf Co-authored-by: James A. Fellows Yates * Update modules/elprep/filter/meta.yml Co-authored-by: James A. Fellows Yates * Update modules/elprep/filter/meta.yml Co-authored-by: James A. Fellows Yates * fix suggestions by @jfy133 * Bit more verbose explanation for bool vals * define variables * fix prettier Co-authored-by: James A. Fellows Yates --- modules/elprep/filter/main.nf | 89 ++++++++++++++++ modules/elprep/filter/meta.yml | 106 ++++++++++++++++++++ tests/config/pytest_modules.yml | 4 + tests/config/test_data.config | 3 + tests/modules/elprep/filter/main.nf | 18 ++++ tests/modules/elprep/filter/nextflow.config | 7 ++ tests/modules/elprep/filter/test.yml | 13 +++ 7 files changed, 240 insertions(+) create mode 100644 modules/elprep/filter/main.nf create mode 100644 modules/elprep/filter/meta.yml create mode 100644 tests/modules/elprep/filter/main.nf create mode 100644 tests/modules/elprep/filter/nextflow.config create mode 100644 tests/modules/elprep/filter/test.yml diff --git a/modules/elprep/filter/main.nf b/modules/elprep/filter/main.nf new file mode 100644 index 00000000..02c93186 --- /dev/null +++ b/modules/elprep/filter/main.nf @@ -0,0 +1,89 @@ +process ELPREP_FILTER { + tag "$meta.id" + label 'process_high' + + conda (params.enable_conda ? "bioconda::elprep=5.1.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/elprep:5.1.2--he881be0_0': + 'quay.io/biocontainers/elprep:5.1.2--he881be0_0' }" + + input: + tuple val(meta), path(bam) + val(run_haplotypecaller) + val(run_bqsr) + path(reference_sequences) + path(filter_regions_bed) + path(reference_elfasta) + path(known_sites_elsites) + path(target_regions_bed) + path(intermediate_bqsr_tables) + val(bqsr_tables_only) + val(get_activity_profile) + val(get_assembly_regions) + + + output: + tuple val(meta), path("**.{bam,sam}") ,emit: bam + tuple val(meta), path("*.metrics.txt") ,optional: true, emit: metrics + tuple val(meta), path("*.recall") ,optional: true, emit: recall + tuple val(meta), path("*.vcf.gz") ,optional: true, emit: gvcf + tuple val(meta), path("*.table") ,optional: true, emit: table + tuple val(meta), path("*.activity_profile.igv") ,optional: true, emit: activity_profile + tuple val(meta), path("*.assembly_regions.igv") ,optional: true, emit: assembly_regions + path "versions.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 suffix = args.contains("--output-type sam") ? "sam" : "bam" + + // filter args + def reference_sequences_cmd = reference_sequences ? " --replace-reference-sequences ${reference_sequences}" : "" + def filter_regions_cmd = filter_regions_bed ? " --filter-non-overlapping-reads ${filter_regions_bed}" : "" + + // markdup args + def markdup_cmd = args.contains("--mark-duplicates") ? " --mark-optical-duplicates ${prefix}.metrics.txt": "" + + // variant calling args + def haplotyper_cmd = run_haplotypecaller ? " --haplotypecaller ${prefix}.g.vcf.gz": "" + + def fasta_cmd = reference_elfasta ? " --reference ${reference_elfasta}": "" + def known_sites_cmd = known_sites_elsites ? " --known-sites ${known_sites_elsites}": "" + def target_regions_cmd = target_regions_bed ? " --target-regions ${target_regions_bed}": "" + + // bqsr args + def bqsr_cmd = run_bqsr ? " --bqsr ${prefix}.recall": "" + def bqsr_tables_only_cmd = bqsr_tables_only ? " --bqsr-tables-only ${prefix}.table": "" + + def intermediate_bqsr_cmd = intermediate_bqsr_tables ? " --bqsr-apply .": "" + + // misc + def activity_profile_cmd = get_activity_profile ? " --activity-profile ${prefix}.activity_profile.igv": "" + def assembly_regions_cmd = get_assembly_regions ? " --assembly-regions ${prefix}.assembly_regions.igv": "" + + """ + elprep filter ${bam} ${prefix}.${suffix} \\ + ${reference_sequences_cmd} \\ + ${filter_regions_cmd} \\ + ${markdup_cmd} \\ + ${haplotyper_cmd} \\ + ${fasta_cmd} \\ + ${known_sites_cmd} \\ + ${target_regions_cmd} \\ + ${bqsr_cmd} \\ + ${bqsr_tables_only_cmd} \\ + ${intermediate_bqsr_cmd} \\ + ${activity_profile_cmd} \\ + ${assembly_regions_cmd} \\ + --nr-of-threads ${task.cpus} \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + elprep: \$(elprep 2>&1 | head -n2 | tail -n1 |sed 's/^.*version //;s/ compiled.*\$//') + END_VERSIONS + """ +} diff --git a/modules/elprep/filter/meta.yml b/modules/elprep/filter/meta.yml new file mode 100644 index 00000000..d7d41071 --- /dev/null +++ b/modules/elprep/filter/meta.yml @@ -0,0 +1,106 @@ +name: "elprep_filter" +description: "Filter, sort and markdup sam/bam files, with optional BQSR and variant calling." +keywords: + - sort + - bam + - sam + - filter + - variant calling +tools: + - "elprep": + description: "elPrep is a high-performance tool for preparing .sam/.bam files for variant calling in sequencing pipelines. It can be used as a drop-in replacement for SAMtools/Picard/GATK4." + homepage: "https://github.com/ExaScience/elprep" + documentation: "https://github.com/ExaScience/elprep" + tool_dev_url: "https://github.com/ExaScience/elprep" + doi: "10.1371/journal.pone.0244471" + licence: "['AGPL v3']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Input SAM/BAM file + pattern: "*.{bam,sam}" + - run_haplotypecaller: + type: boolean + description: Run variant calling on the input files. Needed to generate gvcf output. + - run_bqsr: + type: boolean + description: Run BQSR on the input files. Needed to generate recall metrics. + - reference_sequences: + type: file + description: Optional SAM header to replace existing header. + pattern: "*.sam" + - filter_regions_bed: + type: file + description: Optional BED file containing regions to filter. + pattern: "*.bed" + - reference_elfasta: + type: file + description: Elfasta file, required for BQSR and variant calling. + pattern: "*.elfasta" + - known_sites: + type: file + description: Optional elsites file containing known SNPs for BQSR. + pattern: "*.elsites" + - target_regions_bed: + type: file + description: Optional BED file containing target regions for BQSR and variant calling. + pattern: "*.bed" + - intermediate_bqsr_tables: + type: file + description: Optional list of BQSR tables, used when parsing files created by `elprep split` + pattern: "*.table" + - bqsr_tables_only: + type: boolean + description: Write intermediate BQSR tables, used when parsing files created by `elprep split`. + - get_activity_profile: + type: boolean + description: Get the activity profile calculated by the haplotypecaller to the given file in IGV format. + - get_assembly_regions: + type: boolean + description: Get the assembly regions calculated by haplotypecaller to the speficied file in IGV format. +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" + - bam: + type: file + description: Sorted, markdup, optionally BQSR BAM/SAM file + pattern: "*.{bam,sam}" + - metrics: + type: file + description: Optional duplicate metrics file generated by elprep + pattern: "*.{metrics.txt}" + - recall: + type: file + description: Optional recall metrics file generated by elprep + pattern: "*.{recall}" + - gvcf: + type: file + description: Optional GVCF output file + pattern: "*.{vcf.gz}" + - table: + type: file + description: Optional intermediate BQSR table output file + pattern: "*.{table}" + - activity_profile: + type: file + description: Optional activity profile output file + pattern: "*.{activity_profile.igv}" + - assembly_regions: + type: file + description: Optional activity regions output file + pattern: "*.{assembly_regions.igv}" +authors: + - "@matthdsm" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 19b51f3d..c3bf04aa 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -599,6 +599,10 @@ ectyper: - modules/ectyper/** - tests/modules/ectyper/** +elprep/filter: + - modules/elprep/filter/** + - tests/modules/elprep/filter/** + elprep/split: - modules/elprep/split/** - tests/modules/elprep/split/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index ea123732..559c0d6f 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -112,6 +112,7 @@ params { } 'homo_sapiens' { 'genome' { + genome_elfasta = "${test_data_dir}/genomics/homo_sapiens/genome/genome.elfasta" genome_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/genome.fasta" genome_fasta_fai = "${test_data_dir}/genomics/homo_sapiens/genome/genome.fasta.fai" genome_dict = "${test_data_dir}/genomics/homo_sapiens/genome/genome.dict" @@ -123,6 +124,7 @@ params { genome_header = "${test_data_dir}/genomics/homo_sapiens/genome/genome.header" genome_bed_gz = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed.gz" genome_bed_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed.gz.tbi" + genome_elsites = "${test_data_dir}/genomics/homo_sapiens/genome/genome.elsites" transcriptome_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/transcriptome.fasta" genome2_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/genome2.fasta" genome_chain_gz = "${test_data_dir}/genomics/homo_sapiens/genome/genome.chain.gz" @@ -136,6 +138,7 @@ params { genome_21_multi_interval_bed_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed.gz.tbi" genome_21_chromosomes_dir = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/chromosomes.tar.gz" + dbsnp_146_hg38_elsites = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.elsites" dbsnp_146_hg38_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz" dbsnp_146_hg38_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi" gnomad_r2_1_1_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/gnomAD.r2.1.1.vcf.gz" diff --git a/tests/modules/elprep/filter/main.nf b/tests/modules/elprep/filter/main.nf new file mode 100644 index 00000000..0a8d43ca --- /dev/null +++ b/tests/modules/elprep/filter/main.nf @@ -0,0 +1,18 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { ELPREP_FILTER } from '../../../../modules/elprep/filter/main.nf' + +workflow test_elprep_filter { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] + reference_elfasta = file(params.test_data['homo_sapiens']['genome']['genome_elfasta'], checkIfExists: true) + known_sites_elsites = file(params.test_data['homo_sapiens']['genome']['dbsnp_146_hg38_elsites'], checkIfExists: true) + target_regions_bed = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + + ELPREP_FILTER ( input, true, true, [], [], reference_elfasta, known_sites_elsites, target_regions_bed, [], [], true, true) +} diff --git a/tests/modules/elprep/filter/nextflow.config b/tests/modules/elprep/filter/nextflow.config new file mode 100644 index 00000000..d53a3d2d --- /dev/null +++ b/tests/modules/elprep/filter/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: ELPREP_FILTER { + ext.args = "--mark-duplicates " + } +} diff --git a/tests/modules/elprep/filter/test.yml b/tests/modules/elprep/filter/test.yml new file mode 100644 index 00000000..5242045b --- /dev/null +++ b/tests/modules/elprep/filter/test.yml @@ -0,0 +1,13 @@ +- name: elprep filter test_elprep_filter + command: nextflow run tests/modules/elprep/filter -entry test_elprep_filter -c tests/config/nextflow.config + tags: + - elprep + - elprep/filter + files: + - path: output/elprep/test.activity_profile.igv + - path: output/elprep/test.assembly_regions.igv + - path: output/elprep/test.bam + - path: output/elprep/test.g.vcf.gz + - path: output/elprep/test.metrics.txt + - path: output/elprep/test.recall + - path: output/elprep/versions.yml From 538dbac98ba9c8f799536cd5a617195501439457 Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Fri, 22 Apr 2022 11:26:30 +0200 Subject: [PATCH 044/313] Kaiju2table module (#1545) * Add kaiju2table module --- modules/kaiju/kaiju2table/main.nf | 40 +++++++++++++++ modules/kaiju/kaiju2table/meta.yml | 50 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/kaiju/kaiju2table/main.nf | 21 ++++++++ .../modules/kaiju/kaiju2table/nextflow.config | 5 ++ tests/modules/kaiju/kaiju2table/test.yml | 9 ++++ 6 files changed, 129 insertions(+) create mode 100644 modules/kaiju/kaiju2table/main.nf create mode 100644 modules/kaiju/kaiju2table/meta.yml create mode 100644 tests/modules/kaiju/kaiju2table/main.nf create mode 100644 tests/modules/kaiju/kaiju2table/nextflow.config create mode 100644 tests/modules/kaiju/kaiju2table/test.yml diff --git a/modules/kaiju/kaiju2table/main.nf b/modules/kaiju/kaiju2table/main.nf new file mode 100644 index 00000000..00739d1e --- /dev/null +++ b/modules/kaiju/kaiju2table/main.nf @@ -0,0 +1,40 @@ +process KAIJU_KAIJU2TABLE { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::kaiju=1.8.2" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/kaiju:1.8.2--h5b5514e_1': + 'quay.io/biocontainers/kaiju:1.8.2--h2e03b76_0' }" + + input: + tuple val(meta), path(results) + path db + val taxon_rank + + output: + tuple val(meta), path('*.txt'), 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}" + """ + dbnodes=`find -L ${db} -name "*nodes.dmp"` + dbname=`find -L ${db} -name "*.fmi" -not -name "._*"` + kaiju2table $args \\ + -t \$dbnodes \\ + -n \$dbname \\ + -r ${taxon_rank} \\ + -o ${prefix}.txt \\ + ${results} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + kaiju: \$(echo \$( kaiju -h 2>&1 | sed -n 1p | sed 's/^.*Kaiju //' )) + END_VERSIONS + """ +} diff --git a/modules/kaiju/kaiju2table/meta.yml b/modules/kaiju/kaiju2table/meta.yml new file mode 100644 index 00000000..bc3e85d7 --- /dev/null +++ b/modules/kaiju/kaiju2table/meta.yml @@ -0,0 +1,50 @@ +name: "kaiju_kaiju2table" +description: write your description here +keywords: + - classify + - metagenomics +tools: + - kaiju: + description: Fast and sensitive taxonomic classification for metagenomics + homepage: https://kaiju.binf.ku.dk/ + documentation: https://github.com/bioinformatics-centre/kaiju/blob/master/README.md + tool_dev_url: https://github.com/bioinformatics-centre/kaiju + doi: "10.1038/ncomms11257" + licence: ["GNU GPL v3"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - results: + type: file + description: File containing the kaiju classification results + pattern: "*.{txt}" + - taxon_rank: + type: string + description: | + Taxonomic rank to display in report + pattern: "phylum|class|order|family|genus|species" + +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" + - results: + type: file + description: | + Summary table for a given taxonomic rank + pattern: "*.{tsv}" + +authors: + - "@sofstam" + - "@talnor" + - "@jfy133" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index c3bf04aa..a1a969e7 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1009,6 +1009,10 @@ kaiju/kaiju: - modules/kaiju/kaiju/** - tests/modules/kaiju/kaiju/** +kaiju/kaiju2table: + - modules/kaiju/kaiju2table/** + - tests/modules/kaiju/kaiju2table/** + kallisto/index: - modules/kallisto/index/** - tests/modules/kallisto/index/** diff --git a/tests/modules/kaiju/kaiju2table/main.nf b/tests/modules/kaiju/kaiju2table/main.nf new file mode 100644 index 00000000..b7169ba5 --- /dev/null +++ b/tests/modules/kaiju/kaiju2table/main.nf @@ -0,0 +1,21 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNTAR } from '../../../../modules/untar/main.nf' +include { KAIJU_KAIJU } from '../../../../modules/kaiju/kaiju/main.nf' +include { KAIJU_KAIJU2TABLE } from '../../../../modules/kaiju/kaiju2table/main.nf' + +workflow test_kaiju_kaiju_single_end { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + db = [ [], file(params.test_data['sarscov2']['genome']['kaiju_tar_gz'], checkIfExists: true) ] + taxon_rank = "species" + + ch_db = UNTAR ( db ) + KAIJU_KAIJU ( input, ch_db.untar.map{ it[1] } ) + KAIJU_KAIJU2TABLE ( KAIJU_KAIJU.out.results, ch_db.untar.map{ it[1] }, taxon_rank ) +} diff --git a/tests/modules/kaiju/kaiju2table/nextflow.config b/tests/modules/kaiju/kaiju2table/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/kaiju/kaiju2table/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/kaiju/kaiju2table/test.yml b/tests/modules/kaiju/kaiju2table/test.yml new file mode 100644 index 00000000..47d99c89 --- /dev/null +++ b/tests/modules/kaiju/kaiju2table/test.yml @@ -0,0 +1,9 @@ +- name: kaiju kaiju2table test_kaiju_kaiju_single_end + command: nextflow run tests/modules/kaiju/kaiju2table -entry test_kaiju_kaiju_single_end -c tests/config/nextflow.config + tags: + - kaiju + - kaiju/kaiju2table + files: + - path: output/kaiju/test.txt + md5sum: 0d9f8fd36fcf2888296ae12632c5f0a8 + - path: output/kaiju/versions.yml From 8dad38afc7f28db49c38a23deb7abfeca2ee3bc7 Mon Sep 17 00:00:00 2001 From: CMGG ICT Team Date: Fri, 22 Apr 2022 11:35:14 +0200 Subject: [PATCH 045/313] fix test.yml --- tests/modules/elprep/merge/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/modules/elprep/merge/test.yml b/tests/modules/elprep/merge/test.yml index 26c16f59..d6037bec 100644 --- a/tests/modules/elprep/merge/test.yml +++ b/tests/modules/elprep/merge/test.yml @@ -1,8 +1,8 @@ -- name: "elprep merge" - command: nextflow run ./tests/modules/elprep/merge -entry test_elprep_merge -c ./tests/config/nextflow.config -c ./tests/modules/elprep/merge/nextflow.config +- name: elprep merge test_elprep_merge + command: nextflow run tests/modules/elprep/merge -entry test_elprep_merge -c tests/config/nextflow.config tags: - - "elprep" - - "elprep/merge" + - elprep + - elprep/merge files: - - path: "output/elprep/test.bam" + - path: output/elprep/test.bam - path: output/elprep/versions.yml From c4072f274cdf91601c895b206f2011e0b4b809df Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 11:39:22 +0200 Subject: [PATCH 046/313] fix formatting, fix code style --- modules/elprep/merge/main.nf | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf index 00ed4d60..2b12bfe2 100644 --- a/modules/elprep/merge/main.nf +++ b/modules/elprep/merge/main.nf @@ -18,12 +18,10 @@ process ELPREP_MERGE { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - if (meta.single_end) { - args += " --single-end" - } - def suffix = args.contains("--output-type sam") ? "sam" : "bam" + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def suffix = args.contains("--output-type sam") ? "sam" : "bam" + def single_end = meta.single_end ? " --single-end" : "" """ # create directory and move all input so elprep can find and merge them before splitting @@ -34,6 +32,7 @@ process ELPREP_MERGE { input \\ ${prefix}.${suffix} \\ $args \\ + ${single_end} \\ --nr-of-threads $task.cpus cat <<-END_VERSIONS > versions.yml From 2f6382168cac2ca8a9ff9d53c868fbde1a0ca5e1 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 11:51:54 +0200 Subject: [PATCH 047/313] update meta.yml --- modules/elprep/merge/meta.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/elprep/merge/meta.yml b/modules/elprep/merge/meta.yml index e157fddb..1f49b1a0 100644 --- a/modules/elprep/merge/meta.yml +++ b/modules/elprep/merge/meta.yml @@ -7,10 +7,10 @@ keywords: tools: - "elprep": description: "elPrep is a high-performance tool for preparing .sam/.bam files for variant calling in sequencing pipelines. It can be used as a drop-in replacement for SAMtools/Picard/GATK4." - homepage: "None" - documentation: "None" - tool_dev_url: "None" - doi: "" + homepage: "https://github.com/ExaScience/elprep" + documentation: "https://github.com/ExaScience/elprep" + tool_dev_url: "https://github.com/ExaScience/elprep" + doi: "10.1371/journal.pone.0244471" licence: "['AGPL v3']" input: From fefffb9bb0776e679c2297e8d80325d57e2f2d7a Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 12:36:32 +0200 Subject: [PATCH 048/313] fix output glob --- modules/elprep/merge/main.nf | 6 +++--- tests/modules/elprep/merge/test.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf index 2b12bfe2..28fa9985 100644 --- a/modules/elprep/merge/main.nf +++ b/modules/elprep/merge/main.nf @@ -11,8 +11,8 @@ process ELPREP_MERGE { tuple val(meta), path(bam) output: - tuple val(meta), path("**.{bam,sam}") , emit: bam - path "versions.yml" , emit: versions + tuple val(meta), path("output/**.{bam,sam}") , emit: bam + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -30,7 +30,7 @@ process ELPREP_MERGE { elprep merge \\ input \\ - ${prefix}.${suffix} \\ + output/${prefix}.${suffix} \\ $args \\ ${single_end} \\ --nr-of-threads $task.cpus diff --git a/tests/modules/elprep/merge/test.yml b/tests/modules/elprep/merge/test.yml index d6037bec..ad2ecfef 100644 --- a/tests/modules/elprep/merge/test.yml +++ b/tests/modules/elprep/merge/test.yml @@ -4,5 +4,5 @@ - elprep - elprep/merge files: - - path: output/elprep/test.bam + - path: output/elprep/output/test.bam - path: output/elprep/versions.yml From b1749445d76d12d9961e687e811af1337f0eff0f Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 12:50:17 +0200 Subject: [PATCH 049/313] fix output glob (#1551) --- modules/elprep/split/main.nf | 11 ++++++----- tests/modules/elprep/split/test.yml | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/elprep/split/main.nf b/modules/elprep/split/main.nf index 8af558d4..639944ef 100644 --- a/modules/elprep/split/main.nf +++ b/modules/elprep/split/main.nf @@ -11,16 +11,16 @@ process ELPREP_SPLIT { tuple val(meta), path(bam) output: - tuple val(meta), path("**.{bam,sam}"), emit: bam + tuple val(meta), path("output/**.{bam,sam}"), 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}" - meta.single_end ? args += " --single-end": "" + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def single_end = meta.single_end ? " --single-end": "" """ # create directory and move all input so elprep can find and merge them before splitting @@ -31,8 +31,9 @@ process ELPREP_SPLIT { elprep split \\ input \\ - . \\ + output/ \\ $args \\ + $single_end \\ --nr-of-threads $task.cpus \\ --output-prefix $prefix diff --git a/tests/modules/elprep/split/test.yml b/tests/modules/elprep/split/test.yml index 7ba139b1..2de3f99b 100644 --- a/tests/modules/elprep/split/test.yml +++ b/tests/modules/elprep/split/test.yml @@ -4,7 +4,7 @@ - elprep - elprep/split files: - - path: output/elprep/splits/test-group00001.bam - - path: output/elprep/splits/test-unmapped.bam - - path: output/elprep/test-spread.bam + - path: output/elprep/output/splits/test-group00001.bam + - path: output/elprep/output/splits/test-unmapped.bam + - path: output/elprep/output/test-spread.bam - path: output/elprep/versions.yml From c17d1a7a7b473e103ddd3f28bd91b79733aa7cf2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 13:04:41 +0200 Subject: [PATCH 050/313] fix output glob (#1552) --- modules/elprep/filter/main.nf | 4 ++-- tests/modules/elprep/filter/test.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/elprep/filter/main.nf b/modules/elprep/filter/main.nf index 02c93186..5ca288bc 100644 --- a/modules/elprep/filter/main.nf +++ b/modules/elprep/filter/main.nf @@ -23,7 +23,7 @@ process ELPREP_FILTER { output: - tuple val(meta), path("**.{bam,sam}") ,emit: bam + tuple val(meta), path("output/**.{bam,sam}") ,emit: bam tuple val(meta), path("*.metrics.txt") ,optional: true, emit: metrics tuple val(meta), path("*.recall") ,optional: true, emit: recall tuple val(meta), path("*.vcf.gz") ,optional: true, emit: gvcf @@ -65,7 +65,7 @@ process ELPREP_FILTER { def assembly_regions_cmd = get_assembly_regions ? " --assembly-regions ${prefix}.assembly_regions.igv": "" """ - elprep filter ${bam} ${prefix}.${suffix} \\ + elprep filter ${bam} output/${prefix}.${suffix} \\ ${reference_sequences_cmd} \\ ${filter_regions_cmd} \\ ${markdup_cmd} \\ diff --git a/tests/modules/elprep/filter/test.yml b/tests/modules/elprep/filter/test.yml index 5242045b..922d7a9b 100644 --- a/tests/modules/elprep/filter/test.yml +++ b/tests/modules/elprep/filter/test.yml @@ -6,7 +6,7 @@ files: - path: output/elprep/test.activity_profile.igv - path: output/elprep/test.assembly_regions.igv - - path: output/elprep/test.bam + - path: output/elprep/output/test.bam - path: output/elprep/test.g.vcf.gz - path: output/elprep/test.metrics.txt - path: output/elprep/test.recall From 9a2dad935cad22789380f94b67a44181e89e4392 Mon Sep 17 00:00:00 2001 From: CMGG ICT Team Date: Fri, 22 Apr 2022 13:13:39 +0200 Subject: [PATCH 051/313] update config --- tests/modules/elprep/merge/nextflow.config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/modules/elprep/merge/nextflow.config b/tests/modules/elprep/merge/nextflow.config index 50f50a7a..4e4570f4 100644 --- a/tests/modules/elprep/merge/nextflow.config +++ b/tests/modules/elprep/merge/nextflow.config @@ -1,5 +1,5 @@ process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file + withName : ELPREP_MERGE { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + } +} From 413980e93a9cb8ba51f430d8a794cb25c43e9305 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:33:16 +0200 Subject: [PATCH 052/313] make use of dependent on input array size --- modules/bamtools/split/main.nf | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index f72d13be..7d69a824 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -9,7 +9,6 @@ process BAMTOOLS_SPLIT { input: tuple val(meta), path(bam) - path(bam_list) output: tuple val(meta), path("*.bam"), emit: bam @@ -21,18 +20,22 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def input_list = bam.collect{"-in $it"}.join(' ') - if (bam_list) { - input_list += " -list $bam_list" - } - if (!args.contains("-stub")) { - args += " -stub ${prefix}" + def stub_cmd = !args.contains("-stub") : " -stub ${prefix}" : "" + + if (size(bam) > 1){ + def bamtools_merge_cmd = "bamtools merge ${input_list} |" + } else { + def split_input = input_list } + """ - bamtools merge \\ - ${input_list} \\ - | bamtools split \\ + ${bamtools_merge_cmd} \\ + bamtools split \\ + $split_input \\ + $stub_cmd \\ $args cat <<-END_VERSIONS > versions.yml From d617a50371abf87bdb376844926088c478ae3f51 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:39:25 +0200 Subject: [PATCH 053/313] add extra test --- tests/modules/bamtools/split/main.nf | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index 9f30c4f9..2fc16d67 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -4,11 +4,21 @@ nextflow.enable.dsl = 2 include { BAMTOOLS_SPLIT } from '../../../../modules/bamtools/split/main.nf' -workflow test_bamtools_split { +workflow test_bamtools_split_single_input { input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - BAMTOOLS_SPLIT ( input, [] ) + BAMTOOLS_SPLIT ( input ) +} + +workflow test_bamtools_split_multiple_input { + + input = [ + [ id:'test', single_end:false ], // meta map + [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)] + [ + + BAMTOOLS_SPLIT ( input ) } From d293cffc6a3beb7f1ef9bab6e95ea421f622b2a5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:42:43 +0200 Subject: [PATCH 054/313] update tests --- tests/modules/bamtools/split/main.nf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index 2fc16d67..ef4b9d59 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -2,15 +2,17 @@ nextflow.enable.dsl = 2 -include { BAMTOOLS_SPLIT } from '../../../../modules/bamtools/split/main.nf' +include { BAMTOOLS_SPLIT as BAMTOOLS_SPLIT_SINGLE } from '../../../../modules/bamtools/split/main.nf' +include { BAMTOOLS_SPLIT as BAMTOOLS_SPLIT_MULTIPLE } from '../../../../modules/bamtools/split/main.nf' workflow test_bamtools_split_single_input { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + ] - BAMTOOLS_SPLIT ( input ) + BAMTOOLS_SPLIT_SINGLE ( input ) } workflow test_bamtools_split_multiple_input { @@ -20,5 +22,5 @@ workflow test_bamtools_split_multiple_input { [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)] [ - BAMTOOLS_SPLIT ( input ) + BAMTOOLS_SPLIT_MULTIPLE ( input ) } From 7e883da90460f77b3745468452b4c549327dde13 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 14:50:50 +0200 Subject: [PATCH 055/313] Revert "make use of dependent on input array size" This reverts commit 413980e93a9cb8ba51f430d8a794cb25c43e9305. --- modules/bamtools/split/main.nf | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 7d69a824..f72d13be 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -9,6 +9,7 @@ process BAMTOOLS_SPLIT { input: tuple val(meta), path(bam) + path(bam_list) output: tuple val(meta), path("*.bam"), emit: bam @@ -20,22 +21,18 @@ process BAMTOOLS_SPLIT { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input_list = bam.collect{"-in $it"}.join(' ') - def stub_cmd = !args.contains("-stub") : " -stub ${prefix}" : "" - - if (size(bam) > 1){ - def bamtools_merge_cmd = "bamtools merge ${input_list} |" - } else { - def split_input = input_list + if (bam_list) { + input_list += " -list $bam_list" + } + if (!args.contains("-stub")) { + args += " -stub ${prefix}" } - """ - ${bamtools_merge_cmd} \\ - bamtools split \\ - $split_input \\ - $stub_cmd \\ + bamtools merge \\ + ${input_list} \\ + | bamtools split \\ $args cat <<-END_VERSIONS > versions.yml From b4af3f1475b91d0c411e901d6126515babcdafec Mon Sep 17 00:00:00 2001 From: CMGG ICT Team Date: Fri, 22 Apr 2022 15:02:41 +0200 Subject: [PATCH 056/313] test fixes --- modules/bamtools/split/main.nf | 9 ++------- tests/modules/bamtools/split/main.nf | 9 ++++++--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index f72d13be..7184261e 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -9,7 +9,6 @@ process BAMTOOLS_SPLIT { input: tuple val(meta), path(bam) - path(bam_list) output: tuple val(meta), path("*.bam"), emit: bam @@ -22,17 +21,13 @@ process BAMTOOLS_SPLIT { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input_list = bam.collect{"-in $it"}.join(' ') - if (bam_list) { - input_list += " -list $bam_list" - } - if (!args.contains("-stub")) { - args += " -stub ${prefix}" - } + def stub = !args.contains("-stub") ? "-stub ${prefix}" : "" """ bamtools merge \\ ${input_list} \\ | bamtools split \\ + $stub \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index ef4b9d59..ff0cb748 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -15,12 +15,15 @@ workflow test_bamtools_split_single_input { BAMTOOLS_SPLIT_SINGLE ( input ) } -workflow test_bamtools_split_multiple_input { +workflow test_bamtools_split_multiple { input = [ [ id:'test', single_end:false ], // meta map - [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)] - [ + [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)] + + ] BAMTOOLS_SPLIT_MULTIPLE ( input ) } + From 3bcae8e71e705f289ec3786e7b6255eb5e0d56af Mon Sep 17 00:00:00 2001 From: CMGG ICT Team Date: Fri, 22 Apr 2022 15:19:52 +0200 Subject: [PATCH 057/313] fix testing errors --- tests/modules/bamtools/split/main.nf | 2 +- tests/modules/bamtools/split/test.yml | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index ff0cb748..9787b4ed 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -20,7 +20,7 @@ workflow test_bamtools_split_multiple { input = [ [ id:'test', single_end:false ], // meta map [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true)] + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)] ] diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index b52cc9ee..63ecac57 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -1,5 +1,5 @@ -- name: bamtools split test_bamtools_split - command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split -c tests/config/nextflow.config +- name: bamtools split test_bamtools_split_single_input + command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split_single_input -c tests/config/nextflow.config tags: - bamtools - bamtools/split @@ -9,3 +9,15 @@ - path: output/bamtools/test.REF_unmapped.bam md5sum: e0754bf72c51543b2d745d96537035fb - path: output/bamtools/versions.yml + +- name: bamtools split test_bamtools_split_multiple + command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split_multiple -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/split + files: + - path: output/bamtools/test.REF_chr22.bam + md5sum: 585675bea34c48ebe9db06a561d4b4fa + - path: output/bamtools/test.REF_unmapped.bam + md5sum: 16ad644c87b9471f3026bc87c98b4963 + - path: output/bamtools/versions.yml From 9aadd9a6d3f5964476582319b3a1c54a3e3fe7c9 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Fri, 22 Apr 2022 14:50:07 +0100 Subject: [PATCH 058/313] Replace vanilla Linux Biocontainer with Ubuntu (#1557) --- modules/cat/fastq/main.nf | 4 ++-- modules/gunzip/main.nf | 4 ++-- modules/untar/main.nf | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/cat/fastq/main.nf b/modules/cat/fastq/main.nf index bf0877c3..b6854895 100644 --- a/modules/cat/fastq/main.nf +++ b/modules/cat/fastq/main.nf @@ -4,8 +4,8 @@ process CAT_FASTQ { conda (params.enable_conda ? "conda-forge::sed=4.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : - 'biocontainers/biocontainers:v1.2.0_cv1' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: tuple val(meta), path(reads, stageAs: "input*/*") diff --git a/modules/gunzip/main.nf b/modules/gunzip/main.nf index 9d4b0666..61bf1afa 100644 --- a/modules/gunzip/main.nf +++ b/modules/gunzip/main.nf @@ -4,8 +4,8 @@ process GUNZIP { conda (params.enable_conda ? "conda-forge::sed=4.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv1/biocontainers_v1.2.0_cv1.img' : - 'biocontainers/biocontainers:v1.2.0_cv1' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: tuple val(meta), path(archive) diff --git a/modules/untar/main.nf b/modules/untar/main.nf index bbfa0bfe..058d1764 100644 --- a/modules/untar/main.nf +++ b/modules/untar/main.nf @@ -2,10 +2,10 @@ process UNTAR { tag "$archive" label 'process_low' - conda (params.enable_conda ? "conda-forge::tar=1.34" : null) + conda (params.enable_conda ? "conda-forge::sed=4.7" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://containers.biocontainers.pro/s3/SingImgsRepo/biocontainers/v1.2.0_cv2/biocontainers_v1.2.0_cv2.img' : - 'biocontainers/biocontainers:v1.2.0_cv2' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: tuple val(meta), path(archive) From 6d88f2da8cc5d586456e801b535cc4213e0fa2f7 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Fri, 22 Apr 2022 15:13:06 +0100 Subject: [PATCH 059/313] Rename process from STRINGTIE to STRINGTIE_STRINGTIE (#1546) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Rename process from STRINGTIE to STRINGTIE_STRINGTIE * Bump Stringtie version to 2.2.1 and remove empty files in tests * Fix tests for stringtie/merge Co-authored-by: Júlia Mir Pedrol --- modules/stringtie/merge/main.nf | 6 +++--- modules/stringtie/stringtie/main.nf | 8 ++++---- modules/stringtie/stringtie/meta.yml | 2 +- tests/modules/stringtie/merge/main.nf | 12 ++++++------ tests/modules/stringtie/merge/test.yml | 14 ++++++-------- tests/modules/stringtie/stringtie/main.nf | 6 +++--- tests/modules/stringtie/stringtie/test.yml | 2 -- 7 files changed, 23 insertions(+), 27 deletions(-) diff --git a/modules/stringtie/merge/main.nf b/modules/stringtie/merge/main.nf index aa11eb36..c8460c94 100644 --- a/modules/stringtie/merge/main.nf +++ b/modules/stringtie/merge/main.nf @@ -2,10 +2,10 @@ process STRINGTIE_MERGE { label 'process_medium' // Note: 2.7X indices incompatible with AWS iGenomes. - conda (params.enable_conda ? "bioconda::stringtie=2.1.7" : null) + conda (params.enable_conda ? "bioconda::stringtie=2.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/stringtie:2.1.7--h978d192_0' : - 'quay.io/biocontainers/stringtie:2.1.7--h978d192_0' }" + 'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' : + 'quay.io/biocontainers/stringtie:2.2.1--hecb563c_2' }" input: path stringtie_gtf diff --git a/modules/stringtie/stringtie/main.nf b/modules/stringtie/stringtie/main.nf index f37e347a..c70c9819 100644 --- a/modules/stringtie/stringtie/main.nf +++ b/modules/stringtie/stringtie/main.nf @@ -1,11 +1,11 @@ -process STRINGTIE { +process STRINGTIE_STRINGTIE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::stringtie=2.1.7" : null) + conda (params.enable_conda ? "bioconda::stringtie=2.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/stringtie:2.1.7--h978d192_0' : - 'quay.io/biocontainers/stringtie:2.1.7--h978d192_0' }" + 'https://depot.galaxyproject.org/singularity/stringtie:2.2.1--hecb563c_2' : + 'quay.io/biocontainers/stringtie:2.2.1--hecb563c_2' }" input: tuple val(meta), path(bam) diff --git a/modules/stringtie/stringtie/meta.yml b/modules/stringtie/stringtie/meta.yml index a462c574..0dda84d0 100644 --- a/modules/stringtie/stringtie/meta.yml +++ b/modules/stringtie/stringtie/meta.yml @@ -1,4 +1,4 @@ -name: stringtie +name: stringtie_stringtie description: Transcript assembly and quantification for RNA-Se keywords: - transcript diff --git a/tests/modules/stringtie/merge/main.nf b/tests/modules/stringtie/merge/main.nf index 7851e755..3fe32902 100644 --- a/tests/modules/stringtie/merge/main.nf +++ b/tests/modules/stringtie/merge/main.nf @@ -2,8 +2,8 @@ nextflow.enable.dsl = 2 -include { STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf' -include { STRINGTIE_MERGE } from '../../../../modules/stringtie/merge/main.nf' +include { STRINGTIE_STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf' +include { STRINGTIE_MERGE } from '../../../../modules/stringtie/merge/main.nf' /* * Test with forward strandedness @@ -15,8 +15,8 @@ workflow test_stringtie_forward_merge { ] annotation_gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) - STRINGTIE ( input, annotation_gtf ) - STRINGTIE + STRINGTIE_STRINGTIE ( input, annotation_gtf ) + STRINGTIE_STRINGTIE .out .transcript_gtf .map { it -> it[1] } @@ -35,8 +35,8 @@ workflow test_stringtie_reverse_merge { ] annotation_gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) - STRINGTIE ( input, annotation_gtf ) - STRINGTIE + STRINGTIE_STRINGTIE ( input, annotation_gtf ) + STRINGTIE_STRINGTIE .out .transcript_gtf .map { it -> it[1] } diff --git a/tests/modules/stringtie/merge/test.yml b/tests/modules/stringtie/merge/test.yml index 392a1d7c..fca66447 100644 --- a/tests/modules/stringtie/merge/test.yml +++ b/tests/modules/stringtie/merge/test.yml @@ -5,7 +5,7 @@ - stringtie/merge files: - path: output/stringtie/stringtie.merged.gtf - md5sum: 9fab7049ef2eafdea246fc787d1def40 + md5sum: d959eb2fab0db48ded7275e0a2e83c05 - path: output/stringtie/test.ballgown/e2t.ctab md5sum: 9ae42e056c955a88a883e5e917840d77 - path: output/stringtie/test.ballgown/e_data.ctab @@ -17,11 +17,10 @@ - path: output/stringtie/test.ballgown/t_data.ctab md5sum: 92a98902784e7406ffe054d2adbabc7c - path: output/stringtie/test.coverage.gtf - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/stringtie/test.gene.abundance.txt - md5sum: 9708811bcefe0f6384293d6f419f3250 + md5sum: 8bcd8e2730ed3337e2730186dbc184f3 - path: output/stringtie/test.transcripts.gtf - md5sum: 0e42709bfe30c2c7f2574ba664f5fa9f + md5sum: a914bd55b68a4b5f607738b17861e362 - name: stringtie merge test_stringtie_reverse_merge command: nextflow run ./tests/modules/stringtie/merge -entry test_stringtie_reverse_merge -c ./tests/config/nextflow.config -c ./tests/modules/stringtie/merge/nextflow.config @@ -30,7 +29,7 @@ - stringtie/merge files: - path: output/stringtie/stringtie.merged.gtf - md5sum: afc461bb3cbc368f268a7a45c1b54497 + md5sum: 6da479298d73d5b3216d4e1576a2bdf4 - path: output/stringtie/test.ballgown/e2t.ctab md5sum: 9ae42e056c955a88a883e5e917840d77 - path: output/stringtie/test.ballgown/e_data.ctab @@ -42,8 +41,7 @@ - path: output/stringtie/test.ballgown/t_data.ctab md5sum: 92a98902784e7406ffe054d2adbabc7c - path: output/stringtie/test.coverage.gtf - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/stringtie/test.gene.abundance.txt - md5sum: 94b85145d60ab1b80a7f0f6cf08418b0 + md5sum: f289f41b3ba1b9f0aa05d14408f1a5da - path: output/stringtie/test.transcripts.gtf - md5sum: 3196e3d50fd461aae6408e0a70acae68 + md5sum: 9dcdc9577c0fdbb25089eda210267546 diff --git a/tests/modules/stringtie/stringtie/main.nf b/tests/modules/stringtie/stringtie/main.nf index ae6abe67..463e4b98 100644 --- a/tests/modules/stringtie/stringtie/main.nf +++ b/tests/modules/stringtie/stringtie/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf' +include { STRINGTIE_STRINGTIE } from '../../../../modules/stringtie/stringtie/main.nf' // // Test with forward strandedness // @@ -13,7 +13,7 @@ workflow test_stringtie_forward { ] annotation_gtf = file(params.test_data['sarscov2']['genome']['genome_gtf'], checkIfExists: true) - STRINGTIE ( input, annotation_gtf ) + STRINGTIE_STRINGTIE ( input, annotation_gtf ) } // @@ -26,5 +26,5 @@ workflow test_stringtie_reverse { ] annotation_gtf = file(params.test_data['sarscov2']['genome']['genome_gtf'], checkIfExists: true) - STRINGTIE ( input, annotation_gtf ) + STRINGTIE_STRINGTIE ( input, annotation_gtf ) } diff --git a/tests/modules/stringtie/stringtie/test.yml b/tests/modules/stringtie/stringtie/test.yml index 732b9fd1..2815ba81 100644 --- a/tests/modules/stringtie/stringtie/test.yml +++ b/tests/modules/stringtie/stringtie/test.yml @@ -8,7 +8,6 @@ - path: ./output/stringtie/test.gene.abundance.txt md5sum: 7d8bce7f2a922e367cedccae7267c22e - path: ./output/stringtie/test.coverage.gtf - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: ./output/stringtie/test.ballgown/e_data.ctab md5sum: 6b4cf69bc03f3f69890f972a0e8b7471 - path: ./output/stringtie/test.ballgown/i_data.ctab @@ -30,7 +29,6 @@ - path: ./output/stringtie/test.gene.abundance.txt md5sum: 7385b870b955dae2c2ab78a70cf05cce - path: ./output/stringtie/test.coverage.gtf - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: ./output/stringtie/test.ballgown/e_data.ctab md5sum: 879b6696029d19c4737b562e9d149218 - path: ./output/stringtie/test.ballgown/i_data.ctab From b3e56c83c683111d0d3edfa2821454d6132b6b66 Mon Sep 17 00:00:00 2001 From: Jose Espinosa-Carrasco Date: Fri, 22 Apr 2022 16:29:49 +0200 Subject: [PATCH 060/313] Remove task.cpus from the command (#1559) --- modules/phantompeakqualtools/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/phantompeakqualtools/main.nf b/modules/phantompeakqualtools/main.nf index f584cb65..0362b2e7 100644 --- a/modules/phantompeakqualtools/main.nf +++ b/modules/phantompeakqualtools/main.nf @@ -26,7 +26,7 @@ process PHANTOMPEAKQUALTOOLS { def prefix = task.ext.prefix ?: "${meta.id}" """ RUN_SPP=`which run_spp.R` - Rscript $args -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" -p=$task.cpus + Rscript $args -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" cat <<-END_VERSIONS > versions.yml "${task.process}": From c2d2399107852aed6bd8e3875cc7bf0cbc89bbb3 Mon Sep 17 00:00:00 2001 From: "Robert A. Petit III" Date: Fri, 22 Apr 2022 08:49:44 -0600 Subject: [PATCH 061/313] Update modules/shigatyper/main.nf Co-authored-by: Sateesh Peri <33637490+sateeshperi@users.noreply.github.com> --- modules/shigatyper/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/shigatyper/main.nf b/modules/shigatyper/main.nf index 3754743f..9d5c189a 100644 --- a/modules/shigatyper/main.nf +++ b/modules/shigatyper/main.nf @@ -12,7 +12,7 @@ process SHIGATYPER { output: tuple val(meta), path("${prefix}.tsv") , emit: tsv - tuple val(meta), path("${prefix}-hits.tsv"), emit: hits, optional: true + tuple val(meta), path("${prefix}-hits.tsv"), optional: true, emit: hits path "versions.yml" , emit: versions when: From 99576895682ee210065be35596b28f308aba068d Mon Sep 17 00:00:00 2001 From: Jasmin F <73216762+jasmezz@users.noreply.github.com> Date: Fri, 22 Apr 2022 17:51:18 +0200 Subject: [PATCH 062/313] Add missing bacteroides_fragilis genome.gbff.gz (#1558) Co-authored-by: James A. Fellows Yates --- tests/config/test_data.config | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 559c0d6f..f6ea242d 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -335,6 +335,7 @@ params { 'bacteroides_fragilis' { 'genome' { genome_fna_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz" + genome_gbff_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.gbff.gz" genome_paf = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.paf" genome_mapping_potential_arg = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.mapping.potential.ARG" From 2a2ac290c37fbbd6caa41b06993818491131e0f2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:34:00 +0200 Subject: [PATCH 063/313] Update modules/bamtools/split/meta.yml Co-authored-by: Harshil Patel --- modules/bamtools/split/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index 0fd5d5ca..badc6974 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -23,7 +23,7 @@ input: e.g. [ id:'test', single_end:false ] - bam: type: file - description: A list of BAM files to merge and then split + description: A list of one or more BAM files to merge and then split pattern: "*.bam" - bam_list: type: file From 7bcede747411d77f85dde0c33e3599e81c0cdb14 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:34:14 +0200 Subject: [PATCH 064/313] Update modules/bamtools/split/meta.yml Co-authored-by: Harshil Patel --- modules/bamtools/split/meta.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/modules/bamtools/split/meta.yml b/modules/bamtools/split/meta.yml index badc6974..8af701f0 100644 --- a/modules/bamtools/split/meta.yml +++ b/modules/bamtools/split/meta.yml @@ -25,11 +25,6 @@ input: type: file description: A list of one or more BAM files to merge and then split pattern: "*.bam" - - bam_list: - type: file - description: | - Optional input file containing bam files to merge before splitting, - one line per file output: - meta: From b73662c8d9b5a770904ae9f3b1a79c878f125c6c Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:34:32 +0200 Subject: [PATCH 065/313] Update tests/modules/bamtools/split/main.nf Co-authored-by: Harshil Patel --- tests/modules/bamtools/split/main.nf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/modules/bamtools/split/main.nf b/tests/modules/bamtools/split/main.nf index 9787b4ed..e5c15c32 100644 --- a/tests/modules/bamtools/split/main.nf +++ b/tests/modules/bamtools/split/main.nf @@ -19,9 +19,10 @@ workflow test_bamtools_split_multiple { input = [ [ id:'test', single_end:false ], // meta map - [file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true)] - + [ + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true) + ] ] BAMTOOLS_SPLIT_MULTIPLE ( input ) From 6efb022f6943ff67421b46359b38582a36278fe5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:34:44 +0200 Subject: [PATCH 066/313] Update tests/modules/bamtools/split/test.yml Co-authored-by: Harshil Patel --- tests/modules/bamtools/split/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index 63ecac57..5747aa25 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -11,7 +11,7 @@ - path: output/bamtools/versions.yml - name: bamtools split test_bamtools_split_multiple - command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split_multiple -c tests/config/nextflow.config + command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split_multiple -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config tags: - bamtools - bamtools/split From e9c44f3d85b731add02680fa6a246c0675e1aac7 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:35:34 +0200 Subject: [PATCH 067/313] Update tests/modules/bamtools/split/test.yml Co-authored-by: Harshil Patel --- tests/modules/bamtools/split/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/bamtools/split/test.yml b/tests/modules/bamtools/split/test.yml index 5747aa25..af639b43 100644 --- a/tests/modules/bamtools/split/test.yml +++ b/tests/modules/bamtools/split/test.yml @@ -1,5 +1,5 @@ - name: bamtools split test_bamtools_split_single_input - command: nextflow run tests/modules/bamtools/split -entry test_bamtools_split_single_input -c tests/config/nextflow.config + command: nextflow run ./tests/modules/bamtools/split -entry test_bamtools_split_single_input -c ./tests/config/nextflow.config -c ./tests/modules/bamtools/split/nextflow.config tags: - bamtools - bamtools/split From 2d32267fcdce945375294cb776ca129038d2b903 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:36:01 +0200 Subject: [PATCH 068/313] Update modules/bamtools/split/main.nf Co-authored-by: Harshil Patel --- modules/bamtools/split/main.nf | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 7184261e..9c643b84 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -24,11 +24,13 @@ process BAMTOOLS_SPLIT { def stub = !args.contains("-stub") ? "-stub ${prefix}" : "" """ - bamtools merge \\ - ${input_list} \\ - | bamtools split \\ - $stub \\ - $args + bamtools \\ + merge \\ + $input_list \\ + | bamtools \\ + split \\ + -stub $prefix \\ + $args cat <<-END_VERSIONS > versions.yml "${task.process}": From da56a2d50968f12ff2aa1a6d6b05fae083ba26c3 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 22 Apr 2022 19:36:08 +0200 Subject: [PATCH 069/313] Update modules/bamtools/split/main.nf Co-authored-by: Harshil Patel --- modules/bamtools/split/main.nf | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/bamtools/split/main.nf b/modules/bamtools/split/main.nf index 9c643b84..aaa5b663 100644 --- a/modules/bamtools/split/main.nf +++ b/modules/bamtools/split/main.nf @@ -21,8 +21,6 @@ process BAMTOOLS_SPLIT { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input_list = bam.collect{"-in $it"}.join(' ') - def stub = !args.contains("-stub") ? "-stub ${prefix}" : "" - """ bamtools \\ merge \\ From 378fa5fbb47ed7c8211b01acb5cf1f66111c4e13 Mon Sep 17 00:00:00 2001 From: Sateesh Peri <33637490+sateeshperi@users.noreply.github.com> Date: Sat, 23 Apr 2022 10:12:06 -0400 Subject: [PATCH 070/313] new module: GAMMA (#1532) * initial version of gamma module * remove trailing whitespace * prettier fix * hardcode version number * Update modules/gamma/main.nf Co-authored-by: James A. Fellows Yates * Update modules/gamma/main.nf Co-authored-by: James A. Fellows Yates * Update modules/gamma/meta.yml Co-authored-by: Robert A. Petit III * update meta and prettier * add whitespaces * add fasta output and tests Co-authored-by: Robert A. Petit III Co-authored-by: James A. Fellows Yates --- modules/gamma/main.nf | 41 +++++++++++++++++++ modules/gamma/meta.yml | 63 +++++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/gamma/main.nf | 17 ++++++++ tests/modules/gamma/nextflow.config | 7 ++++ tests/modules/gamma/test.yml | 13 ++++++ 6 files changed, 145 insertions(+) create mode 100644 modules/gamma/main.nf create mode 100644 modules/gamma/meta.yml create mode 100644 tests/modules/gamma/main.nf create mode 100644 tests/modules/gamma/nextflow.config create mode 100644 tests/modules/gamma/test.yml diff --git a/modules/gamma/main.nf b/modules/gamma/main.nf new file mode 100644 index 00000000..e176ee68 --- /dev/null +++ b/modules/gamma/main.nf @@ -0,0 +1,41 @@ +def VERSION = '2.1' // Version information not provided by tool on CLI + +process GAMMA { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::gamma=2.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/gamma%3A2.1--hdfd78af_0': + 'quay.io/biocontainers/gamma:2.1--hdfd78af_0' }" + + input: + tuple val(meta), path(fasta) + path(db) + + output: + tuple val(meta), path("*.gamma") , emit: gamma + tuple val(meta), path("*.psl") , emit: psl + tuple val(meta), path("*.gff") , optional:true , emit: gff + tuple val(meta), path("*.fasta"), 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}" + """ + GAMMA.py \\ + $args \\ + $fasta \\ + $db \\ + $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gamma: $VERSION + END_VERSIONS + """ +} diff --git a/modules/gamma/meta.yml b/modules/gamma/meta.yml new file mode 100644 index 00000000..316b685b --- /dev/null +++ b/modules/gamma/meta.yml @@ -0,0 +1,63 @@ +name: "gamma" +description: Gene Allele Mutation Microbial Assessment +keywords: + - gamma + - gene-calling +tools: + - "gamma": + description: "Tool for Gene Allele Mutation Microbial Assessment" + homepage: "https://github.com/rastanton/GAMMA" + documentation: "https://github.com/rastanton/GAMMA" + tool_dev_url: "https://github.com/rastanton/GAMMA" + doi: "10.1093/bioinformatics/btab607" + licence: "['Apache License 2.0']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: FASTA file + pattern: "*.{fa,fasta}" + - db: + type: file + description: Database in FASTA format + pattern: "*.{fa,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" + + - gamma: + type: file + description: GAMMA file with annotated gene matches + pattern: "*.{gamma}" + + - psl: + type: file + description: PSL file with all gene matches found + pattern: "*.{psl}" + + - gff: + type: file + description: GFF file + pattern: "*.{gff}" + + - fasta: + type: file + description: multifasta file of the gene matches + pattern: "*.{fasta}" + +authors: + - "@sateeshperi" + - "@rastanton" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index a1a969e7..263e83a8 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -675,6 +675,10 @@ freebayes: - modules/freebayes/** - tests/modules/freebayes/** +gamma: + - modules/gamma/** + - tests/modules/gamma/** + gatk4/applybqsr: - modules/gatk4/applybqsr/** - tests/modules/gatk4/applybqsr/** diff --git a/tests/modules/gamma/main.nf b/tests/modules/gamma/main.nf new file mode 100644 index 00000000..f9477706 --- /dev/null +++ b/tests/modules/gamma/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GAMMA } from '../../../modules/gamma/main.nf' + +workflow test_gamma { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + db = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + + GAMMA ( input, db ) +} diff --git a/tests/modules/gamma/nextflow.config b/tests/modules/gamma/nextflow.config new file mode 100644 index 00000000..bbbf4de0 --- /dev/null +++ b/tests/modules/gamma/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + ext.args = '--fasta' + +} diff --git a/tests/modules/gamma/test.yml b/tests/modules/gamma/test.yml new file mode 100644 index 00000000..1b493b49 --- /dev/null +++ b/tests/modules/gamma/test.yml @@ -0,0 +1,13 @@ +- name: gamma test_gamma + command: nextflow run tests/modules/gamma -entry test_gamma -c tests/config/nextflow.config + tags: + - gamma + files: + - path: output/gamma/test.fasta + md5sum: df37b48466181311e0a679f3c5878484 + - path: output/gamma/test.gamma + md5sum: 3256708fa517a65ed01d99e0e3c762ae + - path: output/gamma/test.psl + md5sum: 162a2757ed3b167ae1e0cdb24213f940 + - path: output/gamma/versions.yml + md5sum: 3fefb5b46c94993362243c5f9a472057 From 569e07f0af74e2a6ea43fca61ae90bb762893461 Mon Sep 17 00:00:00 2001 From: "Maxime U. Garcia" Date: Mon, 25 Apr 2022 14:32:49 +0200 Subject: [PATCH 071/313] add samtools/bamtocram modules (#1561) * add new samtools/bamtocram module * fix md5sum * remove md5sum * Update modules/samtools/bamtocram/main.nf Co-authored-by: James A. Fellows Yates Co-authored-by: James A. Fellows Yates --- modules/samtools/bamtocram/main.nf | 35 +++++++++++++ modules/samtools/bamtocram/meta.yml | 52 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/samtools/bamtocram/main.nf | 17 ++++++ .../samtools/bamtocram/nextflow.config | 5 ++ tests/modules/samtools/bamtocram/test.yml | 9 ++++ 6 files changed, 122 insertions(+) create mode 100644 modules/samtools/bamtocram/main.nf create mode 100644 modules/samtools/bamtocram/meta.yml create mode 100644 tests/modules/samtools/bamtocram/main.nf create mode 100644 tests/modules/samtools/bamtocram/nextflow.config create mode 100644 tests/modules/samtools/bamtocram/test.yml diff --git a/modules/samtools/bamtocram/main.nf b/modules/samtools/bamtocram/main.nf new file mode 100644 index 00000000..b49c308f --- /dev/null +++ b/modules/samtools/bamtocram/main.nf @@ -0,0 +1,35 @@ +//There is a -L option to only output alignments in interval, might be an option for exons/panel data? +process SAMTOOLS_BAMTOCRAM { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" + + input: + tuple val(meta), path(input), path(index) + path fasta + path fai + + output: + tuple val(meta), path("*.cram"), path("*.crai"), emit: cram_crai + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + samtools view --threads ${task.cpus} --reference ${fasta} -C $args $input > ${prefix}.cram + samtools index -@${task.cpus} ${prefix}.cram + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ +} diff --git a/modules/samtools/bamtocram/meta.yml b/modules/samtools/bamtocram/meta.yml new file mode 100644 index 00000000..037704c6 --- /dev/null +++ b/modules/samtools/bamtocram/meta.yml @@ -0,0 +1,52 @@ +name: samtools_bamtocram +description: filter/convert and then index CRAM file +keywords: + - view + - index + - bam + - cram +tools: + - samtools: + description: | + SAMtools is a set of utilities for interacting with and post-processing + short DNA sequence read alignments in the SAM, BAM and CRAM formats, written by Heng Li. + These files are generated as output by short read aligners like BWA. + homepage: http://www.htslib.org/ + documentation: hhttp://www.htslib.org/doc/samtools.html + doi: 10.1093/bioinformatics/btp352 + licence: ["MIT"] +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - input: + type: file + description: BAM/SAM file + pattern: "*.{bam,sam}" + - index: + type: file + description: BAM/SAM index file + pattern: "*.{bai,sai}" + - fasta: + type: file + description: Reference file to create the CRAM file + pattern: "*.{fasta,fa}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - cram_crai: + type: file + description: filtered/converted CRAM file + index + pattern: "*{.cram,.crai}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" +authors: + - "@FriederikeHanssen" + - "@maxulysse" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 263e83a8..4d8ce0b5 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1595,6 +1595,10 @@ samtools/bam2fq: - modules/samtools/bam2fq/** - tests/modules/samtools/bam2fq/** +samtools/bamtocram: + - modules/samtools/bamtocram/** + - tests/modules/samtools/bamtocram/** + samtools/collatefastq: - modules/samtools/collatefastq/** - tests/modules/samtools/collatefastq/** diff --git a/tests/modules/samtools/bamtocram/main.nf b/tests/modules/samtools/bamtocram/main.nf new file mode 100644 index 00000000..b1743310 --- /dev/null +++ b/tests/modules/samtools/bamtocram/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SAMTOOLS_BAMTOCRAM } from '../../../../modules/samtools/bamtocram/main.nf' + +workflow test_samtools_bamtocram { + + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true)] + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + + SAMTOOLS_BAMTOCRAM ( input, fasta, fai ) +} \ No newline at end of file diff --git a/tests/modules/samtools/bamtocram/nextflow.config b/tests/modules/samtools/bamtocram/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/samtools/bamtocram/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/samtools/bamtocram/test.yml b/tests/modules/samtools/bamtocram/test.yml new file mode 100644 index 00000000..3cb82902 --- /dev/null +++ b/tests/modules/samtools/bamtocram/test.yml @@ -0,0 +1,9 @@ +- name: samtools bamtocram test_samtools_bamtocram + command: nextflow run ./tests/modules/samtools/bamtocram -entry test_samtools_bamtocram -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bamtocram/nextflow.config + tags: + - samtools/bamtocram + - samtools + files: + - path: output/samtools/test.cram + - path: output/samtools/test.cram.crai + - path: output/samtools/versions.yml From 6a46e7cf117bbae41bca9b4c7ff7a77794df16ec Mon Sep 17 00:00:00 2001 From: Jose Espinosa-Carrasco Date: Mon, 25 Apr 2022 19:07:43 +0200 Subject: [PATCH 072/313] Allow to pass arguments to the phantompeakqualtools script itself (#1562) * Allow to pass arguments to the script itself * Place args2 correctly * Define args2 aaaaarrrrgggg * Testing locally before commiting is a good practice * Update modules/phantompeakqualtools/main.nf Co-authored-by: Harshil Patel Co-authored-by: Harshil Patel --- modules/phantompeakqualtools/main.nf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/phantompeakqualtools/main.nf b/modules/phantompeakqualtools/main.nf index 0362b2e7..d8f73342 100644 --- a/modules/phantompeakqualtools/main.nf +++ b/modules/phantompeakqualtools/main.nf @@ -22,11 +22,12 @@ process PHANTOMPEAKQUALTOOLS { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ RUN_SPP=`which run_spp.R` - Rscript $args -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" + Rscript $args -e "library(caTools); source(\\"\$RUN_SPP\\")" -c="$bam" -savp="${prefix}.spp.pdf" -savd="${prefix}.spp.Rdata" -out="${prefix}.spp.out" $args2 cat <<-END_VERSIONS > versions.yml "${task.process}": From 1f77bc130b26309573670c58053a928a4602a925 Mon Sep 17 00:00:00 2001 From: Sofia Stamouli <91951607+sofstam@users.noreply.github.com> Date: Tue, 26 Apr 2022 16:32:20 +0200 Subject: [PATCH 073/313] Update minimap2/align module (#1537) --- modules/minimap2/align/main.nf | 22 ++++++++++++++++------ modules/minimap2/align/meta.yml | 18 ++++++++++++++++++ tests/modules/minimap2/align/main.nf | 10 ++++++++-- tests/modules/minimap2/align/test.yml | 16 ++++++++-------- 4 files changed, 50 insertions(+), 16 deletions(-) diff --git a/modules/minimap2/align/main.nf b/modules/minimap2/align/main.nf index fe06f14d..7ba05ee9 100644 --- a/modules/minimap2/align/main.nf +++ b/modules/minimap2/align/main.nf @@ -2,18 +2,22 @@ process MINIMAP2_ALIGN { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::minimap2=2.21' : null) + conda (params.enable_conda ? 'bioconda::minimap2=2.21 bioconda::samtools=1.12' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/minimap2:2.21--h5bf99c6_0' : - 'quay.io/biocontainers/minimap2:2.21--h5bf99c6_0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' : + 'quay.io/biocontainers/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' }" input: tuple val(meta), path(reads) path reference + val bam_format + val cigar_paf_format + val cigar_bam output: - tuple val(meta), path("*.paf"), emit: paf - path "versions.yml" , emit: versions + tuple val(meta), path("*.paf"), optional: true, emit: paf + tuple val(meta), path("*.bam"), optional: true, emit: bam + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -22,13 +26,19 @@ process MINIMAP2_ALIGN { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def input_reads = meta.single_end ? "$reads" : "${reads[0]} ${reads[1]}" + def bam_output = bam_format ? "-a | samtools sort | samtools view -@ ${task.cpus} -b -h -o ${prefix}.bam" : "-o ${prefix}.paf" + def cigar_paf = cigar_paf_format && !sam_format ? "-c" : '' + def set_cigar_bam = cigar_bam && sam_format ? "-L" : '' """ minimap2 \\ $args \\ -t $task.cpus \\ $reference \\ $input_reads \\ - > ${prefix}.paf + $cigar_paf \\ + $set_cigar_bam \\ + $bam_output + cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/minimap2/align/meta.yml b/modules/minimap2/align/meta.yml index 89e24283..991b39a0 100644 --- a/modules/minimap2/align/meta.yml +++ b/modules/minimap2/align/meta.yml @@ -29,6 +29,17 @@ input: type: file description: | Reference database in FASTA format. + - bam_format: + type: boolean + description: Specify that output should be in BAM format + - cigar_paf_format: + type: boolean + description: Specify that output CIGAR should be in PAF format + - cigar_bam: + type: boolean + description: | + Write CIGAR with >65535 ops at the CG tag. This is recommended when + doing XYZ (https://github.com/lh3/minimap2#working-with-65535-cigar-operations) output: - meta: type: map @@ -39,9 +50,16 @@ output: type: file description: Alignment in PAF format pattern: "*.paf" + - bam: + type: file + description: Alignment in BAM format + pattern: "*.bam" - versions: type: file description: File containing software versions pattern: "versions.yml" authors: - "@heuermh" + - "@sofstam" + - "@sateeshperi" + - "@jfy133" diff --git a/tests/modules/minimap2/align/main.nf b/tests/modules/minimap2/align/main.nf index e507d3e5..ee6c0838 100644 --- a/tests/modules/minimap2/align/main.nf +++ b/tests/modules/minimap2/align/main.nf @@ -9,8 +9,11 @@ workflow test_minimap2_align_single_end { [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + bam_format = true + cigar_paf_format = false + cigar_bam = false - MINIMAP2_ALIGN ( input, fasta ) + MINIMAP2_ALIGN ( input, fasta, bam_format, cigar_paf_format, cigar_bam) } workflow test_minimap2_align_paired_end { @@ -19,6 +22,9 @@ workflow test_minimap2_align_paired_end { file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + bam_format = true + cigar_paf_format = false + cigar_bam = false - MINIMAP2_ALIGN ( input, fasta ) + MINIMAP2_ALIGN ( input, fasta, bam_format, cigar_paf_format, cigar_bam ) } diff --git a/tests/modules/minimap2/align/test.yml b/tests/modules/minimap2/align/test.yml index 73dd73e2..c392e313 100644 --- a/tests/modules/minimap2/align/test.yml +++ b/tests/modules/minimap2/align/test.yml @@ -1,17 +1,17 @@ -- name: minimap2 align single-end - command: nextflow run ./tests/modules/minimap2/align -entry test_minimap2_align_single_end -c ./tests/config/nextflow.config -c ./tests/modules/minimap2/align/nextflow.config +- name: minimap2 align test_minimap2_align_single_end + command: nextflow run tests/modules/minimap2/align -entry test_minimap2_align_single_end -c tests/config/nextflow.config tags: - minimap2 - minimap2/align files: - - path: ./output/minimap2/test.paf - md5sum: 70e8cf299ee3ecd33e629d10c1f588ce + - path: output/minimap2/test.bam + - path: output/minimap2/versions.yml -- name: minimap2 align paired-end - command: nextflow run ./tests/modules/minimap2/align -entry test_minimap2_align_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/minimap2/align/nextflow.config +- name: minimap2 align test_minimap2_align_paired_end + command: nextflow run tests/modules/minimap2/align -entry test_minimap2_align_paired_end -c tests/config/nextflow.config tags: - minimap2 - minimap2/align files: - - path: ./output/minimap2/test.paf - md5sum: 5e7b55a26bf0ea3a2843423d3e0b9a28 + - path: output/minimap2/test.bam + - path: output/minimap2/versions.yml From 134272c7ee2de794554d51d1a55ea2a4a7e3f9a0 Mon Sep 17 00:00:00 2001 From: jasmezz Date: Tue, 26 Apr 2022 17:04:57 +0200 Subject: [PATCH 074/313] Add missing container folders as output channels --- .../antismashlitedownloaddatabases/main.nf | 6 +++++- .../antismashlitedownloaddatabases/meta.yml | 21 ++++++++++++++++--- .../antismashlitedownloaddatabases/test.yml | 11 +++++++++- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/modules/antismash/antismashlitedownloaddatabases/main.nf b/modules/antismash/antismashlitedownloaddatabases/main.nf index 1853d80a..2154bafa 100644 --- a/modules/antismash/antismashlitedownloaddatabases/main.nf +++ b/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -7,8 +7,9 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { 'quay.io/biocontainers/antismash-lite:6.0.1--pyhdfd78af_1' }" /* - These files are normally downloaded by download-antismash-databases itself, and must be retrieved for input by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. This is solely for use for CI tests of the nf-core/module version of antiSMASH. + These files are normally downloaded/created by download-antismash-databases itself, and must be retrieved for input by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. This is solely for use for CI tests of the nf-core/module version of antiSMASH. Reason: Upon execution, the tool checks if certain database files are present within the container and if not, it tries to create them in /usr/local/bin, for which only root user has write permissions. Mounting those database files with this module prevents the tool from trying to create them. + These files are also emitted as output channels in this module to enable the antismash-lite module to use them as mount volumes to the docker/singularity containers. */ containerOptions { @@ -26,6 +27,9 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { output: path("antismash_db") , emit: database + path("css"), emit: css_dir + path("detection"), emit: detection_dir + path("modules"), emit: modules_dir path "versions.yml", emit: versions when: diff --git a/modules/antismash/antismashlitedownloaddatabases/meta.yml b/modules/antismash/antismashlitedownloaddatabases/meta.yml index ad393bae..9e95957a 100644 --- a/modules/antismash/antismashlitedownloaddatabases/meta.yml +++ b/modules/antismash/antismashlitedownloaddatabases/meta.yml @@ -27,17 +27,17 @@ input: - database_css: type: directory description: | - antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by ther use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. pattern: "css" - database_detection: type: directory description: | - antismash/detection folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + antismash/detection folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. pattern: "detection" - database_modules: type: directory description: | - antismash/modules folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + antismash/modules folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. pattern: "modules" output: @@ -50,6 +50,21 @@ output: type: directory description: Download directory for antiSMASH databases pattern: "antismash_db" + - css_dir: + type: directory + description: | + antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "css" + - detection_dir: + type: directory + description: | + antismash/detection folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "detection" + - modules_dir: + type: directory + description: | + antismash/modules folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "modules" authors: - "@jasmezz" diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml index 3493bb4b..808e3b7e 100644 --- a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml +++ b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml @@ -1,14 +1,23 @@ - name: antismash antismashlitedownloaddatabases test_antismash_antismashlitedownloaddatabases command: nextflow run tests/modules/antismash/antismashlitedownloaddatabases -entry test_antismash_antismashlitedownloaddatabases -c tests/config/nextflow.config tags: - - antismash/antismashlitedownloaddatabases - antismash + - antismash/antismashlitedownloaddatabases files: - path: output/antismash/versions.yml md5sum: e2656c8d2bcc7469eba40eb1ee5c91b3 + - path: output/untar1/versions.yml + md5sum: b724089c7a3b22557626e3d6cf79884d + - path: output/untar2/versions.yml + md5sum: 7182a024e050e5fb6b8830930e551adc + - path: output/untar3/versions.yml + md5sum: d27a9b44dd969d74d237e52ac89bd8e5 - path: output/antismash/antismash_db - path: output/antismash/antismash_db/clusterblast - path: output/antismash/antismash_db/clustercompare - path: output/antismash/antismash_db/pfam - path: output/antismash/antismash_db/resfam - path: output/antismash/antismash_db/tigrfam + - path: output/antismash/css + - path: output/antismash/detection + - path: output/antismash/modules From 85ec13ff1fc2196c5a507ea497de468101baabed Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Tue, 26 Apr 2022 19:15:24 +0100 Subject: [PATCH 075/313] Add Trimgalore output for unpaired reads (#1568) * Add Trimgalore output for unpaired reads * Use glob instead of outprefix --- modules/trimgalore/main.nf | 13 ++++++++----- modules/trimgalore/meta.yml | 5 +++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/trimgalore/main.nf b/modules/trimgalore/main.nf index 9487c799..3a3fca90 100644 --- a/modules/trimgalore/main.nf +++ b/modules/trimgalore/main.nf @@ -11,12 +11,13 @@ process TRIMGALORE { tuple val(meta), path(reads) output: - tuple val(meta), path("*.fq.gz") , emit: reads - tuple val(meta), path("*report.txt"), emit: log - path "versions.yml" , emit: versions + tuple val(meta), path("*{trimmed,val}*.fq.gz"), emit: reads + tuple val(meta), path("*report.txt") , emit: log + path "versions.yml" , emit: versions - tuple val(meta), path("*.html"), emit: html optional true - tuple val(meta), path("*.zip") , emit: zip optional true + tuple val(meta), path("*unpaired*.fq.gz") , emit: unpaired, optional: true + 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 @@ -52,6 +53,7 @@ process TRIMGALORE { $c_r1 \\ $tpc_r1 \\ ${prefix}.fastq.gz + cat <<-END_VERSIONS > versions.yml "${task.process}": trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//') @@ -73,6 +75,7 @@ process TRIMGALORE { $tpc_r2 \\ ${prefix}_1.fastq.gz \\ ${prefix}_2.fastq.gz + cat <<-END_VERSIONS > versions.yml "${task.process}": trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//') diff --git a/modules/trimgalore/meta.yml b/modules/trimgalore/meta.yml index e99a8833..439f566d 100644 --- a/modules/trimgalore/meta.yml +++ b/modules/trimgalore/meta.yml @@ -37,6 +37,11 @@ output: List of input adapter trimmed FastQ files of size 1 and 2 for single-end and paired-end data, respectively. pattern: "*.{fq.gz}" + - unpaired: + type: file + description: | + FastQ files containing unpaired reads from read 1 or read 2 + pattern: "*unpaired*.fq.gz" - html: type: file description: FastQC report (optional) From d79433dcac78aa231f21177a3d69fde3cceb1cec Mon Sep 17 00:00:00 2001 From: Jasmin F <73216762+jasmezz@users.noreply.github.com> Date: Wed, 27 Apr 2022 10:08:07 +0200 Subject: [PATCH 076/313] Apply suggestions from code review Co-authored-by: James A. Fellows Yates --- modules/antismash/antismashlitedownloaddatabases/meta.yml | 2 +- .../antismash/antismashlitedownloaddatabases/test.yml | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/antismash/antismashlitedownloaddatabases/meta.yml b/modules/antismash/antismashlitedownloaddatabases/meta.yml index 9e95957a..619dc8c2 100644 --- a/modules/antismash/antismashlitedownloaddatabases/meta.yml +++ b/modules/antismash/antismashlitedownloaddatabases/meta.yml @@ -27,7 +27,7 @@ input: - database_css: type: directory description: | - antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by ther use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. pattern: "css" - database_detection: type: directory diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml index 808e3b7e..ac38eee3 100644 --- a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml +++ b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml @@ -6,12 +6,6 @@ files: - path: output/antismash/versions.yml md5sum: e2656c8d2bcc7469eba40eb1ee5c91b3 - - path: output/untar1/versions.yml - md5sum: b724089c7a3b22557626e3d6cf79884d - - path: output/untar2/versions.yml - md5sum: 7182a024e050e5fb6b8830930e551adc - - path: output/untar3/versions.yml - md5sum: d27a9b44dd969d74d237e52ac89bd8e5 - path: output/antismash/antismash_db - path: output/antismash/antismash_db/clusterblast - path: output/antismash/antismash_db/clustercompare From 31547edc1e2491c16c00ffff4ed34de193f72b65 Mon Sep 17 00:00:00 2001 From: Jasmin F <73216762+jasmezz@users.noreply.github.com> Date: Wed, 27 Apr 2022 10:14:14 +0200 Subject: [PATCH 077/313] Update tool name --- modules/antismash/antismashlitedownloaddatabases/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/antismash/antismashlitedownloaddatabases/main.nf b/modules/antismash/antismashlitedownloaddatabases/main.nf index 2154bafa..72314eee 100644 --- a/modules/antismash/antismashlitedownloaddatabases/main.nf +++ b/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -44,7 +44,7 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { cat <<-END_VERSIONS > versions.yml "${task.process}": - antismash: \$(antismash --version | sed 's/antiSMASH //') + antismash-lite: \$(antismash --version | sed 's/antiSMASH //') END_VERSIONS """ } From 024c992ca77d6bf5e4baddae30a38cd14d526042 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 27 Apr 2022 11:12:58 +0200 Subject: [PATCH 078/313] created the module --- modules/vardictjava/main.nf | 77 +++++++++++++++++++++++ modules/vardictjava/meta.yml | 51 +++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/vardictjava/main.nf | 15 +++++ tests/modules/vardictjava/nextflow.config | 8 +++ tests/modules/vardictjava/test.yml | 12 ++++ 6 files changed, 167 insertions(+) create mode 100644 modules/vardictjava/main.nf create mode 100644 modules/vardictjava/meta.yml create mode 100644 tests/modules/vardictjava/main.nf create mode 100644 tests/modules/vardictjava/nextflow.config create mode 100644 tests/modules/vardictjava/test.yml diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf new file mode 100644 index 00000000..d52e15dd --- /dev/null +++ b/modules/vardictjava/main.nf @@ -0,0 +1,77 @@ +// TODO nf-core: If in doubt look at other nf-core/modules to see how we are doing things! :) +// https://github.com/nf-core/modules/tree/master/modules +// You can also ask for help via your pull request or on the #modules channel on the nf-core Slack workspace: +// https://nf-co.re/join +// TODO nf-core: A module file SHOULD only define input and output files as command-line parameters. +// All other parameters MUST be provided using the "task.ext" directive, see here: +// https://www.nextflow.io/docs/latest/process.html#ext +// where "task.ext" is a string. +// Any parameters that need to be evaluated in the context of a particular sample +// e.g. single-end/paired-end data MUST also be defined and evaluated appropriately. +// TODO nf-core: Software that can be piped together SHOULD be added to separate module files +// unless there is a run-time, storage advantage in implementing in this way +// e.g. it's ok to have a single module for bwa to output BAM instead of SAM: +// bwa mem | samtools view -B -T ref.fasta +// TODO nf-core: Optional inputs are not currently supported by Nextflow. However, using an empty +// list (`[]`) instead of a file can be used to work around this issue. + +process VARDICTJAVA { + tag "$meta.id" + label 'process_medium' + + // TODO nf-core: List required Conda package(s). + // Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10"). + // For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems. + // TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below. + conda (params.enable_conda ? "bioconda::vardict-java=1.8.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/vardict-java:1.8.3--hdfd78af_0': + 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" + + input: + // TODO nf-core: Where applicable all sample-specific information e.g. "id", "single_end", "read_group" + // MUST be provided as an input via a Groovy Map called "meta". + // This information may not be required in some instances e.g. indexing reference genome files: + // https://github.com/nf-core/modules/blob/master/modules/bwa/index/main.nf + // TODO nf-core: Where applicable please provide/convert compressed files as input/output + // e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc. + tuple val(meta), path(bam) + path(reference_fasta) + path(regions_of_interest) + + output: + // TODO nf-core: Named file extensions MUST be emitted for ALL output channels + tuple val(meta), path("*.bam"), emit: bam + // TODO nf-core: List additional required output channels/values here + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + // TODO nf-core: Where possible, a command MUST be provided to obtain the version number of the software e.g. 1.10 + // If the software is unable to output a version number on the command-line then it can be manually specified + // e.g. https://github.com/nf-core/modules/blob/master/modules/homer/annotatepeaks/main.nf + // Each software used MUST provide the software name and version number in the YAML version file (versions.yml) + // TODO nf-core: It MUST be possible to pass additional parameters to the tool as a command-line string via the "task.ext.args" directive + // TODO nf-core: If the tool supports multi-threading then you MUST provide the appropriate parameter + // using the Nextflow "task" variable e.g. "--threads $task.cpus" + // TODO nf-core: Please replace the example samtools command below with your module's command + // TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;) + """ + vardict-java \\ + $args \\ + -b $bam \\ + -th $task.cpus \\ + -n $prefix \\ + -G $reference_fasta \\ + $regions_of_interest \\ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + vardictjava: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' )) + END_VERSIONS + """ +} diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml new file mode 100644 index 00000000..e8c55de3 --- /dev/null +++ b/modules/vardictjava/meta.yml @@ -0,0 +1,51 @@ +name: "vardictjava" +## TODO nf-core: Add a description of the module and list keywords +description: write your description here +keywords: + - sort +tools: + - "vardictjava": + ## TODO nf-core: Add a description and other details for the software below + description: "Java port of the VarDict variant discovery program" + homepage: "None" + documentation: "None" + tool_dev_url: "None" + doi: "" + licence: "['MIT']" + +## TODO nf-core: Add a description of all of the variables used as input +input: + # Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + # + ## TODO nf-core: Delete / customise this example input + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +## TODO nf-core: Add a description of all of the variables used as output +output: + #Only when we have meta + - 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 + - bam: + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +authors: + - "@nvnieuwk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 4d8ce0b5..8ca9f2e2 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1908,6 +1908,10 @@ unzip: - modules/unzip/** - tests/modules/unzip/** +vardictjava: + - modules/vardictjava/** + - tests/modules/vardictjava/** + variantbam: - modules/variantbam/** - tests/modules/variantbam/** diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf new file mode 100644 index 00000000..8a714b2b --- /dev/null +++ b/tests/modules/vardictjava/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { VARDICTJAVA } from '../../../modules/vardictjava/main.nf' + +workflow test_vardictjava { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + VARDICTJAVA ( input ) +} diff --git a/tests/modules/vardictjava/nextflow.config b/tests/modules/vardictjava/nextflow.config new file mode 100644 index 00000000..5dc176a9 --- /dev/null +++ b/tests/modules/vardictjava/nextflow.config @@ -0,0 +1,8 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: VARDICTJAVA { + ext.args = '' + } +} \ No newline at end of file diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml new file mode 100644 index 00000000..73c647af --- /dev/null +++ b/tests/modules/vardictjava/test.yml @@ -0,0 +1,12 @@ +## TODO nf-core: Please run the following command to build this file: +# nf-core modules create-test-yml vardictjava +- name: "vardictjava" + command: nextflow run ./tests/modules/vardictjava -entry test_vardictjava -c ./tests/config/nextflow.config -c ./tests/modules/vardictjava/nextflow.config + tags: + - "vardictjava" + # + files: + - path: "output/vardictjava/test.bam" + md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/vardictjava/versions.yml + md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b From d57664b576d2433deed1b0fb742f3a3da05d5046 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Wed, 27 Apr 2022 11:18:58 +0200 Subject: [PATCH 079/313] cleanup TODO's --- modules/vardictjava/main.nf | 39 +------------------------------------ 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index d52e15dd..80beb540 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -1,48 +1,19 @@ -// TODO nf-core: If in doubt look at other nf-core/modules to see how we are doing things! :) -// https://github.com/nf-core/modules/tree/master/modules -// You can also ask for help via your pull request or on the #modules channel on the nf-core Slack workspace: -// https://nf-co.re/join -// TODO nf-core: A module file SHOULD only define input and output files as command-line parameters. -// All other parameters MUST be provided using the "task.ext" directive, see here: -// https://www.nextflow.io/docs/latest/process.html#ext -// where "task.ext" is a string. -// Any parameters that need to be evaluated in the context of a particular sample -// e.g. single-end/paired-end data MUST also be defined and evaluated appropriately. -// TODO nf-core: Software that can be piped together SHOULD be added to separate module files -// unless there is a run-time, storage advantage in implementing in this way -// e.g. it's ok to have a single module for bwa to output BAM instead of SAM: -// bwa mem | samtools view -B -T ref.fasta -// TODO nf-core: Optional inputs are not currently supported by Nextflow. However, using an empty -// list (`[]`) instead of a file can be used to work around this issue. - process VARDICTJAVA { tag "$meta.id" label 'process_medium' - // TODO nf-core: List required Conda package(s). - // Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10"). - // For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems. - // TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below. conda (params.enable_conda ? "bioconda::vardict-java=1.8.3" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/vardict-java:1.8.3--hdfd78af_0': 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" input: - // TODO nf-core: Where applicable all sample-specific information e.g. "id", "single_end", "read_group" - // MUST be provided as an input via a Groovy Map called "meta". - // This information may not be required in some instances e.g. indexing reference genome files: - // https://github.com/nf-core/modules/blob/master/modules/bwa/index/main.nf - // TODO nf-core: Where applicable please provide/convert compressed files as input/output - // e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc. tuple val(meta), path(bam) path(reference_fasta) path(regions_of_interest) output: - // TODO nf-core: Named file extensions MUST be emitted for ALL output channels tuple val(meta), path("*.bam"), emit: bam - // TODO nf-core: List additional required output channels/values here path "versions.yml" , emit: versions when: @@ -51,15 +22,7 @@ process VARDICTJAVA { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - // TODO nf-core: Where possible, a command MUST be provided to obtain the version number of the software e.g. 1.10 - // If the software is unable to output a version number on the command-line then it can be manually specified - // e.g. https://github.com/nf-core/modules/blob/master/modules/homer/annotatepeaks/main.nf - // Each software used MUST provide the software name and version number in the YAML version file (versions.yml) - // TODO nf-core: It MUST be possible to pass additional parameters to the tool as a command-line string via the "task.ext.args" directive - // TODO nf-core: If the tool supports multi-threading then you MUST provide the appropriate parameter - // using the Nextflow "task" variable e.g. "--threads $task.cpus" - // TODO nf-core: Please replace the example samtools command below with your module's command - // TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;) + """ vardict-java \\ $args \\ From 9108e2e2ec337978929cafc8d7cfedb656124786 Mon Sep 17 00:00:00 2001 From: Jasmin F <73216762+jasmezz@users.noreply.github.com> Date: Wed, 27 Apr 2022 12:22:05 +0200 Subject: [PATCH 080/313] Update test output checksum --- tests/modules/antismash/antismashlitedownloaddatabases/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml index ac38eee3..1079363c 100644 --- a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml +++ b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml @@ -5,7 +5,7 @@ - antismash/antismashlitedownloaddatabases files: - path: output/antismash/versions.yml - md5sum: e2656c8d2bcc7469eba40eb1ee5c91b3 + md5sum: 24859c67023abab99de295d3675a24b6 - path: output/antismash/antismash_db - path: output/antismash/antismash_db/clusterblast - path: output/antismash/antismash_db/clustercompare From 61e740f79cbb4538483e751ad82ca71c592f3079 Mon Sep 17 00:00:00 2001 From: Jasmin F <73216762+jasmezz@users.noreply.github.com> Date: Wed, 27 Apr 2022 12:40:04 +0200 Subject: [PATCH 081/313] Add antismash download DB: missing container folders as output channels (#1567) * Add missing container folders as output channels * Apply suggestions from code review Co-authored-by: James A. Fellows Yates * Update tool name * Update test output checksum Co-authored-by: James A. Fellows Yates --- .../antismashlitedownloaddatabases/main.nf | 8 +++++-- .../antismashlitedownloaddatabases/meta.yml | 21 ++++++++++++++++--- .../antismashlitedownloaddatabases/test.yml | 7 +++++-- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/modules/antismash/antismashlitedownloaddatabases/main.nf b/modules/antismash/antismashlitedownloaddatabases/main.nf index 1853d80a..72314eee 100644 --- a/modules/antismash/antismashlitedownloaddatabases/main.nf +++ b/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -7,8 +7,9 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { 'quay.io/biocontainers/antismash-lite:6.0.1--pyhdfd78af_1' }" /* - These files are normally downloaded by download-antismash-databases itself, and must be retrieved for input by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. This is solely for use for CI tests of the nf-core/module version of antiSMASH. + These files are normally downloaded/created by download-antismash-databases itself, and must be retrieved for input by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. This is solely for use for CI tests of the nf-core/module version of antiSMASH. Reason: Upon execution, the tool checks if certain database files are present within the container and if not, it tries to create them in /usr/local/bin, for which only root user has write permissions. Mounting those database files with this module prevents the tool from trying to create them. + These files are also emitted as output channels in this module to enable the antismash-lite module to use them as mount volumes to the docker/singularity containers. */ containerOptions { @@ -26,6 +27,9 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { output: path("antismash_db") , emit: database + path("css"), emit: css_dir + path("detection"), emit: detection_dir + path("modules"), emit: modules_dir path "versions.yml", emit: versions when: @@ -40,7 +44,7 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { cat <<-END_VERSIONS > versions.yml "${task.process}": - antismash: \$(antismash --version | sed 's/antiSMASH //') + antismash-lite: \$(antismash --version | sed 's/antiSMASH //') END_VERSIONS """ } diff --git a/modules/antismash/antismashlitedownloaddatabases/meta.yml b/modules/antismash/antismashlitedownloaddatabases/meta.yml index ad393bae..619dc8c2 100644 --- a/modules/antismash/antismashlitedownloaddatabases/meta.yml +++ b/modules/antismash/antismashlitedownloaddatabases/meta.yml @@ -27,17 +27,17 @@ input: - database_css: type: directory description: | - antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. pattern: "css" - database_detection: type: directory description: | - antismash/detection folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + antismash/detection folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. pattern: "detection" - database_modules: type: directory description: | - antismash/modules folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + antismash/modules folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. pattern: "modules" output: @@ -50,6 +50,21 @@ output: type: directory description: Download directory for antiSMASH databases pattern: "antismash_db" + - css_dir: + type: directory + description: | + antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "css" + - detection_dir: + type: directory + description: | + antismash/detection folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "detection" + - modules_dir: + type: directory + description: | + antismash/modules folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + pattern: "modules" authors: - "@jasmezz" diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml index 3493bb4b..1079363c 100644 --- a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml +++ b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml @@ -1,14 +1,17 @@ - name: antismash antismashlitedownloaddatabases test_antismash_antismashlitedownloaddatabases command: nextflow run tests/modules/antismash/antismashlitedownloaddatabases -entry test_antismash_antismashlitedownloaddatabases -c tests/config/nextflow.config tags: - - antismash/antismashlitedownloaddatabases - antismash + - antismash/antismashlitedownloaddatabases files: - path: output/antismash/versions.yml - md5sum: e2656c8d2bcc7469eba40eb1ee5c91b3 + md5sum: 24859c67023abab99de295d3675a24b6 - path: output/antismash/antismash_db - path: output/antismash/antismash_db/clusterblast - path: output/antismash/antismash_db/clustercompare - path: output/antismash/antismash_db/pfam - path: output/antismash/antismash_db/resfam - path: output/antismash/antismash_db/tigrfam + - path: output/antismash/css + - path: output/antismash/detection + - path: output/antismash/modules From 7956d38e61a8efdd2fffcb6cf33f4a02ad73bc50 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 27 Apr 2022 13:18:46 +0200 Subject: [PATCH 082/313] Fixed the test on nextflow level --- modules/vardictjava/main.nf | 4 +-- modules/vardictjava/meta.yml | 46 ++++++++++++++++++------------ tests/modules/vardictjava/main.nf | 8 ++++-- tests/modules/vardictjava/test.yml | 2 +- 4 files changed, 36 insertions(+), 24 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 80beb540..8170bf76 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -13,7 +13,7 @@ process VARDICTJAVA { path(regions_of_interest) output: - tuple val(meta), path("*.bam"), emit: bam + tuple val(meta), path("*.vcf"), emit: vcf path "versions.yml" , emit: versions when: @@ -34,7 +34,7 @@ process VARDICTJAVA { cat <<-END_VERSIONS > versions.yml "${task.process}": - vardictjava: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' )) + vardictjava: \$(echo 1.8.3) END_VERSIONS """ } diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index e8c55de3..7820a877 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -1,19 +1,19 @@ name: "vardictjava" -## TODO nf-core: Add a description of the module and list keywords -description: write your description here + +description: The Java port of the VarDict variant caller keywords: - - sort + - variant calling + - VarDict + - AstraZeneca tools: - "vardictjava": - ## TODO nf-core: Add a description and other details for the software below description: "Java port of the VarDict variant discovery program" - homepage: "None" - documentation: "None" - tool_dev_url: "None" - doi: "" + homepage: "https://github.com/AstraZeneca-NGS/VarDictJava" + documentation: "https://github.com/AstraZeneca-NGS/VarDictJava" + tool_dev_url: "https://github.com/AstraZeneca-NGS/VarDictJava" + doi: "10.1093/nar/gkw227 " licence: "['MIT']" -## TODO nf-core: Add a description of all of the variables used as input input: # Only when we have meta - meta: @@ -21,14 +21,22 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - # - ## TODO nf-core: Delete / customise this example input + - bam: type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: BAM/SAM file + pattern: "*.{bam,sam}" + + - reference_fasta: + type: file + description: FASTA of the reference genome + pattern: "*.{fa,fasta}" + + - regions_of_interest: + type: file + description: BED with the regions of interest + pattern: "*.bed" -## TODO nf-core: Add a description of all of the variables used as output output: #Only when we have meta - meta: @@ -36,16 +44,16 @@ output: 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 - - bam: + + - vcf: type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: VCF file output + pattern: "*.vcf" authors: - "@nvnieuwk" diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf index 8a714b2b..7511b529 100644 --- a/tests/modules/vardictjava/main.nf +++ b/tests/modules/vardictjava/main.nf @@ -8,8 +8,12 @@ workflow test_vardictjava { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_bam'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - VARDICTJAVA ( input ) + VARDICTJAVA ( + input, + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ) } diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml index 73c647af..001a56e8 100644 --- a/tests/modules/vardictjava/test.yml +++ b/tests/modules/vardictjava/test.yml @@ -6,7 +6,7 @@ - "vardictjava" # files: - - path: "output/vardictjava/test.bam" + - path: "output/vardictjava/test.vcf" md5sum: e667c7caad0bc4b7ac383fd023c654fc - path: output/vardictjava/versions.yml md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b From 10ca39a86f1b227a5535238d02398fec686eba72 Mon Sep 17 00:00:00 2001 From: "Maxime U. Garcia" Date: Wed, 27 Apr 2022 16:03:44 +0200 Subject: [PATCH 083/313] add intervals possibilities to splitncigarreads (#1571) --- modules/gatk4/splitncigarreads/main.nf | 4 +++- modules/gatk4/splitncigarreads/meta.yml | 7 +++++++ tests/modules/gatk4/splitncigarreads/main.nf | 18 +++++++++++++++++- tests/modules/gatk4/splitncigarreads/test.yml | 11 ++++++++++- 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/modules/gatk4/splitncigarreads/main.nf b/modules/gatk4/splitncigarreads/main.nf index f7c559d9..85e5daa8 100644 --- a/modules/gatk4/splitncigarreads/main.nf +++ b/modules/gatk4/splitncigarreads/main.nf @@ -8,7 +8,7 @@ process GATK4_SPLITNCIGARREADS { 'quay.io/biocontainers/gatk4:4.2.5.0--hdfd78af_0' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(bam), path(bai), path(intervals) path fasta path fai path dict @@ -23,6 +23,7 @@ process GATK4_SPLITNCIGARREADS { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def interval_command = intervals ? "--intervals $intervals" : "" def avail_mem = 3 if (!task.memory) { @@ -35,6 +36,7 @@ process GATK4_SPLITNCIGARREADS { --input $bam \\ --output ${prefix}.bam \\ --reference $fasta \\ + $interval_command \\ --tmp-dir . \\ $args diff --git a/modules/gatk4/splitncigarreads/meta.yml b/modules/gatk4/splitncigarreads/meta.yml index 407e80bd..76bfdcd3 100644 --- a/modules/gatk4/splitncigarreads/meta.yml +++ b/modules/gatk4/splitncigarreads/meta.yml @@ -23,6 +23,13 @@ input: type: list description: BAM/SAM/CRAM file containing reads pattern: "*.{bam,sam,cram}" + - bai: + type: list + description: BAI/SAI/CRAI index file (optional) + pattern: "*.{bai,sai,crai}" + - intervals: + type: file + description: Bed file with the genomic regions included in the library (optional) - fasta: type: file description: The reference fasta file diff --git a/tests/modules/gatk4/splitncigarreads/main.nf b/tests/modules/gatk4/splitncigarreads/main.nf index 7e5b7c9a..31e45cec 100644 --- a/tests/modules/gatk4/splitncigarreads/main.nf +++ b/tests/modules/gatk4/splitncigarreads/main.nf @@ -6,7 +6,23 @@ include { GATK4_SPLITNCIGARREADS } from '../../../../modules/gatk4/splitncigarre workflow test_gatk4_splitncigarreads { input = [ [ id:'test' ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + [], + [] + ] + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + + GATK4_SPLITNCIGARREADS ( input, fasta, fai, dict ) +} + +workflow test_gatk4_splitncigarreads_intervals { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) diff --git a/tests/modules/gatk4/splitncigarreads/test.yml b/tests/modules/gatk4/splitncigarreads/test.yml index c38064e2..d9a58901 100644 --- a/tests/modules/gatk4/splitncigarreads/test.yml +++ b/tests/modules/gatk4/splitncigarreads/test.yml @@ -5,5 +5,14 @@ - gatk4/splitncigarreads files: - path: output/gatk4/test.bam - md5sum: ceed15c0bd64ff5c38d3816905933b0b + md5sum: 436d8e31285c6b588bdd1c7f1d07f6f2 + - path: output/gatk4/versions.yml +- name: gatk4 splitncigarreads test_gatk4_splitncigarreads_intervals + command: nextflow run tests/modules/gatk4/splitncigarreads -entry test_gatk4_splitncigarreads_intervals -c tests/config/nextflow.config + tags: + - gatk4 + - gatk4/splitncigarreads + files: + - path: output/gatk4/test.bam + md5sum: cd56e3225950f519fd47164cca60a0bb - path: output/gatk4/versions.yml From 213403187932dbbdd936a04474cc8cd8abae7a08 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 27 Apr 2022 18:15:11 +0100 Subject: [PATCH 084/313] Bump SAMtools version for custom/getchromsizes (#1572) --- modules/custom/getchromsizes/main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/custom/getchromsizes/main.nf b/modules/custom/getchromsizes/main.nf index bbcfa9be..0eabf3a4 100644 --- a/modules/custom/getchromsizes/main.nf +++ b/modules/custom/getchromsizes/main.nf @@ -2,10 +2,10 @@ process CUSTOM_GETCHROMSIZES { tag "$fasta" label 'process_low' - conda (params.enable_conda ? "bioconda::samtools=1.15" : null) + conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15--h1170115_1' : - 'quay.io/biocontainers/samtools:1.15--h1170115_1' }" + 'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' : + 'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }" input: path fasta From 1b5d3f5ac2ae61ee35dece20a2aeb8018b6438ce Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 27 Apr 2022 19:21:26 +0100 Subject: [PATCH 085/313] Bump STAR version to 2.7.10a for RSEM modules (#1573) * Bump STAR version to 2.7.10a for RSEM modules * Fix tests --- modules/rsem/calculateexpression/main.nf | 6 +++--- modules/rsem/preparereference/main.nf | 6 +++--- tests/config/test_data.config | 4 ++-- tests/modules/rsem/calculateexpression/test.yml | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/rsem/calculateexpression/main.nf b/modules/rsem/calculateexpression/main.nf index cf147a63..1ab3a635 100644 --- a/modules/rsem/calculateexpression/main.nf +++ b/modules/rsem/calculateexpression/main.nf @@ -2,10 +2,10 @@ process RSEM_CALCULATEEXPRESSION { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.6a" : null) + conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.10a" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0' : - 'quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:64aad4a4e144878400649e71f42105311be7ed87-0' : + 'quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:64aad4a4e144878400649e71f42105311be7ed87-0' }" input: tuple val(meta), path(reads) diff --git a/modules/rsem/preparereference/main.nf b/modules/rsem/preparereference/main.nf index 2d2ca205..da11be45 100644 --- a/modules/rsem/preparereference/main.nf +++ b/modules/rsem/preparereference/main.nf @@ -2,10 +2,10 @@ process RSEM_PREPAREREFERENCE { tag "$fasta" label 'process_high' - conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.6a" : null) + conda (params.enable_conda ? "bioconda::rsem=1.3.3 bioconda::star=2.7.10a" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0' : - 'quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:606b713ec440e799d53a2b51a6e79dbfd28ecf3e-0' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:64aad4a4e144878400649e71f42105311be7ed87-0' : + 'quay.io/biocontainers/mulled-v2-cf0123ef83b3c38c13e3b0696a3f285d3f20f15b:64aad4a4e144878400649e71f42105311be7ed87-0' }" input: path fasta, stageAs: "rsem/*" diff --git a/tests/config/test_data.config b/tests/config/test_data.config index f6ea242d..b3171a51 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -245,8 +245,8 @@ params { test2_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2_2.fastq.gz" test2_umi_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2.umi_1.fastq.gz" test2_umi_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2.umi_2.fastq.gz" - test_rnaseq_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.rnaseq_1.fastq.gz" - test_rnaseq_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.rnaseq_2.fastq.gz" + test_rnaseq_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz" + test_rnaseq_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz" test_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test.baserecalibrator.table" test2_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test2.baserecalibrator.table" diff --git a/tests/modules/rsem/calculateexpression/test.yml b/tests/modules/rsem/calculateexpression/test.yml index f19c3398..b0251de9 100644 --- a/tests/modules/rsem/calculateexpression/test.yml +++ b/tests/modules/rsem/calculateexpression/test.yml @@ -42,7 +42,7 @@ - path: output/rsem/rsem/genome.transcripts.fa md5sum: 050c521a2719c2ae48267c1e65218f29 - path: output/rsem/rsem/genomeParameters.txt - md5sum: 2fe3a030e1706c3e8cd4df3818e6dd2f + md5sum: df5a456e3242520cc36e0083a6a7d9dd - path: output/rsem/rsem/sjdbInfo.txt md5sum: 5690ea9d9f09f7ff85b7fd47bd234903 - path: output/rsem/rsem/sjdbList.fromGTF.out.tab @@ -63,4 +63,4 @@ - path: output/rsem/test.stat/test.theta md5sum: de2e4490c98cc5383a86ae8225fd0a28 - path: output/rsem/test.transcript.bam - md5sum: 7846491086c478858419667d60f18edd + md5sum: ed681d39f5700ffc74d6321525330d93 From a5e7943f2be542cd186abbed45fb522546605dd8 Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Wed, 27 Apr 2022 22:43:31 +0200 Subject: [PATCH 086/313] update krona module add "$args" to the module --- modules/krona/kronadb/main.nf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/krona/kronadb/main.nf b/modules/krona/kronadb/main.nf index afcb0694..3ba745a2 100644 --- a/modules/krona/kronadb/main.nf +++ b/modules/krona/kronadb/main.nf @@ -18,7 +18,9 @@ process KRONA_KRONADB { script: def args = task.ext.args ?: '' """ - ktUpdateTaxonomy.sh taxonomy + ktUpdateTaxonomy.sh \\ + $args \\ + taxonomy cat <<-END_VERSIONS > versions.yml "${task.process}": From 839ee59ca1646d055dced78125d88d8a864cf651 Mon Sep 17 00:00:00 2001 From: jvhagey Date: Wed, 27 Apr 2022 18:01:28 -0400 Subject: [PATCH 087/313] adding srst2 module --- modules/srst2/srst2/main.nf | 47 ++++++++++++++++ modules/srst2/srst2/meta.yml | 68 +++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/srst2/srst2/main.nf | 28 ++++++++++ tests/modules/srst2/srst2/nextflow.config | 5 ++ tests/modules/srst2/srst2/test.yml | 29 ++++++++++ 6 files changed, 181 insertions(+) create mode 100644 modules/srst2/srst2/main.nf create mode 100644 modules/srst2/srst2/meta.yml create mode 100644 tests/modules/srst2/srst2/main.nf create mode 100644 tests/modules/srst2/srst2/nextflow.config create mode 100644 tests/modules/srst2/srst2/test.yml diff --git a/modules/srst2/srst2/main.nf b/modules/srst2/srst2/main.nf new file mode 100644 index 00000000..fc665fad --- /dev/null +++ b/modules/srst2/srst2/main.nf @@ -0,0 +1,47 @@ +process SRST2_SRST2 { + tag "${meta.id}" + label 'process_low' + + conda (params.enable_conda ? "bioconda::srst2=0.2.0" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/srst2%3A0.2.0--py_4': + 'quay.io/biocontainers/srst2:0.2.0--py_4'}" + + input: + tuple val(meta), path(fastq_s), path(db) + + output: + tuple val(meta), path("*_genes_*_results.txt") , emit: gene_results + tuple val(meta), path("*_fullgenes_*_results.txt") , optional:true, emit: fullgene_results + tuple val(meta), path("*.pileup") , emit: pileup + tuple val(meta), path("*.sorted.bam") , emit: sorted_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}" + def read_s = meta.single_end ? "--input_se ${fastq_s}" : "--input_pe ${fastq_s[0]} ${fastq_s[1]}" + if (meta.db=="gene") { + database = "--gene_db ${db}" + } else if (meta.db=="mlst") { + database = "--mlst_db ${db}" + } else { + return + } + """ + srst2 \\ + ${read_s} \\ + --threads $task.cpus \\ + --output ${prefix} \\ + ${database} \\ + $args + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + srst2: \$(echo \$(srst2 --version 2>&1) | sed 's/srst2 //' )) + END_VERSIONS + """ +} diff --git a/modules/srst2/srst2/meta.yml b/modules/srst2/srst2/meta.yml new file mode 100644 index 00000000..2c44f53d --- /dev/null +++ b/modules/srst2/srst2/meta.yml @@ -0,0 +1,68 @@ +name: srst2_srst2 +description: | + Short Read Sequence Typing for Bacterial Pathogens is a program designed to take Illumina sequence data, + a MLST database and/or a database of gene sequences (e.g. resistance genes, virulence genes, etc) + and report the presence of STs and/or reference genes. +keywords: + - mlst + - typing + - illumina +tools: + - srst2: + description: "Short Read Sequence Typing for Bacterial Pathogens" + homepage: {http://katholt.github.io/srst2/} + documentation: {https://github.com/katholt/srst2/blob/master/README.md} + tool_dev_url: {https://github.com/katholt/srst2} + doi: "" + licence: ['BSD'] + +input: + - meta: + type: map0.2.0-4 + description: | + Groovy Map containing sample information + id: should be the identification number or sample name + single_end: should be true for single end data and false for paired in data + db: should be either 'gene' to use the --gene_db option or "mlst" to use the --mlst_db option + e.g. [ id:'sample', single_end:false , db:'gene'] + - fasta: + type: file + description: | + gzipped fasta file. If files are NOT in + MiSeq format sample_S1_L001_R1_001.fastq.gz uses --forward and --reverse parameters; otherwise + default is _1, i.e. expect forward reads as sample_1.fastq.gz). + pattern: "*.fastq.gz" + - db: + type: file + description: Database in FASTA format + pattern: "*.fasta" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'sample', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - txt: + type: file + description: results text file + pattern: "*_fullgenes_*_results.txt" + - txt: + type: file + description: results text file + pattern: "*_genes_*_results.txt" + - bam: + type: file + description: Sorted BAM file + pattern: "*.sorted.bam" + - pileup: + type: file + description: SAMtools pileup file + pattern: "*.pileup" + +authors: + - "@jvhagey" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 4d8ce0b5..66f50903 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1767,6 +1767,10 @@ sratools/prefetch: - modules/sratools/prefetch/** - tests/modules/sratools/prefetch/** +srst2/srst2: + - modules/srst2/srst2/** + - tests/modules/srst2/srst2/** + ssuissero: - modules/ssuissero/** - tests/modules/ssuissero/** diff --git a/tests/modules/srst2/srst2/main.nf b/tests/modules/srst2/srst2/main.nf new file mode 100644 index 00000000..235f3ff9 --- /dev/null +++ b/tests/modules/srst2/srst2/main.nf @@ -0,0 +1,28 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SRST2_SRST2 } from '../../../../modules/srst2/srst2/main.nf' + +workflow test_srst2_srst2_paired_end { + + input = [ + [ id:'test', single_end:false, db:"gene"], // meta map + [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_1_fastq_gz'], checkIfExists: true), + file(params.test_data['bacteroides_fragilis']['illumina']['test1_2_fastq_gz'], checkIfExists: true) ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/resFinder_20180221_srst2.fasta') // Change to params.test_data syntax after the data is included in tests/config/test_data.config + ] + + SRST2_SRST2(input) +} + +workflow test_srst2_srst2_single_end { + + input = [ + [ id:'test', single_end:true, db:"gene" ], // meta map + file(params.test_data['bacteroides_fragilis']['illumina']['test1_1_fastq_gz'], checkIfExists: true), + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/resFinder_20180221_srst2.fasta') // Change to params.test_data syntax after the data is included in tests/config/test_data.config + ] + + SRST2_SRST2(input) +} \ No newline at end of file diff --git a/tests/modules/srst2/srst2/nextflow.config b/tests/modules/srst2/srst2/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/srst2/srst2/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/srst2/srst2/test.yml b/tests/modules/srst2/srst2/test.yml new file mode 100644 index 00000000..7afd0687 --- /dev/null +++ b/tests/modules/srst2/srst2/test.yml @@ -0,0 +1,29 @@ +- name: srst2 srst2 test_srst2_srst2_paired_end + command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_paired_end -c tests/config/nextflow.config + tags: + - srst2/srst2 + - srst2 + files: + - path: /tmp/tmp03v2z3fu/srst2/test__genes__resFinder_20180221_srst2__results.txt + md5sum: 099aa6cacec5524b311f606debdfb3a9 + - path: /tmp/tmp03v2z3fu/srst2/test__test1.resFinder_20180221_srst2.pileup + md5sum: 64b512ff495b828c456405ec7b676ad1 + - path: /tmp/tmp03v2z3fu/srst2/test__test1.resFinder_20180221_srst2.sorted.bam + - path: /tmp/tmp03v2z3fu/srst2/versions.yml + md5sum: b446a70f1a2b4f60757829bcd744a214 + +- name: srst2 srst2 test_srst2_srst2_single_end + command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_single_end -c tests/config/nextflow.config + tags: + - srst2/srst2 + - srst2 + files: + - path: /tmp/tmp3kabyta4/srst2/test__fullgenes__resFinder_20180221_srst2__results.txt + md5sum: d0762ef8c38afd0e0a34cce52ed1a3db + - path: /tmp/tmp3kabyta4/srst2/test__genes__resFinder_20180221_srst2__results.txt + md5sum: b8850c6644406d8b131e471ecc3f9013 + - path: /tmp/tmp3kabyta4/srst2/test__test1_1.resFinder_20180221_srst2.pileup + md5sum: 5f6279dc8124aa762a9dfe3d7a871277 + - path: /tmp/tmp3kabyta4/srst2/test__test1_1.resFinder_20180221_srst2.sorted.bam + - path: /tmp/tmp3kabyta4/srst2/versions.yml + md5sum: 790fe00493c6634d17801a930073218b From a575b91254480f964aa4e105f8fab09d0ecd8451 Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Wed, 27 Apr 2022 19:54:33 -0400 Subject: [PATCH 088/313] Update test.yml --- tests/modules/srst2/srst2/test.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/modules/srst2/srst2/test.yml b/tests/modules/srst2/srst2/test.yml index 7afd0687..f7d058de 100644 --- a/tests/modules/srst2/srst2/test.yml +++ b/tests/modules/srst2/srst2/test.yml @@ -1,29 +1,29 @@ - name: srst2 srst2 test_srst2_srst2_paired_end command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_paired_end -c tests/config/nextflow.config tags: - - srst2/srst2 - srst2 + - srst2/srst2 files: - - path: /tmp/tmp03v2z3fu/srst2/test__genes__resFinder_20180221_srst2__results.txt + - path: /tmp/tmpsqtj3g4l/srst2/test__genes__resFinder_20180221_srst2__results.txt md5sum: 099aa6cacec5524b311f606debdfb3a9 - - path: /tmp/tmp03v2z3fu/srst2/test__test1.resFinder_20180221_srst2.pileup + - path: /tmp/tmpsqtj3g4l/srst2/test__test1.resFinder_20180221_srst2.pileup md5sum: 64b512ff495b828c456405ec7b676ad1 - - path: /tmp/tmp03v2z3fu/srst2/test__test1.resFinder_20180221_srst2.sorted.bam - - path: /tmp/tmp03v2z3fu/srst2/versions.yml + - path: /tmp/tmpsqtj3g4l/srst2/test__test1.resFinder_20180221_srst2.sorted.bam + - path: /tmp/tmpsqtj3g4l/srst2/versions.yml md5sum: b446a70f1a2b4f60757829bcd744a214 - name: srst2 srst2 test_srst2_srst2_single_end command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_single_end -c tests/config/nextflow.config tags: - - srst2/srst2 - srst2 + - srst2/srst2 files: - - path: /tmp/tmp3kabyta4/srst2/test__fullgenes__resFinder_20180221_srst2__results.txt + - path: /tmp/tmpo9au1v02/srst2/test__fullgenes__resFinder_20180221_srst2__results.txt md5sum: d0762ef8c38afd0e0a34cce52ed1a3db - - path: /tmp/tmp3kabyta4/srst2/test__genes__resFinder_20180221_srst2__results.txt + - path: /tmp/tmpo9au1v02/srst2/test__genes__resFinder_20180221_srst2__results.txt md5sum: b8850c6644406d8b131e471ecc3f9013 - - path: /tmp/tmp3kabyta4/srst2/test__test1_1.resFinder_20180221_srst2.pileup + - path: /tmp/tmpo9au1v02/srst2/test__test1_1.resFinder_20180221_srst2.pileup md5sum: 5f6279dc8124aa762a9dfe3d7a871277 - - path: /tmp/tmp3kabyta4/srst2/test__test1_1.resFinder_20180221_srst2.sorted.bam - - path: /tmp/tmp3kabyta4/srst2/versions.yml + - path: /tmp/tmpo9au1v02/srst2/test__test1_1.resFinder_20180221_srst2.sorted.bam + - path: /tmp/tmpo9au1v02/srst2/versions.yml md5sum: 790fe00493c6634d17801a930073218b From ecd31fd3cdc1646bb80e5b04a52cfc3e4666b18b Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Wed, 27 Apr 2022 19:55:42 -0400 Subject: [PATCH 089/313] remove whitespaces and prettier fix --- modules/srst2/srst2/meta.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/srst2/srst2/meta.yml b/modules/srst2/srst2/meta.yml index 2c44f53d..31cf4de0 100644 --- a/modules/srst2/srst2/meta.yml +++ b/modules/srst2/srst2/meta.yml @@ -1,7 +1,7 @@ name: srst2_srst2 description: | - Short Read Sequence Typing for Bacterial Pathogens is a program designed to take Illumina sequence data, - a MLST database and/or a database of gene sequences (e.g. resistance genes, virulence genes, etc) + Short Read Sequence Typing for Bacterial Pathogens is a program designed to take Illumina sequence data, + a MLST database and/or a database of gene sequences (e.g. resistance genes, virulence genes, etc) and report the presence of STs and/or reference genes. keywords: - mlst @@ -10,11 +10,11 @@ keywords: tools: - srst2: description: "Short Read Sequence Typing for Bacterial Pathogens" - homepage: {http://katholt.github.io/srst2/} - documentation: {https://github.com/katholt/srst2/blob/master/README.md} - tool_dev_url: {https://github.com/katholt/srst2} + homepage: { http://katholt.github.io/srst2/ } + documentation: { https://github.com/katholt/srst2/blob/master/README.md } + tool_dev_url: { https://github.com/katholt/srst2 } doi: "" - licence: ['BSD'] + licence: ["BSD"] input: - meta: @@ -49,11 +49,11 @@ output: pattern: "versions.yml" - txt: type: file - description: results text file + description: results text file pattern: "*_fullgenes_*_results.txt" - txt: type: file - description: results text file + description: results text file pattern: "*_genes_*_results.txt" - bam: type: file From b0c5f9422bf4f48a6799b42e9302fe71c0e9bf0f Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Wed, 27 Apr 2022 20:21:41 -0400 Subject: [PATCH 090/313] tmp/ to changed to output/ --- tests/modules/srst2/srst2/test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/modules/srst2/srst2/test.yml b/tests/modules/srst2/srst2/test.yml index f7d058de..f011b4d1 100644 --- a/tests/modules/srst2/srst2/test.yml +++ b/tests/modules/srst2/srst2/test.yml @@ -4,12 +4,12 @@ - srst2 - srst2/srst2 files: - - path: /tmp/tmpsqtj3g4l/srst2/test__genes__resFinder_20180221_srst2__results.txt + - path: output/srst2/test__genes__resFinder_20180221_srst2__results.txt md5sum: 099aa6cacec5524b311f606debdfb3a9 - - path: /tmp/tmpsqtj3g4l/srst2/test__test1.resFinder_20180221_srst2.pileup + - path: output/srst2/test__test1.resFinder_20180221_srst2.pileup md5sum: 64b512ff495b828c456405ec7b676ad1 - - path: /tmp/tmpsqtj3g4l/srst2/test__test1.resFinder_20180221_srst2.sorted.bam - - path: /tmp/tmpsqtj3g4l/srst2/versions.yml + - path: output/srst2/test__test1.resFinder_20180221_srst2.sorted.bam + - path: output/srst2/versions.yml md5sum: b446a70f1a2b4f60757829bcd744a214 - name: srst2 srst2 test_srst2_srst2_single_end @@ -18,12 +18,12 @@ - srst2 - srst2/srst2 files: - - path: /tmp/tmpo9au1v02/srst2/test__fullgenes__resFinder_20180221_srst2__results.txt + - path: output/srst2/test__fullgenes__resFinder_20180221_srst2__results.txt md5sum: d0762ef8c38afd0e0a34cce52ed1a3db - - path: /tmp/tmpo9au1v02/srst2/test__genes__resFinder_20180221_srst2__results.txt + - path: output/srst2/test__genes__resFinder_20180221_srst2__results.txt md5sum: b8850c6644406d8b131e471ecc3f9013 - - path: /tmp/tmpo9au1v02/srst2/test__test1_1.resFinder_20180221_srst2.pileup + - path: output/srst2/test__test1_1.resFinder_20180221_srst2.pileup md5sum: 5f6279dc8124aa762a9dfe3d7a871277 - - path: /tmp/tmpo9au1v02/srst2/test__test1_1.resFinder_20180221_srst2.sorted.bam - - path: /tmp/tmpo9au1v02/srst2/versions.yml + - path: output/srst2/test__test1_1.resFinder_20180221_srst2.sorted.bam + - path: output/srst2/versions.yml md5sum: 790fe00493c6634d17801a930073218b From 85c49a971f91208ead572212be8475f5e7518feb Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 09:07:52 +0200 Subject: [PATCH 091/313] Fixed an issue with wrong file order --- modules/vardictjava/main.nf | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 8170bf76..855784db 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -8,9 +8,8 @@ process VARDICTJAVA { 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(bam), path(regions_of_interest) path(reference_fasta) - path(regions_of_interest) output: tuple val(meta), path("*.vcf"), emit: vcf @@ -24,6 +23,9 @@ process VARDICTJAVA { def prefix = task.ext.prefix ?: "${meta.id}" """ + head -n 20 $reference_fasta + cat $reference_fasta | wc -l + vardict-java \\ $args \\ -b $bam \\ @@ -31,10 +33,11 @@ process VARDICTJAVA { -n $prefix \\ -G $reference_fasta \\ $regions_of_interest \\ + > ${prefix}.vcf cat <<-END_VERSIONS > versions.yml "${task.process}": - vardictjava: \$(echo 1.8.3) + vardict-java: \$(echo 1.8.3) END_VERSIONS """ } From db43095b1a1530af1e3cac7f3e7211c52d87bbd7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 09:18:15 +0200 Subject: [PATCH 092/313] Split the bed file into a seperate input --- modules/vardictjava/main.nf | 8 +++----- tests/modules/vardictjava/main.nf | 14 +++++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 855784db..e1098b22 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -8,7 +8,8 @@ process VARDICTJAVA { 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" input: - tuple val(meta), path(bam), path(regions_of_interest) + tuple val(meta), path(bam) + path(regions_of_interest) path(reference_fasta) output: @@ -23,14 +24,11 @@ process VARDICTJAVA { def prefix = task.ext.prefix ?: "${meta.id}" """ - head -n 20 $reference_fasta - cat $reference_fasta | wc -l - vardict-java \\ $args \\ -b $bam \\ -th $task.cpus \\ - -n $prefix \\ + -N $prefix \\ -G $reference_fasta \\ $regions_of_interest \\ > ${prefix}.vcf diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf index 7511b529..647c8bba 100644 --- a/tests/modules/vardictjava/main.nf +++ b/tests/modules/vardictjava/main.nf @@ -6,14 +6,14 @@ include { VARDICTJAVA } from '../../../modules/vardictjava/main.nf' workflow test_vardictjava { - input = [ + bam_input_ch = Channel.of([ [ id:'test', single_end:false ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) - ] + ]) - VARDICTJAVA ( - input, - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) - ) + bed = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + + VARDICTJAVA ( bam_input_ch, bed, fasta ) } From def580ddb7af11619f8f0757ef5af5ed156ed6a4 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 09:28:57 +0200 Subject: [PATCH 093/313] Add gzip for compressed output --- modules/vardictjava/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index e1098b22..425c1706 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -31,7 +31,7 @@ process VARDICTJAVA { -N $prefix \\ -G $reference_fasta \\ $regions_of_interest \\ - > ${prefix}.vcf + | gzip -c > ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml "${task.process}": From 484c8f5dfa40a2117997afcd8434bcd52ff4fe4e Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 09:29:27 +0200 Subject: [PATCH 094/313] Update meta.yml --- modules/vardictjava/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 7820a877..5bc21b55 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -53,7 +53,7 @@ output: - vcf: type: file description: VCF file output - pattern: "*.vcf" + pattern: "*.vcf.gz" authors: - "@nvnieuwk" From 2b29ff5883278856200f003328ece8d4897548bc Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:03:02 +0200 Subject: [PATCH 095/313] drop params.options --- subworkflows/nf-core/bam_qc_picard/main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 31edb2c3..b8a92a21 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -4,9 +4,9 @@ params.options = [:] -include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picardcollectmultiplemetrics/main' addParams( options: params.options ) -include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picardcollectwgsmetrics/main' addParams( options: params.options ) -include { PICARD_COLLECTHSMETRICS } from '../../../modules/picardcollecthsmetrics/main' addParams( options: params.options ) +include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picardcollectmultiplemetrics/main' +include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picardcollectwgsmetrics/main' +include { PICARD_COLLECTHSMETRICS } from '../../../modules/picardcollecthsmetrics/main' workflow BAM_QC_PICARD { take: From 8fb8199f3115c1a7f136202882b39be403ac5cd5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:05:07 +0200 Subject: [PATCH 096/313] fix copilot suggestion --- subworkflows/nf-core/bam_qc_picard/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index b8a92a21..e4a7e5f0 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -22,10 +22,10 @@ workflow BAM_QC_PICARD { ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) if (!ch_bait_interval.isEmpty() || !ch_target_interval.isEmpty()) { if (ch_bait_interval.isEmpty()) { - throw new Error("Bait interval channel is empty") + log.error("Bait interval channel is empty") } if (ch_target_interval.isEmpty()) { - throw new Error("Target interval channel is empty") + log.error("Target interval channel is empty") } PICARD_COLLECTHSMETRICS( ch_bam_bai, ch_fasta, ch_bait_interval, ch_target_interval ) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) From 433aaece46967b56ba6a4c937ce1c8b0706b260e Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:05:31 +0200 Subject: [PATCH 097/313] Update tests/subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- tests/subworkflows/nf-core/bam_qc_picard/main.nf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/subworkflows/nf-core/bam_qc_picard/main.nf b/tests/subworkflows/nf-core/bam_qc_picard/main.nf index d88f2bf9..9112416b 100644 --- a/tests/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/tests/subworkflows/nf-core/bam_qc_picard/main.nf @@ -16,6 +16,8 @@ workflow test_bam_qc_picard_targetted { input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] + bait = file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true) + target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) - BAM_QC_PICARD ( input, [], file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true), file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) ) + BAM_QC_PICARD ( input, [], bait, target ) } From 3cbf5c63e5677491377f23e6dda20443804a8158 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:09:25 +0200 Subject: [PATCH 098/313] Update subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- subworkflows/nf-core/bam_qc_picard/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index e4a7e5f0..851268c6 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -20,7 +20,7 @@ workflow BAM_QC_PICARD { PICARD_COLLECTMULTIPLEMETRICS( ch_bam_bai, ch_fasta] ) ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) - if (!ch_bait_interval.isEmpty() || !ch_target_interval.isEmpty()) { + if (ch_bait_interval || ch_target_interval) { if (ch_bait_interval.isEmpty()) { log.error("Bait interval channel is empty") } From 881e9db4bfde569c8e9c0d51a1b3916817610fc0 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:19:30 +0200 Subject: [PATCH 099/313] update tests --- subworkflows/nf-core/bam_qc_picard/meta.yml | 2 +- tests/subworkflows/nf-core/bam_qc_picard/main.nf | 12 +++++++----- tests/subworkflows/nf-core/bam_qc_picard/test.yml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml index 77104e82..c4422150 100644 --- a/subworkflows/nf-core/bam_qc_picard/meta.yml +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -47,7 +47,7 @@ output: - hs_metrics: type: file description: Alignment metrics files generated by picard CollectHsMetrics - pattern: "*_collecthsmetrics.txt" + pattern: "*_metrics.txt" - wgs_metrics: type: file description: Alignment metrics files generated by picard CollectWgsMetrics diff --git a/tests/subworkflows/nf-core/bam_qc_picard/main.nf b/tests/subworkflows/nf-core/bam_qc_picard/main.nf index 9112416b..03696b44 100644 --- a/tests/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/tests/subworkflows/nf-core/bam_qc_picard/main.nf @@ -6,18 +6,20 @@ include { BAM_QC_PICARD } from '../../../../subworkflows/nf-core/bam_qc_picard/m workflow test_bam_qc_picard_wgs { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - BAM_QC_PICARD ( input, [], [], [] ) + BAM_QC_PICARD ( input, fasta, [], [] ) } workflow test_bam_qc_picard_targetted { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) bait = file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true) - target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) + target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) - BAM_QC_PICARD ( input, [], bait, target ) + BAM_QC_PICARD ( input, fasta, bait, target ) } diff --git a/tests/subworkflows/nf-core/bam_qc_picard/test.yml b/tests/subworkflows/nf-core/bam_qc_picard/test.yml index af98230d..7b0a6c2b 100644 --- a/tests/subworkflows/nf-core/bam_qc_picard/test.yml +++ b/tests/subworkflows/nf-core/bam_qc_picard/test.yml @@ -30,4 +30,4 @@ - path: ./output/picard/test.CollectMultipleMetrics.base_distribution_by_cycle_metrics - path: ./output/picard/test.CollectMultipleMetrics.quality_by_cycle_metrics - path: ./output/picard/test.CollectMultipleMetrics.quality_distribution_metrics - - path: ./output/picard/test_collecthsmetrics.txt + - path: ./output/picard/test.CollectHsMetrics.coverage_metrics From b92efb7abfc77cb8d9b4149c5fb866409122ce05 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 10:21:47 +0200 Subject: [PATCH 100/313] add nextflow.config --- tests/subworkflows/nf-core/bam_qc_picard/nextflow.config | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tests/subworkflows/nf-core/bam_qc_picard/nextflow.config diff --git a/tests/subworkflows/nf-core/bam_qc_picard/nextflow.config b/tests/subworkflows/nf-core/bam_qc_picard/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/subworkflows/nf-core/bam_qc_picard/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} From 9df830f79dc70a347578120e797a4e3160dfc66d Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 10:23:07 +0200 Subject: [PATCH 101/313] Added the .bai and .fai files --- modules/vardictjava/main.nf | 8 ++++---- tests/modules/vardictjava/main.nf | 12 ++++++++---- tests/modules/vardictjava/test.yml | 15 ++++++--------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 425c1706..c370b6ef 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -8,12 +8,12 @@ process VARDICTJAVA { 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" input: - tuple val(meta), path(bam) + tuple val(meta), path(bam), path(bai) path(regions_of_interest) - path(reference_fasta) + tuple path(reference_fasta), path(reference_fai) output: - tuple val(meta), path("*.vcf"), emit: vcf + tuple val(meta), path("*.vcf.gz"), emit: vcf path "versions.yml" , emit: versions when: @@ -30,7 +30,7 @@ process VARDICTJAVA { -th $task.cpus \\ -N $prefix \\ -G $reference_fasta \\ - $regions_of_interest \\ + $regions_of_interest | gzip -c > ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf index 647c8bba..89eec407 100644 --- a/tests/modules/vardictjava/main.nf +++ b/tests/modules/vardictjava/main.nf @@ -8,12 +8,16 @@ workflow test_vardictjava { bam_input_ch = Channel.of([ [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ]) - bed = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + bed = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true) - fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + reference = Channel.of([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) - VARDICTJAVA ( bam_input_ch, bed, fasta ) + VARDICTJAVA ( bam_input_ch, bed, reference ) } diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml index 001a56e8..77aa9047 100644 --- a/tests/modules/vardictjava/test.yml +++ b/tests/modules/vardictjava/test.yml @@ -1,12 +1,9 @@ -## TODO nf-core: Please run the following command to build this file: -# nf-core modules create-test-yml vardictjava -- name: "vardictjava" - command: nextflow run ./tests/modules/vardictjava -entry test_vardictjava -c ./tests/config/nextflow.config -c ./tests/modules/vardictjava/nextflow.config +- name: vardictjava test_vardictjava + command: nextflow run tests/modules/vardictjava -entry test_vardictjava -c tests/config/nextflow.config tags: - - "vardictjava" - # + - vardictjava files: - - path: "output/vardictjava/test.vcf" - md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/vardictjava/test.vcf.gz + md5sum: 2179dcaee6183495b421293f42db11b5 - path: output/vardictjava/versions.yml - md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b + md5sum: aac455b8c9c9194c5fed80e4fd495b96 From dee8ec9e911ec848e93c8ed0b9667e7c674e9132 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 12:53:17 +0200 Subject: [PATCH 102/313] fix typos --- subworkflows/nf-core/bam_qc_picard/main.nf | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 851268c6..747d5995 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -2,11 +2,9 @@ // Run QC steps on BAM/CRAM files using Picard // -params.options = [:] - -include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picardcollectmultiplemetrics/main' -include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picardcollectwgsmetrics/main' -include { PICARD_COLLECTHSMETRICS } from '../../../modules/picardcollecthsmetrics/main' +include { PICARD_COLLECTMULTIPLEMETRICS } from '../../../modules/picard/collectmultiplemetrics/main' +include { PICARD_COLLECTWGSMETRICS } from '../../../modules/picard/collectwgsmetrics/main' +include { PICARD_COLLECTHSMETRICS } from '../../../modules/picard/collecthsmetrics/main' workflow BAM_QC_PICARD { take: @@ -18,7 +16,7 @@ workflow BAM_QC_PICARD { main: ch_versions = Channel.empty() - PICARD_COLLECTMULTIPLEMETRICS( ch_bam_bai, ch_fasta] ) + PICARD_COLLECTMULTIPLEMETRICS( ch_bam_bai, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) if (ch_bait_interval || ch_target_interval) { if (ch_bait_interval.isEmpty()) { From 45b4a61a15c8b7ac6c29a447ccc1ece9f08f8efe Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 13:31:37 +0200 Subject: [PATCH 103/313] Some small updates --- modules/vardictjava/main.nf | 2 +- tests/modules/vardictjava/main.nf | 8 ++++---- tests/modules/vardictjava/test.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index c370b6ef..26833436 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -30,7 +30,7 @@ process VARDICTJAVA { -th $task.cpus \\ -N $prefix \\ -G $reference_fasta \\ - $regions_of_interest + $regions_of_interest \\ | gzip -c > ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf index 89eec407..d392358a 100644 --- a/tests/modules/vardictjava/main.nf +++ b/tests/modules/vardictjava/main.nf @@ -6,15 +6,15 @@ include { VARDICTJAVA } from '../../../modules/vardictjava/main.nf' workflow test_vardictjava { - bam_input_ch = Channel.of([ - [ id:'test', single_end:false ], // meta map + bam_input_ch = Channel.value([ + [ id:'test' ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ]) - bed = file(params.test_data['homo_sapiens']['genome']['genome_bed_gz'], checkIfExists: true) + bed = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)) - reference = Channel.of([ + reference = Channel.value([ file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ]) diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml index 77aa9047..0bd21f4e 100644 --- a/tests/modules/vardictjava/test.yml +++ b/tests/modules/vardictjava/test.yml @@ -4,6 +4,6 @@ - vardictjava files: - path: output/vardictjava/test.vcf.gz - md5sum: 2179dcaee6183495b421293f42db11b5 + md5sum: 7029066c27ac6f5ef18d660d5741979a - path: output/vardictjava/versions.yml md5sum: aac455b8c9c9194c5fed80e4fd495b96 From 68f1c27169946f931ea4318911de5681f88b2961 Mon Sep 17 00:00:00 2001 From: Praveen Raj S <43108054+praveenraj2018@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:41:20 +0200 Subject: [PATCH 104/313] Changed tbi as optional output in GATK4 HaplotypeCaller (#1576) * Changed tbi as optional output. HC cannot index a VCF from large chromosomes. * Apply suggestions from code review * Update modules/gatk4/haplotypecaller/main.nf Co-authored-by: Maxime U. Garcia --- modules/gatk4/haplotypecaller/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gatk4/haplotypecaller/main.nf b/modules/gatk4/haplotypecaller/main.nf index 57f69ecd..2cd9e7d4 100644 --- a/modules/gatk4/haplotypecaller/main.nf +++ b/modules/gatk4/haplotypecaller/main.nf @@ -17,7 +17,7 @@ process GATK4_HAPLOTYPECALLER { output: tuple val(meta), path("*.vcf.gz"), emit: vcf - tuple val(meta), path("*.tbi") , emit: tbi + tuple val(meta), path("*.tbi") , optional:true, emit: tbi path "versions.yml" , emit: versions when: From e0a8af869324765ec0c6a375703bfa68f5ba4e77 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:42:14 +0200 Subject: [PATCH 105/313] fix outputs --- subworkflows/nf-core/bam_qc_picard/main.nf | 14 ++++++++------ subworkflows/nf-core/bam_qc_picard/meta.yml | 8 ++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 747d5995..13f4a845 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -8,7 +8,7 @@ include { PICARD_COLLECTHSMETRICS } from '../../../modules/picard/collecth workflow BAM_QC_PICARD { take: - ch_bam_bai // channel: [ val(meta), [ bam ], [bai/csi] ] + ch_bam // channel: [ val(meta), [ bam ]] ch_fasta // channel: [ fasta ] ch_bait_interval // channel: [ bait_interval ] ch_target_interval // channel: [ target_interval ] @@ -16,7 +16,7 @@ workflow BAM_QC_PICARD { main: ch_versions = Channel.empty() - PICARD_COLLECTMULTIPLEMETRICS( ch_bam_bai, ch_fasta ) + PICARD_COLLECTMULTIPLEMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) if (ch_bait_interval || ch_target_interval) { if (ch_bait_interval.isEmpty()) { @@ -25,16 +25,18 @@ workflow BAM_QC_PICARD { if (ch_target_interval.isEmpty()) { log.error("Target interval channel is empty") } - PICARD_COLLECTHSMETRICS( ch_bam_bai, ch_fasta, ch_bait_interval, ch_target_interval ) + PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_bait_interval, ch_target_interval ) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { - PICARD_COLLECTWGSMETRICS( ch_bam_bai, ch_fasta ) + PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) } + ch_coverage_metrics = Channel.empty() + ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.coverage_metrics.first(), PICARD_COLLECTWGSMETRICS.out.coverage_metrics.first()) + emit: - hs_metrics = PICARD_COLLECTHSMETRICS.out.hs_metrics // channel: [ val(meta), [ hs_metrics ] ] - wgs_metrics = PICARD_COLLECTWGSMETRICS.out.metrics // channel: [ val(meta), [ wgs_metrics ] ] + coverage_metrics = PICARD_COLLECTWGSMETRICS.out.metrics // channel: [ val(meta), [ coverage_metrics ] ] multiple_metrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics // channel: [ val(meta), [ multiple_metrics ] ] versions = ch_versions // channel: [ versions.yml ] diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml index c4422150..67d3496e 100644 --- a/subworkflows/nf-core/bam_qc_picard/meta.yml +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -44,14 +44,10 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - hs_metrics: + - coverage_metrics: type: file - description: Alignment metrics files generated by picard CollectHsMetrics + description: Alignment metrics files generated by picard CollectHsMetrics or CollectWgsMetrics pattern: "*_metrics.txt" - - wgs_metrics: - type: file - description: Alignment metrics files generated by picard CollectWgsMetrics - pattern: "*_{metrics}" - multiple_metrics: type: file description: Alignment metrics files generated by picard CollectMultipleMetrics From 55dfe1d8ab35873790c13ee4eb75af818fef80b2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:43:59 +0200 Subject: [PATCH 106/313] fix hsmetrics input --- subworkflows/nf-core/bam_qc_picard/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 13f4a845..9e429448 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -25,7 +25,7 @@ workflow BAM_QC_PICARD { if (ch_target_interval.isEmpty()) { log.error("Target interval channel is empty") } - PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_bait_interval, ch_target_interval ) + PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, [], ch_bait_interval, ch_target_interval ) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) From 8ad861a645e86c411b47472616a924063afba106 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:52:03 +0200 Subject: [PATCH 107/313] add fasta index --- subworkflows/nf-core/bam_qc_picard/main.nf | 12 +++++++----- subworkflows/nf-core/bam_qc_picard/meta.yml | 10 +++++----- tests/subworkflows/nf-core/bam_qc_picard/main.nf | 12 +++++++----- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 9e429448..e6f82feb 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -10,14 +10,17 @@ workflow BAM_QC_PICARD { take: ch_bam // channel: [ val(meta), [ bam ]] ch_fasta // channel: [ fasta ] + ch_fasta_faix // channel: [ fasta_fai ] ch_bait_interval // channel: [ bait_interval ] ch_target_interval // channel: [ target_interval ] main: ch_versions = Channel.empty() + ch_coverage_metrics = Channel.empty() PICARD_COLLECTMULTIPLEMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) + if (ch_bait_interval || ch_target_interval) { if (ch_bait_interval.isEmpty()) { log.error("Bait interval channel is empty") @@ -26,18 +29,17 @@ workflow BAM_QC_PICARD { log.error("Target interval channel is empty") } PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, [], ch_bait_interval, ch_target_interval ) + ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.coverage_metrics.first()) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) + ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.coverage_metrics.first()) } - ch_coverage_metrics = Channel.empty() - ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.coverage_metrics.first(), PICARD_COLLECTWGSMETRICS.out.coverage_metrics.first()) - emit: - coverage_metrics = PICARD_COLLECTWGSMETRICS.out.metrics // channel: [ val(meta), [ coverage_metrics ] ] + coverage_metrics = ch_coverage_metrics // channel: [ val(meta), [ coverage_metrics ] ] multiple_metrics = PICARD_COLLECTMULTIPLEMETRICS.out.metrics // channel: [ val(meta), [ multiple_metrics ] ] - versions = ch_versions // channel: [ versions.yml ] + versions = ch_versions // channel: [ versions.yml ] } diff --git a/subworkflows/nf-core/bam_qc_picard/meta.yml b/subworkflows/nf-core/bam_qc_picard/meta.yml index 67d3496e..c45215d1 100644 --- a/subworkflows/nf-core/bam_qc_picard/meta.yml +++ b/subworkflows/nf-core/bam_qc_picard/meta.yml @@ -22,14 +22,14 @@ input: type: file description: BAM/CRAM/SAM file pattern: "*.{bam,cram,sam}" - - bai: - type: file - description: Index for BAM/CRAM/SAM file - pattern: "*.{bai,crai,sai}" - fasta: type: optional file - description: Reference file the CRAM was created with + description: Reference fasta file pattern: "*.{fasta,fa}" + - fasta_fai: + type: optional file + description: Reference fasta file index + pattern: "*.{fasta,fa}.fai" - bait_intervals: type: optional file description: An interval list file that contains the locations of the baits used. diff --git a/tests/subworkflows/nf-core/bam_qc_picard/main.nf b/tests/subworkflows/nf-core/bam_qc_picard/main.nf index 03696b44..a3e2ed62 100644 --- a/tests/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/tests/subworkflows/nf-core/bam_qc_picard/main.nf @@ -9,17 +9,19 @@ workflow test_bam_qc_picard_wgs { file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta_fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - BAM_QC_PICARD ( input, fasta, [], [] ) + BAM_QC_PICARD ( input, fasta, fasta_fai, [], [] ) } workflow test_bam_qc_picard_targetted { input = [ [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - bait = file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true) - target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + fasta_fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + bait = file(params.test_data['sarscov2']['genome']['baits_interval_list'], checkIfExists: true) + target = file(params.test_data['sarscov2']['genome']['targets_interval_list'], checkIfExists: true) - BAM_QC_PICARD ( input, fasta, bait, target ) + BAM_QC_PICARD ( input, fasta, fasta_fai, bait, target ) } From 2fc857955f42c3aed840f9a61062b481a159ff4a Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:53:48 +0200 Subject: [PATCH 108/313] fix index omission --- subworkflows/nf-core/bam_qc_picard/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index e6f82feb..341a4310 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -10,7 +10,7 @@ workflow BAM_QC_PICARD { take: ch_bam // channel: [ val(meta), [ bam ]] ch_fasta // channel: [ fasta ] - ch_fasta_faix // channel: [ fasta_fai ] + ch_fasta_fai // channel: [ fasta_fai ] ch_bait_interval // channel: [ bait_interval ] ch_target_interval // channel: [ target_interval ] @@ -28,7 +28,7 @@ workflow BAM_QC_PICARD { if (ch_target_interval.isEmpty()) { log.error("Target interval channel is empty") } - PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, [], ch_bait_interval, ch_target_interval ) + PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval ) ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.coverage_metrics.first()) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { From 4618c542e9d64cd71176cfd24fe0edc908eb3d10 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:59:46 +0200 Subject: [PATCH 109/313] fix metrics output --- subworkflows/nf-core/bam_qc_picard/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 341a4310..b8be04b2 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -29,12 +29,12 @@ workflow BAM_QC_PICARD { log.error("Target interval channel is empty") } PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval ) - ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.coverage_metrics.first()) + ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.metrics.first()) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) - ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.coverage_metrics.first()) + ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics.first()) } emit: From 57cb730e78634673fb254a77606e014ce942734c Mon Sep 17 00:00:00 2001 From: Daniel Cooke Date: Thu, 28 Apr 2022 13:06:38 +0100 Subject: [PATCH 110/313] Fix tiddit/sv (#1580) * Fix fasta ref option for TIDDIT_SV * Add md5sum's to tiddit/sv tests Co-authored-by: Daniel Cooke --- modules/tiddit/sv/main.nf | 2 +- tests/modules/tiddit/sv/test.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/tiddit/sv/main.nf b/modules/tiddit/sv/main.nf index 1bf7146a..b3e3813c 100644 --- a/modules/tiddit/sv/main.nf +++ b/modules/tiddit/sv/main.nf @@ -24,7 +24,7 @@ process TIDDIT_SV { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def reference = fasta == "dummy_file.txt" ? "--ref $fasta" : "" + def reference = fasta ? "--ref $fasta" : "" """ tiddit \\ --sv \\ diff --git a/tests/modules/tiddit/sv/test.yml b/tests/modules/tiddit/sv/test.yml index 168d21c5..40ea5b4d 100644 --- a/tests/modules/tiddit/sv/test.yml +++ b/tests/modules/tiddit/sv/test.yml @@ -9,6 +9,7 @@ - path: output/tiddit/test.signals.tab md5sum: dab4b2fec4ddf8eb1c23005b0770150e - path: output/tiddit/test.vcf + md5sum: bdce14ae8292bf3deb81f6f255baf859 - name: tiddit sv no ref command: nextflow run ./tests/modules/tiddit/sv -entry test_tiddit_sv_no_ref -c ./tests/config/nextflow.config -c ./tests/modules/tiddit/sv/nextflow.config @@ -21,3 +22,4 @@ - path: output/tiddit/test.signals.tab md5sum: dab4b2fec4ddf8eb1c23005b0770150e - path: output/tiddit/test.vcf + md5sum: 3d0e83a8199b2bdb81cfe3e6b12bf64b From 8c98a78d2a0e12d081184736e17ccde3feee3f44 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 14:07:55 +0200 Subject: [PATCH 111/313] Fixed the issue with the BED file --- modules/vardictjava/main.nf | 1 + tests/modules/vardictjava/test.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 26833436..d6b4f1dd 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -26,6 +26,7 @@ process VARDICTJAVA { """ vardict-java \\ $args \\ + -c 1 -S 2 -E 3 \\ -b $bam \\ -th $task.cpus \\ -N $prefix \\ diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml index 0bd21f4e..77aa9047 100644 --- a/tests/modules/vardictjava/test.yml +++ b/tests/modules/vardictjava/test.yml @@ -4,6 +4,6 @@ - vardictjava files: - path: output/vardictjava/test.vcf.gz - md5sum: 7029066c27ac6f5ef18d660d5741979a + md5sum: 2179dcaee6183495b421293f42db11b5 - path: output/vardictjava/versions.yml md5sum: aac455b8c9c9194c5fed80e4fd495b96 From 24fb7c89aafa401b084e8022b8999efca15fae9d Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Thu, 28 Apr 2022 08:14:30 -0400 Subject: [PATCH 112/313] Update modules/motus/downloaddb/main.nf Co-authored-by: Robert A. Petit III --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index e2a0cec6..58f3cd03 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -18,7 +18,7 @@ process MOTUS_DOWNLOADDB { script: def args = task.ext.args ?: '' - def software = ${motus_downloaddb.simpleName}_copy.py + def software = "${motus_downloaddb.simpleName}_copy.py" """ ## must copy script file to working directory, ## otherwise the reference_db will be download to bin folder From cdefbec66999c0b49d8bfeea9d6f9d19056635a2 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Thu, 28 Apr 2022 08:16:26 -0400 Subject: [PATCH 113/313] add kimporttext module (#1560) * add kimporttext module * fix the Prettier error. * fix the Prettier error. * fix the test.yml * fix the test.yml * Update modules/krona/ktimporttext/meta.yml Co-authored-by: James A. Fellows Yates * Update modules/krona/ktimporttext/meta.yml Co-authored-by: James A. Fellows Yates * Update modules/krona/ktimporttext/meta.yml Co-authored-by: James A. Fellows Yates * Update modules/krona/ktimporttext/meta.yml Co-authored-by: James A. Fellows Yates * Update modules/krona/ktimporttext/meta.yml Co-authored-by: James A. Fellows Yates * update the test files; simplify the main script of krona/ktimporttext. * update the test file url for krona ktimporttext Co-authored-by: James A. Fellows Yates --- modules/krona/ktimporttext/main.nf | 34 ++++++++++++++ modules/krona/ktimporttext/meta.yml | 47 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/config/test_data.config | 3 ++ tests/modules/krona/ktimporttext/main.nf | 31 ++++++++++++ .../krona/ktimporttext/nextflow.config | 5 ++ tests/modules/krona/ktimporttext/test.yml | 19 ++++++++ 7 files changed, 143 insertions(+) create mode 100644 modules/krona/ktimporttext/main.nf create mode 100644 modules/krona/ktimporttext/meta.yml create mode 100644 tests/modules/krona/ktimporttext/main.nf create mode 100644 tests/modules/krona/ktimporttext/nextflow.config create mode 100644 tests/modules/krona/ktimporttext/test.yml diff --git a/modules/krona/ktimporttext/main.nf b/modules/krona/ktimporttext/main.nf new file mode 100644 index 00000000..de0cfc22 --- /dev/null +++ b/modules/krona/ktimporttext/main.nf @@ -0,0 +1,34 @@ +process KRONA_KTIMPORTTEXT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::krona=2.8.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/krona:2.8.1--pl5321hdfd78af_1': + 'quay.io/biocontainers/krona:2.8.1--pl5321hdfd78af_1' }" + + input: + tuple val(meta), path(report) + + output: + 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 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + ktImportText \\ + $args \\ + -o ${prefix}.html \\ + $report + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + krona: \$( echo \$(ktImportText 2>&1) | sed 's/^.*KronaTools //g; s/- ktImportText.*\$//g') + END_VERSIONS + """ +} diff --git a/modules/krona/ktimporttext/meta.yml b/modules/krona/ktimporttext/meta.yml new file mode 100644 index 00000000..a7108e0d --- /dev/null +++ b/modules/krona/ktimporttext/meta.yml @@ -0,0 +1,47 @@ +name: "krona_ktimporttext" +description: Creates a Krona chart from text files listing quantities and lineages. +keywords: + - plot + - taxonomy + - interactive + - html + - visualisation + - krona chart + - metagenomics +tools: + - krona: + description: Krona Tools is a set of scripts to create Krona charts from several Bioinformatics tools as well as from text and XML files. + homepage: https://github.com/marbl/Krona/wiki/KronaTools + documentation: http://manpages.ubuntu.com/manpages/impish/man1/ktImportTaxonomy.1.html + tool_dev_url: https://github.com/marbl/Krona + doi: 10.1186/1471-2105-12-385 + licence: https://raw.githubusercontent.com/marbl/Krona/master/KronaTools/LICENSE.txt + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test'] + - report: + type: file + description: "Tab-delimited text file. Each line should be a number followed by a list of wedges to contribute to (starting from the highest level). If no wedges are listed (and just a quantity is given), it will contribute to the top level. If the same lineage is listed more than once, the values will be added. Quantities can be omitted if -q is specified. Lines beginning with '#' will be ignored." + pattern: "*.{txt}" + +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" + - html: + type: file + description: A html file containing an interactive krona plot. + pattern: "*.{html}" + +authors: + - "@jianhong" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 4d8ce0b5..dfcbfa8c 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1050,6 +1050,10 @@ krona/ktimporttaxonomy: - modules/krona/ktimporttaxonomy/** - tests/modules/krona/ktimporttaxonomy/** +krona/ktimporttext: + - modules/krona/ktimporttext/** + - tests/modules/krona/ktimporttext/** + last/dotplot: - modules/last/dotplot/** - tests/modules/last/dotplot/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index b3171a51..5d5535c4 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -109,6 +109,9 @@ params { test_sequencing_summary = "${test_data_dir}/genomics/sarscov2/nanopore/sequencing_summary/test.sequencing_summary.txt" } + 'metagenome' { + kraken_report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" + } } 'homo_sapiens' { 'genome' { diff --git a/tests/modules/krona/ktimporttext/main.nf b/tests/modules/krona/ktimporttext/main.nf new file mode 100644 index 00000000..3d288b7b --- /dev/null +++ b/tests/modules/krona/ktimporttext/main.nf @@ -0,0 +1,31 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { KRONA_KTIMPORTTEXT } from '../../../../modules/krona/ktimporttext/main.nf' + +workflow test_krona_ktimporttext_multi { + + input = [ + [ id:'test', single_end:false ], // meta map + [ + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/krona/ktimporttext.txt', checkIfExists: true), // krona default test file + file(params.test_data['sarscov2']['metagenome']['kraken_report'], checkIfExists: true), //Kraken2 report file + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/krona/kaiju_out4krona.txt', checkIfExists: true) // Kaiju output 4 krona + ] + ] + + KRONA_KTIMPORTTEXT ( input ) +} + +workflow test_krona_ktimporttext_single { + + input = [ + [ id:'test', single_end:false ], // meta map + [ + file('http://krona.sourceforge.net/examples/text.txt', checkIfExists: true) // krona default test file + ] + ] + + KRONA_KTIMPORTTEXT ( input ) +} diff --git a/tests/modules/krona/ktimporttext/nextflow.config b/tests/modules/krona/ktimporttext/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/krona/ktimporttext/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/krona/ktimporttext/test.yml b/tests/modules/krona/ktimporttext/test.yml new file mode 100644 index 00000000..93ae12da --- /dev/null +++ b/tests/modules/krona/ktimporttext/test.yml @@ -0,0 +1,19 @@ +- name: krona ktimporttext test_krona_ktimporttext_multi + command: nextflow run tests/modules/krona/ktimporttext -entry test_krona_ktimporttext_multi -c tests/config/nextflow.config + tags: + - krona + - krona/ktimporttext + files: + - path: output/krona/test.html + contains: + - "DOCTYPE html PUBLIC" + +- name: krona ktimporttext test_krona_ktimporttext_single + command: nextflow run tests/modules/krona/ktimporttext -entry test_krona_ktimporttext_single -c tests/config/nextflow.config + tags: + - krona + - krona/ktimporttext + files: + - path: output/krona/test.html + contains: + - "DOCTYPE html PUBLIC" From bf186044716cb0621f31ccc4727ad4a0fb7c81b9 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 14:29:37 +0200 Subject: [PATCH 114/313] fix for a linting issue --- modules/vardictjava/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index d6b4f1dd..3e036ebd 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -14,7 +14,7 @@ process VARDICTJAVA { output: tuple val(meta), path("*.vcf.gz"), emit: vcf - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when From 40e6e5273de785042fc1b4d6fc1d7510729a7789 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 14:30:04 +0200 Subject: [PATCH 115/313] fix for a linting issue --- modules/vardictjava/meta.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 5bc21b55..39368f81 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -15,7 +15,6 @@ tools: licence: "['MIT']" input: - # Only when we have meta - meta: type: map description: | @@ -38,7 +37,6 @@ input: pattern: "*.bed" output: - #Only when we have meta - meta: type: map description: | From b3e9b88e80880f450ad79a95b2b7aa05e1de5484 Mon Sep 17 00:00:00 2001 From: Praveen Raj S <43108054+praveenraj2018@users.noreply.github.com> Date: Thu, 28 Apr 2022 14:41:01 +0200 Subject: [PATCH 116/313] csi output in TABIX (#1579) * Added: csi output to TABIX * Added: tests for csi * Fix tiddit/sv (#1580) * Fix fasta ref option for TIDDIT_SV * Add md5sum's to tiddit/sv tests Co-authored-by: Daniel Cooke * Fix: prettier issues Co-authored-by: Daniel Cooke Co-authored-by: Daniel Cooke --- modules/tabix/tabix/main.nf | 3 ++- modules/tabix/tabix/meta.yml | 4 ++++ tests/modules/tabix/tabix/main.nf | 19 ++++++++++++++----- tests/modules/tabix/tabix/nextflow.config | 6 +++++- tests/modules/tabix/tabix/test.yml | 10 +++++++++- 5 files changed, 34 insertions(+), 8 deletions(-) diff --git a/modules/tabix/tabix/main.nf b/modules/tabix/tabix/main.nf index c9dab068..e155e468 100644 --- a/modules/tabix/tabix/main.nf +++ b/modules/tabix/tabix/main.nf @@ -11,7 +11,8 @@ process TABIX_TABIX { tuple val(meta), path(tab) output: - tuple val(meta), path("*.tbi"), emit: tbi + tuple val(meta), path("*.tbi"), optional:true, emit: tbi + tuple val(meta), path("*.csi"), optional:true, emit: csi path "versions.yml" , emit: versions when: diff --git a/modules/tabix/tabix/meta.yml b/modules/tabix/tabix/meta.yml index 89478abe..fcc6e524 100644 --- a/modules/tabix/tabix/meta.yml +++ b/modules/tabix/tabix/meta.yml @@ -31,6 +31,10 @@ output: type: file description: tabix index file pattern: "*.{tbi}" + - csi: + type: file + description: coordinate sorted index file + pattern: "*.{csi}" - versions: type: file description: File containing software versions diff --git a/tests/modules/tabix/tabix/main.nf b/tests/modules/tabix/tabix/main.nf index 993ee812..da26f4d7 100644 --- a/tests/modules/tabix/tabix/main.nf +++ b/tests/modules/tabix/tabix/main.nf @@ -2,9 +2,10 @@ nextflow.enable.dsl = 2 -include { TABIX_TABIX as TABIX_BED } from '../../../../modules/tabix/tabix/main.nf' -include { TABIX_TABIX as TABIX_GFF } from '../../../../modules/tabix/tabix/main.nf' -include { TABIX_TABIX as TABIX_VCF } from '../../../../modules/tabix/tabix/main.nf' +include { TABIX_TABIX as TABIX_BED } from '../../../../modules/tabix/tabix/main.nf' +include { TABIX_TABIX as TABIX_GFF } from '../../../../modules/tabix/tabix/main.nf' +include { TABIX_TABIX as TABIX_VCF_TBI } from '../../../../modules/tabix/tabix/main.nf' +include { TABIX_TABIX as TABIX_VCF_CSI } from '../../../../modules/tabix/tabix/main.nf' workflow test_tabix_tabix_bed { input = [ [ id:'B.bed' ], // meta map @@ -22,10 +23,18 @@ workflow test_tabix_tabix_gff { TABIX_GFF ( input ) } -workflow test_tabix_tabix_vcf { +workflow test_tabix_tabix_vcf_tbi { input = [ [ id:'test.vcf' ], // meta map [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ] ] - TABIX_VCF ( input ) + TABIX_VCF_TBI ( input ) +} + +workflow test_tabix_tabix_vcf_csi { + input = [ [ id:'test.vcf' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) ] + ] + + TABIX_VCF_CSI ( input ) } diff --git a/tests/modules/tabix/tabix/nextflow.config b/tests/modules/tabix/tabix/nextflow.config index aa97a873..139e0865 100644 --- a/tests/modules/tabix/tabix/nextflow.config +++ b/tests/modules/tabix/tabix/nextflow.config @@ -10,8 +10,12 @@ process { ext.args = '-p gff' } - withName: TABIX_VCF { + withName: TABIX_VCF_TBI { ext.args = '-p vcf' } + withName: TABIX_VCF_CSI { + ext.args = '-p vcf --csi' + } + } diff --git a/tests/modules/tabix/tabix/test.yml b/tests/modules/tabix/tabix/test.yml index 46be28dd..6d168ef5 100644 --- a/tests/modules/tabix/tabix/test.yml +++ b/tests/modules/tabix/tabix/test.yml @@ -15,10 +15,18 @@ - path: ./output/tabix/genome.gff3.gz.tbi md5sum: f79a67d95a98076e04fbe0455d825926 - name: tabix tabix vcf - command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf -c ./tests/config/nextflow.config -c ./tests/modules/tabix/tabix/nextflow.config + command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf_tbi -c ./tests/config/nextflow.config -c ./tests/modules/tabix/tabix/nextflow.config tags: - tabix - tabix/tabix files: - path: output/tabix/test.vcf.gz.tbi md5sum: 36e11bf96ed0af4a92caa91a68612d64 +- name: tabix tabix vcf csi + command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf_csi -c ./tests/config/nextflow.config -c ./tests/modules/tabix/tabix/nextflow.config + tags: + - tabix + - tabix/tabix + files: + - path: output/tabix/test.vcf.gz.csi + md5sum: 5f930522d2b9dcdba2807b7da4dfa3fd From 6678ad4426664076d912dab488ea641f44c1fdb6 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 14:54:20 +0200 Subject: [PATCH 117/313] Added a header to the VCF --- modules/vardictjava/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 3e036ebd..a28cb539 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -26,7 +26,7 @@ process VARDICTJAVA { """ vardict-java \\ $args \\ - -c 1 -S 2 -E 3 \\ + -c 1 -S 2 -E 3 -h \\ -b $bam \\ -th $task.cpus \\ -N $prefix \\ From bdff37c3d7c880f599af223504808306e75e2d76 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 15:33:27 +0200 Subject: [PATCH 118/313] Added the statistical tests and conversion to vcf --- modules/vardictjava/main.nf | 7 ++++++- tests/modules/vardictjava/nextflow.config | 1 + tests/modules/vardictjava/test.yml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index a28cb539..92051074 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -21,17 +21,22 @@ process VARDICTJAVA { script: def args = task.ext.args ?: '' + def args_conversion = task.ext.args_conversion ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ vardict-java \\ $args \\ - -c 1 -S 2 -E 3 -h \\ + -c 1 -S 2 -E 3 \\ -b $bam \\ -th $task.cpus \\ -N $prefix \\ -G $reference_fasta \\ $regions_of_interest \\ + | teststrandbias.R \\ + | var2vcf_valid.pl \\ + $args_conversion \\ + -N $prefix \\ | gzip -c > ${prefix}.vcf.gz cat <<-END_VERSIONS > versions.yml diff --git a/tests/modules/vardictjava/nextflow.config b/tests/modules/vardictjava/nextflow.config index 5dc176a9..fc698f59 100644 --- a/tests/modules/vardictjava/nextflow.config +++ b/tests/modules/vardictjava/nextflow.config @@ -4,5 +4,6 @@ process { withName: VARDICTJAVA { ext.args = '' + ext.args_conversion = '' } } \ No newline at end of file diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml index 77aa9047..549d688e 100644 --- a/tests/modules/vardictjava/test.yml +++ b/tests/modules/vardictjava/test.yml @@ -4,6 +4,6 @@ - vardictjava files: - path: output/vardictjava/test.vcf.gz - md5sum: 2179dcaee6183495b421293f42db11b5 + md5sum: 3f1f227afc532bddeb58f16fd3013fc8 - path: output/vardictjava/versions.yml md5sum: aac455b8c9c9194c5fed80e4fd495b96 From d626a1dcd3ca759c2c398efe49642a39d843ecd7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 15:41:43 +0200 Subject: [PATCH 119/313] Removed a whitespace in meta.yml... --- modules/vardictjava/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 39368f81..e3b2efe7 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -25,7 +25,7 @@ input: type: file description: BAM/SAM file pattern: "*.{bam,sam}" - + - reference_fasta: type: file description: FASTA of the reference genome From 4b04ca22ddc577951bc59a693e247c6ff5949dd7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 16:38:49 +0200 Subject: [PATCH 120/313] Variable name change for var2vcf conversion arguments --- modules/vardictjava/main.nf | 4 ++-- tests/modules/vardictjava/nextflow.config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 92051074..08318c29 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -21,7 +21,7 @@ process VARDICTJAVA { script: def args = task.ext.args ?: '' - def args_conversion = task.ext.args_conversion ?: '' + def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ @@ -35,7 +35,7 @@ process VARDICTJAVA { $regions_of_interest \\ | teststrandbias.R \\ | var2vcf_valid.pl \\ - $args_conversion \\ + $args2 \\ -N $prefix \\ | gzip -c > ${prefix}.vcf.gz diff --git a/tests/modules/vardictjava/nextflow.config b/tests/modules/vardictjava/nextflow.config index fc698f59..e08201cc 100644 --- a/tests/modules/vardictjava/nextflow.config +++ b/tests/modules/vardictjava/nextflow.config @@ -4,6 +4,6 @@ process { withName: VARDICTJAVA { ext.args = '' - ext.args_conversion = '' + ext.args2 = '' } } \ No newline at end of file From c7408538746bd2c8d64418691c0e0440483c48da Mon Sep 17 00:00:00 2001 From: Jasmin F <73216762+jasmezz@users.noreply.github.com> Date: Thu, 28 Apr 2022 16:42:44 +0200 Subject: [PATCH 121/313] Antismash db output patch 1 (#3) * Update main.nf * Update meta.yml * Update test.yml --- .../antismashlitedownloaddatabases/main.nf | 6 +++--- .../antismashlitedownloaddatabases/meta.yml | 18 ++++-------------- .../antismashlitedownloaddatabases/test.yml | 9 ++++----- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/modules/antismash/antismashlitedownloaddatabases/main.nf b/modules/antismash/antismashlitedownloaddatabases/main.nf index 72314eee..5f9141f0 100644 --- a/modules/antismash/antismashlitedownloaddatabases/main.nf +++ b/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -27,9 +27,7 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { output: path("antismash_db") , emit: database - path("css"), emit: css_dir - path("detection"), emit: detection_dir - path("modules"), emit: modules_dir + path("antismash_dir"), emit: antismash_dir path "versions.yml", emit: versions when: @@ -42,6 +40,8 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { --database-dir antismash_db \\ $args + cp -r /usr/local/lib/python3.8/site-packages/antismash antismash_dir + cat <<-END_VERSIONS > versions.yml "${task.process}": antismash-lite: \$(antismash --version | sed 's/antiSMASH //') diff --git a/modules/antismash/antismashlitedownloaddatabases/meta.yml b/modules/antismash/antismashlitedownloaddatabases/meta.yml index 619dc8c2..4b9644c4 100644 --- a/modules/antismash/antismashlitedownloaddatabases/meta.yml +++ b/modules/antismash/antismashlitedownloaddatabases/meta.yml @@ -27,7 +27,7 @@ input: - database_css: type: directory description: | - antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by ther use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. pattern: "css" - database_detection: type: directory @@ -50,21 +50,11 @@ output: type: directory description: Download directory for antiSMASH databases pattern: "antismash_db" - - css_dir: + - antismash_dir: type: directory description: | - antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. - pattern: "css" - - detection_dir: - type: directory - description: | - antismash/detection folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. - pattern: "detection" - - modules_dir: - type: directory - description: | - antismash/modules folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. - pattern: "modules" + antismash installation folder which is being modified during the antiSMASH database downloading step. The modified files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database and installation folder in pipelines. + pattern: "antismash_dir" authors: - "@jasmezz" diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml index 1079363c..f9143163 100644 --- a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml +++ b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml @@ -1,17 +1,16 @@ - name: antismash antismashlitedownloaddatabases test_antismash_antismashlitedownloaddatabases command: nextflow run tests/modules/antismash/antismashlitedownloaddatabases -entry test_antismash_antismashlitedownloaddatabases -c tests/config/nextflow.config tags: - - antismash - antismash/antismashlitedownloaddatabases + - antismash files: - path: output/antismash/versions.yml - md5sum: 24859c67023abab99de295d3675a24b6 + md5sum: e2656c8d2bcc7469eba40eb1ee5c91b3 - path: output/antismash/antismash_db - path: output/antismash/antismash_db/clusterblast - path: output/antismash/antismash_db/clustercompare - path: output/antismash/antismash_db/pfam - path: output/antismash/antismash_db/resfam - path: output/antismash/antismash_db/tigrfam - - path: output/antismash/css - - path: output/antismash/detection - - path: output/antismash/modules + - path: output/antismash/antismash_dir + - path: output/antismash/antismash_dir/detection/hmm_detection/data/bgc_seeds.hmm From 39258e53d7b6168fc576d1d46dbd78c286919ec1 Mon Sep 17 00:00:00 2001 From: Jasmin F <73216762+jasmezz@users.noreply.github.com> Date: Thu, 28 Apr 2022 17:09:40 +0200 Subject: [PATCH 122/313] Update checksum in test.yml --- tests/modules/antismash/antismashlitedownloaddatabases/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml index f9143163..b4a964a0 100644 --- a/tests/modules/antismash/antismashlitedownloaddatabases/test.yml +++ b/tests/modules/antismash/antismashlitedownloaddatabases/test.yml @@ -5,7 +5,7 @@ - antismash files: - path: output/antismash/versions.yml - md5sum: e2656c8d2bcc7469eba40eb1ee5c91b3 + md5sum: 24859c67023abab99de295d3675a24b6 - path: output/antismash/antismash_db - path: output/antismash/antismash_db/clusterblast - path: output/antismash/antismash_db/clustercompare From 5be6afd6b1e9b4362ad9f3e43e4a93e0ef4af423 Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Thu, 28 Apr 2022 12:29:39 -0400 Subject: [PATCH 123/313] changed container --- modules/srst2/srst2/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/srst2/srst2/main.nf b/modules/srst2/srst2/main.nf index fc665fad..5f69205d 100644 --- a/modules/srst2/srst2/main.nf +++ b/modules/srst2/srst2/main.nf @@ -4,8 +4,8 @@ process SRST2_SRST2 { conda (params.enable_conda ? "bioconda::srst2=0.2.0" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/srst2%3A0.2.0--py_4': - 'quay.io/biocontainers/srst2:0.2.0--py_4'}" + 'https://depot.galaxyproject.org/singularity/srst2%3A0.2.0--py27_2': + 'quay.io/biocontainers/srst2:0.2.0--py27_2'}" input: tuple val(meta), path(fastq_s), path(db) From e29a69077d470734cd721be8932a1e5b6bf64ff4 Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Thu, 28 Apr 2022 12:30:04 -0400 Subject: [PATCH 124/313] add doi --- modules/srst2/srst2/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/srst2/srst2/meta.yml b/modules/srst2/srst2/meta.yml index 31cf4de0..17d9226d 100644 --- a/modules/srst2/srst2/meta.yml +++ b/modules/srst2/srst2/meta.yml @@ -13,7 +13,7 @@ tools: homepage: { http://katholt.github.io/srst2/ } documentation: { https://github.com/katholt/srst2/blob/master/README.md } tool_dev_url: { https://github.com/katholt/srst2 } - doi: "" + doi: "10.1186/s13073-014-0090-6" licence: ["BSD"] input: From 9e7e10305b98e57f221de07d56bc7add2cfbd263 Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Thu, 28 Apr 2022 14:02:28 -0400 Subject: [PATCH 125/313] Update modules/srst2/srst2/meta.yml Co-authored-by: Sateesh Peri <33637490+sateeshperi@users.noreply.github.com> --- modules/srst2/srst2/meta.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/srst2/srst2/meta.yml b/modules/srst2/srst2/meta.yml index 17d9226d..f70d3780 100644 --- a/modules/srst2/srst2/meta.yml +++ b/modules/srst2/srst2/meta.yml @@ -10,9 +10,9 @@ keywords: tools: - srst2: description: "Short Read Sequence Typing for Bacterial Pathogens" - homepage: { http://katholt.github.io/srst2/ } - documentation: { https://github.com/katholt/srst2/blob/master/README.md } - tool_dev_url: { https://github.com/katholt/srst2 } + homepage: "http://katholt.github.io/srst2/" + documentation: "https://github.com/katholt/srst2/blob/master/README.md" + tool_dev_url: "https://github.com/katholt/srst2" doi: "10.1186/s13073-014-0090-6" licence: ["BSD"] From 842ae3982bd2238cbf5a6e50874c287962573cd9 Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Thu, 28 Apr 2022 14:39:02 -0400 Subject: [PATCH 126/313] Update meta.yml --- modules/srst2/srst2/meta.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/srst2/srst2/meta.yml b/modules/srst2/srst2/meta.yml index f70d3780..3755fb34 100644 --- a/modules/srst2/srst2/meta.yml +++ b/modules/srst2/srst2/meta.yml @@ -49,11 +49,11 @@ output: pattern: "versions.yml" - txt: type: file - description: results text file + description: A detailed report, with one row per gene per sample described here: https://github.com/katholt/srst2#gene-typing pattern: "*_fullgenes_*_results.txt" - txt: type: file - description: results text file + description: A tabulated summary report of samples x genes. pattern: "*_genes_*_results.txt" - bam: type: file From 218769d7df89c78ed253f4a5a70b436e4de17eba Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Thu, 28 Apr 2022 14:41:37 -0400 Subject: [PATCH 127/313] Update modules/srst2/srst2/main.nf Co-authored-by: Edmund Miller --- modules/srst2/srst2/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/srst2/srst2/main.nf b/modules/srst2/srst2/main.nf index 5f69205d..4ee9f6a6 100644 --- a/modules/srst2/srst2/main.nf +++ b/modules/srst2/srst2/main.nf @@ -29,7 +29,7 @@ process SRST2_SRST2 { } else if (meta.db=="mlst") { database = "--mlst_db ${db}" } else { - return + error "Please set meta.db to either \"gene\" or \"mlst\"" } """ srst2 \\ From 2efa5a09abb1393f10ffa240cff388e09dab9b40 Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:00:13 +0200 Subject: [PATCH 128/313] Update main.nf $args line 28 --- modules/krona/ktimporttaxonomy/main.nf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/krona/ktimporttaxonomy/main.nf b/modules/krona/ktimporttaxonomy/main.nf index 7837bb87..4fa15669 100644 --- a/modules/krona/ktimporttaxonomy/main.nf +++ b/modules/krona/ktimporttaxonomy/main.nf @@ -23,7 +23,10 @@ process KRONA_KTIMPORTTAXONOMY { script: def args = task.ext.args ?: '' """ - ktImportTaxonomy "$report" -tax taxonomy + ktImportTaxonomy \\ + "$report" \\ + $args \\ + -tax taxonomy cat <<-END_VERSIONS > versions.yml "${task.process}": From 10a3718ad67ff27f99551c8a5f39c9936e6263b3 Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:03:54 +0200 Subject: [PATCH 129/313] Update test_data.config add 'metagenome' in sarscov2 --- tests/config/test_data.config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 1a5c377c..51454c39 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -110,6 +110,10 @@ params { test_sequencing_summary = "${test_data_dir}/genomics/sarscov2/nanopore/sequencing_summary/test.sequencing_summary.txt" } + 'metagenome' { + classified_reads_alignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt + report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt + } } 'homo_sapiens' { 'genome' { From f13a0070d0f68ff47fc6e1cac7b21b88e52f877f Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:04:49 +0200 Subject: [PATCH 130/313] Update test_data.config --- tests/config/test_data.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 51454c39..ff97106d 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -112,7 +112,7 @@ params { } 'metagenome' { classified_reads_alignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt - report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt + report_txt = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt } } 'homo_sapiens' { From a76be27d9f071129d1a0fe9c952c6452cf2ef05f Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:06:55 +0200 Subject: [PATCH 131/313] Update test_data.config --- tests/config/test_data.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index ff97106d..7f305cda 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -112,7 +112,7 @@ params { } 'metagenome' { classified_reads_alignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt - report_txt = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt + report = '${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt } } 'homo_sapiens' { From a6026e6d3079490a7ab94c456bf439bfb4d0747d Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:08:27 +0200 Subject: [PATCH 132/313] Update test_data.config --- tests/config/test_data.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 7f305cda..579695a8 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -111,8 +111,8 @@ params { test_sequencing_summary = "${test_data_dir}/genomics/sarscov2/nanopore/sequencing_summary/test.sequencing_summary.txt" } 'metagenome' { - classified_reads_alignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt - report = '${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt + classified_reads_alignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt" + report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" } } 'homo_sapiens' { From 05e283405c7a4088f7c65f79ba4a2acef06ce839 Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 00:13:01 +0200 Subject: [PATCH 133/313] Update test_data.config --- tests/config/test_data.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 579695a8..4337d5b9 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -111,7 +111,7 @@ params { test_sequencing_summary = "${test_data_dir}/genomics/sarscov2/nanopore/sequencing_summary/test.sequencing_summary.txt" } 'metagenome' { - classified_reads_alignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt" + classified_reads_assignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt" report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" } } From 6ca6de91f8da9b8cc9a34f7ef6469eb0f851604d Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 07:47:24 +0200 Subject: [PATCH 134/313] bump picard version across the board --- modules/picard/addorreplacereadgroups/main.nf | 6 +++--- modules/picard/cleansam/main.nf | 6 +++--- modules/picard/collecthsmetrics/main.nf | 6 +++--- modules/picard/collectmultiplemetrics/main.nf | 6 +++--- modules/picard/collectwgsmetrics/main.nf | 6 +++--- modules/picard/createsequencedictionary/main.nf | 6 +++--- modules/picard/crosscheckfingerprints/main.nf | 6 +++--- modules/picard/filtersamreads/main.nf | 6 +++--- modules/picard/fixmateinformation/main.nf | 6 +++--- modules/picard/liftovervcf/main.nf | 6 +++--- modules/picard/markduplicates/main.nf | 6 +++--- modules/picard/mergesamfiles/main.nf | 6 +++--- modules/picard/sortsam/main.nf | 6 +++--- modules/picard/sortvcf/main.nf | 6 +++--- 14 files changed, 42 insertions(+), 42 deletions(-) diff --git a/modules/picard/addorreplacereadgroups/main.nf b/modules/picard/addorreplacereadgroups/main.nf index 8e1d10af..e395f4d7 100644 --- a/modules/picard/addorreplacereadgroups/main.nf +++ b/modules/picard/addorreplacereadgroups/main.nf @@ -2,10 +2,10 @@ process PICARD_ADDORREPLACEREADGROUPS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/cleansam/main.nf b/modules/picard/cleansam/main.nf index fb435911..4cd4db58 100644 --- a/modules/picard/cleansam/main.nf +++ b/modules/picard/cleansam/main.nf @@ -2,10 +2,10 @@ process PICARD_CLEANSAM { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/collecthsmetrics/main.nf b/modules/picard/collecthsmetrics/main.nf index ef7a9b9f..26ba8a04 100644 --- a/modules/picard/collecthsmetrics/main.nf +++ b/modules/picard/collecthsmetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTHSMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/collectmultiplemetrics/main.nf b/modules/picard/collectmultiplemetrics/main.nf index 340463a8..0c79b7a5 100644 --- a/modules/picard/collectmultiplemetrics/main.nf +++ b/modules/picard/collectmultiplemetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTMULTIPLEMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index f4efaa4c..ef53d7bd 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -2,10 +2,10 @@ process PICARD_COLLECTWGSMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/picard/createsequencedictionary/main.nf b/modules/picard/createsequencedictionary/main.nf index 96069e9f..3a8f1477 100644 --- a/modules/picard/createsequencedictionary/main.nf +++ b/modules/picard/createsequencedictionary/main.nf @@ -2,10 +2,10 @@ process PICARD_CREATESEQUENCEDICTIONARY { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/picard/crosscheckfingerprints/main.nf b/modules/picard/crosscheckfingerprints/main.nf index b3dface5..d3b59402 100644 --- a/modules/picard/crosscheckfingerprints/main.nf +++ b/modules/picard/crosscheckfingerprints/main.nf @@ -2,10 +2,10 @@ process PICARD_CROSSCHECKFINGERPRINTS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(input1) diff --git a/modules/picard/filtersamreads/main.nf b/modules/picard/filtersamreads/main.nf index ab75abfa..adedcdc2 100644 --- a/modules/picard/filtersamreads/main.nf +++ b/modules/picard/filtersamreads/main.nf @@ -2,10 +2,10 @@ process PICARD_FILTERSAMREADS { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam), path(readlist) diff --git a/modules/picard/fixmateinformation/main.nf b/modules/picard/fixmateinformation/main.nf index 763f3bb4..1993e4fd 100644 --- a/modules/picard/fixmateinformation/main.nf +++ b/modules/picard/fixmateinformation/main.nf @@ -2,10 +2,10 @@ process PICARD_FIXMATEINFORMATION { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.9" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.9--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.9--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/liftovervcf/main.nf b/modules/picard/liftovervcf/main.nf index cdbd637e..7ce694e9 100644 --- a/modules/picard/liftovervcf/main.nf +++ b/modules/picard/liftovervcf/main.nf @@ -2,10 +2,10 @@ process PICARD_LIFTOVERVCF { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(input_vcf) diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index e754a587..b9fec576 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -2,10 +2,10 @@ process PICARD_MARKDUPLICATES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/mergesamfiles/main.nf b/modules/picard/mergesamfiles/main.nf index ef5c3980..7b0185cd 100644 --- a/modules/picard/mergesamfiles/main.nf +++ b/modules/picard/mergesamfiles/main.nf @@ -2,10 +2,10 @@ process PICARD_MERGESAMFILES { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bams) diff --git a/modules/picard/sortsam/main.nf b/modules/picard/sortsam/main.nf index adec17cb..cee60fd1 100644 --- a/modules/picard/sortsam/main.nf +++ b/modules/picard/sortsam/main.nf @@ -2,10 +2,10 @@ process PICARD_SORTSAM { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(bam) diff --git a/modules/picard/sortvcf/main.nf b/modules/picard/sortvcf/main.nf index 4047545e..5fe0ecfd 100644 --- a/modules/picard/sortvcf/main.nf +++ b/modules/picard/sortvcf/main.nf @@ -2,10 +2,10 @@ process PICARD_SORTVCF { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: tuple val(meta), path(vcf) From 00467ac64affbbc17b255762f10a6c8fa362aabc Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 07:57:11 +0200 Subject: [PATCH 135/313] update command line syntax for all tools --- modules/picard/addorreplacereadgroups/main.nf | 2 +- modules/picard/collecthsmetrics/main.nf | 8 ++++---- modules/picard/collectmultiplemetrics/main.nf | 6 +++--- modules/picard/collectwgsmetrics/main.nf | 6 +++--- modules/picard/createsequencedictionary/main.nf | 4 ++-- modules/picard/liftovervcf/main.nf | 10 +++++----- modules/picard/markduplicates/main.nf | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/modules/picard/addorreplacereadgroups/main.nf b/modules/picard/addorreplacereadgroups/main.nf index e395f4d7..55200d2e 100644 --- a/modules/picard/addorreplacereadgroups/main.nf +++ b/modules/picard/addorreplacereadgroups/main.nf @@ -43,7 +43,7 @@ process PICARD_ADDORREPLACEREADGROUPS { -PL ${PLATFORM} \\ -PU ${BARCODE} \\ -SM ${SAMPLE} \\ - -CREATE_INDEX true + --CREATE_INDEX true cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/collecthsmetrics/main.nf b/modules/picard/collecthsmetrics/main.nf index 26ba8a04..317aff4b 100644 --- a/modules/picard/collecthsmetrics/main.nf +++ b/modules/picard/collecthsmetrics/main.nf @@ -38,10 +38,10 @@ process PICARD_COLLECTHSMETRICS { CollectHsMetrics \\ $args \\ $reference \\ - -BAIT_INTERVALS $bait_intervals \\ - -TARGET_INTERVALS $target_intervals \\ - -INPUT $bam \\ - -OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics + --BAIT_INTERVALS $bait_intervals \\ + --TARGET_INTERVALS $target_intervals \\ + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectHsMetrics.coverage_metrics cat <<-END_VERSIONS > versions.yml diff --git a/modules/picard/collectmultiplemetrics/main.nf b/modules/picard/collectmultiplemetrics/main.nf index 0c79b7a5..a653b549 100644 --- a/modules/picard/collectmultiplemetrics/main.nf +++ b/modules/picard/collectmultiplemetrics/main.nf @@ -33,9 +33,9 @@ process PICARD_COLLECTMULTIPLEMETRICS { -Xmx${avail_mem}g \\ CollectMultipleMetrics \\ $args \\ - INPUT=$bam \\ - OUTPUT=${prefix}.CollectMultipleMetrics \\ - REFERENCE_SEQUENCE=$fasta + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectMultipleMetrics \\ + --REFERENCE_SEQUENCE $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index ef53d7bd..957c8058 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -32,9 +32,9 @@ process PICARD_COLLECTWGSMETRICS { -Xmx${avail_mem}g \\ CollectWgsMetrics \\ $args \\ - INPUT=$bam \\ - OUTPUT=${prefix}.CollectWgsMetrics.coverage_metrics \\ - REFERENCE_SEQUENCE=$fasta + --INPUT $bam \\ + --OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\ + --REFERENCE_SEQUENCE $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/createsequencedictionary/main.nf b/modules/picard/createsequencedictionary/main.nf index 3a8f1477..3a8bb62a 100644 --- a/modules/picard/createsequencedictionary/main.nf +++ b/modules/picard/createsequencedictionary/main.nf @@ -31,8 +31,8 @@ process PICARD_CREATESEQUENCEDICTIONARY { -Xmx${avail_mem}g \\ CreateSequenceDictionary \\ $args \\ - R=$fasta \\ - O=${prefix}.dict + -R $fasta \\ + -O ${prefix}.dict cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/liftovervcf/main.nf b/modules/picard/liftovervcf/main.nf index 7ce694e9..ea3f4cb7 100644 --- a/modules/picard/liftovervcf/main.nf +++ b/modules/picard/liftovervcf/main.nf @@ -35,11 +35,11 @@ process PICARD_LIFTOVERVCF { -Xmx${avail_mem}g \\ LiftoverVcf \\ $args \\ - I=$input_vcf \\ - O=${prefix}.lifted.vcf.gz \\ - CHAIN=$chain \\ - REJECT=${prefix}.unlifted.vcf.gz \\ - R=$fasta + -I $input_vcf \\ + -O ${prefix}.lifted.vcf.gz \\ + --CHAIN $chain \\ + --REJECT ${prefix}.unlifted.vcf.gz \\ + -R $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index b9fec576..58b6b88a 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -33,9 +33,9 @@ process PICARD_MARKDUPLICATES { -Xmx${avail_mem}g \\ MarkDuplicates \\ $args \\ - I=$bam \\ - O=${prefix}.bam \\ - M=${prefix}.MarkDuplicates.metrics.txt + -I $bam \\ + -O ${prefix}.bam \\ + -M ${prefix}.MarkDuplicates.metrics.txt cat <<-END_VERSIONS > versions.yml "${task.process}": From b72ec05d69140c6a9c6054175d1412b2f116466f Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 08:19:42 +0200 Subject: [PATCH 136/313] drop md5sum from versions.yml --- tests/modules/picard/addorreplacereadgroups/test.yml | 1 - tests/modules/picard/cleansam/test.yml | 1 - tests/modules/picard/createsequencedictionary/test.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/tests/modules/picard/addorreplacereadgroups/test.yml b/tests/modules/picard/addorreplacereadgroups/test.yml index aa1536bb..6ee81737 100644 --- a/tests/modules/picard/addorreplacereadgroups/test.yml +++ b/tests/modules/picard/addorreplacereadgroups/test.yml @@ -7,4 +7,3 @@ - path: output/picard/test.bam md5sum: 7b82f3461c2d80fc6a10385e78c9427f - path: output/picard/versions.yml - md5sum: 8a2d176295e1343146ea433c79bb517f diff --git a/tests/modules/picard/cleansam/test.yml b/tests/modules/picard/cleansam/test.yml index 3b235d07..08dcd84d 100644 --- a/tests/modules/picard/cleansam/test.yml +++ b/tests/modules/picard/cleansam/test.yml @@ -7,4 +7,3 @@ - path: output/picard/test.bam md5sum: a48f8e77a1480445efc57570c3a38a68 - path: output/picard/versions.yml - md5sum: e6457d7c6de51bf6f4b577eda65e57ac diff --git a/tests/modules/picard/createsequencedictionary/test.yml b/tests/modules/picard/createsequencedictionary/test.yml index 2a43be41..59f2dd44 100644 --- a/tests/modules/picard/createsequencedictionary/test.yml +++ b/tests/modules/picard/createsequencedictionary/test.yml @@ -7,4 +7,3 @@ - path: output/picard/test.dict contains: ["SN:MT192765.1"] - path: output/picard/versions.yml - md5sum: b3d8c7ea65b8a6d3237b153d13fe2014 From ec10f98d558a84da79ba7c90c2d57f6c6f0f7af5 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 09:32:32 +0200 Subject: [PATCH 137/313] picard CollectWgsMetrics: update to new cli args (#1578) * update to new cli args * remove bam index from tuple, not needed by program * bump picard version Co-authored-by: Sateesh Peri <33637490+sateeshperi@users.noreply.github.com> --- modules/picard/collectwgsmetrics/main.nf | 14 +++++++------- tests/modules/picard/collectwgsmetrics/main.nf | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index f4efaa4c..d9c1ec7c 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -2,13 +2,13 @@ process PICARD_COLLECTWGSMETRICS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::picard=2.26.10" : null) + conda (params.enable_conda ? "bioconda::picard=2.27.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/picard:2.26.10--hdfd78af_0' : - 'quay.io/biocontainers/picard:2.26.10--hdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/picard:2.27.1--hdfd78af_0' : + 'quay.io/biocontainers/picard:2.27.1--hdfd78af_0' }" input: - tuple val(meta), path(bam), path(bai) + tuple val(meta), path(bam) path fasta output: @@ -32,9 +32,9 @@ process PICARD_COLLECTWGSMETRICS { -Xmx${avail_mem}g \\ CollectWgsMetrics \\ $args \\ - INPUT=$bam \\ - OUTPUT=${prefix}.CollectWgsMetrics.coverage_metrics \\ - REFERENCE_SEQUENCE=$fasta + -INPUT $bam \\ + -OUTPUT ${prefix}.CollectWgsMetrics.coverage_metrics \\ + -REFERENCE_SEQUENCE $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/picard/collectwgsmetrics/main.nf b/tests/modules/picard/collectwgsmetrics/main.nf index 1d75a2bd..eddf5603 100644 --- a/tests/modules/picard/collectwgsmetrics/main.nf +++ b/tests/modules/picard/collectwgsmetrics/main.nf @@ -6,8 +6,7 @@ include { PICARD_COLLECTWGSMETRICS } from '../../../../modules/picard/collectwgs workflow test_picard_collectwgsmetrics { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), ] fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) From 1a5a9e7b4009dcf34e6867dd1a5a1d9a718b027b Mon Sep 17 00:00:00 2001 From: Lauri Mesilaakso Date: Fri, 29 Apr 2022 09:37:23 +0200 Subject: [PATCH 138/313] Fix typo (#1586) --- modules/minimap2/align/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/minimap2/align/main.nf b/modules/minimap2/align/main.nf index 7ba05ee9..08ac6eef 100644 --- a/modules/minimap2/align/main.nf +++ b/modules/minimap2/align/main.nf @@ -27,8 +27,8 @@ process MINIMAP2_ALIGN { def prefix = task.ext.prefix ?: "${meta.id}" def input_reads = meta.single_end ? "$reads" : "${reads[0]} ${reads[1]}" def bam_output = bam_format ? "-a | samtools sort | samtools view -@ ${task.cpus} -b -h -o ${prefix}.bam" : "-o ${prefix}.paf" - def cigar_paf = cigar_paf_format && !sam_format ? "-c" : '' - def set_cigar_bam = cigar_bam && sam_format ? "-L" : '' + def cigar_paf = cigar_paf_format && !bam_format ? "-c" : '' + def set_cigar_bam = cigar_bam && bam_format ? "-L" : '' """ minimap2 \\ $args \\ From 0e01d703ea55899bd048689258d22c153d39b981 Mon Sep 17 00:00:00 2001 From: CMGG ICT Team Date: Fri, 29 Apr 2022 10:12:52 +0200 Subject: [PATCH 139/313] remove version md5sum from fixmateinformation --- tests/modules/picard/fixmateinformation/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/modules/picard/fixmateinformation/test.yml b/tests/modules/picard/fixmateinformation/test.yml index f12f823b..f2f9c491 100644 --- a/tests/modules/picard/fixmateinformation/test.yml +++ b/tests/modules/picard/fixmateinformation/test.yml @@ -7,4 +7,3 @@ - path: output/picard/test.bam md5sum: 746102e8c242c0ef42e045c49d320030 - path: output/picard/versions.yml - md5sum: 4329ba7cdca8f4f6018dfd5c019ba2eb From bda132191db9548cd1fc1c594399cba583bcd061 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 10:13:22 +0200 Subject: [PATCH 140/313] fix args in nextflow.config --- tests/modules/picard/markduplicates/nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/picard/markduplicates/nextflow.config b/tests/modules/picard/markduplicates/nextflow.config index 9178c5b1..40d46110 100644 --- a/tests/modules/picard/markduplicates/nextflow.config +++ b/tests/modules/picard/markduplicates/nextflow.config @@ -3,7 +3,7 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } withName: PICARD_MARKDUPLICATES_UNSORTED { - ext.args = 'ASSUME_SORT_ORDER=queryname' + ext.args = '--ASSUME_SORT_ORDER queryname' } } From b2e4342105d4e6b06edd33ed2613328eb740b4b8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 10:21:22 +0200 Subject: [PATCH 141/313] fix args in nextflow.config --- tests/modules/picard/liftovervcf/nextflow.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/picard/liftovervcf/nextflow.config b/tests/modules/picard/liftovervcf/nextflow.config index e1581bb9..f69fc351 100644 --- a/tests/modules/picard/liftovervcf/nextflow.config +++ b/tests/modules/picard/liftovervcf/nextflow.config @@ -1,5 +1,5 @@ process { - ext.args = "WARN_ON_MISSING_CONTIG=true" + ext.args = "--WARN_ON_MISSING_CONTIG true" publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } } From 42564565b934eeb2449e35ec97ed13ff2a67f1de Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 29 Apr 2022 10:26:17 +0200 Subject: [PATCH 142/313] Update diamond/blastx diamond/blastp to support all possible output formats --- modules/diamond/blastp/main.nf | 17 ++++++++++++++--- modules/diamond/blastp/meta.yml | 9 +++++++++ modules/diamond/blastx/main.nf | 17 ++++++++++++++--- modules/diamond/blastx/meta.yml | 9 +++++++++ tests/modules/diamond/blastp/main.nf | 13 ++++++++++++- tests/modules/diamond/blastp/test.yml | 21 ++++++++++++++++++--- tests/modules/diamond/blastx/main.nf | 13 ++++++++++++- tests/modules/diamond/blastx/test.yml | 24 ++++++++++++++++++++---- 8 files changed, 108 insertions(+), 15 deletions(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index 955952dc..d7c53d6f 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -11,10 +11,11 @@ process DIAMOND_BLASTP { input: tuple val(meta), path(fasta) - path db + path db + val outext output: - tuple val(meta), path('*.txt'), emit: txt + tuple val(meta), path('*.{blast,xml,txt,daa,sam,tsv,paf}'), emit: output path "versions.yml" , emit: versions when: @@ -23,6 +24,15 @@ process DIAMOND_BLASTP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + switch ( outext ) { + case "blast": outfmt = 0; break + case "xml": outfmt = 5; break + case "txt": outfmt = 6; break + case "daa": outfmt = 100; break + case "sam": outfmt = 101; break + case "tsv": outfmt = 102; break + case "paf": outfmt = 103; break + } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` @@ -31,8 +41,9 @@ process DIAMOND_BLASTP { --threads $task.cpus \\ --db \$DB \\ --query $fasta \\ + --outfmt ${outfmt} \\ $args \\ - --out ${prefix}.txt + --out ${prefix}.${outext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastp/meta.yml b/modules/diamond/blastp/meta.yml index 8ac1d371..1aa36c23 100644 --- a/modules/diamond/blastp/meta.yml +++ b/modules/diamond/blastp/meta.yml @@ -28,6 +28,14 @@ input: type: directory description: Directory containing the protein blast database pattern: "*" + - outext: + type: string + description: | + Specify the type of output file to be generated. `blast` corresponds to + BLAST pairwise format. `xml` corresponds to BLAST xml format. + `txt` corresponds to to BLAST tabular format. `tsv` corresponds to + taxonomic classification format. + pattern: "blast|xml|txt|daa|sam|tsv|paf" output: - txt: @@ -41,3 +49,4 @@ output: authors: - "@spficklin" + - "@jfy133" diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index 3700bd36..6703c1e4 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -11,10 +11,11 @@ process DIAMOND_BLASTX { input: tuple val(meta), path(fasta) - path db + path db + val outext output: - tuple val(meta), path('*.txt'), emit: txt + tuple val(meta), path('*.{blast,xml,txt,daa,sam,tsv,paf}'), emit: output path "versions.yml" , emit: versions when: @@ -23,6 +24,15 @@ process DIAMOND_BLASTX { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + switch ( outext ) { + case "blast": outfmt = 0; break + case "xml": outfmt = 5; break + case "txt": outfmt = 6; break + case "daa": outfmt = 100; break + case "sam": outfmt = 101; break + case "tsv": outfmt = 102; break + case "paf": outfmt = 103; break + } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` @@ -31,8 +41,9 @@ process DIAMOND_BLASTX { --threads $task.cpus \\ --db \$DB \\ --query $fasta \\ + --outfmt ${outfmt} \\ $args \\ - --out ${prefix}.txt + --out ${prefix}.${outext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastx/meta.yml b/modules/diamond/blastx/meta.yml index 7eb3d7b4..5ee2d55e 100644 --- a/modules/diamond/blastx/meta.yml +++ b/modules/diamond/blastx/meta.yml @@ -28,6 +28,14 @@ input: type: directory description: Directory containing the nucelotide blast database pattern: "*" + - outext: + type: string + description: | + Specify the type of output file to be generated. `blast` corresponds to + BLAST pairwise format. `xml` corresponds to BLAST xml format. + `txt` corresponds to to BLAST tabular format. `tsv` corresponds to + taxonomic classification format. + pattern: "blast|xml|txt|daa|sam|tsv|paf" output: - txt: @@ -41,3 +49,4 @@ output: authors: - "@spficklin" + - "@jfy133" diff --git a/tests/modules/diamond/blastp/main.nf b/tests/modules/diamond/blastp/main.nf index 87d05bf9..5c1459d8 100644 --- a/tests/modules/diamond/blastp/main.nf +++ b/tests/modules/diamond/blastp/main.nf @@ -9,7 +9,18 @@ workflow test_diamond_blastp { db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + outext = 'txt' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) +} + +workflow test_diamond_blastp_daa { + + db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + outext = 'daa' + + DIAMOND_MAKEDB ( db ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) } diff --git a/tests/modules/diamond/blastp/test.yml b/tests/modules/diamond/blastp/test.yml index 32dfacaa..5e31df1f 100644 --- a/tests/modules/diamond/blastp/test.yml +++ b/tests/modules/diamond/blastp/test.yml @@ -1,8 +1,23 @@ -- name: diamond blastp - command: nextflow run ./tests/modules/diamond/blastp -entry test_diamond_blastp -c ./tests/config/nextflow.config -c ./tests/modules/diamond/blastp/nextflow.config +- name: diamond blastp test_diamond_blastp + command: nextflow run tests/modules/diamond/blastp -entry test_diamond_blastp -c tests/config/nextflow.config tags: - diamond - diamond/blastp files: - - path: ./output/diamond/test.diamond_blastp.txt + - path: output/diamond/genome.fasta.dmnd + md5sum: 2447fb376394c20d43ea3aad2aa5d15d + - path: output/diamond/test.diamond_blastp.txt md5sum: 3ca7f6290c1d8741c573370e6f8b4db0 + - path: output/diamond/versions.yml + +- name: diamond blastp test_diamond_blastp_daa + command: nextflow run tests/modules/diamond/blastp -entry test_diamond_blastp_daa -c tests/config/nextflow.config + tags: + - diamond + - diamond/blastp + files: + - path: output/diamond/genome.fasta.dmnd + md5sum: 2447fb376394c20d43ea3aad2aa5d15d + - path: output/diamond/test.diamond_blastp.daa + md5sum: d4a79ad1fcb2ec69460e5a09a9468db7 + - path: output/diamond/versions.yml diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index 77eb08ea..d6d5a77a 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -9,7 +9,18 @@ workflow test_diamond_blastx { db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + outext = 'txt' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) +} + +workflow test_diamond_blastx_daa { + + db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + outext = 'daa' + + DIAMOND_MAKEDB ( db ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) } diff --git a/tests/modules/diamond/blastx/test.yml b/tests/modules/diamond/blastx/test.yml index fe7c6938..6a792f30 100644 --- a/tests/modules/diamond/blastx/test.yml +++ b/tests/modules/diamond/blastx/test.yml @@ -1,8 +1,24 @@ -- name: diamond blastx - command: nextflow run ./tests/modules/diamond/blastx -entry test_diamond_blastx -c ./tests/config/nextflow.config -c ./tests/modules/diamond/blastx/nextflow.config +- name: diamond blastx test_diamond_blastx + command: nextflow run tests/modules/diamond/blastx -entry test_diamond_blastx -c tests/config/nextflow.config tags: - diamond - diamond/blastx files: - - path: ./output/diamond/test.diamond_blastx.txt - md5sum: d41d8cd98f00b204e9800998ecf8427e + - path: output/diamond/genome.fasta.dmnd + md5sum: 2447fb376394c20d43ea3aad2aa5d15d + - path: output/diamond/test.diamond_blastx.txt + - path: output/diamond/versions.yml + md5sum: 747934f57b7c0f8901570500f206eac6 + +- name: diamond blastx test_diamond_blastx_daa + command: nextflow run tests/modules/diamond/blastx -entry test_diamond_blastx_daa -c tests/config/nextflow.config + tags: + - diamond + - diamond/blastx + files: + - path: output/diamond/genome.fasta.dmnd + md5sum: 2447fb376394c20d43ea3aad2aa5d15d + - path: output/diamond/test.diamond_blastx.daa + md5sum: 2a0ce0f7e01dcead828b87d5cbaccf7a + - path: output/diamond/versions.yml + md5sum: 05cbabfd500fc17e26b3d8061c5a78c3 From 7df2fae7469095b2f211f4e183cd5f7de77a2b98 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 29 Apr 2022 10:26:38 +0200 Subject: [PATCH 143/313] Clean up test data --- tests/modules/diamond/blastp/test.yml | 4 ---- tests/modules/diamond/blastx/test.yml | 6 ------ 2 files changed, 10 deletions(-) diff --git a/tests/modules/diamond/blastp/test.yml b/tests/modules/diamond/blastp/test.yml index 5e31df1f..cb297743 100644 --- a/tests/modules/diamond/blastp/test.yml +++ b/tests/modules/diamond/blastp/test.yml @@ -4,8 +4,6 @@ - diamond - diamond/blastp files: - - path: output/diamond/genome.fasta.dmnd - md5sum: 2447fb376394c20d43ea3aad2aa5d15d - path: output/diamond/test.diamond_blastp.txt md5sum: 3ca7f6290c1d8741c573370e6f8b4db0 - path: output/diamond/versions.yml @@ -16,8 +14,6 @@ - diamond - diamond/blastp files: - - path: output/diamond/genome.fasta.dmnd - md5sum: 2447fb376394c20d43ea3aad2aa5d15d - path: output/diamond/test.diamond_blastp.daa md5sum: d4a79ad1fcb2ec69460e5a09a9468db7 - path: output/diamond/versions.yml diff --git a/tests/modules/diamond/blastx/test.yml b/tests/modules/diamond/blastx/test.yml index 6a792f30..a2d35c80 100644 --- a/tests/modules/diamond/blastx/test.yml +++ b/tests/modules/diamond/blastx/test.yml @@ -4,11 +4,8 @@ - diamond - diamond/blastx files: - - path: output/diamond/genome.fasta.dmnd - md5sum: 2447fb376394c20d43ea3aad2aa5d15d - path: output/diamond/test.diamond_blastx.txt - path: output/diamond/versions.yml - md5sum: 747934f57b7c0f8901570500f206eac6 - name: diamond blastx test_diamond_blastx_daa command: nextflow run tests/modules/diamond/blastx -entry test_diamond_blastx_daa -c tests/config/nextflow.config @@ -16,9 +13,6 @@ - diamond - diamond/blastx files: - - path: output/diamond/genome.fasta.dmnd - md5sum: 2447fb376394c20d43ea3aad2aa5d15d - path: output/diamond/test.diamond_blastx.daa md5sum: 2a0ce0f7e01dcead828b87d5cbaccf7a - path: output/diamond/versions.yml - md5sum: 05cbabfd500fc17e26b3d8061c5a78c3 From 20ebb89ff97a2665106be9cace5ccb9aa4eed1be Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 10:52:40 +0200 Subject: [PATCH 144/313] update to long args --- modules/picard/addorreplacereadgroups/main.nf | 10 +++++----- modules/picard/cleansam/main.nf | 4 ++-- modules/picard/createsequencedictionary/main.nf | 4 ++-- modules/picard/fixmateinformation/main.nf | 4 ++-- modules/picard/liftovervcf/main.nf | 6 +++--- modules/picard/markduplicates/main.nf | 6 +++--- modules/picard/mergesamfiles/main.nf | 4 ++-- modules/picard/sortvcf/main.nf | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/modules/picard/addorreplacereadgroups/main.nf b/modules/picard/addorreplacereadgroups/main.nf index 55200d2e..fd102f67 100644 --- a/modules/picard/addorreplacereadgroups/main.nf +++ b/modules/picard/addorreplacereadgroups/main.nf @@ -38,11 +38,11 @@ process PICARD_ADDORREPLACEREADGROUPS { -Xmx${avail_mem}g \\ --INPUT ${bam} \\ --OUTPUT ${prefix}.bam \\ - -ID ${ID} \\ - -LB ${LIBRARY} \\ - -PL ${PLATFORM} \\ - -PU ${BARCODE} \\ - -SM ${SAMPLE} \\ + --RGID ${ID} \\ + --RGLB ${LIBRARY} \\ + --RGPL ${PLATFORM} \\ + --RGPU ${BARCODE} \\ + --RGSM ${SAMPLE} \\ --CREATE_INDEX true cat <<-END_VERSIONS > versions.yml diff --git a/modules/picard/cleansam/main.nf b/modules/picard/cleansam/main.nf index 4cd4db58..62989565 100644 --- a/modules/picard/cleansam/main.nf +++ b/modules/picard/cleansam/main.nf @@ -31,8 +31,8 @@ process PICARD_CLEANSAM { -Xmx${avail_mem}g \\ CleanSam \\ ${args} \\ - -I ${bam} \\ - -O ${prefix}.bam + --INPUT ${bam} \\ + --OUTPUT ${prefix}.bam cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/createsequencedictionary/main.nf b/modules/picard/createsequencedictionary/main.nf index 3a8bb62a..735cc97b 100644 --- a/modules/picard/createsequencedictionary/main.nf +++ b/modules/picard/createsequencedictionary/main.nf @@ -31,8 +31,8 @@ process PICARD_CREATESEQUENCEDICTIONARY { -Xmx${avail_mem}g \\ CreateSequenceDictionary \\ $args \\ - -R $fasta \\ - -O ${prefix}.dict + --REFERENCE_SEQUENCE $fasta \\ + --OUTPUT ${prefix}.dict cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/fixmateinformation/main.nf b/modules/picard/fixmateinformation/main.nf index 1993e4fd..539b1082 100644 --- a/modules/picard/fixmateinformation/main.nf +++ b/modules/picard/fixmateinformation/main.nf @@ -31,8 +31,8 @@ process PICARD_FIXMATEINFORMATION { picard \\ FixMateInformation \\ -Xmx${avail_mem}g \\ - -I ${bam} \\ - -O ${prefix}.bam \\ + --INPUT ${bam} \\ + --OUTPUT ${prefix}.bam \\ --VALIDATION_STRINGENCY ${STRINGENCY} cat <<-END_VERSIONS > versions.yml diff --git a/modules/picard/liftovervcf/main.nf b/modules/picard/liftovervcf/main.nf index ea3f4cb7..c92abfeb 100644 --- a/modules/picard/liftovervcf/main.nf +++ b/modules/picard/liftovervcf/main.nf @@ -35,11 +35,11 @@ process PICARD_LIFTOVERVCF { -Xmx${avail_mem}g \\ LiftoverVcf \\ $args \\ - -I $input_vcf \\ - -O ${prefix}.lifted.vcf.gz \\ + --INPUT $input_vcf \\ + --OUTPUT ${prefix}.lifted.vcf.gz \\ --CHAIN $chain \\ --REJECT ${prefix}.unlifted.vcf.gz \\ - -R $fasta + --REFERENCE_SEQUENCE $fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index 58b6b88a..1565c647 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -33,9 +33,9 @@ process PICARD_MARKDUPLICATES { -Xmx${avail_mem}g \\ MarkDuplicates \\ $args \\ - -I $bam \\ - -O ${prefix}.bam \\ - -M ${prefix}.MarkDuplicates.metrics.txt + --INPUT $bam \\ + --OUTPUT ${prefix}.bam \\ + --METRICS_FILE ${prefix}.MarkDuplicates.metrics.txt cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/picard/mergesamfiles/main.nf b/modules/picard/mergesamfiles/main.nf index 7b0185cd..1e32c63a 100644 --- a/modules/picard/mergesamfiles/main.nf +++ b/modules/picard/mergesamfiles/main.nf @@ -33,8 +33,8 @@ process PICARD_MERGESAMFILES { -Xmx${avail_mem}g \\ MergeSamFiles \\ $args \\ - ${'INPUT='+bam_files.join(' INPUT=')} \\ - OUTPUT=${prefix}.bam + ${'--INPUT '+bam_files.join(' --INPUT ')} \\ + --OUTPUT ${prefix}.bam cat <<-END_VERSIONS > versions.yml "${task.process}": picard: \$( echo \$(picard MergeSamFiles --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d:) diff --git a/modules/picard/sortvcf/main.nf b/modules/picard/sortvcf/main.nf index 5fe0ecfd..fb8dbb79 100644 --- a/modules/picard/sortvcf/main.nf +++ b/modules/picard/sortvcf/main.nf @@ -22,8 +22,8 @@ process PICARD_SORTVCF { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def seq_dict = sequence_dict ? "-SEQUENCE_DICTIONARY $sequence_dict" : "" - def reference = reference ? "-REFERENCE_SEQUENCE $reference" : "" + def seq_dict = sequence_dict ? "--SEQUENCE_DICTIONARY $sequence_dict" : "" + def reference = reference ? "--REFERENCE_SEQUENCE $reference" : "" def avail_mem = 3 if (!task.memory) { log.info '[Picard SortVcf] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' From 771d5a19f1cf72f663df27dd396e863193bc0f04 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 11:12:24 +0200 Subject: [PATCH 145/313] fix reference arg --- modules/picard/createsequencedictionary/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/picard/createsequencedictionary/main.nf b/modules/picard/createsequencedictionary/main.nf index 735cc97b..2348c496 100644 --- a/modules/picard/createsequencedictionary/main.nf +++ b/modules/picard/createsequencedictionary/main.nf @@ -31,7 +31,7 @@ process PICARD_CREATESEQUENCEDICTIONARY { -Xmx${avail_mem}g \\ CreateSequenceDictionary \\ $args \\ - --REFERENCE_SEQUENCE $fasta \\ + --REFERENCE $fasta \\ --OUTPUT ${prefix}.dict cat <<-END_VERSIONS > versions.yml From 73600b03393ee2ec585bdc6bb5ff2585fc47bdda Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 14:20:15 +0200 Subject: [PATCH 146/313] Update subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- subworkflows/nf-core/bam_qc_picard/main.nf | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index b8be04b2..c3a441bc 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -22,12 +22,8 @@ workflow BAM_QC_PICARD { ch_versions = ch_versions.mix(PICARD_COLLECTMULTIPLEMETRICS.out.versions.first()) if (ch_bait_interval || ch_target_interval) { - if (ch_bait_interval.isEmpty()) { - log.error("Bait interval channel is empty") - } - if (ch_target_interval.isEmpty()) { - log.error("Target interval channel is empty") - } + if (!ch_bait_interval) log.error("Bait interval channel is empty") + if (!ch_target_interval) log.error("Target interval channel is empty") PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval ) ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.metrics.first()) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) From 71ccf0e207d2b034c931d2264b33f5f54abe1f59 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 14:24:19 +0200 Subject: [PATCH 147/313] Update subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- subworkflows/nf-core/bam_qc_picard/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index c3a441bc..e3c890d5 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -25,7 +25,7 @@ workflow BAM_QC_PICARD { if (!ch_bait_interval) log.error("Bait interval channel is empty") if (!ch_target_interval) log.error("Target interval channel is empty") PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval ) - ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.metrics.first()) + ch_coverage_metrics = PICARD_COLLECTHSMETRICS.out.metrics ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) From 20e3767657ba1a4b87a412121321e79ca109b401 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 14:24:25 +0200 Subject: [PATCH 148/313] Update subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- subworkflows/nf-core/bam_qc_picard/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index e3c890d5..5f46e065 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -30,7 +30,7 @@ workflow BAM_QC_PICARD { } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) - ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics.first()) + ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics) } emit: From 343c0ebe203e53ca9149ec473a8396836039a516 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 14:26:00 +0200 Subject: [PATCH 149/313] Update subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- subworkflows/nf-core/bam_qc_picard/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 5f46e065..76709ea6 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -30,7 +30,7 @@ workflow BAM_QC_PICARD { } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) ch_versions = ch_versions.mix(PICARD_COLLECTWGSMETRICS.out.versions.first()) - ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics) + ch_coverage_metrics = ch_coverage_metrics.mix(PICARD_COLLECTWGSMETRICS.out.metrics) } emit: From 7e391c3a3bfc84b71e79077ba2569276e6fc5d2a Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 14:26:06 +0200 Subject: [PATCH 150/313] Update subworkflows/nf-core/bam_qc_picard/main.nf Co-authored-by: Maxime U. Garcia --- subworkflows/nf-core/bam_qc_picard/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/nf-core/bam_qc_picard/main.nf b/subworkflows/nf-core/bam_qc_picard/main.nf index 76709ea6..e38697c3 100644 --- a/subworkflows/nf-core/bam_qc_picard/main.nf +++ b/subworkflows/nf-core/bam_qc_picard/main.nf @@ -25,7 +25,7 @@ workflow BAM_QC_PICARD { if (!ch_bait_interval) log.error("Bait interval channel is empty") if (!ch_target_interval) log.error("Target interval channel is empty") PICARD_COLLECTHSMETRICS( ch_bam, ch_fasta, ch_fasta_fai, ch_bait_interval, ch_target_interval ) - ch_coverage_metrics = PICARD_COLLECTHSMETRICS.out.metrics + ch_coverage_metrics = ch_coverage_metrics.mix(PICARD_COLLECTHSMETRICS.out.metrics) ch_versions = ch_versions.mix(PICARD_COLLECTHSMETRICS.out.versions.first()) } else { PICARD_COLLECTWGSMETRICS( ch_bam, ch_fasta ) From 9d0f03d96a6855af87f19f27728757e839e51842 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 29 Apr 2022 15:07:09 +0200 Subject: [PATCH 151/313] Update modules/elprep/merge/main.nf Co-authored-by: James A. Fellows Yates --- modules/elprep/merge/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/elprep/merge/main.nf b/modules/elprep/merge/main.nf index 28fa9985..d5ffc497 100644 --- a/modules/elprep/merge/main.nf +++ b/modules/elprep/merge/main.nf @@ -29,7 +29,7 @@ process ELPREP_MERGE { mv ${bam} input/ elprep merge \\ - input \\ + input/ \\ output/${prefix}.${suffix} \\ $args \\ ${single_end} \\ From 20787514d91b5fc699e85b8a1558b5b4de97f451 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Fri, 29 Apr 2022 15:11:21 +0200 Subject: [PATCH 152/313] modifiche per il test --- tests/modules/krona/ktimporttaxonomy/main.nf | 21 +++++++++++++++---- .../krona/ktimporttaxonomy/nextflow.config | 8 +++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index a23e6fcb..280658a5 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -2,15 +2,28 @@ nextflow.enable.dsl = 2 -include { KRONA_KTIMPORTTAXONOMY } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' -workflow test_krona_ktimporttaxonomy { +include { KRONA_KTIMPORTTAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' + +workflow test_krona_ktimporttaxonomy_reads { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['generic']['txt']['hello'], checkIfExists: true) + file(params.test_data['sarscov2']['metagenome']['test_1.kraken2.reads.txt'], checkIfExists: true) ] taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) - KRONA_KTIMPORTTAXONOMY ( input, taxonomy ) + KRONA_KTIMPORTTAXONOMY_READS ( input, taxonomy ) +} + +workflow test_krona_ktimporttaxonomy_report { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['metagenome']['test_1.kraken2.report.txt'], checkIfExists: true) + ] + taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) + + KRONA_KTIMPORTTAXONOMY_REPORT ( input, taxonomy ) } diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index 8730f1c4..0abcdbeb 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,4 +2,12 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: CLASSIFIED_READS { + ext.args = '-t 3' + } + + withName: CLASSIFIED_REPORT { + ext.args = '-m 3 -t 5' + } + } From d9d0eb393bcc16d672ae39418dd6b4296777e95d Mon Sep 17 00:00:00 2001 From: Simone Carpanzano <96130486+carpanz@users.noreply.github.com> Date: Fri, 29 Apr 2022 15:39:50 +0200 Subject: [PATCH 153/313] Update nextflow.config --- tests/modules/krona/ktimporttaxonomy/nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index 0abcdbeb..fb4d86f5 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,11 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: CLASSIFIED_READS { + withName: KRONA_KTIMPORTTAXONOMY_READS { ext.args = '-t 3' } - withName: CLASSIFIED_REPORT { + withName: KRONA_KTIMPORTTAXONOMY_REPORT { ext.args = '-m 3 -t 5' } From 6bf0a407f6427c017921e7d6f30c58b80c6e4445 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Fri, 29 Apr 2022 15:51:27 +0200 Subject: [PATCH 154/313] modifiche nextflow.config --- tests/modules/krona/ktimporttaxonomy/nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index fb4d86f5..0abcdbeb 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,11 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: KRONA_KTIMPORTTAXONOMY_READS { + withName: CLASSIFIED_READS { ext.args = '-t 3' } - withName: KRONA_KTIMPORTTAXONOMY_REPORT { + withName: CLASSIFIED_REPORT { ext.args = '-m 3 -t 5' } From cb29ae2187a2bc624a948eee589ad11d168a069e Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 28 Apr 2022 21:14:52 -0500 Subject: [PATCH 155/313] chore: Use forms for bug report --- .github/ISSUE_TEMPLATE/bug_report.md | 64 --------------------------- .github/ISSUE_TEMPLATE/bug_report.yml | 50 +++++++++++++++++++++ 2 files changed, 50 insertions(+), 64 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index f1122ea3..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,64 +0,0 @@ ---- -name: Bug report -about: Report something that is broken or incorrect -title: "[BUG]" ---- - - - -## Check Documentation - -I have checked the following places for your error: - -- [ ] [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) -- [ ] [nf-core/module documentation](https://github.com/nf-core/modules/blob/master/README.md) - -## Description of the bug - - - -## Steps to reproduce - -Steps to reproduce the behaviour: - -1. Command line: -2. See error: - -## Expected behaviour - - - -## Log files - -Have you provided the following extra information/files: - -- [ ] The command used to run the module -- [ ] The `.nextflow.log` file - -## System - -- Hardware: -- Executor: -- OS: -- Version - -## Nextflow Installation - -- Version: - -## Container engine - -- Engine: -- version: -- Image tag: - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..d9720fb7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,50 @@ +name: Bug report +description: Report something that is broken or incorrect +labels: bug +body: + - type: markdown + attributes: + value: | + Before you post this issue, please check the documentation: + + - [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) + - [nf-core/rnaseq pipeline documentation](https://nf-co.re/rnaseq/usage) + + - type: textarea + id: description + attributes: + label: Description of the bug + description: A clear and concise description of what the bug is. + validations: + required: true + + - type: textarea + id: command_used + attributes: + label: Command used and terminal output + description: Steps to reproduce the behaviour. Please paste the command you used to launch the pipeline and the output from your terminal. + render: console + placeholder: | + $ nextflow run ... + + Some output where something broke + + - type: textarea + id: files + attributes: + label: Relevant files + description: | + Please drag and drop the relevant files here. Create a `.zip` archive if the extension is not allowed. + Your verbose log file `.nextflow.log` is often useful _(this is a hidden file in the directory where you launched the pipeline)_ as well as custom Nextflow configuration files. + + - type: textarea + id: system + attributes: + label: System information + description: | + * Nextflow version _(eg. 21.10.3)_ + * Hardware _(eg. HPC, Desktop, Cloud)_ + * Executor _(eg. slurm, local, awsbatch)_ + * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_ + * OS _(eg. CentOS Linux, macOS, Linux Mint)_ + * Version of nf-core/rnaseq _(eg. 1.1, 1.5, 1.8.2)_ From 2da712f6f3d8f9b246e5fdcb1d786d5fbd6ef7d1 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 28 Apr 2022 21:29:29 -0500 Subject: [PATCH 156/313] chore: Use forms for new modules --- .github/ISSUE_TEMPLATE/new_module.md | 26 ------------------- .github/ISSUE_TEMPLATE/new_module.yml | 36 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 26 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/new_module.md create mode 100644 .github/ISSUE_TEMPLATE/new_module.yml diff --git a/.github/ISSUE_TEMPLATE/new_module.md b/.github/ISSUE_TEMPLATE/new_module.md deleted file mode 100644 index 5c7e61cc..00000000 --- a/.github/ISSUE_TEMPLATE/new_module.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: New module -about: Suggest a new module for nf-core/modules -title: "new module: TOOL/SUBTOOL" -label: new module ---- - - - -I think it would be good to have a module for [TOOL](https://bioconda.github.io/recipes/TOOL/README.html) - -- [ ] This module does not exist yet with the [`nf-core modules list`](https://github.com/nf-core/tools#list-modules) command -- [ ] There is no [open pull request](https://github.com/nf-core/modules/pulls) for this module -- [ ] There is no [open issue](https://github.com/nf-core/modules/issues) for this module -- [ ] If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module diff --git a/.github/ISSUE_TEMPLATE/new_module.yml b/.github/ISSUE_TEMPLATE/new_module.yml new file mode 100644 index 00000000..2d3e9d47 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new_module.yml @@ -0,0 +1,36 @@ +name: New module +description: Suggest a new module for nf-core/modules +title: "new module: TOOL/SUBTOOL" +labels: new module +body: + - type: checkboxes + attributes: + label: Is there an existing module for this? + description: This module does not exist yet with the [`nf-core modules list`](https://github.com/nf-core/tools#list-modules) command + options: + - label: I have searched for the existing module + required: true + + - type: checkboxes + attributes: + label: Is there an open PR for this? + description: There is no [open pull request](https://github.com/nf-core/modules/pulls) for this module + options: + - label: I have searched for existing PRs + required: true + + - type: checkboxes + attributes: + label: Is there an open issue for this? + description: There is no [open issue](https://github.com/nf-core/modules/issues) for this module + options: + - label: I have searched for existing issues + required: true + + - type: checkboxes + attributes: + label: Are you going to work on this? + description: If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module + options: + - label: If I'm planning to work on this module, I added myself to the `Assignees` to facilitate tracking who is working on the module + required: false From 816803dbe98bc5395e87ab51862b57d5b84b2824 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 28 Apr 2022 21:36:49 -0500 Subject: [PATCH 157/313] chore: Add checkboxes for bug report --- .github/ISSUE_TEMPLATE/bug_report.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d9720fb7..22dc47d4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -2,13 +2,15 @@ name: Bug report description: Report something that is broken or incorrect labels: bug body: - - type: markdown + - type: checkboxes attributes: - value: | - Before you post this issue, please check the documentation: - - - [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) - - [nf-core/rnaseq pipeline documentation](https://nf-co.re/rnaseq/usage) + label: Have you checked the docs? + description: I have checked the following places for my error + options: + - label: "[nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting)" + required: true + - label: "[nf-core modules documentation](https://nf-co.re/docs/contributing/modules)" + required: true - type: textarea id: description From ef0483586a1a2fdeff3f90584b558f14302a2973 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 28 Apr 2022 21:46:36 -0500 Subject: [PATCH 158/313] chore: Use forms for feature request --- .github/ISSUE_TEMPLATE/feature_request.md | 32 ---------------------- .github/ISSUE_TEMPLATE/feature_request.yml | 32 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 32 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 72d6c058..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for nf-core/modules -title: "[FEATURE]" ---- - - - -## Is your feature request related to a problem? Please describe - - - - - -## Describe the solution you'd like - - - -## Describe alternatives you've considered - - - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..316fba90 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,32 @@ +name: Feature request +description: Suggest an idea for nf-core/modules +labels: feature +title: "[FEATURE]" +body: + - type: textarea + id: description + attributes: + label: Is your feature request related to a problem? Please describe + description: A clear and concise description of what the bug is. + placeholder: | + + validations: + required: true + + - type: textarea + id: solution + attributes: + label: Describe the solution you'd like + description: A clear and concise description of the solution you want to happen. + + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + + - type: textarea + id: additional_context + attributes: + label: Additional context + description: Add any other context about the feature request here. From 8bee7d47489ae3a6652e7925a841f32b39f15609 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Fri, 29 Apr 2022 09:28:08 -0500 Subject: [PATCH 159/313] chore: Add image tag to bug report Co-authored-by: FriederikeHanssen --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 22dc47d4..349dd44d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -49,4 +49,4 @@ body: * Executor _(eg. slurm, local, awsbatch)_ * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_ * OS _(eg. CentOS Linux, macOS, Linux Mint)_ - * Version of nf-core/rnaseq _(eg. 1.1, 1.5, 1.8.2)_ + * Image tag: From fb02d6e85f95e5564ca446fe448e94db5a78d470 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Fri, 29 Apr 2022 09:30:03 -0500 Subject: [PATCH 160/313] chore: add OS version to bug report Co-authored-by: FriederikeHanssen --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 349dd44d..71afc6b0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -48,5 +48,5 @@ body: * Hardware _(eg. HPC, Desktop, Cloud)_ * Executor _(eg. slurm, local, awsbatch)_ * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_ - * OS _(eg. CentOS Linux, macOS, Linux Mint)_ + * OS and version: _(eg. CentOS Linux, macOS, Ubuntu 22.04)_ * Image tag: From a8a4d76a65af792ca5ab254e9eb0cb521a70047b Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Fri, 29 Apr 2022 09:30:45 -0500 Subject: [PATCH 161/313] chore: Add container version Co-authored-by: FriederikeHanssen --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 71afc6b0..74907cfe 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -47,6 +47,6 @@ body: * Nextflow version _(eg. 21.10.3)_ * Hardware _(eg. HPC, Desktop, Cloud)_ * Executor _(eg. slurm, local, awsbatch)_ - * Container engine: _(e.g. Docker, Singularity, Conda, Podman, Shifter or Charliecloud)_ + * Container engine and version: _(e.g. Docker 1.0.0, Singularity, Conda, Podman, Shifter or Charliecloud)_ * OS and version: _(eg. CentOS Linux, macOS, Ubuntu 22.04)_ * Image tag: From 41fd2d15576ba669a7aaec281a9d95de219185f4 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Fri, 29 Apr 2022 17:52:12 +0200 Subject: [PATCH 162/313] modifiche --- tests/modules/krona/ktimporttaxonomy/nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index 0abcdbeb..fb4d86f5 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,11 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: CLASSIFIED_READS { + withName: KRONA_KTIMPORTTAXONOMY_READS { ext.args = '-t 3' } - withName: CLASSIFIED_REPORT { + withName: KRONA_KTIMPORTTAXONOMY_REPORT { ext.args = '-m 3 -t 5' } From 39530b5ca710e028fdec94a704e5eed3f78c5800 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Fri, 29 Apr 2022 21:05:12 +0200 Subject: [PATCH 163/313] Bump DIAMOND version to 2.0.15 --- modules/diamond/blastp/main.nf | 8 +++----- modules/diamond/blastx/main.nf | 8 +++----- modules/diamond/makedb/main.nf | 8 +++----- tests/config/test_data.config | 1 + tests/modules/diamond/blastp/main.nf | 8 ++++---- tests/modules/diamond/blastp/test.yml | 8 ++++---- tests/modules/diamond/blastx/main.nf | 4 ++-- tests/modules/diamond/blastx/test.yml | 3 ++- tests/modules/diamond/makedb/main.nf | 2 +- tests/modules/diamond/makedb/test.yml | 9 +++++---- 10 files changed, 28 insertions(+), 31 deletions(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index d7c53d6f..ccd455f4 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -2,12 +2,10 @@ process DIAMOND_BLASTP { tag "$meta.id" label 'process_medium' - // Dimaond is limited to v2.0.9 because there is not a - // singularity version higher than this at the current time. - conda (params.enable_conda ? "bioconda::diamond=2.0.9" : null) + conda (params.enable_conda ? "bioconda::diamond=2.0.15" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0' : - 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0' }" + 'https://depot.galaxyproject.org/singularity/diamond:2.0.15--hb97b32f_0' : + 'quay.io/biocontainers/diamond:2.0.15--hb97b32f_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index 6703c1e4..357427eb 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -2,12 +2,10 @@ process DIAMOND_BLASTX { tag "$meta.id" label 'process_medium' - // Dimaond is limited to v2.0.9 because there is not a - // singularity version higher than this at the current time. - conda (params.enable_conda ? "bioconda::diamond=2.0.9" : null) + conda (params.enable_conda ? "bioconda::diamond=2.0.15" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0' : - 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0' }" + 'https://depot.galaxyproject.org/singularity/diamond:2.0.15--hb97b32f_0' : + 'quay.io/biocontainers/diamond:2.0.15--hb97b32f_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/diamond/makedb/main.nf b/modules/diamond/makedb/main.nf index e3d62f00..a76a94e5 100644 --- a/modules/diamond/makedb/main.nf +++ b/modules/diamond/makedb/main.nf @@ -2,12 +2,10 @@ process DIAMOND_MAKEDB { tag "$fasta" label 'process_medium' - // Dimaond is limited to v2.0.9 because there is not a - // singularity version higher than this at the current time. - conda (params.enable_conda ? 'bioconda::diamond=2.0.9' : null) + conda (params.enable_conda ? "bioconda::diamond=2.0.15" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/diamond:2.0.9--hdcc8f71_0' : - 'quay.io/biocontainers/diamond:2.0.9--hdcc8f71_0' }" + 'https://depot.galaxyproject.org/singularity/diamond:2.0.15--hb97b32f_0' : + 'quay.io/biocontainers/diamond:2.0.15--hb97b32f_0' }" input: path fasta diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 5d5535c4..62e38c4d 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -14,6 +14,7 @@ params { genome_paf = "${test_data_dir}/genomics/sarscov2/genome/genome.paf" genome_sizes = "${test_data_dir}/genomics/sarscov2/genome/genome.sizes" transcriptome_fasta = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.fasta" + proteome_fasta = "${test_data_dir}/genomics/sarscov2/genome/proteome.fasta" transcriptome_paf = "${test_data_dir}/genomics/sarscov2/genome/transcriptome.paf" test_bed = "${test_data_dir}/genomics/sarscov2/genome/bed/test.bed" diff --git a/tests/modules/diamond/blastp/main.nf b/tests/modules/diamond/blastp/main.nf index 5c1459d8..80ea2ec5 100644 --- a/tests/modules/diamond/blastp/main.nf +++ b/tests/modules/diamond/blastp/main.nf @@ -7,8 +7,8 @@ include { DIAMOND_BLASTP } from '../../../../modules/diamond/blastp/main.nf' workflow test_diamond_blastp { - db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] outext = 'txt' DIAMOND_MAKEDB ( db ) @@ -17,8 +17,8 @@ workflow test_diamond_blastp { workflow test_diamond_blastp_daa { - db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] - fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] + fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] outext = 'daa' DIAMOND_MAKEDB ( db ) diff --git a/tests/modules/diamond/blastp/test.yml b/tests/modules/diamond/blastp/test.yml index cb297743..c2b8b6f5 100644 --- a/tests/modules/diamond/blastp/test.yml +++ b/tests/modules/diamond/blastp/test.yml @@ -1,19 +1,19 @@ - name: diamond blastp test_diamond_blastp command: nextflow run tests/modules/diamond/blastp -entry test_diamond_blastp -c tests/config/nextflow.config tags: - - diamond - diamond/blastp + - diamond files: - path: output/diamond/test.diamond_blastp.txt - md5sum: 3ca7f6290c1d8741c573370e6f8b4db0 + md5sum: 2515cf88590afa32356497e79a51fce9 - path: output/diamond/versions.yml - name: diamond blastp test_diamond_blastp_daa command: nextflow run tests/modules/diamond/blastp -entry test_diamond_blastp_daa -c tests/config/nextflow.config tags: - - diamond - diamond/blastp + - diamond files: - path: output/diamond/test.diamond_blastp.daa - md5sum: d4a79ad1fcb2ec69460e5a09a9468db7 + md5sum: 0b539c68a5b66dd6e20ad5d218f4f4c6 - path: output/diamond/versions.yml diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index d6d5a77a..d5949762 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -7,7 +7,7 @@ include { DIAMOND_BLASTX } from '../../../../modules/diamond/blastx/main.nf' workflow test_diamond_blastx { - db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] outext = 'txt' @@ -17,7 +17,7 @@ workflow test_diamond_blastx { workflow test_diamond_blastx_daa { - db = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] outext = 'daa' diff --git a/tests/modules/diamond/blastx/test.yml b/tests/modules/diamond/blastx/test.yml index a2d35c80..9c30ba25 100644 --- a/tests/modules/diamond/blastx/test.yml +++ b/tests/modules/diamond/blastx/test.yml @@ -5,6 +5,7 @@ - diamond/blastx files: - path: output/diamond/test.diamond_blastx.txt + md5sum: eb2aebfa1cb42fcb2121c65528663307 - path: output/diamond/versions.yml - name: diamond blastx test_diamond_blastx_daa @@ -14,5 +15,5 @@ - diamond/blastx files: - path: output/diamond/test.diamond_blastx.daa - md5sum: 2a0ce0f7e01dcead828b87d5cbaccf7a + md5sum: 0df4a833408416f32981415873facc11 - path: output/diamond/versions.yml diff --git a/tests/modules/diamond/makedb/main.nf b/tests/modules/diamond/makedb/main.nf index 70982ae9..d309de6d 100644 --- a/tests/modules/diamond/makedb/main.nf +++ b/tests/modules/diamond/makedb/main.nf @@ -6,7 +6,7 @@ include { DIAMOND_MAKEDB } from '../../../../modules/diamond/makedb/main.nf' workflow test_diamond_makedb { - input = [ file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) ] + input = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] DIAMOND_MAKEDB ( input ) } diff --git a/tests/modules/diamond/makedb/test.yml b/tests/modules/diamond/makedb/test.yml index c8f2d79e..cdddf735 100644 --- a/tests/modules/diamond/makedb/test.yml +++ b/tests/modules/diamond/makedb/test.yml @@ -1,8 +1,9 @@ - name: diamond makedb test_diamond_makedb - command: nextflow run ./tests/modules/diamond/makedb -entry test_diamond_makedb -c ./tests/config/nextflow.config -c ./tests/modules/diamond/makedb/nextflow.config + command: nextflow run tests/modules/diamond/makedb -entry test_diamond_makedb -c tests/config/nextflow.config tags: - - diamond - diamond/makedb + - diamond files: - - path: output/diamond/genome.fasta.dmnd - md5sum: 2447fb376394c20d43ea3aad2aa5d15d + - path: output/diamond/proteome.fasta.dmnd + md5sum: fc28c50b202dd7a7c5451cddff2ba1f4 + - path: output/diamond/versions.yml From d2004a2b769d9ff6c2f8fd8a1e1d0e5660fcc3f9 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Sun, 1 May 2022 21:14:01 +0200 Subject: [PATCH 164/313] update cnvpytor --- modules/cnvpytor/callcnvs/main.nf | 6 +++--- modules/cnvpytor/histogram/main.nf | 6 +++--- modules/cnvpytor/importreaddepth/main.nf | 6 +++--- modules/cnvpytor/partition/main.nf | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/cnvpytor/callcnvs/main.nf b/modules/cnvpytor/callcnvs/main.nf index 17675cde..fcb36ba5 100644 --- a/modules/cnvpytor/callcnvs/main.nf +++ b/modules/cnvpytor/callcnvs/main.nf @@ -2,10 +2,10 @@ process CNVPYTOR_CALLCNVS { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': - 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(pytor) diff --git a/modules/cnvpytor/histogram/main.nf b/modules/cnvpytor/histogram/main.nf index 9e59c6b8..f6e9dd25 100644 --- a/modules/cnvpytor/histogram/main.nf +++ b/modules/cnvpytor/histogram/main.nf @@ -2,10 +2,10 @@ process CNVPYTOR_HISTOGRAM { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': - 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(pytor) diff --git a/modules/cnvpytor/importreaddepth/main.nf b/modules/cnvpytor/importreaddepth/main.nf index 162da719..059c19a5 100644 --- a/modules/cnvpytor/importreaddepth/main.nf +++ b/modules/cnvpytor/importreaddepth/main.nf @@ -2,10 +2,10 @@ process CNVPYTOR_IMPORTREADDEPTH { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': - 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(input_file), path(index) diff --git a/modules/cnvpytor/partition/main.nf b/modules/cnvpytor/partition/main.nf index 0311bdfc..8365cb29 100644 --- a/modules/cnvpytor/partition/main.nf +++ b/modules/cnvpytor/partition/main.nf @@ -2,10 +2,10 @@ process CNVPYTOR_PARTITION { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null) + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2': - 'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }" + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(pytor) From 9a9f3e97dedd3cf72720cca5588df4d4edd35d71 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Sun, 1 May 2022 21:51:40 +0200 Subject: [PATCH 165/313] fix md5sums --- tests/modules/cnvpytor/callcnvs/test.yml | 3 --- tests/modules/cnvpytor/histogram/test.yml | 3 --- tests/modules/cnvpytor/importreaddepth/test.yml | 4 ---- tests/modules/cnvpytor/partition/test.yml | 3 --- 4 files changed, 13 deletions(-) diff --git a/tests/modules/cnvpytor/callcnvs/test.yml b/tests/modules/cnvpytor/callcnvs/test.yml index 4565151e..e284ab53 100644 --- a/tests/modules/cnvpytor/callcnvs/test.yml +++ b/tests/modules/cnvpytor/callcnvs/test.yml @@ -5,9 +5,7 @@ - cnvpytor/callcnvs files: - path: output/cnvpytor/test.tsv - md5sum: d41d8cd98f00b204e9800998ecf8427e - path: output/cnvpytor/versions.yml - md5sum: 0bea08a253fcb2ff0ff79b99df77b9fa - name: cnvpytor callcnvs test_cnvpytor_callcnvs stub command: nextflow run tests/modules/cnvpytor/callcnvs -entry test_cnvpytor_callcnvs -c tests/config/nextflow.config -stub-run @@ -17,4 +15,3 @@ files: - path: output/cnvpytor/test.tsv - path: output/cnvpytor/versions.yml - md5sum: 0bea08a253fcb2ff0ff79b99df77b9fa diff --git a/tests/modules/cnvpytor/histogram/test.yml b/tests/modules/cnvpytor/histogram/test.yml index 0543fcc3..f67901d4 100644 --- a/tests/modules/cnvpytor/histogram/test.yml +++ b/tests/modules/cnvpytor/histogram/test.yml @@ -5,9 +5,7 @@ - cnvpytor/histogram files: - path: output/cnvpytor/test.pytor - md5sum: aa03a8fa15b39f77816705a48e10312a - path: output/cnvpytor/versions.yml - md5sum: 0f4d75c4f3a3eb26c22616d12b0b78b2 - name: cnvpytor histogram test_cnvpytor_histogram stub command: nextflow run tests/modules/cnvpytor/histogram -entry test_cnvpytor_histogram -c tests/config/nextflow.config -stub-run @@ -17,4 +15,3 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 0f4d75c4f3a3eb26c22616d12b0b78b2 diff --git a/tests/modules/cnvpytor/importreaddepth/test.yml b/tests/modules/cnvpytor/importreaddepth/test.yml index b148c38e..a2530c26 100644 --- a/tests/modules/cnvpytor/importreaddepth/test.yml +++ b/tests/modules/cnvpytor/importreaddepth/test.yml @@ -6,7 +6,6 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 5834495324c08a37f3fd73ccdd881dc8 - name: cnvpytor importreaddepth test_cnvpytor_importreaddepth stub command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth -c tests/config/nextflow.config -stub-run @@ -16,7 +15,6 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 5834495324c08a37f3fd73ccdd881dc8 - name: cnvpytor importreaddepth test_cnvpytor_importreaddepth_cram command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth_cram -c tests/config/nextflow.config @@ -26,7 +24,6 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: dfa0afb0982d985b96d1633f71ebb82a - name: cnvpytor importreaddepth test_cnvpytor_importreaddepth_cram stub command: nextflow run tests/modules/cnvpytor/importreaddepth -entry test_cnvpytor_importreaddepth_cram -c tests/config/nextflow.config -stub-run @@ -36,4 +33,3 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: dfa0afb0982d985b96d1633f71ebb82a diff --git a/tests/modules/cnvpytor/partition/test.yml b/tests/modules/cnvpytor/partition/test.yml index 10232097..e24a1200 100644 --- a/tests/modules/cnvpytor/partition/test.yml +++ b/tests/modules/cnvpytor/partition/test.yml @@ -5,9 +5,7 @@ - cnvpytor/partition files: - path: output/cnvpytor/test.pytor - md5sum: aa03a8fa15b39f77816705a48e10312a - path: output/cnvpytor/versions.yml - md5sum: 7fd6ec952a316463bcd324f176b46b64 - name: cnvpytor partition test_cnvpytor_partition stub command: nextflow run tests/modules/cnvpytor/partition -entry test_cnvpytor_partition -c tests/config/nextflow.config -stub-run @@ -17,4 +15,3 @@ files: - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - md5sum: 7fd6ec952a316463bcd324f176b46b64 From 996385fb0f2018d4bb79bc82aea329a58a1e6fe3 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 2 May 2022 09:36:34 +0200 Subject: [PATCH 166/313] Remove MD5sumfor DIAMOND DAA file due to occasioanlly variability --- tests/modules/diamond/blastp/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/modules/diamond/blastp/test.yml b/tests/modules/diamond/blastp/test.yml index c2b8b6f5..4fad0cbf 100644 --- a/tests/modules/diamond/blastp/test.yml +++ b/tests/modules/diamond/blastp/test.yml @@ -15,5 +15,4 @@ - diamond files: - path: output/diamond/test.diamond_blastp.daa - md5sum: 0b539c68a5b66dd6e20ad5d218f4f4c6 - path: output/diamond/versions.yml From 6b64f9cb6c3dd3577931cc3cd032d6fb730000ce Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 10:34:14 +0200 Subject: [PATCH 167/313] feat added stub to modules --- modules/gatk4/mergebamalignment/main.nf | 11 +++++++++++ modules/gatk4/mutect2/main.nf | 14 ++++++++++++++ modules/gatk4/revertsam/main.nf | 11 +++++++++++ modules/gatk4/samtofastq/main.nf | 13 +++++++++++++ modules/samtools/view/main.nf | 12 ++++++++++++ 5 files changed, 61 insertions(+) diff --git a/modules/gatk4/mergebamalignment/main.nf b/modules/gatk4/mergebamalignment/main.nf index 7ba9ccda..5c36b4ba 100644 --- a/modules/gatk4/mergebamalignment/main.nf +++ b/modules/gatk4/mergebamalignment/main.nf @@ -43,4 +43,15 @@ process GATK4_MERGEBAMALIGNMENT { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/mutect2/main.nf b/modules/gatk4/mutect2/main.nf index 4a1f5768..a214b57d 100644 --- a/modules/gatk4/mutect2/main.nf +++ b/modules/gatk4/mutect2/main.nf @@ -57,4 +57,18 @@ process GATK4_MUTECT2 { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.vcf.gz + touch ${prefix}.tbi + touch ${prefix}.stats + touch ${prefix}.f1r2.tar.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/revertsam/main.nf b/modules/gatk4/revertsam/main.nf index 4e8e9ddc..3084658d 100644 --- a/modules/gatk4/revertsam/main.nf +++ b/modules/gatk4/revertsam/main.nf @@ -39,4 +39,15 @@ process GATK4_REVERTSAM { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.reverted.bam + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/gatk4/samtofastq/main.nf b/modules/gatk4/samtofastq/main.nf index 8553e419..d8d94d69 100644 --- a/modules/gatk4/samtofastq/main.nf +++ b/modules/gatk4/samtofastq/main.nf @@ -40,4 +40,17 @@ process GATK4_SAMTOFASTQ { gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.fastq.gz + touch ${prefix}_1.fastq.gz + touch ${prefix}_2.fastq.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//') + END_VERSIONS + """ } diff --git a/modules/samtools/view/main.nf b/modules/samtools/view/main.nf index 11cfb74b..55194e88 100644 --- a/modules/samtools/view/main.nf +++ b/modules/samtools/view/main.nf @@ -41,4 +41,16 @@ process SAMTOOLS_VIEW { samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + touch ${prefix}.bam + touch ${prefix}.cram + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') + END_VERSIONS + """ } From 8a5bcbc325d20f081c9a722bc47f380df43448b7 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 11:06:08 +0200 Subject: [PATCH 168/313] fix the stub of gatk4_revertsam --- modules/gatk4/revertsam/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gatk4/revertsam/main.nf b/modules/gatk4/revertsam/main.nf index 3084658d..162aa0fa 100644 --- a/modules/gatk4/revertsam/main.nf +++ b/modules/gatk4/revertsam/main.nf @@ -43,7 +43,7 @@ process GATK4_REVERTSAM { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.reverted.bam + touch ${prefix}.bam cat <<-END_VERSIONS > versions.yml "${task.process}": From 0511e7fbbfa4ba41940d33b687b1cc90227b4eb8 Mon Sep 17 00:00:00 2001 From: Praveen Date: Mon, 2 May 2022 11:35:15 +0200 Subject: [PATCH 169/313] Changed BAI as optional output to handle large genome --- modules/gatk4/markduplicates/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gatk4/markduplicates/main.nf b/modules/gatk4/markduplicates/main.nf index e8a98156..2650925b 100644 --- a/modules/gatk4/markduplicates/main.nf +++ b/modules/gatk4/markduplicates/main.nf @@ -12,7 +12,7 @@ process GATK4_MARKDUPLICATES { output: tuple val(meta), path("*.bam") , emit: bam - tuple val(meta), path("*.bai") , emit: bai + tuple val(meta), path("*.bai") , optional:true, emit: bai tuple val(meta), path("*.metrics"), emit: metrics path "versions.yml" , emit: versions From 6986975bc0425e0b0e6c93dce648167f91f7ebc9 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 2 May 2022 11:39:07 +0200 Subject: [PATCH 170/313] Fix output channels allow BLAST table customisation --- modules/diamond/blastp/main.nf | 14 +++++++++--- modules/diamond/blastp/meta.yml | 34 ++++++++++++++++++++++++++-- modules/diamond/blastx/main.nf | 14 +++++++++--- modules/diamond/blastx/meta.yml | 28 +++++++++++++++++++++-- tests/modules/diamond/blastp/main.nf | 6 +++-- tests/modules/diamond/blastx/main.nf | 6 +++-- 6 files changed, 88 insertions(+), 14 deletions(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index ccd455f4..6b750145 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -11,10 +11,17 @@ process DIAMOND_BLASTP { tuple val(meta), path(fasta) path db val outext + val blast_columns output: - tuple val(meta), path('*.{blast,xml,txt,daa,sam,tsv,paf}'), emit: output - path "versions.yml" , emit: versions + tuple val(meta), path('*.{blast}'), optional: true, emit: blast + tuple val(meta), path('*.{xml}') , optional: true, emit: xml + tuple val(meta), path('*.{txt}') , optional: true, emit: txt + tuple val(meta), path('*.{daa}') , optional: true, emit: daa + tuple val(meta), path('*.{sam}') , optional: true, emit: sam + tuple val(meta), path('*.{tsv}') , optional: true, emit: tsv + tuple val(meta), path('*.{paf}') , optional: true, emit: paf + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -22,6 +29,7 @@ process DIAMOND_BLASTP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def columns = blast_columns ? "${blast_columns}" : '' switch ( outext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break @@ -39,7 +47,7 @@ process DIAMOND_BLASTP { --threads $task.cpus \\ --db \$DB \\ --query $fasta \\ - --outfmt ${outfmt} \\ + --outfmt ${outfmt} ${columns} \\ $args \\ --out ${prefix}.${outext} diff --git a/modules/diamond/blastp/meta.yml b/modules/diamond/blastp/meta.yml index 1aa36c23..0bc12889 100644 --- a/modules/diamond/blastp/meta.yml +++ b/modules/diamond/blastp/meta.yml @@ -36,12 +36,42 @@ input: `txt` corresponds to to BLAST tabular format. `tsv` corresponds to taxonomic classification format. pattern: "blast|xml|txt|daa|sam|tsv|paf" + - blast_columns: + type: string + description: | + Optional space separated list of DIAMOND tabular BLAST output keywords + used for in conjunction with the 'txt' outext option (--outfmt 6). See + DIAMOND documnetation for more information. output: - - txt: + - blast: type: file description: File containing blastp hits - pattern: "*.{blastp.txt}" + pattern: "*.{blast}" + - xml: + type: file + description: File containing blastp hits + pattern: "*.{xml}" + - txt: + type: file + description: File containing hits in tabular BLAST format. + pattern: "*.{txt}" + - daa: + type: file + description: File containing hits DAA format + pattern: "*.{daa}" + - sam: + type: file + description: File containing aligned reads in SAM format + pattern: "*.{sam}" + - tsv: + type: file + description: Tab separated file containing taxonomic classification of hits + pattern: "*.{tsv}" + - paf: + type: file + description: File containing aligned reads in pairwise mapping format format + pattern: "*.{paf}" - versions: type: file description: File containing software versions diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index 357427eb..bb630e32 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -11,10 +11,17 @@ process DIAMOND_BLASTX { tuple val(meta), path(fasta) path db val outext + val blast_columns output: - tuple val(meta), path('*.{blast,xml,txt,daa,sam,tsv,paf}'), emit: output - path "versions.yml" , emit: versions + tuple val(meta), path('*.{blast}'), optional: true, emit: blast + tuple val(meta), path('*.{xml}') , optional: true, emit: xml + tuple val(meta), path('*.{txt}') , optional: true, emit: txt + tuple val(meta), path('*.{daa}') , optional: true, emit: daa + tuple val(meta), path('*.{sam}') , optional: true, emit: sam + tuple val(meta), path('*.{tsv}') , optional: true, emit: tsv + tuple val(meta), path('*.{paf}') , optional: true, emit: paf + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -22,6 +29,7 @@ process DIAMOND_BLASTX { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def columns = blast_columns ? "${blast_columns}" : '' switch ( outext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break @@ -39,7 +47,7 @@ process DIAMOND_BLASTX { --threads $task.cpus \\ --db \$DB \\ --query $fasta \\ - --outfmt ${outfmt} \\ + --outfmt ${outfmt} ${columns} \\ $args \\ --out ${prefix}.${outext} diff --git a/modules/diamond/blastx/meta.yml b/modules/diamond/blastx/meta.yml index 5ee2d55e..64645d34 100644 --- a/modules/diamond/blastx/meta.yml +++ b/modules/diamond/blastx/meta.yml @@ -38,10 +38,34 @@ input: pattern: "blast|xml|txt|daa|sam|tsv|paf" output: + - blast: + type: file + description: File containing blastp hits + pattern: "*.{blast}" + - xml: + type: file + description: File containing blastp hits + pattern: "*.{xml}" - txt: type: file - description: File containing blastx hits - pattern: "*.{blastx.txt}" + description: File containing hits in tabular BLAST format. + pattern: "*.{txt}" + - daa: + type: file + description: File containing hits DAA format + pattern: "*.{daa}" + - sam: + type: file + description: File containing aligned reads in SAM format + pattern: "*.{sam}" + - tsv: + type: file + description: Tab separated file containing taxonomic classification of hits + pattern: "*.{tsv}" + - paf: + type: file + description: File containing aligned reads in pairwise mapping format format + pattern: "*.{paf}" - versions: type: file description: File containing software versions diff --git a/tests/modules/diamond/blastp/main.nf b/tests/modules/diamond/blastp/main.nf index 80ea2ec5..e90599f0 100644 --- a/tests/modules/diamond/blastp/main.nf +++ b/tests/modules/diamond/blastp/main.nf @@ -10,9 +10,10 @@ workflow test_diamond_blastp { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] outext = 'txt' + blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) } workflow test_diamond_blastp_daa { @@ -20,7 +21,8 @@ workflow test_diamond_blastp_daa { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] outext = 'daa' + blast_columns = [] DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) } diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index d5949762..8f244528 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -10,9 +10,10 @@ workflow test_diamond_blastx { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] outext = 'txt' + blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) } workflow test_diamond_blastx_daa { @@ -20,7 +21,8 @@ workflow test_diamond_blastx_daa { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] outext = 'daa' + blast_columns = [] DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) } From 58e5c6aecefbff55b8f29bb542b908da0bd293f7 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 2 May 2022 11:55:43 +0200 Subject: [PATCH 171/313] Make variables consistent --- modules/diamond/blastp/main.nf | 6 +++--- modules/diamond/blastp/meta.yml | 4 ++-- modules/diamond/blastx/main.nf | 6 +++--- modules/diamond/blastx/meta.yml | 2 +- tests/modules/diamond/blastp/main.nf | 8 ++++---- tests/modules/diamond/blastx/main.nf | 8 ++++---- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index 6b750145..0d78e230 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -10,7 +10,7 @@ process DIAMOND_BLASTP { input: tuple val(meta), path(fasta) path db - val outext + val out_ext val blast_columns output: @@ -30,7 +30,7 @@ process DIAMOND_BLASTP { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def columns = blast_columns ? "${blast_columns}" : '' - switch ( outext ) { + switch ( out_ext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break case "txt": outfmt = 6; break @@ -49,7 +49,7 @@ process DIAMOND_BLASTP { --query $fasta \\ --outfmt ${outfmt} ${columns} \\ $args \\ - --out ${prefix}.${outext} + --out ${prefix}.${out_ext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastp/meta.yml b/modules/diamond/blastp/meta.yml index 0bc12889..3aa81e53 100644 --- a/modules/diamond/blastp/meta.yml +++ b/modules/diamond/blastp/meta.yml @@ -28,7 +28,7 @@ input: type: directory description: Directory containing the protein blast database pattern: "*" - - outext: + - out_ext: type: string description: | Specify the type of output file to be generated. `blast` corresponds to @@ -40,7 +40,7 @@ input: type: string description: | Optional space separated list of DIAMOND tabular BLAST output keywords - used for in conjunction with the 'txt' outext option (--outfmt 6). See + used for in conjunction with the 'txt' out_ext option (--outfmt 6). See DIAMOND documnetation for more information. output: diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index bb630e32..ef641435 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -10,7 +10,7 @@ process DIAMOND_BLASTX { input: tuple val(meta), path(fasta) path db - val outext + val out_ext val blast_columns output: @@ -30,7 +30,7 @@ process DIAMOND_BLASTX { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" def columns = blast_columns ? "${blast_columns}" : '' - switch ( outext ) { + switch ( out_ext ) { case "blast": outfmt = 0; break case "xml": outfmt = 5; break case "txt": outfmt = 6; break @@ -49,7 +49,7 @@ process DIAMOND_BLASTX { --query $fasta \\ --outfmt ${outfmt} ${columns} \\ $args \\ - --out ${prefix}.${outext} + --out ${prefix}.${out_ext} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/diamond/blastx/meta.yml b/modules/diamond/blastx/meta.yml index 64645d34..2dcd7bc6 100644 --- a/modules/diamond/blastx/meta.yml +++ b/modules/diamond/blastx/meta.yml @@ -28,7 +28,7 @@ input: type: directory description: Directory containing the nucelotide blast database pattern: "*" - - outext: + - out_ext: type: string description: | Specify the type of output file to be generated. `blast` corresponds to diff --git a/tests/modules/diamond/blastp/main.nf b/tests/modules/diamond/blastp/main.nf index e90599f0..ff669233 100644 --- a/tests/modules/diamond/blastp/main.nf +++ b/tests/modules/diamond/blastp/main.nf @@ -9,20 +9,20 @@ workflow test_diamond_blastp { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] - outext = 'txt' + out_ext = 'txt' blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } workflow test_diamond_blastp_daa { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] - outext = 'daa' + out_ext = 'daa' blast_columns = [] DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) + DIAMOND_BLASTP ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index 8f244528..bb1b55a8 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -9,20 +9,20 @@ workflow test_diamond_blastx { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] - outext = 'txt' + out_ext = 'txt' blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } workflow test_diamond_blastx_daa { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] - outext = 'daa' + out_ext = 'daa' blast_columns = [] DIAMOND_MAKEDB ( db ) - DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, outext, blast_columns ) + DIAMOND_BLASTX ( [ [id:'test'], fasta ], DIAMOND_MAKEDB.out.db, out_ext, blast_columns ) } From 08d5acbeb6c9e1b113ef3a0f4d32a6a1dbe522fe Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 11:59:08 +0200 Subject: [PATCH 172/313] feat added tests for stubs --- tests/modules/gatk4/mergebamalignment/main.nf | 11 +++++++++++ tests/modules/gatk4/mergebamalignment/test.yml | 9 +++++++++ tests/modules/gatk4/mutect2/main.nf | 18 ++++++++++++++++++ tests/modules/gatk4/mutect2/test.yml | 11 +++++++++++ tests/modules/gatk4/revertsam/main.nf | 8 ++++++++ tests/modules/gatk4/revertsam/test.yml | 9 +++++++++ tests/modules/gatk4/samtofastq/main.nf | 8 ++++++++ tests/modules/gatk4/samtofastq/test.yml | 10 ++++++++++ tests/modules/samtools/view/main.nf | 9 +++++++++ tests/modules/samtools/view/test.yml | 8 ++++++++ 10 files changed, 101 insertions(+) diff --git a/tests/modules/gatk4/mergebamalignment/main.nf b/tests/modules/gatk4/mergebamalignment/main.nf index 8a38c129..ebedad9b 100644 --- a/tests/modules/gatk4/mergebamalignment/main.nf +++ b/tests/modules/gatk4/mergebamalignment/main.nf @@ -14,3 +14,14 @@ workflow test_gatk4_mergebamalignment { GATK4_MERGEBAMALIGNMENT ( input, fasta, dict ) } + +workflow test_gatk4_mergebamalignment_stubs { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true), + 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, fasta, dict ) +} diff --git a/tests/modules/gatk4/mergebamalignment/test.yml b/tests/modules/gatk4/mergebamalignment/test.yml index b1bb32b2..84a67654 100644 --- a/tests/modules/gatk4/mergebamalignment/test.yml +++ b/tests/modules/gatk4/mergebamalignment/test.yml @@ -7,3 +7,12 @@ - path: output/gatk4/test.bam md5sum: e6f1b343700b7ccb94e81ae127433988 - path: output/gatk4/versions.yml + +- name: gatk4 mergebamalignment test_gatk4_mergebamalignment_stubs + command: nextflow run ./tests/modules/gatk4/mergebamalignment -entry test_gatk4_mergebamalignment -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mergebamalignment/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/mergebamalignment + files: + - path: output/gatk4/test.bam + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/mutect2/main.nf b/tests/modules/gatk4/mutect2/main.nf index 0b4339f0..619d28b8 100644 --- a/tests/modules/gatk4/mutect2/main.nf +++ b/tests/modules/gatk4/mutect2/main.nf @@ -118,3 +118,21 @@ workflow test_gatk4_mutect2_mitochondria { GATK4_MUTECT2_MITO ( input, fasta, fai, dict, [], [], [], [] ) } + +workflow test_gatk4_mutect2_tumor_single_stubs { + input = [ [ id:'test'], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)], + [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)], + [] + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) + germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) + panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) + panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) + + GATK4_MUTECT2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) +} diff --git a/tests/modules/gatk4/mutect2/test.yml b/tests/modules/gatk4/mutect2/test.yml index 3cefce09..9232cedd 100644 --- a/tests/modules/gatk4/mutect2/test.yml +++ b/tests/modules/gatk4/mutect2/test.yml @@ -69,3 +69,14 @@ md5sum: fc6ea14ca2da346babe78161beea28c9 - path: output/gatk4/test.vcf.gz.tbi - path: output/gatk4/versions.yml + +- name: gatk4 mutect2 test_gatk4_mutect2_tumor_single_stubs + command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_single -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/mutect2 + files: + - path: output/gatk4/test.vcf.gz + - path: output/gatk4/test.vcf.gz.stats + - path: output/gatk4/test.vcf.gz.tbi + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/revertsam/main.nf b/tests/modules/gatk4/revertsam/main.nf index ab5dddee..5b14d471 100644 --- a/tests/modules/gatk4/revertsam/main.nf +++ b/tests/modules/gatk4/revertsam/main.nf @@ -11,3 +11,11 @@ workflow test_gatk4_revertsam { GATK4_REVERTSAM ( input ) } + +workflow test_gatk4_revertsam_stubs { + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + GATK4_REVERTSAM ( input ) +} diff --git a/tests/modules/gatk4/revertsam/test.yml b/tests/modules/gatk4/revertsam/test.yml index 2ebdb685..89e78659 100644 --- a/tests/modules/gatk4/revertsam/test.yml +++ b/tests/modules/gatk4/revertsam/test.yml @@ -7,3 +7,12 @@ - path: output/gatk4/test.reverted.bam md5sum: f783a88deb45c3a2c20ca12cbe1c5652 - path: output/gatk4/versions.yml + +- name: gatk4 revertsam test_gatk4_revertsam_stubs + command: nextflow run ./tests/modules/gatk4/revertsam -entry test_gatk4_revertsam -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/revertsam/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/revertsam + files: + - path: output/gatk4/test.reverted.bam + - path: output/gatk4/versions.yml diff --git a/tests/modules/gatk4/samtofastq/main.nf b/tests/modules/gatk4/samtofastq/main.nf index 26a8ce2d..aad80057 100644 --- a/tests/modules/gatk4/samtofastq/main.nf +++ b/tests/modules/gatk4/samtofastq/main.nf @@ -19,3 +19,11 @@ workflow test_gatk4_samtofastq_paired_end { GATK4_SAMTOFASTQ ( input ) } + +workflow test_gatk4_samtofastq_paired_end_stubs { + input = [ [ id:'test', single_end: false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] + ] + + GATK4_SAMTOFASTQ ( input ) +} diff --git a/tests/modules/gatk4/samtofastq/test.yml b/tests/modules/gatk4/samtofastq/test.yml index eb25f33b..1288a270 100644 --- a/tests/modules/gatk4/samtofastq/test.yml +++ b/tests/modules/gatk4/samtofastq/test.yml @@ -19,3 +19,13 @@ - path: output/gatk4/test_2.fastq.gz md5sum: 613bf64c023609e1c62ad6ce9e4be8d7 - path: output/gatk4/versions.yml + +- name: gatk4 samtofastq test_gatk4_samtofastq_paired_end_stubs + command: nextflow run ./tests/modules/gatk4/samtofastq -entry test_gatk4_samtofastq_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/samtofastq/nextflow.config -stub-run + tags: + - gatk4 + - gatk4/samtofastq + files: + - path: output/gatk4/test_1.fastq.gz + - path: output/gatk4/test_2.fastq.gz + - path: output/gatk4/versions.yml diff --git a/tests/modules/samtools/view/main.nf b/tests/modules/samtools/view/main.nf index 9c239066..0e3f597e 100644 --- a/tests/modules/samtools/view/main.nf +++ b/tests/modules/samtools/view/main.nf @@ -22,3 +22,12 @@ workflow test_samtools_view_cram { SAMTOOLS_VIEW ( input, fasta ) } + +workflow test_samtools_view_stubs { + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + [] + ] + + SAMTOOLS_VIEW ( input, [] ) +} diff --git a/tests/modules/samtools/view/test.yml b/tests/modules/samtools/view/test.yml index 1287d455..2718130e 100644 --- a/tests/modules/samtools/view/test.yml +++ b/tests/modules/samtools/view/test.yml @@ -14,3 +14,11 @@ - samtools files: - path: output/samtools/test.cram + +- name: samtools view test_samtools_view_stubs + command: nextflow run ./tests/modules/samtools/view -entry test_samtools_view -c ./tests/config/nextflow.config -c ./tests/modules/samtools/view/nextflow.config -stub-run + tags: + - samtools/view + - samtools + files: + - path: output/samtools/test.bam From 67b074382e418de8b86409af7d4b7663f6912a02 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 2 May 2022 12:29:00 +0200 Subject: [PATCH 173/313] Fix tests --- modules/diamond/blastp/main.nf | 14 +++++++------- modules/diamond/blastx/main.nf | 14 +++++++------- tests/modules/diamond/blastp/test.yml | 1 - tests/modules/diamond/blastx/test.yml | 1 - 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index 0d78e230..fc77ee7b 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -14,13 +14,13 @@ process DIAMOND_BLASTP { val blast_columns output: - tuple val(meta), path('*.{blast}'), optional: true, emit: blast - tuple val(meta), path('*.{xml}') , optional: true, emit: xml - tuple val(meta), path('*.{txt}') , optional: true, emit: txt - tuple val(meta), path('*.{daa}') , optional: true, emit: daa - tuple val(meta), path('*.{sam}') , optional: true, emit: sam - tuple val(meta), path('*.{tsv}') , optional: true, emit: tsv - tuple val(meta), path('*.{paf}') , optional: true, emit: paf + tuple val(meta), path('*.blast'), optional: true, emit: blast + tuple val(meta), path('*.xml') , optional: true, emit: xml + tuple val(meta), path('*.txt') , optional: true, emit: txt + tuple val(meta), path('*.daa') , optional: true, emit: daa + tuple val(meta), path('*.sam') , optional: true, emit: sam + tuple val(meta), path('*.tsv') , optional: true, emit: tsv + tuple val(meta), path('*.paf') , optional: true, emit: paf path "versions.yml" , emit: versions when: diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index ef641435..3479eedb 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -14,13 +14,13 @@ process DIAMOND_BLASTX { val blast_columns output: - tuple val(meta), path('*.{blast}'), optional: true, emit: blast - tuple val(meta), path('*.{xml}') , optional: true, emit: xml - tuple val(meta), path('*.{txt}') , optional: true, emit: txt - tuple val(meta), path('*.{daa}') , optional: true, emit: daa - tuple val(meta), path('*.{sam}') , optional: true, emit: sam - tuple val(meta), path('*.{tsv}') , optional: true, emit: tsv - tuple val(meta), path('*.{paf}') , optional: true, emit: paf + tuple val(meta), path('*.blast'), optional: true, emit: blast + tuple val(meta), path('*.xml') , optional: true, emit: xml + tuple val(meta), path('*.txt') , optional: true, emit: txt + tuple val(meta), path('*.daa') , optional: true, emit: daa + tuple val(meta), path('*.sam') , optional: true, emit: sam + tuple val(meta), path('*.tsv') , optional: true, emit: tsv + tuple val(meta), path('*.paf') , optional: true, emit: paf path "versions.yml" , emit: versions when: diff --git a/tests/modules/diamond/blastp/test.yml b/tests/modules/diamond/blastp/test.yml index 4fad0cbf..aff4e1c5 100644 --- a/tests/modules/diamond/blastp/test.yml +++ b/tests/modules/diamond/blastp/test.yml @@ -5,7 +5,6 @@ - diamond files: - path: output/diamond/test.diamond_blastp.txt - md5sum: 2515cf88590afa32356497e79a51fce9 - path: output/diamond/versions.yml - name: diamond blastp test_diamond_blastp_daa diff --git a/tests/modules/diamond/blastx/test.yml b/tests/modules/diamond/blastx/test.yml index 9c30ba25..b2b6149f 100644 --- a/tests/modules/diamond/blastx/test.yml +++ b/tests/modules/diamond/blastx/test.yml @@ -5,7 +5,6 @@ - diamond/blastx files: - path: output/diamond/test.diamond_blastx.txt - md5sum: eb2aebfa1cb42fcb2121c65528663307 - path: output/diamond/versions.yml - name: diamond blastx test_diamond_blastx_daa From bd3bfe0817246082525ab93707976676b1fe208b Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Mon, 2 May 2022 12:41:24 +0200 Subject: [PATCH 174/313] Add warn of default being used --- modules/diamond/blastp/main.nf | 5 +++++ modules/diamond/blastx/main.nf | 5 +++++ tests/modules/diamond/blastx/main.nf | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/diamond/blastp/main.nf b/modules/diamond/blastp/main.nf index fc77ee7b..033186ea 100644 --- a/modules/diamond/blastp/main.nf +++ b/modules/diamond/blastp/main.nf @@ -38,6 +38,11 @@ process DIAMOND_BLASTP { case "sam": outfmt = 101; break case "tsv": outfmt = 102; break case "paf": outfmt = 103; break + default: + outfmt = '6'; + out_ext = 'txt'; + log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); + break } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` diff --git a/modules/diamond/blastx/main.nf b/modules/diamond/blastx/main.nf index 3479eedb..d3272279 100644 --- a/modules/diamond/blastx/main.nf +++ b/modules/diamond/blastx/main.nf @@ -38,6 +38,11 @@ process DIAMOND_BLASTX { case "sam": outfmt = 101; break case "tsv": outfmt = 102; break case "paf": outfmt = 103; break + default: + outfmt = '6'; + out_ext = 'txt'; + log.warn("Unknown output file format provided (${out_ext}): selecting DIAMOND default of tabular BLAST output (txt)"); + break } """ DB=`find -L ./ -name "*.dmnd" | sed 's/.dmnd//'` diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index bb1b55a8..847a64b1 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -9,7 +9,7 @@ workflow test_diamond_blastx { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] - out_ext = 'txt' + out_ext = 'tfdfdt' blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) From f231291e7730654158cbd3f10b82c292e27fa273 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 12:58:12 +0200 Subject: [PATCH 175/313] fix gatk4_reversam test --- modules/gatk4/revertsam/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gatk4/revertsam/main.nf b/modules/gatk4/revertsam/main.nf index 162aa0fa..3084658d 100644 --- a/modules/gatk4/revertsam/main.nf +++ b/modules/gatk4/revertsam/main.nf @@ -43,7 +43,7 @@ process GATK4_REVERTSAM { stub: def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.bam + touch ${prefix}.reverted.bam cat <<-END_VERSIONS > versions.yml "${task.process}": From de40c1bf54b79efb4aa2396ded7f8f457cf33c02 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 13:15:01 +0200 Subject: [PATCH 176/313] chore removing file from test --- tests/modules/gatk4/mergebamalignment/main.nf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/modules/gatk4/mergebamalignment/main.nf b/tests/modules/gatk4/mergebamalignment/main.nf index ebedad9b..0eb6876d 100644 --- a/tests/modules/gatk4/mergebamalignment/main.nf +++ b/tests/modules/gatk4/mergebamalignment/main.nf @@ -16,12 +16,12 @@ workflow test_gatk4_mergebamalignment { } workflow test_gatk4_mergebamalignment_stubs { - input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_unaligned_bam'], checkIfExists: true) + input = [ [ id:'test' ], // meta map + "test_foo.bam", + "test_bar.bam" ] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) + fasta = "genome.fasta" + dict = "genome.fasta.dict" GATK4_MERGEBAMALIGNMENT ( input, fasta, dict ) } From f1c2f624ebf8fb4368b6d5f26ea5b3cfafadf25c Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Mon, 2 May 2022 13:17:22 +0200 Subject: [PATCH 177/313] Update tests/modules/diamond/blastx/main.nf Co-authored-by: Mahesh Binzer-Panchal --- tests/modules/diamond/blastx/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/diamond/blastx/main.nf b/tests/modules/diamond/blastx/main.nf index 847a64b1..8316aa91 100644 --- a/tests/modules/diamond/blastx/main.nf +++ b/tests/modules/diamond/blastx/main.nf @@ -9,7 +9,7 @@ workflow test_diamond_blastx { db = [ file(params.test_data['sarscov2']['genome']['proteome_fasta'], checkIfExists: true) ] fasta = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] - out_ext = 'tfdfdt' + out_ext = 'tfdfdt' // Nonsense file extension to check default case. blast_columns = 'qseqid qlen' DIAMOND_MAKEDB ( db ) From 3a4e415fe21982ccb39807d71c16e7d6ad0a1c1a Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 13:30:18 +0200 Subject: [PATCH 178/313] chores adding dummy files for stubs --- tests/modules/gatk4/mutect2/main.nf | 18 +++++++++--------- tests/modules/gatk4/revertsam/main.nf | 2 +- tests/modules/gatk4/samtofastq/main.nf | 2 +- tests/modules/samtools/view/main.nf | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/modules/gatk4/mutect2/main.nf b/tests/modules/gatk4/mutect2/main.nf index 619d28b8..251e1987 100644 --- a/tests/modules/gatk4/mutect2/main.nf +++ b/tests/modules/gatk4/mutect2/main.nf @@ -121,18 +121,18 @@ workflow test_gatk4_mutect2_mitochondria { workflow test_gatk4_mutect2_tumor_single_stubs { input = [ [ id:'test'], // meta map - [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true)], - [ file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true)], + [ "foo.bam" ], + [ "foo.bam.bai" ], [] ] - fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) - fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) - dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) - germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) - germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) - panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) - panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) + fasta = "genome.fasta" + fai = "genome.fasta.fai" + dict = "genome.fasta.dict" + germline_resource = "genome_gnomAD.r2.1.1.vcf.gz" + germline_resource_tbi = "genome_gnomAD.r2.1.1.vcf.gz.tbi" + panel_of_normals = "genome_mills_and_1000G.indels.hg38.vcf.gz" + panel_of_normals_tbi = "genome_mills_and_1000G.indels.hg38.vcf.gz.tbi" GATK4_MUTECT2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) } diff --git a/tests/modules/gatk4/revertsam/main.nf b/tests/modules/gatk4/revertsam/main.nf index 5b14d471..738ecd8f 100644 --- a/tests/modules/gatk4/revertsam/main.nf +++ b/tests/modules/gatk4/revertsam/main.nf @@ -14,7 +14,7 @@ workflow test_gatk4_revertsam { workflow test_gatk4_revertsam_stubs { input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + "foo_paired_end.bam" ] GATK4_REVERTSAM ( input ) diff --git a/tests/modules/gatk4/samtofastq/main.nf b/tests/modules/gatk4/samtofastq/main.nf index aad80057..79d04c7c 100644 --- a/tests/modules/gatk4/samtofastq/main.nf +++ b/tests/modules/gatk4/samtofastq/main.nf @@ -22,7 +22,7 @@ workflow test_gatk4_samtofastq_paired_end { workflow test_gatk4_samtofastq_paired_end_stubs { input = [ [ id:'test', single_end: false ], // meta map - [ file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] + [ "foo_paired_end.bam" ] ] GATK4_SAMTOFASTQ ( input ) diff --git a/tests/modules/samtools/view/main.nf b/tests/modules/samtools/view/main.nf index 0e3f597e..bdad1078 100644 --- a/tests/modules/samtools/view/main.nf +++ b/tests/modules/samtools/view/main.nf @@ -25,7 +25,7 @@ workflow test_samtools_view_cram { workflow test_samtools_view_stubs { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), + "foo_paired_end.bam", [] ] From da82e06354c34bf6381a86e5af195b24d7ef98ee Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 14:16:07 +0200 Subject: [PATCH 179/313] fix gatk4_mutect2 test --- tests/modules/gatk4/mutect2/main.nf | 14 +++++++++----- tests/modules/gatk4/mutect2/test.yml | 5 +++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/modules/gatk4/mutect2/main.nf b/tests/modules/gatk4/mutect2/main.nf index 251e1987..486b78ad 100644 --- a/tests/modules/gatk4/mutect2/main.nf +++ b/tests/modules/gatk4/mutect2/main.nf @@ -119,10 +119,14 @@ workflow test_gatk4_mutect2_mitochondria { GATK4_MUTECT2_MITO ( input, fasta, fai, dict, [], [], [], [] ) } -workflow test_gatk4_mutect2_tumor_single_stubs { - input = [ [ id:'test'], // meta map - [ "foo.bam" ], - [ "foo.bam.bai" ], +workflow test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs { + input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map + [ "foo_parired.bam", + "foo_parired2.bam" + ], + [ "foo_parired.bam.bai", + "foo_parired2.bam.bai" + ], [] ] @@ -134,5 +138,5 @@ workflow test_gatk4_mutect2_tumor_single_stubs { panel_of_normals = "genome_mills_and_1000G.indels.hg38.vcf.gz" panel_of_normals_tbi = "genome_mills_and_1000G.indels.hg38.vcf.gz.tbi" - GATK4_MUTECT2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) + GATK4_MUTECT2_F1R2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) } diff --git a/tests/modules/gatk4/mutect2/test.yml b/tests/modules/gatk4/mutect2/test.yml index 9232cedd..3853801d 100644 --- a/tests/modules/gatk4/mutect2/test.yml +++ b/tests/modules/gatk4/mutect2/test.yml @@ -70,12 +70,13 @@ - path: output/gatk4/test.vcf.gz.tbi - path: output/gatk4/versions.yml -- name: gatk4 mutect2 test_gatk4_mutect2_tumor_single_stubs - command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_single -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config -stub-run +- name: gatk4 mutect2 test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs + command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_normal_pair_f1r2 -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config -stub-run tags: - gatk4 - gatk4/mutect2 files: + - path: output/gatk4/test.f1r2.tar.gz - path: output/gatk4/test.vcf.gz - path: output/gatk4/test.vcf.gz.stats - path: output/gatk4/test.vcf.gz.tbi From ed4dd1a928ebf4308efb720de878045f7773f8e2 Mon Sep 17 00:00:00 2001 From: ljmesi <37740329+ljmesi@users.noreply.github.com> Date: Mon, 2 May 2022 14:16:12 +0200 Subject: [PATCH 180/313] Add additional handling of fq.gz file name suffix --- modules/metaphlan3/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/metaphlan3/main.nf b/modules/metaphlan3/main.nf index 3fc6b277..bff0eb9a 100644 --- a/modules/metaphlan3/main.nf +++ b/modules/metaphlan3/main.nf @@ -23,7 +23,7 @@ process METAPHLAN3 { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def input_type = ("$input".endsWith(".fastq.gz")) ? "--input_type fastq" : ("$input".contains(".fasta")) ? "--input_type fasta" : ("$input".endsWith(".bowtie2out.txt")) ? "--input_type bowtie2out" : "--input_type sam" + def input_type = ("$input".endsWith(".fastq.gz") || "$input".endsWith(".fq.gz")) ? "--input_type fastq" : ("$input".contains(".fasta")) ? "--input_type fasta" : ("$input".endsWith(".bowtie2out.txt")) ? "--input_type bowtie2out" : "--input_type sam" def input_data = ("$input_type".contains("fastq")) && !meta.single_end ? "${input[0]},${input[1]}" : "$input" def bowtie2_out = "$input_type" == "--input_type bowtie2out" || "$input_type" == "--input_type sam" ? '' : "--bowtie2out ${prefix}.bowtie2out.txt" From 3f07761da5cfee184a281acb1dfe80838566f234 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Mon, 2 May 2022 08:19:13 -0400 Subject: [PATCH 181/313] remove the output check for the versions.yml. --- tests/modules/motus/downloaddb/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/modules/motus/downloaddb/test.yml b/tests/modules/motus/downloaddb/test.yml index ada5383a..e61f937f 100644 --- a/tests/modules/motus/downloaddb/test.yml +++ b/tests/modules/motus/downloaddb/test.yml @@ -5,5 +5,3 @@ - motus/downloaddb files: - path: output/motus/db_mOTU/db_mOTU_versions - - path: output/motus/versions.yml - md5sum: b9b843b2435b01bb430ee8780b5c639e From 5cd517e7596b8869d27c01505029ac1449067e95 Mon Sep 17 00:00:00 2001 From: Jasmin F <73216762+jasmezz@users.noreply.github.com> Date: Mon, 2 May 2022 14:31:40 +0200 Subject: [PATCH 182/313] Apply suggestions from code review Co-authored-by: James A. Fellows Yates --- modules/antismash/antismashlitedownloaddatabases/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/antismash/antismashlitedownloaddatabases/meta.yml b/modules/antismash/antismashlitedownloaddatabases/meta.yml index 4b9644c4..f7ddf3b0 100644 --- a/modules/antismash/antismashlitedownloaddatabases/meta.yml +++ b/modules/antismash/antismashlitedownloaddatabases/meta.yml @@ -27,7 +27,7 @@ input: - database_css: type: directory description: | - antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by ther use by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. + antismash/outputs/html/css folder which is being created during the antiSMASH database downloading step. These files are normally downloaded by download-antismash-databases itself, and must be retrieved by the user by manually running the command with conda or a standalone installation of antiSMASH. Therefore we do not recommend using this module for production pipelines, but rather require users to specify their own local copy of the antiSMASH database in pipelines. pattern: "css" - database_detection: type: directory From 0fc352188b8060331ee4268ee5492d9a54905b47 Mon Sep 17 00:00:00 2001 From: jasmezz Date: Mon, 2 May 2022 14:40:35 +0200 Subject: [PATCH 183/313] Fix conda antismash path --- modules/antismash/antismashlitedownloaddatabases/main.nf | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/antismash/antismashlitedownloaddatabases/main.nf b/modules/antismash/antismashlitedownloaddatabases/main.nf index 5f9141f0..da8a750d 100644 --- a/modules/antismash/antismashlitedownloaddatabases/main.nf +++ b/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -35,12 +35,19 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { script: def args = task.ext.args ?: '' + conda = params.enable_conda """ download-antismash-databases \\ --database-dir antismash_db \\ $args - cp -r /usr/local/lib/python3.8/site-packages/antismash antismash_dir + if [[ $conda = false ]]; \ + then \ + cp -r /usr/local/lib/python3.8/site-packages/antismash antismash_dir; \ + else \ + antismash_path=\$(python -c 'import antismash;print(antismash.__file__.split("__")[0])') \ + cp -r \$antismash_path antismash_dir; \ + fi cat <<-END_VERSIONS > versions.yml "${task.process}": From 31dd31079d8f2968dcd39eb3e4eca5687467d634 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Mon, 2 May 2022 08:41:41 -0400 Subject: [PATCH 184/313] update teh versions.yml --- modules/motus/downloaddb/main.nf | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 58f3cd03..6a689e4a 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -30,12 +30,9 @@ process MOTUS_DOWNLOADDB { ## clean up rm ${software} - ## mOTUs version number is not available from command line. - ## mOTUs save the version number in index database folder. - ## mOTUs will check the database version is same version as exec version. cat <<-END_VERSIONS > versions.yml "${task.process}": - mOTUs: \$(grep motus db_mOTU/db_mOTU_versions | sed 's/motus\\t//g') + mOTUs: \$(echo \$(motus -h 2>&1) | sed 's/^.*Version: //; s/References.*\$//') END_VERSIONS """ } From 250d64dfde684d9e180e737e79540d1675b17dcb Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Mon, 2 May 2022 08:52:54 -0400 Subject: [PATCH 185/313] fix the typo of motus_downloadb. --- modules/motus/downloaddb/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 6a689e4a..46bec9b6 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -18,12 +18,12 @@ process MOTUS_DOWNLOADDB { script: def args = task.ext.args ?: '' - def software = "${motus_downloaddb.simpleName}_copy.py" + def software = "${motus_downloaddb_script.simpleName}_copy.py" """ ## must copy script file to working directory, ## otherwise the reference_db will be download to bin folder ## other than current directory - cp $motus_downloaddb ${software} + cp $motus_downloaddb_script ${software} python ${software} \\ $args \\ -t $task.cpus From 62c6123ec48e15b42bd60b344603a83b658054d8 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 15:11:57 +0200 Subject: [PATCH 186/313] fix gatk4_mutect2 test by changing main.nf --- modules/gatk4/mutect2/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gatk4/mutect2/main.nf b/modules/gatk4/mutect2/main.nf index a214b57d..9969ad70 100644 --- a/modules/gatk4/mutect2/main.nf +++ b/modules/gatk4/mutect2/main.nf @@ -62,8 +62,8 @@ process GATK4_MUTECT2 { def prefix = task.ext.prefix ?: "${meta.id}" """ touch ${prefix}.vcf.gz - touch ${prefix}.tbi - touch ${prefix}.stats + touch ${prefix}.vcf.gz.tbi + touch ${prefix}.vcf.gz.stats touch ${prefix}.f1r2.tar.gz cat <<-END_VERSIONS > versions.yml From 50cc136a7810323f2c802ff3bcc1bf54c85d57a9 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 15:14:05 +0200 Subject: [PATCH 187/313] Update tests/modules/gatk4/mutect2/main.nf fix spelling mistake Co-authored-by: Maxime U. Garcia --- tests/modules/gatk4/mutect2/main.nf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/modules/gatk4/mutect2/main.nf b/tests/modules/gatk4/mutect2/main.nf index 486b78ad..310e9ca1 100644 --- a/tests/modules/gatk4/mutect2/main.nf +++ b/tests/modules/gatk4/mutect2/main.nf @@ -121,11 +121,11 @@ workflow test_gatk4_mutect2_mitochondria { workflow test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs { input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map - [ "foo_parired.bam", - "foo_parired2.bam" + [ "foo_paired.bam", + "foo_paired2.bam" ], - [ "foo_parired.bam.bai", - "foo_parired2.bam.bai" + [ "foo_paired.bam.bai", + "foo_paired2.bam.bai" ], [] ] From 38d9d81aaf61c83743b7e43e405917e7aeb376a6 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 16:10:57 +0200 Subject: [PATCH 188/313] update code --- tests/modules/krona/ktimporttaxonomy/main.nf | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index 280658a5..e58543a6 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -2,9 +2,11 @@ nextflow.enable.dsl = 2 -include { KRONA_KTIMPORTTAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as TAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' -include { KRONA_KTIMPORTTAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as TAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' + +include { KRONA_KRONADB as DOWNLOAD_DB } from '../../../../modules/krona/kronadb/main.nf' workflow test_krona_ktimporttaxonomy_reads { @@ -12,9 +14,10 @@ workflow test_krona_ktimporttaxonomy_reads { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['test_1.kraken2.reads.txt'], checkIfExists: true) ] - taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) + // taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) - KRONA_KTIMPORTTAXONOMY_READS ( input, taxonomy ) + DOWNLOAD_DB() + TAXONOMY_READS ( input, DOWNLOAD_DB.out.db ) } workflow test_krona_ktimporttaxonomy_report { @@ -25,5 +28,6 @@ workflow test_krona_ktimporttaxonomy_report { ] taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) - KRONA_KTIMPORTTAXONOMY_REPORT ( input, taxonomy ) + TDOWNLOAD_DB() + TAXONOMY_REPORT ( input, DOWNLOAD_DB.out.db ) } From 42310cbce29929b0c40520f852ca19307febf094 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 16:14:38 +0200 Subject: [PATCH 189/313] updated config to reflect names in test workflow --- tests/modules/krona/ktimporttaxonomy/nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index fb4d86f5..973b60ba 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,11 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: KRONA_KTIMPORTTAXONOMY_READS { + withName: TAXONOMY_READS { ext.args = '-t 3' } - withName: KRONA_KTIMPORTTAXONOMY_REPORT { + withName: TAXONOMY_REPORT { ext.args = '-m 3 -t 5' } From 80f107515e5e4d0db115d4ce4677a8c98bd50633 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 16:22:22 +0200 Subject: [PATCH 190/313] update nextflow.config withName --- tests/modules/krona/ktimporttaxonomy/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index e58543a6..4ac0f0ac 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -12,7 +12,7 @@ workflow test_krona_ktimporttaxonomy_reads { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['metagenome']['test_1.kraken2.reads.txt'], checkIfExists: true) + file(params.test_data['sarscov2']['metagenome']['classified_reads_assignment'], checkIfExists: true) ] // taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) @@ -24,7 +24,7 @@ workflow test_krona_ktimporttaxonomy_report { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['metagenome']['test_1.kraken2.report.txt'], checkIfExists: true) + file(params.test_data['sarscov2']['metagenome']['report'], checkIfExists: true) ] taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) From 6a9f2077cf6f224c547e4c7ff0f703cedc69bda2 Mon Sep 17 00:00:00 2001 From: jasmezz Date: Mon, 2 May 2022 16:41:59 +0200 Subject: [PATCH 191/313] Fix unbound variable crash --- modules/antismash/antismashlitedownloaddatabases/main.nf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/antismash/antismashlitedownloaddatabases/main.nf b/modules/antismash/antismashlitedownloaddatabases/main.nf index da8a750d..fbb92490 100644 --- a/modules/antismash/antismashlitedownloaddatabases/main.nf +++ b/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -37,16 +37,15 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { def args = task.ext.args ?: '' conda = params.enable_conda """ - download-antismash-databases \\ - --database-dir antismash_db \\ - $args + #download-antismash-databases \\ + # --database-dir antismash_db \\ + # $args if [[ $conda = false ]]; \ then \ cp -r /usr/local/lib/python3.8/site-packages/antismash antismash_dir; \ else \ - antismash_path=\$(python -c 'import antismash;print(antismash.__file__.split("__")[0])') \ - cp -r \$antismash_path antismash_dir; \ + cp -r \$(python -c 'import antismash;print(antismash.__file__.split("/__")[0])') antismash_dir; \ fi cat <<-END_VERSIONS > versions.yml From 700d6ab3f1a5596a2c9bbdd22c763644061580a8 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 16:55:18 +0200 Subject: [PATCH 192/313] errore TDOWNLOAD --- tests/modules/krona/ktimporttaxonomy/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index 4ac0f0ac..9987eec5 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -28,6 +28,6 @@ workflow test_krona_ktimporttaxonomy_report { ] taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) - TDOWNLOAD_DB() + DOWNLOAD_DB() TAXONOMY_REPORT ( input, DOWNLOAD_DB.out.db ) } From 8db0b754c0422cb80d06f47986d660f8aaf02c89 Mon Sep 17 00:00:00 2001 From: Jasmin F <73216762+jasmezz@users.noreply.github.com> Date: Mon, 2 May 2022 16:56:39 +0200 Subject: [PATCH 193/313] Fix commented-out command --- modules/antismash/antismashlitedownloaddatabases/main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/antismash/antismashlitedownloaddatabases/main.nf b/modules/antismash/antismashlitedownloaddatabases/main.nf index fbb92490..a0928333 100644 --- a/modules/antismash/antismashlitedownloaddatabases/main.nf +++ b/modules/antismash/antismashlitedownloaddatabases/main.nf @@ -37,9 +37,9 @@ process ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES { def args = task.ext.args ?: '' conda = params.enable_conda """ - #download-antismash-databases \\ - # --database-dir antismash_db \\ - # $args + download-antismash-databases \\ + --database-dir antismash_db \\ + $args if [[ $conda = false ]]; \ then \ From 2e4c200a26ecb6dd63f2c95e5ab619d99e7a7582 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:13:20 +0200 Subject: [PATCH 194/313] remove new line between includes --- tests/modules/krona/ktimporttaxonomy/main.nf | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index 9987eec5..56ff8ae2 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -3,9 +3,7 @@ nextflow.enable.dsl = 2 include { KRONA_KTIMPORTTAXONOMY as TAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' - include { KRONA_KTIMPORTTAXONOMY as TAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' - include { KRONA_KRONADB as DOWNLOAD_DB } from '../../../../modules/krona/kronadb/main.nf' workflow test_krona_ktimporttaxonomy_reads { From 3cebcbfc0ae17d3fe026619ee7c0cb1c7c2a665d Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:13:58 +0200 Subject: [PATCH 195/313] remove taxonomy not used in place of db --- tests/modules/krona/ktimporttaxonomy/main.nf | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index 56ff8ae2..c259a793 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -12,7 +12,6 @@ workflow test_krona_ktimporttaxonomy_reads { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['classified_reads_assignment'], checkIfExists: true) ] - // taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) DOWNLOAD_DB() TAXONOMY_READS ( input, DOWNLOAD_DB.out.db ) @@ -24,7 +23,6 @@ workflow test_krona_ktimporttaxonomy_report { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['report'], checkIfExists: true) ] - taxonomy = file(params.test_data['generic']['txt']['hello'], checkIfExists: true) DOWNLOAD_DB() TAXONOMY_REPORT ( input, DOWNLOAD_DB.out.db ) From 028dc3cb876415932054df1d456e2f6549c52219 Mon Sep 17 00:00:00 2001 From: carpanz Date: Mon, 2 May 2022 17:24:55 +0200 Subject: [PATCH 196/313] updated test yml file --- tests/modules/krona/ktimporttaxonomy/test.yml | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index b7748980..b73e6473 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -1,9 +1,29 @@ -- name: krona ktimporttaxonomy test_krona_ktimporttaxonomy - command: nextflow run ./tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy -c ./tests/config/nextflow.config -c ./tests/modules/krona/ktimporttaxonomy/nextflow.config +- name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_reads + command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_reads -c tests/config/nextflow.config tags: - krona/ktimporttaxonomy - krona files: - - path: output/krona/taxonomy.krona.html - contains: - - "DOCTYPE html PUBLIC" + - path: output/download/taxonomy/taxonomy.tab + md5sum: 0d13b5b3838f12d1f51827464345e0f0 + - path: output/download/versions.yml + md5sum: 5bf3137779303fb36e4c5373704a4bb6 + - path: output/taxonomy/taxonomy.krona.html + contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + - path: output/taxonomy/versions.yml + md5sum: ea32399c9fd3bc1d4fc1081cb3a345d5 + +- name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_report + command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_report -c tests/config/nextflow.config + tags: + - krona/ktimporttaxonomy + - krona + files: + - path: output/download/taxonomy/taxonomy.tab + md5sum: 0d13b5b3838f12d1f51827464345e0f0 + - path: output/download/versions.yml + md5sum: ea7720c3555ad61eb06b46454c87407e + - path: output/taxonomy/taxonomy.krona.html + contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + - path: output/taxonomy/versions.yml + md5sum: 4d46e08ff46dbd1e7075b93903b72400 From 1188264fa209e4de8e139d79e0d79684d543c11a Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:25:58 +0200 Subject: [PATCH 197/313] finished test yml file --- tests/modules/krona/ktimporttaxonomy/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index b73e6473..f9d4c91a 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -9,7 +9,8 @@ - path: output/download/versions.yml md5sum: 5bf3137779303fb36e4c5373704a4bb6 - path: output/taxonomy/taxonomy.krona.html - contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + contains: + - "DOCTYPE html PUBLIC" - path: output/taxonomy/versions.yml md5sum: ea32399c9fd3bc1d4fc1081cb3a345d5 @@ -24,6 +25,7 @@ - path: output/download/versions.yml md5sum: ea7720c3555ad61eb06b46454c87407e - path: output/taxonomy/taxonomy.krona.html - contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + contains: + - "DOCTYPE html PUBLIC" - path: output/taxonomy/versions.yml md5sum: 4d46e08ff46dbd1e7075b93903b72400 From 24dc2d21132b07b4c3d36c9836885427a5019b11 Mon Sep 17 00:00:00 2001 From: jvhagey Date: Mon, 2 May 2022 11:30:19 -0400 Subject: [PATCH 198/313] added tests --- modules/srst2/srst2/main.nf | 4 ++-- modules/srst2/srst2/meta.yml | 6 +++++- tests/modules/srst2/srst2/main.nf | 31 +++++++++++++++++++++++++++--- tests/modules/srst2/srst2/test.yml | 21 ++++++++++++++++++-- 4 files changed, 54 insertions(+), 8 deletions(-) diff --git a/modules/srst2/srst2/main.nf b/modules/srst2/srst2/main.nf index 4ee9f6a6..e8a91716 100644 --- a/modules/srst2/srst2/main.nf +++ b/modules/srst2/srst2/main.nf @@ -11,8 +11,9 @@ process SRST2_SRST2 { tuple val(meta), path(fastq_s), path(db) output: - tuple val(meta), path("*_genes_*_results.txt") , emit: gene_results + tuple val(meta), path("*_genes_*_results.txt") , optional:true, emit: gene_results tuple val(meta), path("*_fullgenes_*_results.txt") , optional:true, emit: fullgene_results + tuple val(meta), path("*_mlst_*_results.txt") , optional:true, emit: mlst_results tuple val(meta), path("*.pileup") , emit: pileup tuple val(meta), path("*.sorted.bam") , emit: sorted_bam path "versions.yml" , emit: versions @@ -38,7 +39,6 @@ process SRST2_SRST2 { --output ${prefix} \\ ${database} \\ $args - cat <<-END_VERSIONS > versions.yml "${task.process}": srst2: \$(echo \$(srst2 --version 2>&1) | sed 's/srst2 //' )) diff --git a/modules/srst2/srst2/meta.yml b/modules/srst2/srst2/meta.yml index 3755fb34..94c763bb 100644 --- a/modules/srst2/srst2/meta.yml +++ b/modules/srst2/srst2/meta.yml @@ -49,12 +49,16 @@ output: pattern: "versions.yml" - txt: type: file - description: A detailed report, with one row per gene per sample described here: https://github.com/katholt/srst2#gene-typing + description: A detailed report, with one row per gene per sample described here github.com/katholt/srst2#gene-typing pattern: "*_fullgenes_*_results.txt" - txt: type: file description: A tabulated summary report of samples x genes. pattern: "*_genes_*_results.txt" + - txt: + type: file + description: A tabulated summary report of mlst subtyping. + pattern: "*_mlst_*_results.txt" - bam: type: file description: Sorted BAM file diff --git a/tests/modules/srst2/srst2/main.nf b/tests/modules/srst2/srst2/main.nf index 235f3ff9..7d51937b 100644 --- a/tests/modules/srst2/srst2/main.nf +++ b/tests/modules/srst2/srst2/main.nf @@ -4,9 +4,34 @@ nextflow.enable.dsl = 2 include { SRST2_SRST2 } from '../../../../modules/srst2/srst2/main.nf' +workflow test_srst2_srst2_exit { + + input = [ + [ id:'test', single_end:false, db:"test"], // meta map + [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_1_fastq_gz'], checkIfExists: true), + file(params.test_data['bacteroides_fragilis']['illumina']['test1_2_fastq_gz'], checkIfExists: true) ], +// [("")] + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/resFinder_20180221_srst2.fasta') + ] + + SRST2_SRST2(input) +} + +workflow test_srst2_srst2_mlst { + + input = [ + [ id:'test', single_end:false, db:"mlst"], // meta map + [ file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/SRR9067271_1.fastq.gz", checkIfExists: true), + file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/SRR9067271_2.fastq.gz", checkIfExists: true) ], + file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/MLST_DB.fas') + ] + + SRST2_SRST2(input) +} + workflow test_srst2_srst2_paired_end { - input = [ + input = [ [ id:'test', single_end:false, db:"gene"], // meta map [ file(params.test_data['bacteroides_fragilis']['illumina']['test1_1_fastq_gz'], checkIfExists: true), file(params.test_data['bacteroides_fragilis']['illumina']['test1_2_fastq_gz'], checkIfExists: true) ], @@ -18,11 +43,11 @@ workflow test_srst2_srst2_paired_end { workflow test_srst2_srst2_single_end { - input = [ + input = [ [ id:'test', single_end:true, db:"gene" ], // meta map file(params.test_data['bacteroides_fragilis']['illumina']['test1_1_fastq_gz'], checkIfExists: true), file('https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/resFinder_20180221_srst2.fasta') // Change to params.test_data syntax after the data is included in tests/config/test_data.config ] SRST2_SRST2(input) -} \ No newline at end of file +} diff --git a/tests/modules/srst2/srst2/test.yml b/tests/modules/srst2/srst2/test.yml index f011b4d1..102c78a4 100644 --- a/tests/modules/srst2/srst2/test.yml +++ b/tests/modules/srst2/srst2/test.yml @@ -1,8 +1,22 @@ +- name: srst2 srst2 test_srst2_srst2_mlst + command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_mlst -c tests/config/nextflow.config + tags: + - srst2/srst2 + - srst2 + files: + - path: output/srst2/test__SRR9067271.MLST_DB.pileup + md5sum: f59217dd9340264b9913c20b545b2ce7 + - path: output/srst2/test__SRR9067271.MLST_DB.sorted.bam + - path: output/srst2/test__mlst__MLST_DB__results.txt + md5sum: ec1b1f69933401d67c57f64cad11a098 + - path: output/srst2/versions.yml + md5sum: a0c256a2fd3636069710b8ef22ee5ea7 + - name: srst2 srst2 test_srst2_srst2_paired_end command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_paired_end -c tests/config/nextflow.config tags: - - srst2 - srst2/srst2 + - srst2 files: - path: output/srst2/test__genes__resFinder_20180221_srst2__results.txt md5sum: 099aa6cacec5524b311f606debdfb3a9 @@ -15,8 +29,8 @@ - name: srst2 srst2 test_srst2_srst2_single_end command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_single_end -c tests/config/nextflow.config tags: - - srst2 - srst2/srst2 + - srst2 files: - path: output/srst2/test__fullgenes__resFinder_20180221_srst2__results.txt md5sum: d0762ef8c38afd0e0a34cce52ed1a3db @@ -27,3 +41,6 @@ - path: output/srst2/test__test1_1.resFinder_20180221_srst2.sorted.bam - path: output/srst2/versions.yml md5sum: 790fe00493c6634d17801a930073218b + +- name: srst2 srst2 test_srst2_srst2_exit #Testing pipeline exit when not meta.db + exit_code: 1 From cd45dc15503972b3f4bce572fe98168f68e66f9e Mon Sep 17 00:00:00 2001 From: jvhagey Date: Mon, 2 May 2022 11:38:39 -0400 Subject: [PATCH 199/313] linting test.yml --- tests/modules/srst2/srst2/test.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/modules/srst2/srst2/test.yml b/tests/modules/srst2/srst2/test.yml index 102c78a4..9e448211 100644 --- a/tests/modules/srst2/srst2/test.yml +++ b/tests/modules/srst2/srst2/test.yml @@ -1,3 +1,9 @@ +- name: srst2 srst2 test_srst2_srst2_exit #Testing pipeline exit when not meta.db + tags: + - srst2/srst2 + - srst2 + exit_code: 1 + - name: srst2 srst2 test_srst2_srst2_mlst command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_mlst -c tests/config/nextflow.config tags: @@ -41,6 +47,3 @@ - path: output/srst2/test__test1_1.resFinder_20180221_srst2.sorted.bam - path: output/srst2/versions.yml md5sum: 790fe00493c6634d17801a930073218b - -- name: srst2 srst2 test_srst2_srst2_exit #Testing pipeline exit when not meta.db - exit_code: 1 From 76a0e3ef04aac7c3ea70b375aaabee9f2dfb332a Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:40:50 +0200 Subject: [PATCH 200/313] updated config kraken report name --- tests/config/test_data.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 4337d5b9..21cf5b27 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -112,7 +112,7 @@ params { } 'metagenome' { classified_reads_assignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt" - report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" + kraken_report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" } } 'homo_sapiens' { From c9ab26ba8e5b222599baca73fa40a36909834685 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:41:55 +0200 Subject: [PATCH 201/313] synced name of report as in test config --- tests/modules/krona/ktimporttaxonomy/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index c259a793..5fa227b6 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -21,7 +21,7 @@ workflow test_krona_ktimporttaxonomy_report { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['metagenome']['report'], checkIfExists: true) + file(params.test_data['sarscov2']['metagenome']['kraken_report'], checkIfExists: true) ] DOWNLOAD_DB() From c07ae8c48345b2700684eda60fda099c159ad6de Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:47:45 +0200 Subject: [PATCH 202/313] fixed lint in ktimporttaxonomy --- modules/krona/ktimporttaxonomy/main.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/krona/ktimporttaxonomy/main.nf b/modules/krona/ktimporttaxonomy/main.nf index 4fa15669..6a9fae89 100644 --- a/modules/krona/ktimporttaxonomy/main.nf +++ b/modules/krona/ktimporttaxonomy/main.nf @@ -24,9 +24,9 @@ process KRONA_KTIMPORTTAXONOMY { def args = task.ext.args ?: '' """ ktImportTaxonomy \\ - "$report" \\ - $args \\ - -tax taxonomy + "$report" \\ + $args \\ + -tax taxonomy cat <<-END_VERSIONS > versions.yml "${task.process}": From b0a2d36ec1e8cd53258961e8fbd1e40b42e07638 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 18:16:08 +0200 Subject: [PATCH 203/313] removing kronadb module from testing ktimporttaxonomy test - NB: temporarily using test db while testdb is added to test-datasets --- tests/modules/krona/ktimporttaxonomy/main.nf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index 5fa227b6..e48882b9 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -12,9 +12,9 @@ workflow test_krona_ktimporttaxonomy_reads { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['classified_reads_assignment'], checkIfExists: true) ] + taxonomy = file("https://raw.githubusercontent.com/lescai/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab") - DOWNLOAD_DB() - TAXONOMY_READS ( input, DOWNLOAD_DB.out.db ) + TAXONOMY_READS ( input, taxonomy ) } workflow test_krona_ktimporttaxonomy_report { @@ -23,7 +23,7 @@ workflow test_krona_ktimporttaxonomy_report { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['kraken_report'], checkIfExists: true) ] + taxonomy = file("https://raw.githubusercontent.com/lescai/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab") - DOWNLOAD_DB() - TAXONOMY_REPORT ( input, DOWNLOAD_DB.out.db ) + TAXONOMY_REPORT ( input, taxonomy ) } From 6e83196634582e7a70dc1ab52e293e26f80c7acc Mon Sep 17 00:00:00 2001 From: carpanz Date: Mon, 2 May 2022 18:20:36 +0200 Subject: [PATCH 204/313] updating test yml after removing kronadb from test --- tests/modules/krona/ktimporttaxonomy/test.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index f9d4c91a..64ec948e 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -1,31 +1,21 @@ - name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_reads command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_reads -c tests/config/nextflow.config tags: - - krona/ktimporttaxonomy - krona + - krona/ktimporttaxonomy files: - - path: output/download/taxonomy/taxonomy.tab - md5sum: 0d13b5b3838f12d1f51827464345e0f0 - - path: output/download/versions.yml - md5sum: 5bf3137779303fb36e4c5373704a4bb6 - path: output/taxonomy/taxonomy.krona.html - contains: - - "DOCTYPE html PUBLIC" + contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' - path: output/taxonomy/versions.yml md5sum: ea32399c9fd3bc1d4fc1081cb3a345d5 - name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_report command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_report -c tests/config/nextflow.config tags: - - krona/ktimporttaxonomy - krona + - krona/ktimporttaxonomy files: - - path: output/download/taxonomy/taxonomy.tab - md5sum: 0d13b5b3838f12d1f51827464345e0f0 - - path: output/download/versions.yml - md5sum: ea7720c3555ad61eb06b46454c87407e - path: output/taxonomy/taxonomy.krona.html - contains: - - "DOCTYPE html PUBLIC" + contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' - path: output/taxonomy/versions.yml md5sum: 4d46e08ff46dbd1e7075b93903b72400 From 32b8f3f612e22aeca11dd8ec1fb0a025d1e8e8ed Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 18:21:26 +0200 Subject: [PATCH 205/313] adding contain for html output in test yml --- tests/modules/krona/ktimporttaxonomy/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index 64ec948e..26d16dde 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -5,7 +5,8 @@ - krona/ktimporttaxonomy files: - path: output/taxonomy/taxonomy.krona.html - contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + contains: + - "DOCTYPE html PUBLIC" - path: output/taxonomy/versions.yml md5sum: ea32399c9fd3bc1d4fc1081cb3a345d5 @@ -16,6 +17,6 @@ - krona/ktimporttaxonomy files: - path: output/taxonomy/taxonomy.krona.html - contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' - - path: output/taxonomy/versions.yml + contains: + - "DOCTYPE html PUBLIC" md5sum: 4d46e08ff46dbd1e7075b93903b72400 From 5735f515f805445d0d2132fa5b587e0a1f61d2ec Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Mon, 2 May 2022 12:25:48 -0400 Subject: [PATCH 206/313] fix a typo in version export. --- modules/motus/downloaddb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 46bec9b6..c8af459a 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -32,7 +32,7 @@ process MOTUS_DOWNLOADDB { cat <<-END_VERSIONS > versions.yml "${task.process}": - mOTUs: \$(echo \$(motus -h 2>&1) | sed 's/^.*Version: //; s/References.*\$//') + mOTUs: \$(echo \$(motus -h 2>&1) | sed 's/^.*Version: //; s/Reference.*\$//') END_VERSIONS """ } From 99a87119970762fea09f8c71080dabf88d0836f3 Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Mon, 2 May 2022 12:26:56 -0400 Subject: [PATCH 207/313] Update tests/modules/srst2/srst2/test.yml Co-authored-by: Edmund Miller --- tests/modules/srst2/srst2/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/modules/srst2/srst2/test.yml b/tests/modules/srst2/srst2/test.yml index 9e448211..5ed236d3 100644 --- a/tests/modules/srst2/srst2/test.yml +++ b/tests/modules/srst2/srst2/test.yml @@ -1,4 +1,5 @@ - name: srst2 srst2 test_srst2_srst2_exit #Testing pipeline exit when not meta.db + command: nextflow run tests/modules/srst2/srst2 -entry test_srst2_srst2_exit -c tests/config/nextflow.config tags: - srst2/srst2 - srst2 From 5136ed29c4ce92eb32160ff7c5ad63ba243861fa Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 18:38:59 +0200 Subject: [PATCH 208/313] removed include and changed process name due to expected folder name before tokenize --- tests/modules/krona/ktimporttaxonomy/main.nf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index e48882b9..f8e9f485 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -2,9 +2,8 @@ nextflow.enable.dsl = 2 -include { KRONA_KTIMPORTTAXONOMY as TAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' -include { KRONA_KTIMPORTTAXONOMY as TAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' -include { KRONA_KRONADB as DOWNLOAD_DB } from '../../../../modules/krona/kronadb/main.nf' +include { KRONA_KTIMPORTTAXONOMY as KRONA_TAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as KRONA_TAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' workflow test_krona_ktimporttaxonomy_reads { @@ -14,7 +13,7 @@ workflow test_krona_ktimporttaxonomy_reads { ] taxonomy = file("https://raw.githubusercontent.com/lescai/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab") - TAXONOMY_READS ( input, taxonomy ) + KRONA_TAXONOMY_READS ( input, taxonomy ) } workflow test_krona_ktimporttaxonomy_report { @@ -25,5 +24,5 @@ workflow test_krona_ktimporttaxonomy_report { ] taxonomy = file("https://raw.githubusercontent.com/lescai/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab") - TAXONOMY_REPORT ( input, taxonomy ) + KRONA_TAXONOMY_REPORT ( input, taxonomy ) } From 1deb789502a3a2765329141598ed3e1a69d5b4fa Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 18:39:45 +0200 Subject: [PATCH 209/313] synced withName ext.args with process name --- tests/modules/krona/ktimporttaxonomy/nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index 973b60ba..3f35bfc2 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,11 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: TAXONOMY_READS { + withName: KRONA_TAXONOMY_READS { ext.args = '-t 3' } - withName: TAXONOMY_REPORT { + withName: KRONA_TAXONOMY_REPORT { ext.args = '-m 3 -t 5' } From e8b24458780cc4716c35416fa50bba9efb3361b9 Mon Sep 17 00:00:00 2001 From: carpanz Date: Mon, 2 May 2022 18:43:20 +0200 Subject: [PATCH 210/313] updated file location in test yml --- tests/modules/krona/ktimporttaxonomy/test.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index 26d16dde..14b3d9be 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -4,11 +4,10 @@ - krona - krona/ktimporttaxonomy files: - - path: output/taxonomy/taxonomy.krona.html - contains: - - "DOCTYPE html PUBLIC" - - path: output/taxonomy/versions.yml - md5sum: ea32399c9fd3bc1d4fc1081cb3a345d5 + - path: output/krona/taxonomy.krona.html + contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + - path: output/krona/versions.yml + md5sum: c6823bf3822cf3714fe9f2073ee76d60 - name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_report command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_report -c tests/config/nextflow.config @@ -16,7 +15,7 @@ - krona - krona/ktimporttaxonomy files: - - path: output/taxonomy/taxonomy.krona.html - contains: - - "DOCTYPE html PUBLIC" - md5sum: 4d46e08ff46dbd1e7075b93903b72400 + - path: output/krona/taxonomy.krona.html + contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + - path: output/krona/versions.yml + md5sum: 06b76d9a7602d63fec182e195cc16a76 From d2e1408b0f1cd17fed110285d7399f63e6d357ad Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 18:44:05 +0200 Subject: [PATCH 211/313] updated content for html file in test yml --- tests/modules/krona/ktimporttaxonomy/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index 14b3d9be..5dc02c58 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -5,7 +5,8 @@ - krona/ktimporttaxonomy files: - path: output/krona/taxonomy.krona.html - contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + contains: + - "DOCTYPE html PUBLIC" - path: output/krona/versions.yml md5sum: c6823bf3822cf3714fe9f2073ee76d60 @@ -16,6 +17,7 @@ - krona/ktimporttaxonomy files: - path: output/krona/taxonomy.krona.html - contains: '[ # TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead ]' + contains: + - "DOCTYPE html PUBLIC" - path: output/krona/versions.yml md5sum: 06b76d9a7602d63fec182e195cc16a76 From 16aa3915e3853c6baed6d847dedc0229340c7901 Mon Sep 17 00:00:00 2001 From: "Moritz E. Beber" Date: Mon, 2 May 2022 23:16:59 +0200 Subject: [PATCH 212/313] feat: add module for slimfastq --- modules/slimfastq/main.nf | 52 +++++++++++++++++++++++++ modules/slimfastq/meta.yml | 41 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/slimfastq/main.nf | 46 ++++++++++++++++++++++ tests/modules/slimfastq/nextflow.config | 5 +++ tests/modules/slimfastq/test.yml | 41 +++++++++++++++++++ 6 files changed, 189 insertions(+) create mode 100644 modules/slimfastq/main.nf create mode 100644 modules/slimfastq/meta.yml create mode 100644 tests/modules/slimfastq/main.nf create mode 100644 tests/modules/slimfastq/nextflow.config create mode 100644 tests/modules/slimfastq/test.yml diff --git a/modules/slimfastq/main.nf b/modules/slimfastq/main.nf new file mode 100644 index 00000000..19ca876f --- /dev/null +++ b/modules/slimfastq/main.nf @@ -0,0 +1,52 @@ +def VERSION = '2.04' + +process SLIMFASTQ { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::slimfastq=2.04" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/slimfastq:2.04--h87f3376_2': + 'quay.io/biocontainers/slimfastq:2.04--h87f3376_2' }" + + input: + tuple val(meta), path(fastq) + + output: + tuple val(meta), path("*.sfq"), emit: sfq + path "versions.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 (meta.single_end) { + """ + gzip -d -c '${fastq}' | slimfastq \\ + $args \\ + -f '${prefix}.sfq' + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + slimfastq: ${VERSION} + END_VERSIONS + """ + } else { + """ + gzip -d -c '${fastq[0]}' | slimfastq \\ + $args \\ + -f '${prefix}_1.sfq' + + gzip -d -c '${fastq[1]}' | slimfastq \\ + $args \\ + -f '${prefix}_2.sfq' + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + slimfastq: ${VERSION} + END_VERSIONS + """ + } +} diff --git a/modules/slimfastq/meta.yml b/modules/slimfastq/meta.yml new file mode 100644 index 00000000..3b040f25 --- /dev/null +++ b/modules/slimfastq/meta.yml @@ -0,0 +1,41 @@ +name: "slimfastq" +description: Fast, efficient, lossless compression of FASTQ files. +keywords: + - FASTQ + - compression + - lossless +tools: + - "slimfastq": + description: "slimfastq efficiently compresses/decompresses FASTQ files" + homepage: "https://github.com/Infinidat/slimfastq" + tool_dev_url: "https://github.com/Infinidat/slimfastq" + licence: "['BSD-3-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fastq: + type: file + description: Either a single-end FASTQ file or paired-end 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" + - sfq: + type: file + description: Either one or two sequence files in slimfastq compressed format. + pattern: "*.{sfq}" + +authors: + - "@Midnighter" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index dcf85ba0..9da057d9 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1727,6 +1727,10 @@ sistr: - modules/sistr/** - tests/modules/sistr/** +slimfastq: + - modules/slimfastq/** + - tests/modules/slimfastq/** + snapaligner/index: - modules/snapaligner/index/** - tests/modules/snapaligner/index/** diff --git a/tests/modules/slimfastq/main.nf b/tests/modules/slimfastq/main.nf new file mode 100644 index 00000000..40d44285 --- /dev/null +++ b/tests/modules/slimfastq/main.nf @@ -0,0 +1,46 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SLIMFASTQ } from '../../../modules/slimfastq/main.nf' + +workflow test_slimfastq_single_end { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + + SLIMFASTQ ( input ) +} + +workflow test_slimfastq_paired_end { + + input = [ + [ id:'test', single_end:false ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)] + ] + + SLIMFASTQ ( input ) +} + +workflow test_slimfastq_nanopore { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) + ] + + SLIMFASTQ ( input ) +} + +workflow test_slimfastq_pacbio { + + input = [ + [ id:'test', single_end:true ], // meta map + file(params.test_data['homo_sapiens']['pacbio']['ccs_fq_gz'], checkIfExists: true) + ] + + SLIMFASTQ ( input ) +} diff --git a/tests/modules/slimfastq/nextflow.config b/tests/modules/slimfastq/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/slimfastq/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/slimfastq/test.yml b/tests/modules/slimfastq/test.yml new file mode 100644 index 00000000..f0d8b446 --- /dev/null +++ b/tests/modules/slimfastq/test.yml @@ -0,0 +1,41 @@ +- name: slimfastq test_slimfastq_single_end + command: nextflow run tests/modules/slimfastq -entry test_slimfastq_single_end -c tests/config/nextflow.config + tags: + - slimfastq + files: + - path: output/slimfastq/test.sfq + md5sum: 6a942eeca6c99ee9a9a0cedab5d246f1 + - path: output/slimfastq/versions.yml + md5sum: f52351f5c9e6259af02745c8eae5c780 + +- name: slimfastq test_slimfastq_paired_end + command: nextflow run tests/modules/slimfastq -entry test_slimfastq_paired_end -c tests/config/nextflow.config + tags: + - slimfastq + files: + - path: output/slimfastq/test_1.sfq + md5sum: 6a942eeca6c99ee9a9a0cedab5d246f1 + - path: output/slimfastq/test_2.sfq + md5sum: 0d2c60b52a39f7c2cb7843e848d90afd + - path: output/slimfastq/versions.yml + md5sum: 6239853705877651a4851c4cb6d62da4 + +- name: slimfastq test_slimfastq_nanopore + command: nextflow run tests/modules/slimfastq -entry test_slimfastq_nanopore -c tests/config/nextflow.config + tags: + - slimfastq + files: + - path: output/slimfastq/test.sfq + md5sum: e17f14d64d3a75356b03ff2f9e8881f7 + - path: output/slimfastq/versions.yml + md5sum: 33153f1103482a2bd35cb2f4c337c5e8 + +- name: slimfastq test_slimfastq_pacbio + command: nextflow run tests/modules/slimfastq -entry test_slimfastq_pacbio -c tests/config/nextflow.config + tags: + - slimfastq + files: + - path: output/slimfastq/test.sfq + md5sum: 9e8389e47e6ddf8c25e92412dd628339 + - path: output/slimfastq/versions.yml + md5sum: 1982789c3d5c7de37c0a9351e4ae63f7 From e5d7c80bb50dc58c360c3234faa243964d1a2dbb Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Mon, 2 May 2022 18:13:14 -0400 Subject: [PATCH 213/313] Update test.yml --- tests/modules/srst2/srst2/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/srst2/srst2/test.yml b/tests/modules/srst2/srst2/test.yml index 5ed236d3..9ea38dd6 100644 --- a/tests/modules/srst2/srst2/test.yml +++ b/tests/modules/srst2/srst2/test.yml @@ -12,11 +12,11 @@ - srst2 files: - path: output/srst2/test__SRR9067271.MLST_DB.pileup - md5sum: f59217dd9340264b9913c20b545b2ce7 + contains: "dnaJ_1 2 C 17 .........,....... FFFFFFFFFFFFFFFFF" - path: output/srst2/test__SRR9067271.MLST_DB.sorted.bam - path: output/srst2/test__mlst__MLST_DB__results.txt md5sum: ec1b1f69933401d67c57f64cad11a098 - - path: output/srst2/versions.yml + - path: /tmp/tmp74070b6r/srst2/versions.yml md5sum: a0c256a2fd3636069710b8ef22ee5ea7 - name: srst2 srst2 test_srst2_srst2_paired_end From 7b0d6f96fd0764254510df99e238be33b0acf862 Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Mon, 2 May 2022 18:20:54 -0400 Subject: [PATCH 214/313] Update test.yml --- tests/modules/srst2/srst2/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/modules/srst2/srst2/test.yml b/tests/modules/srst2/srst2/test.yml index 9ea38dd6..2b0c0d70 100644 --- a/tests/modules/srst2/srst2/test.yml +++ b/tests/modules/srst2/srst2/test.yml @@ -12,7 +12,8 @@ - srst2 files: - path: output/srst2/test__SRR9067271.MLST_DB.pileup - contains: "dnaJ_1 2 C 17 .........,....... FFFFFFFFFFFFFFFFF" + contains: + - "dnaJ_1 2 C 17 .........,....... FFFFFFFFFFFFFFFFF" - path: output/srst2/test__SRR9067271.MLST_DB.sorted.bam - path: output/srst2/test__mlst__MLST_DB__results.txt md5sum: ec1b1f69933401d67c57f64cad11a098 From db9681029c7a75da227577e29f26cb26de78a2e5 Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Mon, 2 May 2022 18:27:01 -0400 Subject: [PATCH 215/313] Update test.yml --- tests/modules/srst2/srst2/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/srst2/srst2/test.yml b/tests/modules/srst2/srst2/test.yml index 2b0c0d70..12b2a4f0 100644 --- a/tests/modules/srst2/srst2/test.yml +++ b/tests/modules/srst2/srst2/test.yml @@ -13,11 +13,11 @@ files: - path: output/srst2/test__SRR9067271.MLST_DB.pileup contains: - - "dnaJ_1 2 C 17 .........,....... FFFFFFFFFFFFFFFFF" + - "dnaJ-1 2 C 17 .........,....... FFFFFFFFFFFFFFFFF" - path: output/srst2/test__SRR9067271.MLST_DB.sorted.bam - path: output/srst2/test__mlst__MLST_DB__results.txt md5sum: ec1b1f69933401d67c57f64cad11a098 - - path: /tmp/tmp74070b6r/srst2/versions.yml + - path: output/srst2/versions.yml md5sum: a0c256a2fd3636069710b8ef22ee5ea7 - name: srst2 srst2 test_srst2_srst2_paired_end From 23cfb5dd42dc3dba37ee4588cf1262ce5c59ef6e Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Mon, 2 May 2022 18:38:48 -0400 Subject: [PATCH 216/313] Update test.yml --- tests/modules/srst2/srst2/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/srst2/srst2/test.yml b/tests/modules/srst2/srst2/test.yml index 12b2a4f0..f7621f4f 100644 --- a/tests/modules/srst2/srst2/test.yml +++ b/tests/modules/srst2/srst2/test.yml @@ -13,7 +13,7 @@ files: - path: output/srst2/test__SRR9067271.MLST_DB.pileup contains: - - "dnaJ-1 2 C 17 .........,....... FFFFFFFFFFFFFFFFF" + - "dnaJ-1 2 C 17 .........,....... FFFFFFFFFFFFFFFFF" - path: output/srst2/test__SRR9067271.MLST_DB.sorted.bam - path: output/srst2/test__mlst__MLST_DB__results.txt md5sum: ec1b1f69933401d67c57f64cad11a098 From b8a59c2b173cf0d987effc8a3e1cd547307a6085 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 3 May 2022 08:20:10 +0200 Subject: [PATCH 217/313] Fixed version annotation --- modules/vardictjava/main.nf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 08318c29..682c26be 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -24,6 +24,8 @@ process VARDICTJAVA { def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def VERSION = '1.8.3' + """ vardict-java \\ $args \\ @@ -41,7 +43,8 @@ process VARDICTJAVA { cat <<-END_VERSIONS > versions.yml "${task.process}": - vardict-java: \$(echo 1.8.3) + vardict-java: \$VERSION + var2vcf_valid.pl: \$(echo \$(var2vcf_valid.pl -h | sed -n 2p | awk '{ print \$2 }')) END_VERSIONS """ } From 9a10e5beb56904061e0b728fea55c8246af74997 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 3 May 2022 08:29:46 +0200 Subject: [PATCH 218/313] Added the missing inputs in meta.yml + correct notation --- modules/vardictjava/main.nf | 10 +++++----- modules/vardictjava/meta.yml | 16 ++++++++++++++-- tests/modules/vardictjava/nextflow.config | 4 ---- tests/modules/vardictjava/test.yml | 2 +- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 682c26be..14964989 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -9,8 +9,8 @@ process VARDICTJAVA { input: tuple val(meta), path(bam), path(bai) - path(regions_of_interest) - tuple path(reference_fasta), path(reference_fai) + path(bed) + tuple path(fasta), path(fasta_fai) output: tuple val(meta), path("*.vcf.gz"), emit: vcf @@ -33,8 +33,8 @@ process VARDICTJAVA { -b $bam \\ -th $task.cpus \\ -N $prefix \\ - -G $reference_fasta \\ - $regions_of_interest \\ + -G $fasta \\ + $bed \\ | teststrandbias.R \\ | var2vcf_valid.pl \\ $args2 \\ @@ -43,7 +43,7 @@ process VARDICTJAVA { cat <<-END_VERSIONS > versions.yml "${task.process}": - vardict-java: \$VERSION + vardict-java: $VERSION var2vcf_valid.pl: \$(echo \$(var2vcf_valid.pl -h | sed -n 2p | awk '{ print \$2 }')) END_VERSIONS """ diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index e3b2efe7..42480bc1 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -25,17 +25,29 @@ input: type: file description: BAM/SAM file pattern: "*.{bam,sam}" + + - bai: + type: file + description: Index of the BAM file + pattern: "*.bai" - - reference_fasta: + - fasta: type: file description: FASTA of the reference genome pattern: "*.{fa,fasta}" - - regions_of_interest: + - fasta_fai: + type: file + description: The index of the FASTA of the reference genome + pattern: "*.fai" + + - bed: type: file description: BED with the regions of interest pattern: "*.bed" + + output: - meta: type: map diff --git a/tests/modules/vardictjava/nextflow.config b/tests/modules/vardictjava/nextflow.config index e08201cc..50f50a7a 100644 --- a/tests/modules/vardictjava/nextflow.config +++ b/tests/modules/vardictjava/nextflow.config @@ -2,8 +2,4 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: VARDICTJAVA { - ext.args = '' - ext.args2 = '' - } } \ No newline at end of file diff --git a/tests/modules/vardictjava/test.yml b/tests/modules/vardictjava/test.yml index 549d688e..8cb29c4e 100644 --- a/tests/modules/vardictjava/test.yml +++ b/tests/modules/vardictjava/test.yml @@ -6,4 +6,4 @@ - path: output/vardictjava/test.vcf.gz md5sum: 3f1f227afc532bddeb58f16fd3013fc8 - path: output/vardictjava/versions.yml - md5sum: aac455b8c9c9194c5fed80e4fd495b96 + md5sum: 9b62c431a4f2680412b61c7071bdb1cd From 71c5d213742b56c62a75b6f34b1f734e073f415e Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 3 May 2022 08:34:12 +0200 Subject: [PATCH 219/313] ran prettier --- modules/vardictjava/meta.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 42480bc1..83675fdc 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -25,10 +25,10 @@ input: type: file description: BAM/SAM file pattern: "*.{bam,sam}" - + - bai: type: file - description: Index of the BAM file + description: Index of the BAM file pattern: "*.bai" - fasta: @@ -46,8 +46,6 @@ input: description: BED with the regions of interest pattern: "*.bed" - - output: - meta: type: map From 550390345785fe0ebb1835616f895af2bdadf122 Mon Sep 17 00:00:00 2001 From: ljmesi <37740329+ljmesi@users.noreply.github.com> Date: Tue, 3 May 2022 09:46:04 +0200 Subject: [PATCH 220/313] Add compression for output fastq file --- modules/samtools/bam2fq/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/samtools/bam2fq/main.nf b/modules/samtools/bam2fq/main.nf index 5d6aa79d..554af48b 100644 --- a/modules/samtools/bam2fq/main.nf +++ b/modules/samtools/bam2fq/main.nf @@ -45,7 +45,7 @@ process SAMTOOLS_BAM2FQ { bam2fq \\ $args \\ -@ $task.cpus \\ - $inputbam >${prefix}_interleaved.fq.gz + $inputbam | gzip > ${prefix}_interleaved.fq.gz cat <<-END_VERSIONS > versions.yml "${task.process}": From 59d6e6e1dd0dc5cbfff7d431725caeaf201c40e4 Mon Sep 17 00:00:00 2001 From: ljmesi <37740329+ljmesi@users.noreply.github.com> Date: Tue, 3 May 2022 09:56:50 +0200 Subject: [PATCH 221/313] Add updated md5sums --- tests/modules/samtools/bam2fq/test.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/modules/samtools/bam2fq/test.yml b/tests/modules/samtools/bam2fq/test.yml index 213c7a2d..6fcc9c22 100644 --- a/tests/modules/samtools/bam2fq/test.yml +++ b/tests/modules/samtools/bam2fq/test.yml @@ -1,17 +1,19 @@ - name: samtools bam2fq test_samtools_bam2fq_nosplit - command: nextflow run ./tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bam2fq/nextflow.config + command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c tests/config/nextflow.config tags: - - samtools/bam2fq - samtools + - samtools/bam2fq files: - path: output/samtools/test_interleaved.fq.gz - md5sum: d733e66d29a4b366bf9df8c42f845256 + md5sum: 7a57a8ab53dd1d799cca67a85c47ccd9 + - path: output/samtools/versions.yml + md5sum: 4973eac1b6a8f090d5fcd4456d65a894 - name: samtools bam2fq test_samtools_bam2fq_withsplit - command: nextflow run ./tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bam2fq/nextflow.config + command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c tests/config/nextflow.config tags: - - samtools/bam2fq - samtools + - samtools/bam2fq files: - path: output/samtools/test_1.fq.gz md5sum: 1c84aadcdca10e97be2b5b6ce773f5ed @@ -21,3 +23,5 @@ md5sum: 709872fc2910431b1e8b7074bfe38c67 - path: output/samtools/test_singleton.fq.gz md5sum: 709872fc2910431b1e8b7074bfe38c67 + - path: output/samtools/versions.yml + md5sum: e92d21bbcda2fed7cb438d95c51edff0 From d33253513fcd8900db9480450496886ea1f17adb Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 3 May 2022 10:15:30 +0200 Subject: [PATCH 222/313] put the version on top of the file --- modules/vardictjava/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 14964989..454b86a4 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -1,3 +1,5 @@ +def VERSION = '1.8.3' + process VARDICTJAVA { tag "$meta.id" label 'process_medium' @@ -24,8 +26,6 @@ process VARDICTJAVA { def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def VERSION = '1.8.3' - """ vardict-java \\ $args \\ From 7c89af359c19131d2f9e8d32bd6ebb0dd682e4d2 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:15:51 +0200 Subject: [PATCH 223/313] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 83675fdc..63a52611 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -20,7 +20,6 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - bam: type: file description: BAM/SAM file From 2dff193b543d78c1176d19c6f9c42385caa131c2 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:15:59 +0200 Subject: [PATCH 224/313] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 63a52611..a0af9fcc 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -29,7 +29,6 @@ input: type: file description: Index of the BAM file pattern: "*.bai" - - fasta: type: file description: FASTA of the reference genome From 3cdbdf50fc6423826e4aeed8fef8e1f75a19f621 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:16:14 +0200 Subject: [PATCH 225/313] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index a0af9fcc..3afa7e62 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -24,7 +24,6 @@ input: type: file description: BAM/SAM file pattern: "*.{bam,sam}" - - bai: type: file description: Index of the BAM file From 1609dfc96dd1ff205f1cac511b8dabb64f8a3db6 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:16:20 +0200 Subject: [PATCH 226/313] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 3afa7e62..325ce1ca 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -32,7 +32,6 @@ input: type: file description: FASTA of the reference genome pattern: "*.{fa,fasta}" - - fasta_fai: type: file description: The index of the FASTA of the reference genome From 01085b3e090b0e64ed0db23a93e00bd891a11639 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:16:30 +0200 Subject: [PATCH 227/313] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 325ce1ca..5be27690 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -36,7 +36,6 @@ input: type: file description: The index of the FASTA of the reference genome pattern: "*.fai" - - bed: type: file description: BED with the regions of interest From 11c6faf433d19803a1a9c198c83bde5ce5ae9706 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:16:36 +0200 Subject: [PATCH 228/313] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 5be27690..196b090e 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -47,7 +47,6 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - versions: type: file description: File containing software versions From 818764128039936e8d94df70427667638b0276a9 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 3 May 2022 10:16:45 +0200 Subject: [PATCH 229/313] Update modules/vardictjava/meta.yml Co-authored-by: James A. Fellows Yates --- modules/vardictjava/meta.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/vardictjava/meta.yml b/modules/vardictjava/meta.yml index 196b090e..59fba966 100644 --- a/modules/vardictjava/meta.yml +++ b/modules/vardictjava/meta.yml @@ -51,7 +51,6 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - vcf: type: file description: VCF file output From 9a72548ee122607e46681f4b0b87296b48580cb3 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 3 May 2022 08:42:56 +0000 Subject: [PATCH 230/313] Update busco module --- modules/busco/main.nf | 62 +++++++++++++++++++---------- tests/modules/busco/main.nf | 20 +++++++--- tests/modules/busco/nextflow.config | 5 ++- tests/modules/busco/test.yml | 9 ++--- 4 files changed, 60 insertions(+), 36 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index 6e526538..e66beeeb 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -1,31 +1,31 @@ process BUSCO { tag "$meta.id" label 'process_medium' - - conda (params.enable_conda ? "bioconda::busco=5.2.2" : null) + + conda (params.enable_conda ? "bioconda::busco=5.3.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/busco:5.2.2--pyhdfd78af_0': - 'quay.io/biocontainers/busco:5.2.2--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/busco:5.3.2--pyhdfd78af_0': + 'quay.io/biocontainers/busco:5.3.2--pyhdfd78af_0' }" input: - tuple val(meta), path(fasta) - val(mode) - path(augustus_config) - val(lineage) + tuple val(meta), path(fasta) // Required: meta map, and fasta sequence file + each lineage // Required: lineage to check against + path busco_lineages_path // Recommended: path to busco lineages - downloads if not set + path config_file // Optional: busco configuration file output: - tuple val(meta), path("${meta.id}/run_*/full_table.tsv"), emit: tsv - tuple val(meta), path("${meta.id}/run_*/short_summary.txt"), emit: txt - path "versions.yml" , emit: versions + tuple val(meta), path("*-busco"), emit: busco_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}" - if (lineage) args += " --lineage_dataset $lineage" + def prefix = task.ext.prefix ?: "${meta.id}-${lineage}" + def busco_config = config_file ? "--config $config_file" : '' + def busco_lineage_dir = busco_lineages_path ? "--download_path ${busco_lineages_path}" : '' """ - # Ensure the input is uncompressed - gzip -cdf $fasta > __UNCOMPRESSED_FASTA_FILE__ - # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) # Check for container variable initialisation script and source it. if [ -f "/usr/local/env-activate.sh" ]; then @@ -39,12 +39,30 @@ process BUSCO { . "/usr/local/etc/conda/activate.d/augustus.sh" . "/usr/local/etc/conda/activate.d/openjdk_activate.sh" fi - - # Copy the image's AUGUSTUS config directory if it was not provided to the module - [ ! -e augustus_config ] && cp -a /usr/local/config augustus_config - - # Busco command - AUGUSTUS_CONFIG_PATH=augustus_config busco $args --augustus --mode $mode --cpu $task.cpus --in __UNCOMPRESSED_FASTA_FILE__ --out $meta.id + + # If the augustus config directory is not writable, then copy to writeable area + if [ ! -w "\${AUGUSTUS_CONFIG_PATH}" ]; then + # Create writable tmp directory for augustus + AUG_CONF_DIR=\$( mktemp -d -p \$PWD ) + cp -r \$AUGUSTUS_CONFIG_PATH/* \$AUG_CONF_DIR + export AUGUSTUS_CONFIG_PATH=\$AUG_CONF_DIR + echo "New AUGUSTUS_CONFIG_PATH=\${AUGUSTUS_CONFIG_PATH}" + fi + + # Ensure the input is uncompressed + gzip -cdf $fasta > ${prefix}_uncompressed.fasta + + busco \\ + --cpu $task.cpus \\ + --in ${prefix}_uncompressed.fasta \\ + --out ${prefix}-busco \\ + --lineage_dataset $lineage \\ + $busco_lineage_dir \\ + $busco_config \\ + $args + + # clean up + rm ${prefix}_uncompressed.fasta cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index d12abae9..4985bd18 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -2,14 +2,22 @@ nextflow.enable.dsl = 2 -include { BUSCO as BUSCO_BACTE } from '../../../modules/busco/main.nf' +include { BUSCO } from '../../../modules/busco/main.nf' // This tests genome decompression, empty input channels and data download workflow test_busco { - input = [ [ id:'test' ], file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) ] - BUSCO_BACTE ( input, - "genome", - [], - [] ) + + input = [ + [ id:'test', single_end:false ], // meta map + file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + BUSCO ( + input, + 'bacteria_odb10', + [], // Download busco lineage + [], // No config + ) + } diff --git a/tests/modules/busco/nextflow.config b/tests/modules/busco/nextflow.config index 50f50a7a..feea8d40 100644 --- a/tests/modules/busco/nextflow.config +++ b/tests/modules/busco/nextflow.config @@ -1,5 +1,6 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file + ext.args = '--mode genome' + +} diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index d66bd305..3e7c1bf6 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -1,10 +1,7 @@ - name: busco test_busco - command: nextflow run ./tests/modules/busco -entry test_busco -c ./tests/config/nextflow.config -c ./tests/modules/busco/nextflow.config + command: nextflow run tests/modules/busco -entry test_busco -c tests/config/nextflow.config tags: - busco files: - - path: output/busco/test/run_bacteroidales_odb10/full_table.tsv - md5sum: 8d7b401d875ecd9291b01bf4485bf080 - - path: output/busco/test/run_bacteroidales_odb10/short_summary.txt - contains: ['Complete BUSCOs (C)'] - + - path: output/busco/versions.yml + md5sum: 921e2abe85bf73e63a8b494453dc83cf From 9eff38ff94c2ecf7236b770b005518bacd272983 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 3 May 2022 09:15:15 +0000 Subject: [PATCH 231/313] Update meta.yml --- modules/busco/meta.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index 8f41f2f3..72ae4c29 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -22,14 +22,17 @@ input: e.g. [ id:'test', single_end:false ] - fasta: type: file - description: Nucleic or amino acid sequence file in FASTA format - pattern: "*.{fasta}" - - mode: + description: Nucleic or amino acid sequence file in FASTA format. + pattern: "*.{fasta,fna,fa,fasta.gz,fna.gz,fa.gz}" + - lineage: type: value - description: Sets the assessment MODE – genome, proteins, transcriptome - - augustus_config: + description: The BUSCO lineage to use. + - busco_lineages_path: type: directory - description: AUGUSTUS config directory + description: Path to local BUSCO lineages directory. + - config_file: + type: directory + description: Path to BUSCO config file. output: - meta: @@ -37,19 +40,16 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - busco_dir: + type: directory + description: BUSCO lineage specific output + pattern: "*-busco" - versions: type: file description: File containing software versions pattern: "versions.yml" - - tsv: - type: file - description: Full summary table - pattern: "*.{tsv}" - - txt: - type: file - description: Short summary text - pattern: "*.{txt}" authors: - "@priyanka-surana" - "@charles-plessy" + - "@mahesh-panchal" From 012f08537880805ad70a006f0076e6f8933b860f Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 3 May 2022 09:19:39 +0000 Subject: [PATCH 232/313] Prettier --- modules/busco/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index 72ae4c29..b73f498b 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -12,7 +12,7 @@ tools: documentation: https://busco.ezlab.org/busco_userguide.html tool_dev_url: https://gitlab.com/ezlab/busco doi: "10.1007/978-1-4939-9173-0_14" - licence: ['MIT'] + licence: ["MIT"] input: - meta: From 768073be6390c620e133230dea376466383832f5 Mon Sep 17 00:00:00 2001 From: Chris Cheshire Date: Tue, 3 May 2022 11:46:19 +0100 Subject: [PATCH 233/313] bowtie2|Added support for large indexes --- modules/bowtie2/align/main.nf | 4 ++ tests/modules/bowtie2/align/main.nf | 2 +- tests/modules/bowtie2/align/nextflow.config | 13 ++++++- tests/modules/bowtie2/align/test.yml | 43 +++++++++++++++++++++ 4 files changed, 60 insertions(+), 2 deletions(-) diff --git a/modules/bowtie2/align/main.nf b/modules/bowtie2/align/main.nf index 20b08f72..e68dbf24 100644 --- a/modules/bowtie2/align/main.nf +++ b/modules/bowtie2/align/main.nf @@ -26,6 +26,8 @@ process BOWTIE2_ALIGN { def unaligned = save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : '' """ INDEX=`find -L ./ -name "*.rev.1.bt2" | sed 's/.rev.1.bt2//'` + [ -z "\$INDEX" ] && INDEX=`find -L ./ -name "*.rev.1.bt2l" | sed 's/.rev.1.bt2l//'` + [ -z "\$INDEX" ] && echo "BT2 index files not found" 1>&2 && exit 1 bowtie2 \\ -x \$INDEX \\ -U $reads \\ @@ -46,6 +48,8 @@ process BOWTIE2_ALIGN { def unaligned = save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : '' """ INDEX=`find -L ./ -name "*.rev.1.bt2" | sed 's/.rev.1.bt2//'` + [ -z "\$INDEX" ] && INDEX=`find -L ./ -name "*.rev.1.bt2l" | sed 's/.rev.1.bt2l//'` + [ -z "\$INDEX" ] && echo "BT2 index files not found" 1>&2 && exit 1 bowtie2 \\ -x \$INDEX \\ -1 ${reads[0]} \\ diff --git a/tests/modules/bowtie2/align/main.nf b/tests/modules/bowtie2/align/main.nf index 2d3945e5..f91394ff 100644 --- a/tests/modules/bowtie2/align/main.nf +++ b/tests/modules/bowtie2/align/main.nf @@ -32,4 +32,4 @@ workflow test_bowtie2_align_paired_end { BOWTIE2_BUILD ( fasta ) BOWTIE2_ALIGN ( input, BOWTIE2_BUILD.out.index, save_unaligned ) -} +} \ No newline at end of file diff --git a/tests/modules/bowtie2/align/nextflow.config b/tests/modules/bowtie2/align/nextflow.config index 8730f1c4..b4640de7 100644 --- a/tests/modules/bowtie2/align/nextflow.config +++ b/tests/modules/bowtie2/align/nextflow.config @@ -1,5 +1,16 @@ +params { + force_large_index = false +} + process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - +} + +if (params.force_large_index) { + process { + withName: BOWTIE2_BUILD { + ext.args = '--large-index' + } + } } diff --git a/tests/modules/bowtie2/align/test.yml b/tests/modules/bowtie2/align/test.yml index 95d48b88..11e4c4e5 100644 --- a/tests/modules/bowtie2/align/test.yml +++ b/tests/modules/bowtie2/align/test.yml @@ -39,3 +39,46 @@ md5sum: 52be6950579598a990570fbcf5372184 - path: ./output/bowtie2/bowtie2/genome.rev.2.bt2 md5sum: e3b4ef343dea4dd571642010a7d09597 + +- name: bowtie2 align single-end large-index + command: nextflow run ./tests/modules/bowtie2/align -entry test_bowtie2_align_single_end -c ./tests/config/nextflow.config -c ./tests/modules/bowtie2/align/nextflow.config --force_large_index + tags: + tags: + - bowtie2 + - bowtie2/align + files: + - path: ./output/bowtie2/test.bam + - path: ./output/bowtie2/test.bowtie2.log + - path: ./output/bowtie2/bowtie2/genome.3.bt2 + md5sum: 8952b3e0b1ce9a7a5916f2e147180853 + - path: ./output/bowtie2/bowtie2/genome.2.bt2 + md5sum: 22c284084784a0720989595e0c9461fd + - path: ./output/bowtie2/bowtie2/genome.1.bt2 + md5sum: 07d811cd4e350d56267183d2ac7023a5 + - path: ./output/bowtie2/bowtie2/genome.4.bt2 + md5sum: c25be5f8b0378abf7a58c8a880b87626 + - path: ./output/bowtie2/bowtie2/genome.rev.1.bt2 + md5sum: fda48e35925fb24d1c0785f021981e25 + - path: ./output/bowtie2/bowtie2/genome.rev.2.bt2 + md5sum: 802c26d32b970e1b105032b7ce7348b4 + +- name: bowtie2 align paired-end large-index + command: nextflow run ./tests/modules/bowtie2/align -entry test_bowtie2_align_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/bowtie2/align/nextflow.config --force_large_index + tags: + - bowtie2 + - bowtie2/align + files: + - path: ./output/bowtie2/test.bam + - path: ./output/bowtie2/test.bowtie2.log + - path: ./output/bowtie2/bowtie2/genome.3.bt2l + md5sum: 8952b3e0b1ce9a7a5916f2e147180853 + - path: ./output/bowtie2/bowtie2/genome.2.bt2l + md5sum: 22c284084784a0720989595e0c9461fd + - path: ./output/bowtie2/bowtie2/genome.1.bt2l + md5sum: 07d811cd4e350d56267183d2ac7023a5 + - path: ./output/bowtie2/bowtie2/genome.4.bt2l + md5sum: c25be5f8b0378abf7a58c8a880b87626 + - path: ./output/bowtie2/bowtie2/genome.rev.1.bt2l + md5sum: fda48e35925fb24d1c0785f021981e25 + - path: ./output/bowtie2/bowtie2/genome.rev.2.bt2l + md5sum: 802c26d32b970e1b105032b7ce7348b4 From 0f1ee7e50dccd1a8717cd448c518b67fb68c1d09 Mon Sep 17 00:00:00 2001 From: Chris Cheshire Date: Tue, 3 May 2022 12:04:51 +0100 Subject: [PATCH 234/313] bowtie2|test fixes --- tests/modules/bowtie2/align/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/modules/bowtie2/align/test.yml b/tests/modules/bowtie2/align/test.yml index 11e4c4e5..961009b4 100644 --- a/tests/modules/bowtie2/align/test.yml +++ b/tests/modules/bowtie2/align/test.yml @@ -49,17 +49,17 @@ files: - path: ./output/bowtie2/test.bam - path: ./output/bowtie2/test.bowtie2.log - - path: ./output/bowtie2/bowtie2/genome.3.bt2 + - path: ./output/bowtie2/bowtie2/genome.3.bt2l md5sum: 8952b3e0b1ce9a7a5916f2e147180853 - - path: ./output/bowtie2/bowtie2/genome.2.bt2 + - path: ./output/bowtie2/bowtie2/genome.2.bt2l md5sum: 22c284084784a0720989595e0c9461fd - - path: ./output/bowtie2/bowtie2/genome.1.bt2 + - path: ./output/bowtie2/bowtie2/genome.1.bt2l md5sum: 07d811cd4e350d56267183d2ac7023a5 - - path: ./output/bowtie2/bowtie2/genome.4.bt2 + - path: ./output/bowtie2/bowtie2/genome.4.bt2l md5sum: c25be5f8b0378abf7a58c8a880b87626 - - path: ./output/bowtie2/bowtie2/genome.rev.1.bt2 + - path: ./output/bowtie2/bowtie2/genome.rev.1.bt2l md5sum: fda48e35925fb24d1c0785f021981e25 - - path: ./output/bowtie2/bowtie2/genome.rev.2.bt2 + - path: ./output/bowtie2/bowtie2/genome.rev.2.bt2l md5sum: 802c26d32b970e1b105032b7ce7348b4 - name: bowtie2 align paired-end large-index From 40e6bd9dc16a7a4b63d399cf79f0bb1b7e3927c0 Mon Sep 17 00:00:00 2001 From: Chris Cheshire Date: Tue, 3 May 2022 12:07:04 +0100 Subject: [PATCH 235/313] bowtie2|fix tags error --- tests/modules/bowtie2/align/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/modules/bowtie2/align/test.yml b/tests/modules/bowtie2/align/test.yml index 961009b4..ea9aa72a 100644 --- a/tests/modules/bowtie2/align/test.yml +++ b/tests/modules/bowtie2/align/test.yml @@ -42,7 +42,6 @@ - name: bowtie2 align single-end large-index command: nextflow run ./tests/modules/bowtie2/align -entry test_bowtie2_align_single_end -c ./tests/config/nextflow.config -c ./tests/modules/bowtie2/align/nextflow.config --force_large_index - tags: tags: - bowtie2 - bowtie2/align From 2990dc8357dcf3bb53aef8cf5a7c9e8c8f5caa9b Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:20:05 +0200 Subject: [PATCH 236/313] callcnv module --- modules/cnvpytor/callcnvs/main.nf | 14 +++++++------- modules/cnvpytor/callcnvs/meta.yml | 11 +++++++---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/modules/cnvpytor/callcnvs/main.nf b/modules/cnvpytor/callcnvs/main.nf index fcb36ba5..c3866095 100644 --- a/modules/cnvpytor/callcnvs/main.nf +++ b/modules/cnvpytor/callcnvs/main.nf @@ -9,10 +9,11 @@ process CNVPYTOR_CALLCNVS { input: tuple val(meta), path(pytor) + val bin_sizes output: - tuple val(meta), path("*.tsv"), emit: cnvs - path "versions.yml" , emit: versions + tuple val(meta), path("${pytor.baseName}.pytor") , emit: pytor + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -23,22 +24,21 @@ process CNVPYTOR_CALLCNVS { """ cnvpytor \\ -root $pytor \\ - -call $args > ${prefix}.tsv + -call $bin_sizes cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ stub: - def prefix = task.ext.prefix ?: "${meta.id}" """ - touch ${prefix}.tsv + touch ${pytor.baseName}.pytor cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ } diff --git a/modules/cnvpytor/callcnvs/meta.yml b/modules/cnvpytor/callcnvs/meta.yml index edfc462a..6ba46b6f 100644 --- a/modules/cnvpytor/callcnvs/meta.yml +++ b/modules/cnvpytor/callcnvs/meta.yml @@ -17,8 +17,11 @@ input: e.g. [ id:'test'] - pytor: type: file - description: cnvpytor root file + description: pytor file containing partitions of read depth histograms using mean-shift method pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" output: - meta: @@ -26,10 +29,10 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test' ] - - cnvs: + - pytor: type: file - description: file containing identified copy numer variations - pattern: "*.{tsv}" + description: pytor files containing cnv calls + pattern: "*.{pytor}" - versions: type: file description: File containing software versions From 07e026054a018139da73534acacfdcaf8762173e Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:24:54 +0200 Subject: [PATCH 237/313] histogram --- modules/cnvpytor/histogram/main.nf | 8 +++++--- modules/cnvpytor/histogram/meta.yml | 3 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/cnvpytor/histogram/main.nf b/modules/cnvpytor/histogram/main.nf index f6e9dd25..1906fa36 100644 --- a/modules/cnvpytor/histogram/main.nf +++ b/modules/cnvpytor/histogram/main.nf @@ -9,6 +9,8 @@ process CNVPYTOR_HISTOGRAM { input: tuple val(meta), path(pytor) + val bin_sizes + output: tuple val(meta), path("${pytor.baseName}.pytor") , emit: pytor @@ -18,15 +20,15 @@ process CNVPYTOR_HISTOGRAM { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '1000' + def bins = bin_sizes ?: '1000' """ cnvpytor \\ -root $pytor \\ - -his $args + -his $bins cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ diff --git a/modules/cnvpytor/histogram/meta.yml b/modules/cnvpytor/histogram/meta.yml index fcad2221..4855f26d 100644 --- a/modules/cnvpytor/histogram/meta.yml +++ b/modules/cnvpytor/histogram/meta.yml @@ -22,6 +22,9 @@ input: type: file description: pytor file containing read depth data pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" output: - meta: From 7cc47f6ba6a3aba385fde62bb8c2e0a7ae435ed3 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:25:20 +0200 Subject: [PATCH 238/313] importrd --- modules/cnvpytor/importreaddepth/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cnvpytor/importreaddepth/main.nf b/modules/cnvpytor/importreaddepth/main.nf index 059c19a5..ff00c0b0 100644 --- a/modules/cnvpytor/importreaddepth/main.nf +++ b/modules/cnvpytor/importreaddepth/main.nf @@ -43,7 +43,7 @@ process CNVPYTOR_IMPORTREADDEPTH { cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ } From 829c15c98b1447f9445690e29f2b684dbe053f65 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:26:34 +0200 Subject: [PATCH 239/313] partition --- modules/cnvpytor/partition/main.nf | 7 ++++--- modules/cnvpytor/partition/meta.yml | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/cnvpytor/partition/main.nf b/modules/cnvpytor/partition/main.nf index 8365cb29..42a5ec78 100644 --- a/modules/cnvpytor/partition/main.nf +++ b/modules/cnvpytor/partition/main.nf @@ -9,6 +9,7 @@ process CNVPYTOR_PARTITION { input: tuple val(meta), path(pytor) + val bin_sizes output: tuple val(meta), path("${pytor.baseName}.pytor"), emit: pytor @@ -18,15 +19,15 @@ process CNVPYTOR_PARTITION { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def bins = bin_sizes ?: '1000' """ cnvpytor \\ -root $pytor \\ - -partition $args + -partition $bins cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ diff --git a/modules/cnvpytor/partition/meta.yml b/modules/cnvpytor/partition/meta.yml index a72cea4c..bb7a047e 100644 --- a/modules/cnvpytor/partition/meta.yml +++ b/modules/cnvpytor/partition/meta.yml @@ -22,6 +22,9 @@ input: type: file description: pytor file containing read depth data pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" output: - meta: From 3efa931bf6a77a6f6942ebfe4ba8620119f49327 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:26:46 +0200 Subject: [PATCH 240/313] view --- modules/cnvpytor/view/main.nf | 59 ++++++++++++++++++++++++++++++++++ modules/cnvpytor/view/meta.yml | 44 +++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 modules/cnvpytor/view/main.nf create mode 100644 modules/cnvpytor/view/meta.yml diff --git a/modules/cnvpytor/view/main.nf b/modules/cnvpytor/view/main.nf new file mode 100644 index 00000000..c4e49a78 --- /dev/null +++ b/modules/cnvpytor/view/main.nf @@ -0,0 +1,59 @@ +process CNVPYTOR_VIEW { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::cnvpytor=1.2.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/cnvpytor:1.2.1--pyhdfd78af_0': + 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" + + input: + tuple val(meta), path(pytor) + val bin_sizes + val output_format + + output: + tuple val(meta), path("*.vcf"), emit: vcf , optional: true + tuple val(meta), path("*.tsv"), emit: tsv , optional: true + tuple val(meta), path("*.xls"), emit: xls , optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def output_suffix = output_format ?: 'vcf' + """ + + python3 < versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ + + stub: + def output_suffix = output_format ?: 'vcf' + """ + touch ${pytor.baseName}.${output_suffix} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) + END_VERSIONS + """ +} diff --git a/modules/cnvpytor/view/meta.yml b/modules/cnvpytor/view/meta.yml new file mode 100644 index 00000000..d4456469 --- /dev/null +++ b/modules/cnvpytor/view/meta.yml @@ -0,0 +1,44 @@ +name: cnvpytor_view +description: view function to generate vcfs +keywords: + - cnv calling +tools: + - cnvpytor: + description: calling CNVs using read depth + homepage: https://github.com/abyzovlab/CNVpytor + documentation: https://github.com/abyzovlab/CNVpytor + tool_dev_url: https://github.com/abyzovlab/CNVpytor + doi: "10.1101/2021.01.27.428472v1" + licence: ["MIT"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - pytor: + type: file + description: pytor file containing read depth data + pattern: "*.{pytor}" + - bin_sizes: + type: string + description: list of binsizes separated by space e.g. "1000 10000" and "1000" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - partitions: + type: file + description: pytor file containing partitions of read depth histograms using mean-shift method + pattern: "*.{pytor}" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@sima-r" From 46e5752b82fb9d0f8d472b3d87efa7419f658279 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:32:45 +0200 Subject: [PATCH 241/313] update tests --- tests/modules/cnvpytor/callcnvs/test.yml | 4 +- tests/modules/cnvpytor/view/main.nf | 43 +++++++++++++++++++++ tests/modules/cnvpytor/view/nextflow.config | 7 ++++ tests/modules/cnvpytor/view/test.yml | 26 +++++++++++++ 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 tests/modules/cnvpytor/view/main.nf create mode 100644 tests/modules/cnvpytor/view/nextflow.config create mode 100644 tests/modules/cnvpytor/view/test.yml diff --git a/tests/modules/cnvpytor/callcnvs/test.yml b/tests/modules/cnvpytor/callcnvs/test.yml index e284ab53..fd07db4c 100644 --- a/tests/modules/cnvpytor/callcnvs/test.yml +++ b/tests/modules/cnvpytor/callcnvs/test.yml @@ -4,7 +4,7 @@ - cnvpytor - cnvpytor/callcnvs files: - - path: output/cnvpytor/test.tsv + - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml - name: cnvpytor callcnvs test_cnvpytor_callcnvs stub @@ -13,5 +13,5 @@ - cnvpytor - cnvpytor/callcnvs files: - - path: output/cnvpytor/test.tsv + - path: output/cnvpytor/test.pytor - path: output/cnvpytor/versions.yml diff --git a/tests/modules/cnvpytor/view/main.nf b/tests/modules/cnvpytor/view/main.nf new file mode 100644 index 00000000..30177c44 --- /dev/null +++ b/tests/modules/cnvpytor/view/main.nf @@ -0,0 +1,43 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { CNVPYTOR_VIEW } from '../../../../modules/cnvpytor/view/main.nf' + +workflow test_cnvpytor_view { + + input = [ + [ id:'test'], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + ] + + bin_sizes = "10000 100000" + + CNVPYTOR_VIEW ( input, bin_sizes, [] ) +} + +workflow test_cnvpytor_view_tsvout { + + input = [ + [ id:'test'], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + ] + + bin_sizes = "10000" + output_suffix = "tsv" + + CNVPYTOR_VIEW ( input, bin_sizes, output_suffix ) +} + +workflow test_cnvpytor_view_stub { + + input = [ + [ id:'test'], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + ] + + bin_sizes = "10000" + output_suffix = "tsv" + + CNVPYTOR_VIEW ( input, bin_sizes, output_suffix ) +} diff --git a/tests/modules/cnvpytor/view/nextflow.config b/tests/modules/cnvpytor/view/nextflow.config new file mode 100644 index 00000000..6d2cc1fb --- /dev/null +++ b/tests/modules/cnvpytor/view/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + withName: CNVPYTOR_VIEW { + ext.args = '10000 100000' + } +} diff --git a/tests/modules/cnvpytor/view/test.yml b/tests/modules/cnvpytor/view/test.yml new file mode 100644 index 00000000..38f75003 --- /dev/null +++ b/tests/modules/cnvpytor/view/test.yml @@ -0,0 +1,26 @@ +- name: cnvpytor view test_cnvpytor_view + command: nextflow run tests/modules/cnvpytor/view -entry test_cnvpytor_view -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/view + files: + - path: output/cnvpytor/test_10000.vcf + - path: output/cnvpytor/versions.yml + +- name: cnvpytor view test_cnvpytor_view tsv + command: nextflow run tests/modules/cnvpytor/view -entry test_cnvpytor_view_tsvout -c tests/config/nextflow.config + tags: + - cnvpytor + - cnvpytor/view + files: + - path: output/cnvpytor/test.tsv + - path: output/cnvpytor/versions.yml + +- name: cnvpytor view test_cnvpytor_view stub + command: nextflow run tests/modules/cnvpytor/view -entry test_cnvpytor_view_stub -c tests/config/nextflow.config -stub-run + tags: + - cnvpytor + - cnvpytor/view + files: + - path: output/cnvpytor/test.vcf + - path: output/cnvpytor/versions.yml From 19cfb4e95196d0e8cc14a67ecb8f1ed0b0fcc3a7 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Tue, 3 May 2022 14:53:56 +0200 Subject: [PATCH 242/313] update meta files --- modules/cnvpytor/histogram/main.nf | 2 +- modules/cnvpytor/histogram/meta.yml | 1 + modules/cnvpytor/importreaddepth/main.nf | 2 +- modules/cnvpytor/importreaddepth/meta.yml | 1 + modules/cnvpytor/partition/main.nf | 2 +- modules/cnvpytor/partition/meta.yml | 1 + modules/cnvpytor/view/main.nf | 3 ++- modules/cnvpytor/view/meta.yml | 15 ++++++++++++--- tests/modules/cnvpytor/view/main.nf | 7 +++---- tests/modules/cnvpytor/view/test.yml | 2 +- 10 files changed, 24 insertions(+), 12 deletions(-) diff --git a/modules/cnvpytor/histogram/main.nf b/modules/cnvpytor/histogram/main.nf index 1906fa36..fd2ebe14 100644 --- a/modules/cnvpytor/histogram/main.nf +++ b/modules/cnvpytor/histogram/main.nf @@ -38,7 +38,7 @@ process CNVPYTOR_HISTOGRAM { cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ } diff --git a/modules/cnvpytor/histogram/meta.yml b/modules/cnvpytor/histogram/meta.yml index 4855f26d..ecd48b9a 100644 --- a/modules/cnvpytor/histogram/meta.yml +++ b/modules/cnvpytor/histogram/meta.yml @@ -43,3 +43,4 @@ output: authors: - "@sima-r" + - "@ramprasadn" diff --git a/modules/cnvpytor/importreaddepth/main.nf b/modules/cnvpytor/importreaddepth/main.nf index ff00c0b0..6f9abae9 100644 --- a/modules/cnvpytor/importreaddepth/main.nf +++ b/modules/cnvpytor/importreaddepth/main.nf @@ -32,7 +32,7 @@ process CNVPYTOR_IMPORTREADDEPTH { cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ diff --git a/modules/cnvpytor/importreaddepth/meta.yml b/modules/cnvpytor/importreaddepth/meta.yml index 1cf3c0d0..8b58887e 100644 --- a/modules/cnvpytor/importreaddepth/meta.yml +++ b/modules/cnvpytor/importreaddepth/meta.yml @@ -52,3 +52,4 @@ output: authors: - "@sima-r" + - "@ramprasadn" diff --git a/modules/cnvpytor/partition/main.nf b/modules/cnvpytor/partition/main.nf index 42a5ec78..6d7a9c6b 100644 --- a/modules/cnvpytor/partition/main.nf +++ b/modules/cnvpytor/partition/main.nf @@ -37,7 +37,7 @@ process CNVPYTOR_PARTITION { cat <<-END_VERSIONS > versions.yml "${task.process}": - cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' )) + cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/CNVpytor //' )) END_VERSIONS """ } diff --git a/modules/cnvpytor/partition/meta.yml b/modules/cnvpytor/partition/meta.yml index bb7a047e..17b5e199 100644 --- a/modules/cnvpytor/partition/meta.yml +++ b/modules/cnvpytor/partition/meta.yml @@ -43,3 +43,4 @@ output: authors: - "@sima-r" + - "@ramprasadn" diff --git a/modules/cnvpytor/view/main.nf b/modules/cnvpytor/view/main.nf index c4e49a78..72726615 100644 --- a/modules/cnvpytor/view/main.nf +++ b/modules/cnvpytor/view/main.nf @@ -23,13 +23,14 @@ process CNVPYTOR_VIEW { script: def output_suffix = output_format ?: 'vcf' + def bins = bin_sizes ?: '1000' """ python3 < Date: Tue, 3 May 2022 15:04:37 +0200 Subject: [PATCH 243/313] fix minor errors --- modules/cnvpytor/callcnvs/main.nf | 2 +- modules/cnvpytor/view/meta.yml | 3 +++ tests/modules/cnvpytor/view/test.yml | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/cnvpytor/callcnvs/main.nf b/modules/cnvpytor/callcnvs/main.nf index c3866095..092f6def 100644 --- a/modules/cnvpytor/callcnvs/main.nf +++ b/modules/cnvpytor/callcnvs/main.nf @@ -19,7 +19,7 @@ process CNVPYTOR_CALLCNVS { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '1000' + def bins = bin_sizes ?: '1000' def prefix = task.ext.prefix ?: "${meta.id}" """ cnvpytor \\ diff --git a/modules/cnvpytor/view/meta.yml b/modules/cnvpytor/view/meta.yml index 0f9bbb43..1392e90e 100644 --- a/modules/cnvpytor/view/meta.yml +++ b/modules/cnvpytor/view/meta.yml @@ -24,6 +24,9 @@ input: - bin_sizes: type: string description: list of binsizes separated by space e.g. "1000 10000" and "1000" + - output_format: + type: string + description: output format of the cnv calls. Valid entries are "tsv", "vcf", and "xls" output: - meta: diff --git a/tests/modules/cnvpytor/view/test.yml b/tests/modules/cnvpytor/view/test.yml index 9c8b346b..ea8ab792 100644 --- a/tests/modules/cnvpytor/view/test.yml +++ b/tests/modules/cnvpytor/view/test.yml @@ -5,6 +5,7 @@ - cnvpytor/view files: - path: output/cnvpytor/test_10000.vcf + - path: output/cnvpytor/test_100000.vcf - path: output/cnvpytor/versions.yml - name: cnvpytor view test_cnvpytor_view tsv From 5510ea39fe638594bc26ac34cadf4a84bf27d159 Mon Sep 17 00:00:00 2001 From: ljmesi <37740329+ljmesi@users.noreply.github.com> Date: Tue, 3 May 2022 15:18:09 +0200 Subject: [PATCH 244/313] Test --no-name to solve inconsistent checksums --- modules/samtools/bam2fq/main.nf | 2 +- tests/modules/samtools/bam2fq/test.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/samtools/bam2fq/main.nf b/modules/samtools/bam2fq/main.nf index 554af48b..9301d1d3 100644 --- a/modules/samtools/bam2fq/main.nf +++ b/modules/samtools/bam2fq/main.nf @@ -45,7 +45,7 @@ process SAMTOOLS_BAM2FQ { bam2fq \\ $args \\ -@ $task.cpus \\ - $inputbam | gzip > ${prefix}_interleaved.fq.gz + $inputbam | gzip --no-name > ${prefix}_interleaved.fq.gz cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/samtools/bam2fq/test.yml b/tests/modules/samtools/bam2fq/test.yml index 6fcc9c22..674730d7 100644 --- a/tests/modules/samtools/bam2fq/test.yml +++ b/tests/modules/samtools/bam2fq/test.yml @@ -1,8 +1,8 @@ - name: samtools bam2fq test_samtools_bam2fq_nosplit command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c tests/config/nextflow.config tags: - - samtools - samtools/bam2fq + - samtools files: - path: output/samtools/test_interleaved.fq.gz md5sum: 7a57a8ab53dd1d799cca67a85c47ccd9 @@ -12,8 +12,8 @@ - name: samtools bam2fq test_samtools_bam2fq_withsplit command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c tests/config/nextflow.config tags: - - samtools - samtools/bam2fq + - samtools files: - path: output/samtools/test_1.fq.gz md5sum: 1c84aadcdca10e97be2b5b6ce773f5ed From 57db28386ebd236e4ffd07c47eba21f284cda55c Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 3 May 2022 13:26:49 +0000 Subject: [PATCH 245/313] Support batch fasta analysis --- modules/busco/main.nf | 24 +++++++++++++++++------- tests/modules/busco/main.nf | 6 ++++-- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index e66beeeb..4ba4baac 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -8,10 +8,10 @@ process BUSCO { 'quay.io/biocontainers/busco:5.3.2--pyhdfd78af_0' }" input: - tuple val(meta), path(fasta) // Required: meta map, and fasta sequence file - each lineage // Required: lineage to check against - path busco_lineages_path // Recommended: path to busco lineages - downloads if not set - path config_file // Optional: busco configuration file + tuple val(meta), path(fasta, stageAs: 'tmp_input/*') // Required: meta map, and fasta sequence files + each lineage // Required: lineage to check against + path busco_lineages_path // Recommended: path to busco lineages - downloads if not set + path config_file // Optional: busco configuration file output: tuple val(meta), path("*-busco"), emit: busco_dir @@ -50,11 +50,21 @@ process BUSCO { fi # Ensure the input is uncompressed - gzip -cdf $fasta > ${prefix}_uncompressed.fasta + INPUT_SEQS=input_seqs + mkdir "\$INPUT_SEQS" + cd "\$INPUT_SEQS" + for FASTA in ../tmp_input/*; do + if [ "\${FASTA##*.}" == 'gz' ]; then + gzip -cdf "\$FASTA" > \$( basename "\$FASTA" .gz ) + else + ln -s "\$FASTA" . + fi + done + cd .. busco \\ --cpu $task.cpus \\ - --in ${prefix}_uncompressed.fasta \\ + --in "\$INPUT_SEQS" \\ --out ${prefix}-busco \\ --lineage_dataset $lineage \\ $busco_lineage_dir \\ @@ -62,7 +72,7 @@ process BUSCO { $args # clean up - rm ${prefix}_uncompressed.fasta + rm -rf "\$INPUT_SEQS" cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index 4985bd18..bdd5f40d 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -9,7 +9,10 @@ workflow test_busco { input = [ [ id:'test', single_end:false ], // meta map - file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + [ + file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true), + file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['genome_fasta'], checkIfExists: true) + ] ] BUSCO ( @@ -20,4 +23,3 @@ workflow test_busco { ) } - From 96d4a31cc15e3b20ee6a7df0ad39ca59feeb3a02 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 3 May 2022 15:31:05 +0200 Subject: [PATCH 246/313] Moved the BED file to the main tuple --- modules/vardictjava/main.nf | 3 +-- tests/modules/vardictjava/main.nf | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/vardictjava/main.nf b/modules/vardictjava/main.nf index 454b86a4..c99301bb 100644 --- a/modules/vardictjava/main.nf +++ b/modules/vardictjava/main.nf @@ -10,8 +10,7 @@ process VARDICTJAVA { 'quay.io/biocontainers/vardict-java:1.8.3--hdfd78af_0' }" input: - tuple val(meta), path(bam), path(bai) - path(bed) + tuple val(meta), path(bam), path(bai), path(bed) tuple path(fasta), path(fasta_fai) output: diff --git a/tests/modules/vardictjava/main.nf b/tests/modules/vardictjava/main.nf index d392358a..e29490f3 100644 --- a/tests/modules/vardictjava/main.nf +++ b/tests/modules/vardictjava/main.nf @@ -9,15 +9,14 @@ workflow test_vardictjava { bam_input_ch = Channel.value([ [ id:'test' ], // meta map file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) ]) - bed = Channel.value(file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true)) - reference = Channel.value([ file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ]) - VARDICTJAVA ( bam_input_ch, bed, reference ) + VARDICTJAVA ( bam_input_ch, reference ) } From a39fa4e003efce395debe34de57c5b28472c762c Mon Sep 17 00:00:00 2001 From: ljmesi <37740329+ljmesi@users.noreply.github.com> Date: Tue, 3 May 2022 15:47:49 +0200 Subject: [PATCH 247/313] Fix checksum for one file --- tests/modules/samtools/bam2fq/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/modules/samtools/bam2fq/test.yml b/tests/modules/samtools/bam2fq/test.yml index 674730d7..9d641e4a 100644 --- a/tests/modules/samtools/bam2fq/test.yml +++ b/tests/modules/samtools/bam2fq/test.yml @@ -5,7 +5,7 @@ - samtools files: - path: output/samtools/test_interleaved.fq.gz - md5sum: 7a57a8ab53dd1d799cca67a85c47ccd9 + md5sum: 7290d2d8dbef0fa57c0e2f28b5db1bf8 - path: output/samtools/versions.yml md5sum: 4973eac1b6a8f090d5fcd4456d65a894 From 4be754b0080364ea14470ea152e3d0f3ca38baa8 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Tue, 3 May 2022 14:53:17 +0100 Subject: [PATCH 248/313] It's a file, not a directory --- modules/busco/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index b73f498b..e546c5ae 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -31,7 +31,7 @@ input: type: directory description: Path to local BUSCO lineages directory. - config_file: - type: directory + type: file description: Path to BUSCO config file. output: From 6351ec745ea35861554a0896470a43d47d1abee4 Mon Sep 17 00:00:00 2001 From: Matthieu Muffato Date: Tue, 3 May 2022 14:56:27 +0100 Subject: [PATCH 249/313] Update contributor list --- modules/busco/meta.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index e546c5ae..1301e091 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -53,3 +53,4 @@ authors: - "@priyanka-surana" - "@charles-plessy" - "@mahesh-panchal" + - "@muffato" From 1c54c0b1ae684dba97345a136b802b5ef8e31e4d Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Tue, 3 May 2022 16:02:11 +0200 Subject: [PATCH 250/313] Apply suggestions from code review Co-authored-by: Matthieu Muffato --- modules/busco/main.nf | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index 4ba4baac..c011b05b 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -24,20 +24,14 @@ process BUSCO { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}-${lineage}" def busco_config = config_file ? "--config $config_file" : '' - def busco_lineage_dir = busco_lineages_path ? "--download_path ${busco_lineages_path}" : '' + def busco_lineage_dir = busco_lineages_path ? "--offline --download_path ${busco_lineages_path}" : '' """ # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) # Check for container variable initialisation script and source it. if [ -f "/usr/local/env-activate.sh" ]; then - # . "/usr/local/env-activate.sh" # Errors out because of various unbound variables - export PATH='/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' - export CONDA_PREFIX='/usr/local' - export CONDA_SHLVL='1' - export CONDA_DEFAULT_ENV='/usr/local' - export CONDA_PROMPT_MODIFIER='' - . "/usr/local/etc/conda/activate.d/activate-r-base.sh" - . "/usr/local/etc/conda/activate.d/augustus.sh" - . "/usr/local/etc/conda/activate.d/openjdk_activate.sh" + set +u # Otherwise, errors out because of various unbound variables + . "/usr/local/env-activate.sh" + set -u fi # If the augustus config directory is not writable, then copy to writeable area From f02cd618b89e57f7d7a92bcdd8c654c85897c14c Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Tue, 3 May 2022 10:09:19 -0400 Subject: [PATCH 251/313] Update meta.yml --- modules/busco/meta.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index 1301e091..007d5e7c 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -54,3 +54,4 @@ authors: - "@charles-plessy" - "@mahesh-panchal" - "@muffato" + - "@jvhagey" From dc59ad0bf5cd65a921c85680e872097da43d2f77 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Tue, 3 May 2022 12:27:39 -0400 Subject: [PATCH 252/313] fix the version issue. --- modules/motus/downloaddb/main.nf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index c8af459a..20dae83c 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -30,9 +30,12 @@ process MOTUS_DOWNLOADDB { ## clean up rm ${software} + ## mOTUs version number is not available from command line. + ## mOTUs save the version number in index database folder. + ## mOTUs will check the database version is same version as exec version. cat <<-END_VERSIONS > versions.yml "${task.process}": - mOTUs: \$(echo \$(motus -h 2>&1) | sed 's/^.*Version: //; s/Reference.*\$//') + mOTUs: \$(grep motus db_mOTU/db_mOTU_versions | sed 's/motus\\t//g') END_VERSIONS """ } From 8df20218bf2f348a4f30b7a9b2f72bdb8e9e23a5 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Wed, 4 May 2022 09:22:43 +0000 Subject: [PATCH 253/313] Add more tests and capture summaries Co-authored-by: Jill V. Hagey, PhD --- modules/busco/main.nf | 11 +- tests/modules/busco/main.nf | 304 +++++++++++++++++++++++++++- tests/modules/busco/nextflow.config | 24 ++- tests/modules/busco/test.yml | 60 +++++- 4 files changed, 392 insertions(+), 7 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index c011b05b..59ac20f8 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -14,8 +14,11 @@ process BUSCO { path config_file // Optional: busco configuration file output: - tuple val(meta), path("*-busco"), emit: busco_dir - path "versions.yml" , emit: versions + tuple val(meta), path("*-busco.batch_summary.txt"), emit: batch_summary + tuple val(meta), path("short_summary.*.txt") , emit: short_summaries_txt + tuple val(meta), path("short_summary.*.json") , emit: short_summaries_json + tuple val(meta), path("*-busco") , emit: busco_dir + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -68,6 +71,10 @@ process BUSCO { # clean up rm -rf "\$INPUT_SEQS" + # Move files to avoid staging/publishing issues + mv ${prefix}-busco/batch_summary.txt ${prefix}-busco.batch_summary.txt + mv ${prefix}-busco/*/short_summary.*.{json,txt} . + cat <<-END_VERSIONS > versions.yml "${task.process}": busco: \$( busco --version 2>&1 | sed 's/^BUSCO //' ) diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index bdd5f40d..a678d371 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -5,7 +5,70 @@ nextflow.enable.dsl = 2 include { BUSCO } from '../../../modules/busco/main.nf' // This tests genome decompression, empty input channels and data download -workflow test_busco { +workflow test_busco_genome_single_fasta { + + input = [ + [ id:'test', single_end:false ], // meta map + file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) + ] + + BUSCO ( + input, + ['bacteria_odb10', 'bacteroidetes_odb10'], + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpimsfk4sj/busco/ + ├── test-bacteria_odb10-busco -> /tmp/tmp1sz7013h/b7/fdeaab567e1c5bccc475a4c19b8582/test-bacteria_odb10-busco/ + │ ├── batch_summary.txt + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ ├── run_bacteria_odb10/ + │ │ │ ├── busco_sequences/ + │ │ │ ├── full_table.tsv + │ │ │ ├── hmmer_output/ + │ │ │ ├── missing_busco_list.tsv + │ │ │ ├── short_summary.json + │ │ │ └── short_summary.txt + │ │ ├── short_summary.specific.bacteria_odb10.genome.fna.json + │ │ └── short_summary.specific.bacteria_odb10.genome.fna.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteroidetes_odb10-busco -> /tmp/tmp1sz7013h/75/0da56f59ee44bd2b85e0172906de49/test-bacteroidetes_odb10-busco/ + │ ├── batch_summary.txt + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ ├── run_bacteroidetes_odb10/ + │ │ │ ├── busco_sequences/ + │ │ │ ├── full_table.tsv + │ │ │ ├── hmmer_output/ + │ │ │ ├── missing_busco_list.tsv + │ │ │ ├── short_summary.json + │ │ │ └── short_summary.txt + │ │ ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json + │ │ └── short_summary.specific.bacteroidetes_odb10.genome.fna.txt + │ └── logs/ + │ └── busco.log + └── versions.yml -> /tmp/tmp1sz7013h/b7/fdeaab567e1c5bccc475a4c19b8582/versions.yml + */ + +} + +workflow test_busco_genome_multi_fasta { input = [ [ id:'test', single_end:false ], // meta map @@ -22,4 +85,243 @@ workflow test_busco { [], // No config ) + /* Output tree: + /tmp/tmpt22rjxzq/busco/ + ├── test-bacteria_odb10-busco -> /tmp/tmpfxt64xr_/36/425acbe5e9b27ba0bac8861f735494/test-bacteria_odb10-busco/ + │ ├── batch_summary.txt + │ ├── genome.fasta/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ ├── run_bacteria_odb10/ + │ │ │ ├── busco_sequences/ + │ │ │ ├── full_table.tsv + │ │ │ ├── hmmer_output/ + │ │ │ ├── missing_busco_list.tsv + │ │ │ ├── short_summary.json + │ │ │ └── short_summary.txt + │ │ ├── short_summary.specific.bacteria_odb10.genome.fasta.json + │ │ └── short_summary.specific.bacteria_odb10.genome.fasta.txt + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ ├── run_bacteria_odb10/ + │ │ │ ├── busco_sequences/ + │ │ │ ├── full_table.tsv + │ │ │ ├── hmmer_output/ + │ │ │ ├── missing_busco_list.tsv + │ │ │ ├── short_summary.json + │ │ │ └── short_summary.txt + │ │ ├── short_summary.specific.bacteria_odb10.genome.fna.json + │ │ └── short_summary.specific.bacteria_odb10.genome.fna.txt + │ └── logs/ + │ └── busco.log + └── versions.yml -> /tmp/tmpfxt64xr_/36/425acbe5e9b27ba0bac8861f735494/versions.yml + */ + +} + +workflow test_busco_eukaryote_metaeuk { + + input = [ + [ id:'test', single_end:false ], // meta map + file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + + BUSCO ( + input, + 'eukaryota_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmp22sf7kg9/busco/ + ├── test-eukaryota_odb10-busco -> /tmp/tmpmic8qsk6/d5/d8cb6681c0fcaa6da34b57ec174d59/test-eukaryota_odb10-busco/ + │ ├── batch_summary.txt + │ ├── genome.fasta/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── metaeuk_err.log + │ │ │ └── metaeuk_out.log + │ │ ├── run_eukaryota_odb10/ + │ │ │ ├── busco_sequences/ + │ │ │ ├── full_table.tsv + │ │ │ ├── hmmer_output/ + │ │ │ ├── metaeuk_output/ + │ │ │ ├── missing_busco_list.tsv + │ │ │ ├── short_summary.json + │ │ │ └── short_summary.txt + │ │ ├── short_summary.specific.eukaryota_odb10.genome.fasta.json + │ │ └── short_summary.specific.eukaryota_odb10.genome.fasta.txt + │ └── logs/ + │ └── busco.log + └── versions.yml -> /tmp/tmpmic8qsk6/d5/d8cb6681c0fcaa6da34b57ec174d59/versions.yml + */ + +} + +workflow test_busco_eukaryote_augustus { + + input = [ + [ id:'test', single_end:false ], // meta map + file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + ] + + BUSCO ( + input, + 'eukaryota_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmpo77wyvb9/busco/ + ├── test-eukaryota_odb10-busco -> /tmp/tmpshljnwcg/25/9891a19cbabda15a5c10fb5e34987f/test-eukaryota_odb10-busco/ + │ ├── batch_summary.txt + │ ├── genome.fasta/ + │ │ ├── blast_db/ + │ │ │ ├── genome.fasta.ndb + │ │ │ ├── genome.fasta.nhr + │ │ │ ├── genome.fasta.nin + │ │ │ ├── genome.fasta.not + │ │ │ ├── genome.fasta.nsq + │ │ │ ├── genome.fasta.ntf + │ │ │ └── genome.fasta.nto + │ │ ├── logs/ + │ │ │ ├── makeblastdb_err.log + │ │ │ ├── makeblastdb_out.log + │ │ │ ├── tblastn_err.log + │ │ │ └── tblastn_out.log + │ │ └── run_eukaryota_odb10/ + │ │ ├── augustus_output/ + │ │ ├── blast_output/ + │ │ ├── busco_sequences/ + │ │ └── hmmer_output/ + │ └── logs/ + │ └── busco.log + └── versions.yml -> /tmp/tmpshljnwcg/25/9891a19cbabda15a5c10fb5e34987f/versions.yml + */ + +} + +workflow test_busco_protein { + + input = [ + [ id:'test', single_end:false ], // meta map + file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['proteome_fasta'], checkIfExists: true) + ] + + BUSCO ( + input, + 'bacteria_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmplju98s42/busco/ + ├── test-bacteria_odb10-busco -> /tmp/tmp0oru9_61/9c/e992f5eee84806770002e4510f51cb/test-bacteria_odb10-busco/ + │ ├── batch_summary.txt + │ ├── logs/ + │ │ └── busco.log + │ └── proteome.fasta/ + │ ├── logs/ + │ │ ├── hmmsearch_err.log + │ │ └── hmmsearch_out.log + │ ├── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ ├── short_summary.specific.bacteria_odb10.proteome.fasta.json + │ └── short_summary.specific.bacteria_odb10.proteome.fasta.txt + └── versions.yml -> /tmp/tmp0oru9_61/9c/e992f5eee84806770002e4510f51cb/versions.yml + */ +} +workflow test_busco_transcriptome { + + input = [ + [ id:'test', single_end:false ], // meta map + file( params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true) + ] + + BUSCO ( + input, + 'bacteria_odb10', + [], // Download busco lineage + [], // No config + ) + + /* Output tree: + /tmp/tmp5twpr8o9/busco/ + ├── test-bacteria_odb10-busco -> /tmp/tmp_qyjiads/0d/886515d0f06686b2227517398ef8ce/test-bacteria_odb10-busco/ + │ ├── batch_summary.txt + │ ├── logs/ + │ │ └── busco.log + │ └── test1.contigs.fa/ + │ ├── blast_db/ + │ │ ├── test1.contigs.fa.ndb + │ │ ├── test1.contigs.fa.nhr + │ │ ├── test1.contigs.fa.nin + │ │ ├── test1.contigs.fa.not + │ │ ├── test1.contigs.fa.nsq + │ │ ├── test1.contigs.fa.ntf + │ │ └── test1.contigs.fa.nto + │ ├── logs/ + │ │ ├── hmmsearch_err.log + │ │ ├── hmmsearch_out.log + │ │ ├── makeblastdb_err.log + │ │ ├── makeblastdb_out.log + │ │ ├── tblastn_err.log + │ │ └── tblastn_out.log + │ ├── run_bacteria_odb10/ + │ │ ├── blast_output/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ ├── short_summary.txt + │ │ └── single_copy_proteins.faa + │ ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.json + │ ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.txt + │ └── translated_proteins/ + │ ├── 1024388at2.faa + │ ├── 1054741at2.faa + │ ├── 1093223at2.faa + │ ├── 1151822at2.faa + │ ├── 143460at2.faa + │ ├── 1491686at2.faa + │ ├── 1504821at2.faa + │ ├── 1574817at2.faa + │ ├── 1592033at2.faa + │ ├── 1623045at2.faa + │ ├── 1661836at2.faa + │ ├── 1674344at2.faa + │ ├── 1698718at2.faa + │ ├── 1990650at2.faa + │ ├── 223233at2.faa + │ ├── 402899at2.faa + │ ├── 505485at2.faa + │ ├── 665824at2.faa + │ ├── 776861at2.faa + │ ├── 874197at2.faa + │ ├── 932854at2.faa + │ └── 95696at2.faa + └── versions.yml -> /tmp/tmp_qyjiads/0d/886515d0f06686b2227517398ef8ce/versions.yml + */ + } diff --git a/tests/modules/busco/nextflow.config b/tests/modules/busco/nextflow.config index feea8d40..9e8f718f 100644 --- a/tests/modules/busco/nextflow.config +++ b/tests/modules/busco/nextflow.config @@ -1,6 +1,28 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - ext.args = '--mode genome' + withName: 'test_busco_genome_single_fasta:BUSCO' { + ext.args = '--mode genome' + } + + withName: 'test_busco_genome_multi_fasta:BUSCO' { + ext.args = '--mode genome' + } + + withName: 'test_busco_eukaryote_metaeuk:BUSCO' { + ext.args = '--mode genome' + } + + withName: 'test_busco_eukaryote_augustus:BUSCO' { + ext.args = '--mode genome --augustus' + } + + withName: 'test_busco_protein:BUSCO' { + ext.args = '--mode proteins' + } + + withName: 'test_busco_transcriptome:BUSCO'{ + ext.args = '--mode transcriptome' + } } diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index 3e7c1bf6..2125c3a4 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -1,7 +1,61 @@ -- name: busco test_busco - command: nextflow run tests/modules/busco -entry test_busco -c tests/config/nextflow.config +- name: busco test_busco_genome_single_fasta + command: nextflow run tests/modules/busco -entry test_busco_genome_single_fasta -c tests/config/nextflow.config tags: - busco + - bacteria + - genome files: - path: output/busco/versions.yml - md5sum: 921e2abe85bf73e63a8b494453dc83cf + md5sum: 8aa830f71587d859df35c6cfab59f35d + +- name: busco test_busco_genome_multi_fasta + command: nextflow run tests/modules/busco -entry test_busco_genome_multi_fasta -c tests/config/nextflow.config + tags: + - busco + - bacteria + - genome + files: + - path: output/busco/versions.yml + md5sum: 9a959eb0a1f765777dff1ea2f5c139c0 + +- name: busco test_busco_eukaryote_metaeuk + command: nextflow run tests/modules/busco -entry test_busco_eukaryote_metaeuk -c tests/config/nextflow.config + tags: + - busco + - eukaryote + - genome + - metaeuk + files: + - path: output/busco/versions.yml + md5sum: 34a808c257e6db1b0456f3b4372bc477 + +- name: busco test_busco_eukaryote_augustus + command: nextflow run tests/modules/busco -entry test_busco_eukaryote_augustus -c tests/config/nextflow.config + tags: + - busco + - eukaryote + - genome + - augustus + files: + - path: output/busco/versions.yml + md5sum: 2caac915461410b16a1524ac064cd0df + +- name: busco test_busco_protein + command: nextflow run tests/modules/busco -entry test_busco_protein -c tests/config/nextflow.config + tags: + - busco + - bacteria + - proteins + files: + - path: output/busco/versions.yml + md5sum: d7392261a57960a7e6aea609dce824f5 + +- name: busco test_busco_transcriptome + command: nextflow run tests/modules/busco -entry test_busco_transcriptome -c tests/config/nextflow.config + tags: + - busco + - bacteria + - transcriptome + files: + - path: output/busco/versions.yml + md5sum: 30eacbc7df70f6b1e72e0a7b6d02a7e1 From c517ce9b4d3f09f2d49cf0c6795019a6e78938b3 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 13:42:12 +0200 Subject: [PATCH 254/313] Added the module and some simple testing --- modules/happy/main.nf | 53 +++++++++++++++++++++++++++++ modules/happy/meta.yml | 51 +++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 +++ tests/modules/happy/main.nf | 39 +++++++++++++++++++++ tests/modules/happy/nextflow.config | 5 +++ tests/modules/happy/test.yml | 7 ++++ 6 files changed, 159 insertions(+) create mode 100644 modules/happy/main.nf create mode 100644 modules/happy/meta.yml create mode 100644 tests/modules/happy/main.nf create mode 100644 tests/modules/happy/nextflow.config create mode 100644 tests/modules/happy/test.yml diff --git a/modules/happy/main.nf b/modules/happy/main.nf new file mode 100644 index 00000000..68059dd8 --- /dev/null +++ b/modules/happy/main.nf @@ -0,0 +1,53 @@ +def VERSION_HAP = '0.3.14' +def VERSION_PRE = '0.3.14' + +process HAPPY { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::hap.py=0.3.14" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hap.py:0.3.14--py27h5c5a3ab_0': + 'quay.io/biocontainers/hap.py:0.3.14--py27h5c5a3ab_0' }" + + input: + tuple val(meta), path(truth_vcf), path(query_vcf), path(bed) + tuple path(fasta), path(fasta_fai) + + output: + tuple val(meta), path('*.csv'), path('*.json') , emit: metrics + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + pre.py \\ + $args \\ + -R $bed \\ + --reference $fasta \\ + --threads $task.cpus \\ + $query_vcf \\ + ${prefix}_preprocessed.vcf.gz + + hap.py \\ + $truth_vcf \\ + ${prefix}_preprocessed.vcf.gz \\ + $args2 \\ + --reference $fasta \\ + --threads $task.cpus \\ + -R $bed \\ + -o $prefix + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + hap.py: $VERSION_HAP + pre.py: $VERSION_PRE + END_VERSIONS + """ +} diff --git a/modules/happy/meta.yml b/modules/happy/meta.yml new file mode 100644 index 00000000..52d98e04 --- /dev/null +++ b/modules/happy/meta.yml @@ -0,0 +1,51 @@ +name: "happy" +description: Hap.py is a tool to compare diploid genotypes at haplotype level. Rather than comparing VCF records row by row, hap.py will generate and match alternate sequences in a superlocus. A superlocus is a small region of the genome (sized between 1 and around 1000 bp) that contains one or more variants. +keywords: + - happy + - benchmark + - haplotype +tools: + - "happy": + description: "Haplotype VCF comparison tools" + homepage: "https://www.illumina.com/products/by-type/informatics-products/basespace-sequence-hub/apps/hap-py-benchmarking.html" + documentation: "https://github.com/Illumina/hap.py" + tool_dev_url: "https://github.com/Illumina/hap.py" + doi: "" + licence: "['BSD-2-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - truth_vcf: + type: file + description: gold standard VCF file + pattern: "*.{vcf,vcf.gz}" + - query_vcf: + type: file + description: VCF file to query + pattern: "*.{vcf,vcf.gz}" + - bed: + type: file + description: BED file + pattern: "*.bed" + - fasta: + type: file + description: FASTA file of the reference genome + pattern: "*.{fa,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" + +authors: + - "@nvnieuwk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index f4feb844..c14ffc8e 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -891,6 +891,10 @@ hamronization/summarize: - modules/hamronization/summarize/** - tests/modules/hamronization/summarize/** +happy: + - modules/happy/** + - tests/modules/happy/** + hicap: - modules/hicap/** - tests/modules/hicap/** diff --git a/tests/modules/happy/main.nf b/tests/modules/happy/main.nf new file mode 100644 index 00000000..0ce23b50 --- /dev/null +++ b/tests/modules/happy/main.nf @@ -0,0 +1,39 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HAPPY } from '../../../modules/happy/main.nf' + +workflow test_happy_vcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome21_indels_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY ( input, fasta ) +} + +workflow test_happy_gvcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY ( input, fasta ) +} diff --git a/tests/modules/happy/nextflow.config b/tests/modules/happy/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/happy/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/happy/test.yml b/tests/modules/happy/test.yml new file mode 100644 index 00000000..d85d42a2 --- /dev/null +++ b/tests/modules/happy/test.yml @@ -0,0 +1,7 @@ +- name: happy test_happy + command: nextflow run tests/modules/happy -entry test_happy -c tests/config/nextflow.config + tags: + - happy + files: + - path: output/happy/versions.yml + md5sum: ab8944c1b24e55bab311a9d389c75c90 From 73a8df9522e31eaa34f9f611d8a5a42d6a8c53fe Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Wed, 4 May 2022 11:52:42 +0000 Subject: [PATCH 255/313] Fix no genes found test and update test.yml --- modules/busco/main.nf | 6 +- tests/modules/busco/main.nf | 166 +++++++++++++++++------------------ tests/modules/busco/test.yml | 126 +++++++++++++++++++++++--- 3 files changed, 198 insertions(+), 100 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index 59ac20f8..f6bd63e2 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -15,8 +15,8 @@ process BUSCO { output: tuple val(meta), path("*-busco.batch_summary.txt"), emit: batch_summary - tuple val(meta), path("short_summary.*.txt") , emit: short_summaries_txt - tuple val(meta), path("short_summary.*.json") , emit: short_summaries_json + tuple val(meta), path("short_summary.*.txt") , emit: short_summaries_txt, optional: true + tuple val(meta), path("short_summary.*.json") , emit: short_summaries_json, optional: true tuple val(meta), path("*-busco") , emit: busco_dir path "versions.yml" , emit: versions @@ -73,7 +73,7 @@ process BUSCO { # Move files to avoid staging/publishing issues mv ${prefix}-busco/batch_summary.txt ${prefix}-busco.batch_summary.txt - mv ${prefix}-busco/*/short_summary.*.{json,txt} . + mv ${prefix}-busco/*/short_summary.*.{json,txt} . || echo "Short summaries were not available: No genes were found." cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index a678d371..f0201d21 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -20,9 +20,12 @@ workflow test_busco_genome_single_fasta { ) /* Output tree: - /tmp/tmpimsfk4sj/busco/ - ├── test-bacteria_odb10-busco -> /tmp/tmp1sz7013h/b7/fdeaab567e1c5bccc475a4c19b8582/test-bacteria_odb10-busco/ - │ ├── batch_summary.txt + /tmp/tmpisa3ktco/busco/ + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/short_summary.specific.bacteroidetes_odb10.genome.fna.json + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.txt -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/test-bacteria_odb10-busco/ │ ├── genome.fna/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log @@ -31,19 +34,17 @@ workflow test_busco_genome_single_fasta { │ │ │ └── prodigal_out.log │ │ ├── prodigal_output/ │ │ │ └── predicted_genes/ - │ │ ├── run_bacteria_odb10/ - │ │ │ ├── busco_sequences/ - │ │ │ ├── full_table.tsv - │ │ │ ├── hmmer_output/ - │ │ │ ├── missing_busco_list.tsv - │ │ │ ├── short_summary.json - │ │ │ └── short_summary.txt - │ │ ├── short_summary.specific.bacteria_odb10.genome.fna.json - │ │ └── short_summary.specific.bacteria_odb10.genome.fna.txt + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt │ └── logs/ │ └── busco.log - ├── test-bacteroidetes_odb10-busco -> /tmp/tmp1sz7013h/75/0da56f59ee44bd2b85e0172906de49/test-bacteroidetes_odb10-busco/ - │ ├── batch_summary.txt + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/test-bacteria_odb10-busco.batch_summary.txt + ├── test-bacteroidetes_odb10-busco -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/test-bacteroidetes_odb10-busco/ │ ├── genome.fna/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log @@ -52,18 +53,17 @@ workflow test_busco_genome_single_fasta { │ │ │ └── prodigal_out.log │ │ ├── prodigal_output/ │ │ │ └── predicted_genes/ - │ │ ├── run_bacteroidetes_odb10/ - │ │ │ ├── busco_sequences/ - │ │ │ ├── full_table.tsv - │ │ │ ├── hmmer_output/ - │ │ │ ├── missing_busco_list.tsv - │ │ │ ├── short_summary.json - │ │ │ └── short_summary.txt - │ │ ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json - │ │ └── short_summary.specific.bacteroidetes_odb10.genome.fna.txt + │ │ └── run_bacteroidetes_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt │ └── logs/ │ └── busco.log - └── versions.yml -> /tmp/tmp1sz7013h/b7/fdeaab567e1c5bccc475a4c19b8582/versions.yml + ├── test-bacteroidetes_odb10-busco.batch_summary.txt -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/test-bacteroidetes_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/versions.yml */ } @@ -86,9 +86,12 @@ workflow test_busco_genome_multi_fasta { ) /* Output tree: - /tmp/tmpt22rjxzq/busco/ - ├── test-bacteria_odb10-busco -> /tmp/tmpfxt64xr_/36/425acbe5e9b27ba0bac8861f735494/test-bacteria_odb10-busco/ - │ ├── batch_summary.txt + /tmp/tmpk19byek7/busco/ + ├── short_summary.specific.bacteria_odb10.genome.fasta.json -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fasta.json + ├── short_summary.specific.bacteria_odb10.genome.fasta.txt -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fasta.txt + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── test-bacteria_odb10-busco -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/test-bacteria_odb10-busco/ │ ├── genome.fasta/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log @@ -97,15 +100,13 @@ workflow test_busco_genome_multi_fasta { │ │ │ └── prodigal_out.log │ │ ├── prodigal_output/ │ │ │ └── predicted_genes/ - │ │ ├── run_bacteria_odb10/ - │ │ │ ├── busco_sequences/ - │ │ │ ├── full_table.tsv - │ │ │ ├── hmmer_output/ - │ │ │ ├── missing_busco_list.tsv - │ │ │ ├── short_summary.json - │ │ │ └── short_summary.txt - │ │ ├── short_summary.specific.bacteria_odb10.genome.fasta.json - │ │ └── short_summary.specific.bacteria_odb10.genome.fasta.txt + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt │ ├── genome.fna/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log @@ -114,18 +115,17 @@ workflow test_busco_genome_multi_fasta { │ │ │ └── prodigal_out.log │ │ ├── prodigal_output/ │ │ │ └── predicted_genes/ - │ │ ├── run_bacteria_odb10/ - │ │ │ ├── busco_sequences/ - │ │ │ ├── full_table.tsv - │ │ │ ├── hmmer_output/ - │ │ │ ├── missing_busco_list.tsv - │ │ │ ├── short_summary.json - │ │ │ └── short_summary.txt - │ │ ├── short_summary.specific.bacteria_odb10.genome.fna.json - │ │ └── short_summary.specific.bacteria_odb10.genome.fna.txt + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt │ └── logs/ │ └── busco.log - └── versions.yml -> /tmp/tmpfxt64xr_/36/425acbe5e9b27ba0bac8861f735494/versions.yml + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/test-bacteria_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmplt9fv3tl/15/ff310a16d9ce7ad24e207a05ce718e/versions.yml */ } @@ -145,28 +145,28 @@ workflow test_busco_eukaryote_metaeuk { ) /* Output tree: - /tmp/tmp22sf7kg9/busco/ - ├── test-eukaryota_odb10-busco -> /tmp/tmpmic8qsk6/d5/d8cb6681c0fcaa6da34b57ec174d59/test-eukaryota_odb10-busco/ - │ ├── batch_summary.txt + /tmp/tmpeq4dsir5/busco/ + ├── short_summary.specific.eukaryota_odb10.genome.fasta.json -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/short_summary.specific.eukaryota_odb10.genome.fasta.json + ├── short_summary.specific.eukaryota_odb10.genome.fasta.txt -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/short_summary.specific.eukaryota_odb10.genome.fasta.txt + ├── test-eukaryota_odb10-busco -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/test-eukaryota_odb10-busco/ │ ├── genome.fasta/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log │ │ │ ├── hmmsearch_out.log │ │ │ ├── metaeuk_err.log │ │ │ └── metaeuk_out.log - │ │ ├── run_eukaryota_odb10/ - │ │ │ ├── busco_sequences/ - │ │ │ ├── full_table.tsv - │ │ │ ├── hmmer_output/ - │ │ │ ├── metaeuk_output/ - │ │ │ ├── missing_busco_list.tsv - │ │ │ ├── short_summary.json - │ │ │ └── short_summary.txt - │ │ ├── short_summary.specific.eukaryota_odb10.genome.fasta.json - │ │ └── short_summary.specific.eukaryota_odb10.genome.fasta.txt + │ │ └── run_eukaryota_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── metaeuk_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt │ └── logs/ │ └── busco.log - └── versions.yml -> /tmp/tmpmic8qsk6/d5/d8cb6681c0fcaa6da34b57ec174d59/versions.yml + ├── test-eukaryota_odb10-busco.batch_summary.txt -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/test-eukaryota_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmp60hby2pk/6f/529873d91cda6bae3a4a6a21746aee/versions.yml */ } @@ -186,9 +186,8 @@ workflow test_busco_eukaryote_augustus { ) /* Output tree: - /tmp/tmpo77wyvb9/busco/ - ├── test-eukaryota_odb10-busco -> /tmp/tmpshljnwcg/25/9891a19cbabda15a5c10fb5e34987f/test-eukaryota_odb10-busco/ - │ ├── batch_summary.txt + /tmp/tmp2xqaygjj/busco/ + ├── test-eukaryota_odb10-busco -> /tmp/tmpjqs61x9o/3f/67cc14e873c0ceb45e2a27594d624c/test-eukaryota_odb10-busco/ │ ├── genome.fasta/ │ │ ├── blast_db/ │ │ │ ├── genome.fasta.ndb @@ -210,7 +209,8 @@ workflow test_busco_eukaryote_augustus { │ │ └── hmmer_output/ │ └── logs/ │ └── busco.log - └── versions.yml -> /tmp/tmpshljnwcg/25/9891a19cbabda15a5c10fb5e34987f/versions.yml + ├── test-eukaryota_odb10-busco.batch_summary.txt -> /tmp/tmpjqs61x9o/3f/67cc14e873c0ceb45e2a27594d624c/test-eukaryota_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpjqs61x9o/3f/67cc14e873c0ceb45e2a27594d624c/versions.yml */ } @@ -230,25 +230,25 @@ workflow test_busco_protein { ) /* Output tree: - /tmp/tmplju98s42/busco/ - ├── test-bacteria_odb10-busco -> /tmp/tmp0oru9_61/9c/e992f5eee84806770002e4510f51cb/test-bacteria_odb10-busco/ - │ ├── batch_summary.txt + /tmp/tmpzwd5dn56/busco/ + ├── short_summary.specific.bacteria_odb10.proteome.fasta.json -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/short_summary.specific.bacteria_odb10.proteome.fasta.json + ├── short_summary.specific.bacteria_odb10.proteome.fasta.txt -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/short_summary.specific.bacteria_odb10.proteome.fasta.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/test-bacteria_odb10-busco/ │ ├── logs/ │ │ └── busco.log │ └── proteome.fasta/ │ ├── logs/ │ │ ├── hmmsearch_err.log │ │ └── hmmsearch_out.log - │ ├── run_bacteria_odb10/ - │ │ ├── busco_sequences/ - │ │ ├── full_table.tsv - │ │ ├── hmmer_output/ - │ │ ├── missing_busco_list.tsv - │ │ ├── short_summary.json - │ │ └── short_summary.txt - │ ├── short_summary.specific.bacteria_odb10.proteome.fasta.json - │ └── short_summary.specific.bacteria_odb10.proteome.fasta.txt - └── versions.yml -> /tmp/tmp0oru9_61/9c/e992f5eee84806770002e4510f51cb/versions.yml + │ └── run_bacteria_odb10/ + │ ├── busco_sequences/ + │ ├── full_table.tsv + │ ├── hmmer_output/ + │ ├── missing_busco_list.tsv + │ ├── short_summary.json + │ └── short_summary.txt + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/test-bacteria_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpk1nlgbf_/ae/0db07b5cd08fb23d0aba5f134ebbe2/versions.yml */ } workflow test_busco_transcriptome { @@ -266,9 +266,10 @@ workflow test_busco_transcriptome { ) /* Output tree: - /tmp/tmp5twpr8o9/busco/ - ├── test-bacteria_odb10-busco -> /tmp/tmp_qyjiads/0d/886515d0f06686b2227517398ef8ce/test-bacteria_odb10-busco/ - │ ├── batch_summary.txt + /tmp/tmpitjyvo9g/busco/ + ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.json -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/short_summary.specific.bacteria_odb10.test1.contigs.fa.json + ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.txt -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/short_summary.specific.bacteria_odb10.test1.contigs.fa.txt + ├── test-bacteria_odb10-busco -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/test-bacteria_odb10-busco/ │ ├── logs/ │ │ └── busco.log │ └── test1.contigs.fa/ @@ -296,8 +297,6 @@ workflow test_busco_transcriptome { │ │ ├── short_summary.json │ │ ├── short_summary.txt │ │ └── single_copy_proteins.faa - │ ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.json - │ ├── short_summary.specific.bacteria_odb10.test1.contigs.fa.txt │ └── translated_proteins/ │ ├── 1024388at2.faa │ ├── 1054741at2.faa @@ -321,7 +320,8 @@ workflow test_busco_transcriptome { │ ├── 874197at2.faa │ ├── 932854at2.faa │ └── 95696at2.faa - └── versions.yml -> /tmp/tmp_qyjiads/0d/886515d0f06686b2227517398ef8ce/versions.yml + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/test-bacteria_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmp6wqi0eyx/4f/ed0b23f0fc807bb68091298845c135/versions.yml */ } diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index 2125c3a4..b838d9b7 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -2,9 +2,39 @@ command: nextflow run tests/modules/busco -entry test_busco_genome_single_fasta -c tests/config/nextflow.config tags: - busco - - bacteria - - genome files: + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: e50690742e9ae6abdd2bf99334ff9e12 + - path: output/busco/test-bacteroidetes_odb10-busco.batch_summary.txt + md5sum: 4c1b2c4317c88398eddc30877ed740d9 - path: output/busco/versions.yml md5sum: 8aa830f71587d859df35c6cfab59f35d @@ -12,9 +42,37 @@ command: nextflow run tests/modules/busco -entry test_busco_genome_multi_fasta -c tests/config/nextflow.config tags: - busco - - bacteria - - genome files: + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: 5360dfe83bec1f5741ee115e53e6b517 - path: output/busco/versions.yml md5sum: 9a959eb0a1f765777dff1ea2f5c139c0 @@ -22,10 +80,23 @@ command: nextflow run tests/modules/busco -entry test_busco_eukaryote_metaeuk -c tests/config/nextflow.config tags: - busco - - eukaryote - - genome - - metaeuk files: + - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/test-eukaryota_odb10-busco.batch_summary.txt + md5sum: a70806f99ba5706d7353d3353b3f1d2b - path: output/busco/versions.yml md5sum: 34a808c257e6db1b0456f3b4372bc477 @@ -33,10 +104,9 @@ command: nextflow run tests/modules/busco -entry test_busco_eukaryote_augustus -c tests/config/nextflow.config tags: - busco - - eukaryote - - genome - - augustus files: + - path: output/busco/test-eukaryota_odb10-busco.batch_summary.txt + md5sum: 660393dd43cd6a093b952d4b8ad41e40 - path: output/busco/versions.yml md5sum: 2caac915461410b16a1524ac064cd0df @@ -44,9 +114,23 @@ command: nextflow run tests/modules/busco -entry test_busco_protein -c tests/config/nextflow.config tags: - busco - - bacteria - - proteins files: + - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: fd3b4e30ce74d1fcb95d6286d6e2049f - path: output/busco/versions.yml md5sum: d7392261a57960a7e6aea609dce824f5 @@ -54,8 +138,22 @@ command: nextflow run tests/modules/busco -entry test_busco_transcriptome -c tests/config/nextflow.config tags: - busco - - bacteria - - transcriptome files: + - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.json + contains: + - 'one_line_summary' + - 'input_file' + - 'mode' + - 'dataset' + - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.txt + contains: + - 'BUSCO version' + - 'The lineage dataset is' + - 'BUSCO was run in mode' + - 'Complete BUSCOs' + - 'Missing BUSCOs' + - 'Dependencies and versions' + - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt + md5sum: 9a176cafe66ac0adca89dc34ad2be13f - path: output/busco/versions.yml md5sum: 30eacbc7df70f6b1e72e0a7b6d02a7e1 From f65abe1e9a4e9d9932772a4d2355666b9cac9e61 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Wed, 4 May 2022 11:54:51 +0000 Subject: [PATCH 256/313] Prettier --- tests/modules/busco/test.yml | 140 +++++++++++++++++------------------ 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index b838d9b7..43b810ba 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -5,32 +5,32 @@ files: - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt md5sum: e50690742e9ae6abdd2bf99334ff9e12 - path: output/busco/test-bacteroidetes_odb10-busco.batch_summary.txt @@ -45,32 +45,32 @@ files: - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.bacteria_odb10.genome.fasta.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt md5sum: 5360dfe83bec1f5741ee115e53e6b517 - path: output/busco/versions.yml @@ -83,18 +83,18 @@ files: - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.eukaryota_odb10.genome.fasta.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/test-eukaryota_odb10-busco.batch_summary.txt md5sum: a70806f99ba5706d7353d3353b3f1d2b - path: output/busco/versions.yml @@ -117,18 +117,18 @@ files: - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.bacteria_odb10.proteome.fasta.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt md5sum: fd3b4e30ce74d1fcb95d6286d6e2049f - path: output/busco/versions.yml @@ -141,18 +141,18 @@ files: - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.json contains: - - 'one_line_summary' - - 'input_file' - - 'mode' - - 'dataset' + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" - path: output/busco/short_summary.specific.bacteria_odb10.test1.contigs.fa.txt contains: - - 'BUSCO version' - - 'The lineage dataset is' - - 'BUSCO was run in mode' - - 'Complete BUSCOs' - - 'Missing BUSCOs' - - 'Dependencies and versions' + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt md5sum: 9a176cafe66ac0adca89dc34ad2be13f - path: output/busco/versions.yml From 37338ecee30a7210e9a40d993370fd25bddf003d Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:00:02 +0200 Subject: [PATCH 257/313] Finished the module --- modules/happy/meta.yml | 12 ++++++++++++ tests/modules/happy/test.yml | 26 +++++++++++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/modules/happy/meta.yml b/modules/happy/meta.yml index 52d98e04..28142d9b 100644 --- a/modules/happy/meta.yml +++ b/modules/happy/meta.yml @@ -42,6 +42,18 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - summary: + type: file + description: A CSV file containing the summary of the benchmarking + pattern: "*.summary.csv" + - extended: + type: file + description: A CSV file containing extended info of the benchmarking + pattern: "*.extended.csv" + - runinfo: + type: file + description: A JSON file containing the run info + pattern: "*.runinfo.json" - versions: type: file description: File containing software versions diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml index d85d42a2..7dddca17 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/test.yml @@ -1,7 +1,27 @@ -- name: happy test_happy - command: nextflow run tests/modules/happy -entry test_happy -c tests/config/nextflow.config +- name: happy test_happy_vcf + command: nextflow run tests/modules/happy -entry test_happy_vcf -c tests/config/nextflow.config tags: - happy files: + - path: output/happy/test.extended.csv + md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 + - path: output/happy/test.runinfo.json + contains: '"name": "hap.py"' + - path: output/happy/test.summary.csv + md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml - md5sum: ab8944c1b24e55bab311a9d389c75c90 + md5sum: 2c2b8249f9f52194da7f09076dbb5019 + +- name: happy test_happy_gvcf + command: nextflow run tests/modules/happy -entry test_happy_gvcf -c tests/config/nextflow.config + tags: + - happy + files: + - path: output/happy/test.extended.csv + md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 + - path: output/happy/test.runinfo.json + contains: '"name": "hap.py"' + - path: output/happy/test.summary.csv + md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 + - path: output/happy/versions.yml + md5sum: 75331161af9ec046d045ffcba83abddf From 065a5d6a7f13a50ad7965fdc770df50363bde3d7 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:05:21 +0200 Subject: [PATCH 258/313] Fixed a linting issue --- modules/happy/main.nf | 2 +- modules/happy/meta.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/happy/main.nf b/modules/happy/main.nf index 68059dd8..1338686e 100644 --- a/modules/happy/main.nf +++ b/modules/happy/main.nf @@ -25,7 +25,7 @@ process HAPPY { def args = task.ext.args ?: '' def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - + """ pre.py \\ $args \\ diff --git a/modules/happy/meta.yml b/modules/happy/meta.yml index 28142d9b..aba9410b 100644 --- a/modules/happy/meta.yml +++ b/modules/happy/meta.yml @@ -45,7 +45,7 @@ output: - summary: type: file description: A CSV file containing the summary of the benchmarking - pattern: "*.summary.csv" + pattern: "*.summary.csv" - extended: type: file description: A CSV file containing extended info of the benchmarking @@ -60,4 +60,4 @@ output: pattern: "versions.yml" authors: - - "@nvnieuwk" + - "@nvnieuwk" \ No newline at end of file From 177a7e49f249952d8b3271c454529a768f16af43 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:06:42 +0200 Subject: [PATCH 259/313] Fixed a linting issue --- modules/happy/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/happy/meta.yml b/modules/happy/meta.yml index aba9410b..d732df22 100644 --- a/modules/happy/meta.yml +++ b/modules/happy/meta.yml @@ -60,4 +60,4 @@ output: pattern: "versions.yml" authors: - - "@nvnieuwk" \ No newline at end of file + - "@nvnieuwk" From c1393bf999e4e967d24d7ec3d2e864c5d0a856e3 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:14:01 +0200 Subject: [PATCH 260/313] Possible fix for the pytest errors? --- tests/modules/happy/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml index 7dddca17..f5bdef52 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/test.yml @@ -6,7 +6,7 @@ - path: output/happy/test.extended.csv md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 - path: output/happy/test.runinfo.json - contains: '"name": "hap.py"' + contains: 'hap.py' - path: output/happy/test.summary.csv md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml @@ -20,7 +20,7 @@ - path: output/happy/test.extended.csv md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 - path: output/happy/test.runinfo.json - contains: '"name": "hap.py"' + contains: 'hap.py' - path: output/happy/test.summary.csv md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 - path: output/happy/versions.yml From 505ab038037df6a7d7af1db1cae3354b8f713364 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:14:53 +0200 Subject: [PATCH 261/313] fixed a description --- modules/happy/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/happy/meta.yml b/modules/happy/meta.yml index d732df22..6b5b86cf 100644 --- a/modules/happy/meta.yml +++ b/modules/happy/meta.yml @@ -25,7 +25,7 @@ input: pattern: "*.{vcf,vcf.gz}" - query_vcf: type: file - description: VCF file to query + description: VCF/GVCF file to query pattern: "*.{vcf,vcf.gz}" - bed: type: file From 17dbd2bb82093cd6ca1d1439c5c7815eb0b9a2a6 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:18:56 +0200 Subject: [PATCH 262/313] Linting issue fixed --- tests/modules/happy/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml index f5bdef52..937df32e 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/test.yml @@ -6,7 +6,7 @@ - path: output/happy/test.extended.csv md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 - path: output/happy/test.runinfo.json - contains: 'hap.py' + contains: hap.py - path: output/happy/test.summary.csv md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml @@ -20,7 +20,7 @@ - path: output/happy/test.extended.csv md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 - path: output/happy/test.runinfo.json - contains: 'hap.py' + contains: hap.py - path: output/happy/test.summary.csv md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 - path: output/happy/versions.yml From 583ea138006d8c49d4821bbfaeba81408ff57053 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:22:55 +0200 Subject: [PATCH 263/313] Another try to fix the pytest issues --- tests/modules/happy/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml index 937df32e..c0a34387 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/test.yml @@ -6,7 +6,7 @@ - path: output/happy/test.extended.csv md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 - path: output/happy/test.runinfo.json - contains: hap.py + contains: dist - path: output/happy/test.summary.csv md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml @@ -20,7 +20,7 @@ - path: output/happy/test.extended.csv md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 - path: output/happy/test.runinfo.json - contains: hap.py + contains: dist - path: output/happy/test.summary.csv md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 - path: output/happy/versions.yml From 5889d6c9233fae612dbce8d333773f1a8b1d47e9 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:46:15 +0200 Subject: [PATCH 264/313] Another possible fix for the pytest issues --- tests/modules/happy/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml index c0a34387..9af6cc83 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/test.yml @@ -6,7 +6,9 @@ - path: output/happy/test.extended.csv md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 - path: output/happy/test.runinfo.json - contains: dist + contains: + - 'dist' + - 'python_version' - path: output/happy/test.summary.csv md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml @@ -20,7 +22,9 @@ - path: output/happy/test.extended.csv md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 - path: output/happy/test.runinfo.json - contains: dist + contains: + - 'dist' + - 'python_version' - path: output/happy/test.summary.csv md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 - path: output/happy/versions.yml From 3c661386728c3552da55db5252ef2bae8f113220 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 14:49:17 +0200 Subject: [PATCH 265/313] Linting issue + removed the contains lines --- tests/modules/happy/test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/test.yml index 9af6cc83..0fd26e5b 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/test.yml @@ -6,9 +6,6 @@ - path: output/happy/test.extended.csv md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 - path: output/happy/test.runinfo.json - contains: - - 'dist' - - 'python_version' - path: output/happy/test.summary.csv md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml @@ -22,9 +19,6 @@ - path: output/happy/test.extended.csv md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 - path: output/happy/test.runinfo.json - contains: - - 'dist' - - 'python_version' - path: output/happy/test.summary.csv md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 - path: output/happy/versions.yml From f875aec46b9ab231ab96dfa4bb3b62c53fb821ee Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 15:29:48 +0200 Subject: [PATCH 266/313] Split the module into two parts --- modules/happy/{ => happy}/main.nf | 21 ++----- modules/happy/{ => happy}/meta.yml | 6 +- modules/happy/prepy/main.nf | 41 ++++++++++++++ modules/happy/prepy/meta.yml | 55 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/happy/{ => happy}/main.nf | 6 +- .../modules/happy/{ => happy}/nextflow.config | 0 tests/modules/happy/{ => happy}/test.yml | 14 +++-- tests/modules/happy/prepy/main.nf | 37 +++++++++++++ tests/modules/happy/prepy/nextflow.config | 5 ++ tests/modules/happy/prepy/test.yml | 19 +++++++ 11 files changed, 182 insertions(+), 26 deletions(-) rename modules/happy/{ => happy}/main.nf (74%) rename modules/happy/{ => happy}/meta.yml (93%) create mode 100644 modules/happy/prepy/main.nf create mode 100644 modules/happy/prepy/meta.yml rename tests/modules/happy/{ => happy}/main.nf (90%) rename tests/modules/happy/{ => happy}/nextflow.config (100%) rename tests/modules/happy/{ => happy}/test.yml (58%) create mode 100644 tests/modules/happy/prepy/main.nf create mode 100644 tests/modules/happy/prepy/nextflow.config create mode 100644 tests/modules/happy/prepy/test.yml diff --git a/modules/happy/main.nf b/modules/happy/happy/main.nf similarity index 74% rename from modules/happy/main.nf rename to modules/happy/happy/main.nf index 1338686e..1bb99117 100644 --- a/modules/happy/main.nf +++ b/modules/happy/happy/main.nf @@ -1,7 +1,6 @@ -def VERSION_HAP = '0.3.14' -def VERSION_PRE = '0.3.14' +def VERSION = '0.3.14' -process HAPPY { +process HAPPY_HAPPY { tag "$meta.id" label 'process_medium' @@ -23,22 +22,13 @@ process HAPPY { script: def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ - pre.py \\ - $args \\ - -R $bed \\ - --reference $fasta \\ - --threads $task.cpus \\ - $query_vcf \\ - ${prefix}_preprocessed.vcf.gz - hap.py \\ $truth_vcf \\ - ${prefix}_preprocessed.vcf.gz \\ - $args2 \\ + $query_vcf \\ + $args \\ --reference $fasta \\ --threads $task.cpus \\ -R $bed \\ @@ -46,8 +36,7 @@ process HAPPY { cat <<-END_VERSIONS > versions.yml "${task.process}": - hap.py: $VERSION_HAP - pre.py: $VERSION_PRE + hap.py: $VERSION END_VERSIONS """ } diff --git a/modules/happy/meta.yml b/modules/happy/happy/meta.yml similarity index 93% rename from modules/happy/meta.yml rename to modules/happy/happy/meta.yml index 6b5b86cf..8ec762d5 100644 --- a/modules/happy/meta.yml +++ b/modules/happy/happy/meta.yml @@ -1,4 +1,4 @@ -name: "happy" +name: "happy_happy" description: Hap.py is a tool to compare diploid genotypes at haplotype level. Rather than comparing VCF records row by row, hap.py will generate and match alternate sequences in a superlocus. A superlocus is a small region of the genome (sized between 1 and around 1000 bp) that contains one or more variants. keywords: - happy @@ -35,6 +35,10 @@ input: type: file description: FASTA file of the reference genome pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: The index of the reference FASTA + pattern: "*.fai" output: - meta: diff --git a/modules/happy/prepy/main.nf b/modules/happy/prepy/main.nf new file mode 100644 index 00000000..936f56ea --- /dev/null +++ b/modules/happy/prepy/main.nf @@ -0,0 +1,41 @@ +def VERSION = '0.3.14' + +process HAPPY_PREPY { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::hap.py=0.3.14" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/hap.py:0.3.14--py27h5c5a3ab_0': + 'quay.io/biocontainers/hap.py:0.3.14--py27h5c5a3ab_0' }" + + input: + tuple val(meta), path(vcf), path(bed) + tuple path(fasta), path(fasta_fai) + + output: + tuple val(meta), path('*.vcf.gz') , emit: preprocessed_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}" + + """ + pre.py \\ + $args \\ + -R $bed \\ + --reference $fasta \\ + --threads $task.cpus \\ + $vcf \\ + ${prefix}.vcf.gz + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + pre.py: $VERSION + END_VERSIONS + """ +} diff --git a/modules/happy/prepy/meta.yml b/modules/happy/prepy/meta.yml new file mode 100644 index 00000000..7e27a652 --- /dev/null +++ b/modules/happy/prepy/meta.yml @@ -0,0 +1,55 @@ +name: "happy_prepy" +description: Pre.py is a preprocessing tool made to preprocess VCF files for Hap.py +keywords: + - happy + - benchmark + - haplotype +tools: + - "happy": + description: "Haplotype VCF comparison tools" + homepage: "https://www.illumina.com/products/by-type/informatics-products/basespace-sequence-hub/apps/hap-py-benchmarking.html" + documentation: "https://github.com/Illumina/hap.py" + tool_dev_url: "https://github.com/Illumina/hap.py" + doi: "" + licence: "['BSD-2-clause']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF file to preprocess + pattern: "*.{vcf,vcf.gz}" + - bed: + type: file + description: BED file + pattern: "*.bed" + - fasta: + type: file + description: FASTA file of the reference genome + pattern: "*.{fa,fasta}" + - fasta_fai: + type: file + description: The index of the reference FASTA + pattern: "*.fai" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: A preprocessed VCF file + pattern: "*.vcf.gz" + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + +authors: + - "@nvnieuwk" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index c14ffc8e..4f85ba7d 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -895,6 +895,10 @@ happy: - modules/happy/** - tests/modules/happy/** +happy/prepy: + - modules/happy/prepy/** + - tests/modules/happy/prepy/** + hicap: - modules/hicap/** - tests/modules/hicap/** diff --git a/tests/modules/happy/main.nf b/tests/modules/happy/happy/main.nf similarity index 90% rename from tests/modules/happy/main.nf rename to tests/modules/happy/happy/main.nf index 0ce23b50..515a657b 100644 --- a/tests/modules/happy/main.nf +++ b/tests/modules/happy/happy/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { HAPPY } from '../../../modules/happy/main.nf' +include { HAPPY_HAPPY } from '../../../../modules/happy/happy/main.nf' workflow test_happy_vcf { @@ -18,7 +18,7 @@ workflow test_happy_vcf { file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ]) - HAPPY ( input, fasta ) + HAPPY_HAPPY ( input, fasta ) } workflow test_happy_gvcf { @@ -35,5 +35,5 @@ workflow test_happy_gvcf { file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) ]) - HAPPY ( input, fasta ) + HAPPY_HAPPY ( input, fasta ) } diff --git a/tests/modules/happy/nextflow.config b/tests/modules/happy/happy/nextflow.config similarity index 100% rename from tests/modules/happy/nextflow.config rename to tests/modules/happy/happy/nextflow.config diff --git a/tests/modules/happy/test.yml b/tests/modules/happy/happy/test.yml similarity index 58% rename from tests/modules/happy/test.yml rename to tests/modules/happy/happy/test.yml index 0fd26e5b..89a1f012 100644 --- a/tests/modules/happy/test.yml +++ b/tests/modules/happy/happy/test.yml @@ -1,7 +1,8 @@ -- name: happy test_happy_vcf - command: nextflow run tests/modules/happy -entry test_happy_vcf -c tests/config/nextflow.config +- name: happy happy test_happy_vcf + command: nextflow run tests/modules/happy/happy -entry test_happy_vcf -c tests/config/nextflow.config tags: - happy + - happy/happy files: - path: output/happy/test.extended.csv md5sum: ef79c7c789ef4f146ca2e50dafaf22b3 @@ -9,12 +10,13 @@ - path: output/happy/test.summary.csv md5sum: f8aa5d36d3c48dede2f607fd565894ad - path: output/happy/versions.yml - md5sum: 2c2b8249f9f52194da7f09076dbb5019 + md5sum: 82243bf6dbdc71aa63211ee2a89f47f2 -- name: happy test_happy_gvcf - command: nextflow run tests/modules/happy -entry test_happy_gvcf -c tests/config/nextflow.config +- name: happy happy test_happy_gvcf + command: nextflow run tests/modules/happy/happy -entry test_happy_gvcf -c tests/config/nextflow.config tags: - happy + - happy/happy files: - path: output/happy/test.extended.csv md5sum: 3d5c21b67a259a3f6dcb088d55b86cd3 @@ -22,4 +24,4 @@ - path: output/happy/test.summary.csv md5sum: 03044e9bb5a0c6f0947b7e910fc8a558 - path: output/happy/versions.yml - md5sum: 75331161af9ec046d045ffcba83abddf + md5sum: 551fa216952d6f5de78e6e453b92aaab diff --git a/tests/modules/happy/prepy/main.nf b/tests/modules/happy/prepy/main.nf new file mode 100644 index 00000000..0b511104 --- /dev/null +++ b/tests/modules/happy/prepy/main.nf @@ -0,0 +1,37 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { HAPPY_PREPY } from '../../../../modules/happy/prepy/main.nf' + +workflow test_happy_prepy_vcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome21_indels_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY_PREPY ( input, fasta ) +} + +workflow test_happy_prepy_gvcf { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) + ] + + fasta = Channel.value([ + file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + ]) + + HAPPY_PREPY ( input, fasta ) +} diff --git a/tests/modules/happy/prepy/nextflow.config b/tests/modules/happy/prepy/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/happy/prepy/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/happy/prepy/test.yml b/tests/modules/happy/prepy/test.yml new file mode 100644 index 00000000..a0a45c38 --- /dev/null +++ b/tests/modules/happy/prepy/test.yml @@ -0,0 +1,19 @@ +- name: happy prepy test_happy_prepy_vcf + command: nextflow run tests/modules/happy/prepy -entry test_happy_prepy_vcf -c tests/config/nextflow.config + tags: + - happy/prepy + - happy + files: + - path: output/happy/test.vcf.gz + - path: output/happy/versions.yml + md5sum: 814d20f1f29f23a3d21012748a5d6393 + +- name: happy prepy test_happy_prepy_gvcf + command: nextflow run tests/modules/happy/prepy -entry test_happy_prepy_gvcf -c tests/config/nextflow.config + tags: + - happy/prepy + - happy + files: + - path: output/happy/test.vcf.gz + - path: output/happy/versions.yml + md5sum: 970a54de46e68ef6d5228a26eaa4c8e7 From 42bdc5471e1591ba6c8272dcd8a955ea21fec2e3 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 15:40:34 +0200 Subject: [PATCH 267/313] Changed the pytest location of happy --- tests/config/pytest_modules.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 4f85ba7d..32a28477 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -891,9 +891,9 @@ hamronization/summarize: - modules/hamronization/summarize/** - tests/modules/hamronization/summarize/** -happy: - - modules/happy/** - - tests/modules/happy/** +happy/happy: + - modules/happy/happy/** + - tests/modules/happy/happy/** happy/prepy: - modules/happy/prepy/** From 6b8ca501ed2d20e7d021f56cb6b15406cc4e584c Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 16:34:52 +0200 Subject: [PATCH 268/313] fixing suggestions from PR --- modules/krona/ktimporttaxonomy/main.nf | 4 ++-- modules/krona/{kronadb => ktupdatetaxonomy}/main.nf | 4 ++-- modules/krona/{kronadb => ktupdatetaxonomy}/meta.yml | 0 tests/config/pytest_modules.yml | 6 +++--- tests/config/test_data.config | 1 + tests/modules/krona/kronadb/main.nf | 9 --------- tests/modules/krona/kronadb/test.yml | 7 ------- tests/modules/krona/ktimporttaxonomy/main.nf | 12 ++++++------ tests/modules/krona/ktupdatetaxonomy/main.nf | 9 +++++++++ .../{kronadb => ktupdatetaxonomy}/nextflow.config | 0 tests/modules/krona/ktupdatetaxonomy/test.yml | 7 +++++++ 11 files changed, 30 insertions(+), 29 deletions(-) rename modules/krona/{kronadb => ktupdatetaxonomy}/main.nf (93%) rename modules/krona/{kronadb => ktupdatetaxonomy}/meta.yml (100%) delete mode 100644 tests/modules/krona/kronadb/main.nf delete mode 100644 tests/modules/krona/kronadb/test.yml create mode 100644 tests/modules/krona/ktupdatetaxonomy/main.nf rename tests/modules/krona/{kronadb => ktupdatetaxonomy}/nextflow.config (100%) create mode 100644 tests/modules/krona/ktupdatetaxonomy/test.yml diff --git a/modules/krona/ktimporttaxonomy/main.nf b/modules/krona/ktimporttaxonomy/main.nf index 6a9fae89..bc78c6ba 100644 --- a/modules/krona/ktimporttaxonomy/main.nf +++ b/modules/krona/ktimporttaxonomy/main.nf @@ -24,9 +24,9 @@ process KRONA_KTIMPORTTAXONOMY { def args = task.ext.args ?: '' """ ktImportTaxonomy \\ - "$report" \\ $args \\ - -tax taxonomy + -tax taxonomy/ \\ + "$report" cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/krona/kronadb/main.nf b/modules/krona/ktupdatetaxonomy/main.nf similarity index 93% rename from modules/krona/kronadb/main.nf rename to modules/krona/ktupdatetaxonomy/main.nf index 3ba745a2..8326f219 100644 --- a/modules/krona/kronadb/main.nf +++ b/modules/krona/ktupdatetaxonomy/main.nf @@ -1,6 +1,6 @@ def VERSION='2.7.1' // Version information not provided by tool on CLI -process KRONA_KRONADB { +process KRONA_KTUPDATETAXONOMY { label 'process_low' conda (params.enable_conda ? "bioconda::krona=2.7.1" : null) @@ -20,7 +20,7 @@ process KRONA_KRONADB { """ ktUpdateTaxonomy.sh \\ $args \\ - taxonomy + taxonomy/ cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/krona/kronadb/meta.yml b/modules/krona/ktupdatetaxonomy/meta.yml similarity index 100% rename from modules/krona/kronadb/meta.yml rename to modules/krona/ktupdatetaxonomy/meta.yml diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index dcf85ba0..6b649a92 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1046,9 +1046,9 @@ kraken2/kraken2: - modules/untar/** - tests/modules/kraken2/kraken2/** -krona/kronadb: - - modules/krona/kronadb/** - - tests/modules/krona/kronadb/** +krona/ktupdatetaxonomy: + - modules/krona/ktupdatetaxonomy/** + - tests/modules/krona/ktupdatetaxonomy/** krona/ktimporttaxonomy: - modules/krona/ktimporttaxonomy/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 9757a29d..e9a5f4ab 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -113,6 +113,7 @@ params { 'metagenome' { classified_reads_assignment = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.reads.txt" kraken_report = "${test_data_dir}/genomics/sarscov2/metagenome/test_1.kraken2.report.txt" + krona_taxonomy = "${test_data_dir}/genomics/sarscov2/metagenome/krona_taxonomy.tab" } } 'homo_sapiens' { diff --git a/tests/modules/krona/kronadb/main.nf b/tests/modules/krona/kronadb/main.nf deleted file mode 100644 index ed955854..00000000 --- a/tests/modules/krona/kronadb/main.nf +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { KRONA_KRONADB } from '../../../../modules/krona/kronadb/main.nf' - -workflow test_krona_kronadb { - KRONA_KRONADB ( ) -} diff --git a/tests/modules/krona/kronadb/test.yml b/tests/modules/krona/kronadb/test.yml deleted file mode 100644 index 1d61640f..00000000 --- a/tests/modules/krona/kronadb/test.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: krona kronadb test_krona_kronadb - command: nextflow run ./tests/modules/krona/kronadb -entry test_krona_kronadb -c ./tests/config/nextflow.config -c ./tests/modules/krona/kronadb/nextflow.config - tags: - - krona - - krona/kronadb - files: - - path: output/krona/taxonomy/taxonomy.tab diff --git a/tests/modules/krona/ktimporttaxonomy/main.nf b/tests/modules/krona/ktimporttaxonomy/main.nf index f8e9f485..7b39ee82 100644 --- a/tests/modules/krona/ktimporttaxonomy/main.nf +++ b/tests/modules/krona/ktimporttaxonomy/main.nf @@ -2,8 +2,8 @@ nextflow.enable.dsl = 2 -include { KRONA_KTIMPORTTAXONOMY as KRONA_TAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' -include { KRONA_KTIMPORTTAXONOMY as KRONA_TAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as KRONA_KTIMPORTTAXONOMY_READS } from '../../../../modules/krona/ktimporttaxonomy/main.nf' +include { KRONA_KTIMPORTTAXONOMY as KRONA_KTIMPORTTAXONOMY_REPORT } from '../../../../modules/krona/ktimporttaxonomy/main.nf' workflow test_krona_ktimporttaxonomy_reads { @@ -11,9 +11,9 @@ workflow test_krona_ktimporttaxonomy_reads { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['classified_reads_assignment'], checkIfExists: true) ] - taxonomy = file("https://raw.githubusercontent.com/lescai/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab") + taxonomy = file(params.test_data['sarscov2']['metagenome']['krona_taxonomy'], checkIfExists: true) - KRONA_TAXONOMY_READS ( input, taxonomy ) + KRONA_KTIMPORTTAXONOMY_READS ( input, taxonomy ) } workflow test_krona_ktimporttaxonomy_report { @@ -22,7 +22,7 @@ workflow test_krona_ktimporttaxonomy_report { [ id:'test', single_end:false ], // meta map file(params.test_data['sarscov2']['metagenome']['kraken_report'], checkIfExists: true) ] - taxonomy = file("https://raw.githubusercontent.com/lescai/test-datasets/modules/data/genomics/sarscov2/metagenome/krona_taxonomy.tab") + taxonomy = file(params.test_data['sarscov2']['metagenome']['krona_taxonomy'], checkIfExists: true) - KRONA_TAXONOMY_REPORT ( input, taxonomy ) + KRONA_KTIMPORTTAXONOMY_REPORT ( input, taxonomy ) } diff --git a/tests/modules/krona/ktupdatetaxonomy/main.nf b/tests/modules/krona/ktupdatetaxonomy/main.nf new file mode 100644 index 00000000..d2d18f31 --- /dev/null +++ b/tests/modules/krona/ktupdatetaxonomy/main.nf @@ -0,0 +1,9 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { KRONA_KTUPDATETAXONOMY } from '../../../../modules/krona/ktupdatetaxonomy/main.nf' + +workflow test_krona_ktupdatetaxonomy { + KRONA_KTUPDATETAXONOMY ( ) +} diff --git a/tests/modules/krona/kronadb/nextflow.config b/tests/modules/krona/ktupdatetaxonomy/nextflow.config similarity index 100% rename from tests/modules/krona/kronadb/nextflow.config rename to tests/modules/krona/ktupdatetaxonomy/nextflow.config diff --git a/tests/modules/krona/ktupdatetaxonomy/test.yml b/tests/modules/krona/ktupdatetaxonomy/test.yml new file mode 100644 index 00000000..b50fe8f2 --- /dev/null +++ b/tests/modules/krona/ktupdatetaxonomy/test.yml @@ -0,0 +1,7 @@ +- name: krona ktupdatetaxonomy test_krona_ktupdatetaxonomy + command: nextflow run ./tests/modules/krona/ktupdatetaxonomy -entry test_krona_ktupdatetaxonomy -c ./tests/config/nextflow.config -c ./tests/modules/krona/ktupdatetaxonomy/nextflow.config + tags: + - krona + - krona/ktupdatetaxonomy + files: + - path: output/krona/taxonomy/taxonomy.tab From 8b1711d8a19696df101c73df2fa11f8994941823 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 16:38:10 +0200 Subject: [PATCH 269/313] recovering old module name --- modules/krona/kronadb/main.nf | 30 +++++++++++++++++++++++++ modules/krona/kronadb/meta.yml | 30 +++++++++++++++++++++++++ modules/krona/ktupdatetaxonomy/meta.yml | 2 +- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 modules/krona/kronadb/main.nf create mode 100644 modules/krona/kronadb/meta.yml diff --git a/modules/krona/kronadb/main.nf b/modules/krona/kronadb/main.nf new file mode 100644 index 00000000..8326f219 --- /dev/null +++ b/modules/krona/kronadb/main.nf @@ -0,0 +1,30 @@ +def VERSION='2.7.1' // Version information not provided by tool on CLI + +process KRONA_KTUPDATETAXONOMY { + label 'process_low' + + conda (params.enable_conda ? "bioconda::krona=2.7.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/krona:2.7.1--pl526_5' : + 'quay.io/biocontainers/krona:2.7.1--pl526_5' }" + + output: + 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 ?: '' + """ + ktUpdateTaxonomy.sh \\ + $args \\ + taxonomy/ + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + krona: $VERSION + END_VERSIONS + """ +} diff --git a/modules/krona/kronadb/meta.yml b/modules/krona/kronadb/meta.yml new file mode 100644 index 00000000..2a12aaaf --- /dev/null +++ b/modules/krona/kronadb/meta.yml @@ -0,0 +1,30 @@ +name: krona_kronadb +description: KronaTools Update Taxonomy downloads a taxonomy database +keywords: + - database + - taxonomy + - krona +tools: + - krona: + description: Krona Tools is a set of scripts to create Krona charts from several Bioinformatics tools as well as from text and XML files. + homepage: https://github.com/marbl/Krona/wiki/KronaTools + documentation: https://github.com/marbl/Krona/wiki/Installing + tool_dev_url: + doi: https://doi.org/10.1186/1471-2105-12-385 + licence: + +input: + - none: There is no input. This module downloads a pre-built taxonomy database for use with Krona Tools. + +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - db: + type: file + description: A TAB separated file that contains a taxonomy database. + pattern: "*.{tab}" + +authors: + - "@mjakobs" diff --git a/modules/krona/ktupdatetaxonomy/meta.yml b/modules/krona/ktupdatetaxonomy/meta.yml index 2a12aaaf..1e0d6299 100644 --- a/modules/krona/ktupdatetaxonomy/meta.yml +++ b/modules/krona/ktupdatetaxonomy/meta.yml @@ -1,4 +1,4 @@ -name: krona_kronadb +name: krona_ktupdatetaxonomy description: KronaTools Update Taxonomy downloads a taxonomy database keywords: - database From e7b92a7616f653272ce9fb0e443921b37c915e79 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 16:43:22 +0200 Subject: [PATCH 270/313] fixing md5sum changes --- tests/modules/krona/ktimporttaxonomy/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/test.yml b/tests/modules/krona/ktimporttaxonomy/test.yml index 5dc02c58..ffcb5669 100644 --- a/tests/modules/krona/ktimporttaxonomy/test.yml +++ b/tests/modules/krona/ktimporttaxonomy/test.yml @@ -8,7 +8,7 @@ contains: - "DOCTYPE html PUBLIC" - path: output/krona/versions.yml - md5sum: c6823bf3822cf3714fe9f2073ee76d60 + md5sum: 660a8c151191bf4c63bd96db2c7fe503 - name: krona ktimporttaxonomy test_krona_ktimporttaxonomy_report command: nextflow run tests/modules/krona/ktimporttaxonomy -entry test_krona_ktimporttaxonomy_report -c tests/config/nextflow.config @@ -20,4 +20,4 @@ contains: - "DOCTYPE html PUBLIC" - path: output/krona/versions.yml - md5sum: 06b76d9a7602d63fec182e195cc16a76 + md5sum: 8a593c16bb2d4132638fb0fc342fe2b7 From 38faf040ecbae67abbc4d26623f30b1a9b763f2e Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 16:54:15 +0200 Subject: [PATCH 271/313] missing change in ext.args config --- tests/modules/krona/ktimporttaxonomy/nextflow.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/krona/ktimporttaxonomy/nextflow.config b/tests/modules/krona/ktimporttaxonomy/nextflow.config index 3f35bfc2..fb4d86f5 100644 --- a/tests/modules/krona/ktimporttaxonomy/nextflow.config +++ b/tests/modules/krona/ktimporttaxonomy/nextflow.config @@ -2,11 +2,11 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: KRONA_TAXONOMY_READS { + withName: KRONA_KTIMPORTTAXONOMY_READS { ext.args = '-t 3' } - withName: KRONA_TAXONOMY_REPORT { + withName: KRONA_KTIMPORTTAXONOMY_REPORT { ext.args = '-m 3 -t 5' } From a6086f549d1e10627ed5caa26f8e8d6485125869 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 17:28:24 +0200 Subject: [PATCH 272/313] recovered process name --- modules/krona/kronadb/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/krona/kronadb/main.nf b/modules/krona/kronadb/main.nf index 8326f219..eaab43f0 100644 --- a/modules/krona/kronadb/main.nf +++ b/modules/krona/kronadb/main.nf @@ -1,6 +1,6 @@ def VERSION='2.7.1' // Version information not provided by tool on CLI -process KRONA_KTUPDATETAXONOMY { +process KRONA_KRONADB { label 'process_low' conda (params.enable_conda ? "bioconda::krona=2.7.1" : null) From ec5bada3fc9aa2bf7cbce711f870139f9a649b51 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 4 May 2022 20:55:16 +0200 Subject: [PATCH 273/313] Update modules/motus/downloaddb/meta.yml --- modules/motus/downloaddb/meta.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml index 2d363cb1..416f6ba8 100644 --- a/modules/motus/downloaddb/meta.yml +++ b/modules/motus/downloaddb/meta.yml @@ -7,6 +7,8 @@ keywords: - taxonomic profiling - database - download + - database + - download tools: - "motus": description: "The mOTU profiler is a computational tool that estimates relative taxonomic abundance of known and currently unknown microbial community members using metagenomic shotgun sequencing data." From e9c82a5f48fd4801f56854ab7e68c737721155c0 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Wed, 4 May 2022 15:29:06 -0400 Subject: [PATCH 274/313] Update modules/motus/downloaddb/meta.yml Co-authored-by: James A. Fellows Yates --- modules/motus/downloaddb/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml index 416f6ba8..1d6b265b 100644 --- a/modules/motus/downloaddb/meta.yml +++ b/modules/motus/downloaddb/meta.yml @@ -20,7 +20,7 @@ tools: input: - motus_downloaddb: - type: file + type: directory description: | the mOTUs downloadDB script source file pattern: "downloadDB.py" From 29ee72c693fc271943a9cc719e856cbb806b925c Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Wed, 4 May 2022 15:37:12 -0400 Subject: [PATCH 275/313] update meta.yml and remove the cleanup step. --- modules/motus/downloaddb/main.nf | 2 -- modules/motus/downloaddb/meta.yml | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/motus/downloaddb/main.nf b/modules/motus/downloaddb/main.nf index 20dae83c..317624b5 100644 --- a/modules/motus/downloaddb/main.nf +++ b/modules/motus/downloaddb/main.nf @@ -27,8 +27,6 @@ process MOTUS_DOWNLOADDB { python ${software} \\ $args \\ -t $task.cpus - ## clean up - rm ${software} ## mOTUs version number is not available from command line. ## mOTUs save the version number in index database folder. diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml index 1d6b265b..a4759128 100644 --- a/modules/motus/downloaddb/meta.yml +++ b/modules/motus/downloaddb/meta.yml @@ -7,8 +7,6 @@ keywords: - taxonomic profiling - database - download - - database - - download tools: - "motus": description: "The mOTU profiler is a computational tool that estimates relative taxonomic abundance of known and currently unknown microbial community members using metagenomic shotgun sequencing data." @@ -22,7 +20,9 @@ input: - motus_downloaddb: type: directory description: | - the mOTUs downloadDB script source file + The mOTUs downloadDB script source file. + It is the source file installed or + remote source in github such as https://raw.githubusercontent.com/motu-tool/mOTUs/master/motus/downloadDB.py pattern: "downloadDB.py" output: From 6393a085c5fcea11963774c041808df169907487 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 5 May 2022 08:23:51 +0200 Subject: [PATCH 276/313] Apply suggestions from code review --- modules/motus/downloaddb/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/motus/downloaddb/meta.yml b/modules/motus/downloaddb/meta.yml index a4759128..64df5ee0 100644 --- a/modules/motus/downloaddb/meta.yml +++ b/modules/motus/downloaddb/meta.yml @@ -32,7 +32,7 @@ output: pattern: "versions.yml" - db: type: directory - description: The mOTUs database + description: The mOTUs database directory pattern: "db_mOTU" authors: From be8ce6de2ae833802a44b9c2b3991dbb56eb43a4 Mon Sep 17 00:00:00 2001 From: ljmesi <37740329+ljmesi@users.noreply.github.com> Date: Thu, 5 May 2022 08:32:45 +0200 Subject: [PATCH 277/313] Remove variable md5sum from the tests --- tests/modules/samtools/bam2fq/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/modules/samtools/bam2fq/test.yml b/tests/modules/samtools/bam2fq/test.yml index 9d641e4a..4f9472e5 100644 --- a/tests/modules/samtools/bam2fq/test.yml +++ b/tests/modules/samtools/bam2fq/test.yml @@ -5,7 +5,6 @@ - samtools files: - path: output/samtools/test_interleaved.fq.gz - md5sum: 7290d2d8dbef0fa57c0e2f28b5db1bf8 - path: output/samtools/versions.yml md5sum: 4973eac1b6a8f090d5fcd4456d65a894 From 865ad3447a2b74167a25f36e0471f7dbe42fce97 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Thu, 5 May 2022 08:23:54 +0000 Subject: [PATCH 278/313] Update meta.yml output files --- modules/busco/meta.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index 007d5e7c..19c2c991 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -40,6 +40,18 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] + - batch_summary: + type: file + description: Summary of all sequence files analyzed + pattern: "*-busco.batch_summary.txt" + - short_summaries_txt: + type: file + description: Short Busco summary in plain text format + pattern: "short_summary.*.txt" + - short_summaries_json: + type: file + description: Short Busco summary in JSON format + pattern: "short_summary.*.json" - busco_dir: type: directory description: BUSCO lineage specific output From 204dfba2d8635d1a73255538441544a0c1501d4d Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Thu, 5 May 2022 10:51:22 +0200 Subject: [PATCH 279/313] fixing ktupdatetaxonomy/meta.yml as suggested in PR --- modules/krona/ktupdatetaxonomy/meta.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/krona/ktupdatetaxonomy/meta.yml b/modules/krona/ktupdatetaxonomy/meta.yml index 1e0d6299..945b5062 100644 --- a/modules/krona/ktupdatetaxonomy/meta.yml +++ b/modules/krona/ktupdatetaxonomy/meta.yml @@ -4,6 +4,7 @@ keywords: - database - taxonomy - krona + - visualisation tools: - krona: description: Krona Tools is a set of scripts to create Krona charts from several Bioinformatics tools as well as from text and XML files. From 40dd662fd26c3eb3160b7c8cbbe9bff80bbe2c30 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Thu, 5 May 2022 12:57:14 +0200 Subject: [PATCH 280/313] update ensemblvep and snpeff modules --- modules/ensemblvep/Dockerfile | 11 +++-- modules/ensemblvep/build.sh | 5 +- modules/ensemblvep/main.nf | 1 + modules/ensemblvep/meta.yml | 15 ++---- modules/snpeff/Dockerfile | 9 ++-- modules/snpeff/build.sh | 5 +- modules/snpeff/meta.yml | 12 ----- .../nf-core/annotation/ensemblvep/main.nf | 31 ++++++++++++ .../nf-core/annotation/ensemblvep/meta.yml | 49 +++++++++++++++++++ .../nf-core/annotation/snpeff/main.nf | 28 +++++++++++ .../snpeff}/meta.yml | 18 +++++-- .../nf-core/annotation_ensemblvep/main.nf | 26 ---------- .../nf-core/annotation_ensemblvep/meta.yml | 29 ----------- .../nf-core/annotation_snpeff/main.nf | 23 --------- tests/modules/ensemblvep/main.nf | 2 +- .../ensemblvep}/main.nf | 4 +- .../ensemblvep}/nextflow.config | 2 +- .../ensemblvep}/test.yml | 0 .../snpeff}/main.nf | 2 +- .../snpeff}/nextflow.config | 2 +- .../snpeff}/test.yml | 0 21 files changed, 149 insertions(+), 125 deletions(-) mode change 100755 => 100644 modules/snpeff/build.sh create mode 100644 subworkflows/nf-core/annotation/ensemblvep/main.nf create mode 100644 subworkflows/nf-core/annotation/ensemblvep/meta.yml create mode 100644 subworkflows/nf-core/annotation/snpeff/main.nf rename subworkflows/nf-core/{annotation_snpeff => annotation/snpeff}/meta.yml (66%) delete mode 100644 subworkflows/nf-core/annotation_ensemblvep/main.nf delete mode 100644 subworkflows/nf-core/annotation_ensemblvep/meta.yml delete mode 100644 subworkflows/nf-core/annotation_snpeff/main.nf rename tests/subworkflows/nf-core/{annotation_ensemblvep => annotation/ensemblvep}/main.nf (69%) rename tests/subworkflows/nf-core/{annotation_ensemblvep => annotation/ensemblvep}/nextflow.config (88%) rename tests/subworkflows/nf-core/{annotation_ensemblvep => annotation/ensemblvep}/test.yml (100%) rename tests/subworkflows/nf-core/{annotation_snpeff => annotation/snpeff}/main.nf (74%) rename tests/subworkflows/nf-core/{annotation_snpeff => annotation/snpeff}/nextflow.config (88%) rename tests/subworkflows/nf-core/{annotation_snpeff => annotation/snpeff}/test.yml (100%) diff --git a/modules/ensemblvep/Dockerfile b/modules/ensemblvep/Dockerfile index ac1b4691..b4a1c664 100644 --- a/modules/ensemblvep/Dockerfile +++ b/modules/ensemblvep/Dockerfile @@ -8,13 +8,14 @@ LABEL \ COPY environment.yml / RUN conda env create -f /environment.yml && conda clean -a -# Add conda installation dir to PATH (instead of doing 'conda activate') -ENV PATH /opt/conda/envs/nf-core-vep-104.3/bin:$PATH - # Setup default ARG variables ARG GENOME=GRCh38 ARG SPECIES=homo_sapiens -ARG VEP_VERSION=99 +ARG VEP_VERSION=104 +ARG VEP_TAG=104.3 + +# Add conda installation dir to PATH (instead of doing 'conda activate') +ENV PATH /opt/conda/envs/nf-core-vep-${VEP_TAG}/bin:$PATH # Download Genome RUN vep_install \ @@ -27,4 +28,4 @@ RUN vep_install \ --NO_BIOPERL --NO_HTSLIB --NO_TEST --NO_UPDATE # Dump the details of the installed packages to a file for posterity -RUN conda env export --name nf-core-vep-104.3 > nf-core-vep-104.3.yml +RUN conda env export --name nf-core-vep-${VEP_TAG} > nf-core-vep-${VEP_TAG}.yml diff --git a/modules/ensemblvep/build.sh b/modules/ensemblvep/build.sh index 5fcb91df..650c8704 100755 --- a/modules/ensemblvep/build.sh +++ b/modules/ensemblvep/build.sh @@ -10,11 +10,12 @@ build_push() { VEP_TAG=$4 docker build \ + . \ -t nfcore/vep:${VEP_TAG}.${GENOME} \ - software/vep/. \ --build-arg GENOME=${GENOME} \ --build-arg SPECIES=${SPECIES} \ - --build-arg VEP_VERSION=${VEP_VERSION} + --build-arg VEP_VERSION=${VEP_VERSION} \ + --build-arg VEP_TAG=${VEP_TAG} docker push nfcore/vep:${VEP_TAG}.${GENOME} } diff --git a/modules/ensemblvep/main.nf b/modules/ensemblvep/main.nf index c2bd055f..a5a9b1ab 100644 --- a/modules/ensemblvep/main.nf +++ b/modules/ensemblvep/main.nf @@ -13,6 +13,7 @@ process ENSEMBLVEP { val species val cache_version path cache + path extra_files output: tuple val(meta), path("*.ann.vcf"), emit: vcf diff --git a/modules/ensemblvep/meta.yml b/modules/ensemblvep/meta.yml index cd9c8905..418bb970 100644 --- a/modules/ensemblvep/meta.yml +++ b/modules/ensemblvep/meta.yml @@ -10,17 +10,6 @@ tools: homepage: https://www.ensembl.org/info/docs/tools/vep/index.html documentation: https://www.ensembl.org/info/docs/tools/vep/script/index.html licence: ["Apache-2.0"] -params: - - use_cache: - type: boolean - description: | - Enable the usage of containers with cache - Does not work with conda - - vep_tag: - type: value - description: | - Specify the tag for the container - https://hub.docker.com/r/nfcore/vep/tags input: - meta: type: map @@ -47,6 +36,10 @@ input: type: file description: | path to VEP cache (optional) + - extra_files: + type: tuple + description: | + path to file(s) needed for plugins (optional) output: - vcf: type: file diff --git a/modules/snpeff/Dockerfile b/modules/snpeff/Dockerfile index 608716a4..d0e34757 100644 --- a/modules/snpeff/Dockerfile +++ b/modules/snpeff/Dockerfile @@ -8,15 +8,16 @@ LABEL \ COPY environment.yml / RUN conda env create -f /environment.yml && conda clean -a -# Add conda installation dir to PATH (instead of doing 'conda activate') -ENV PATH /opt/conda/envs/nf-core-snpeff-5.0/bin:$PATH - # Setup default ARG variables ARG GENOME=GRCh38 ARG SNPEFF_CACHE_VERSION=99 +ARG SNPEFF_TAG=99 + +# Add conda installation dir to PATH (instead of doing 'conda activate') +ENV PATH /opt/conda/envs/nf-core-snpeff-${SNPEFF_TAG}/bin:$PATH # Download Genome RUN snpEff download -v ${GENOME}.${SNPEFF_CACHE_VERSION} # Dump the details of the installed packages to a file for posterity -RUN conda env export --name nf-core-snpeff-5.0 > nf-core-snpeff-5.0.yml +RUN conda env export --name nf-core-snpeff-${SNPEFF_TAG} > nf-core-snpeff-${SNPEFF_TAG}.yml diff --git a/modules/snpeff/build.sh b/modules/snpeff/build.sh old mode 100755 new mode 100644 index b94ffd69..2fccf9a8 --- a/modules/snpeff/build.sh +++ b/modules/snpeff/build.sh @@ -9,10 +9,11 @@ build_push() { SNPEFF_TAG=$3 docker build \ + . \ -t nfcore/snpeff:${SNPEFF_TAG}.${GENOME} \ - software/snpeff/. \ --build-arg GENOME=${GENOME} \ - --build-arg SNPEFF_CACHE_VERSION=${SNPEFF_CACHE_VERSION} + --build-arg SNPEFF_CACHE_VERSION=${SNPEFF_CACHE_VERSION} \ + --build-arg SNPEFF_TAG=${SNPEFF_TAG} docker push nfcore/snpeff:${SNPEFF_TAG}.${GENOME} } diff --git a/modules/snpeff/meta.yml b/modules/snpeff/meta.yml index c191b9ac..2f0d866e 100644 --- a/modules/snpeff/meta.yml +++ b/modules/snpeff/meta.yml @@ -10,18 +10,6 @@ tools: homepage: https://pcingola.github.io/SnpEff/ documentation: https://pcingola.github.io/SnpEff/se_introduction/ licence: ["MIT"] -params: - - use_cache: - type: boolean - description: | - boolean to enable the usage of containers with cache - Enable the usage of containers with cache - Does not work with conda - - snpeff_tag: - type: value - description: | - Specify the tag for the container - https://hub.docker.com/r/nfcore/snpeff/tags input: - meta: type: map diff --git a/subworkflows/nf-core/annotation/ensemblvep/main.nf b/subworkflows/nf-core/annotation/ensemblvep/main.nf new file mode 100644 index 00000000..5073f38d --- /dev/null +++ b/subworkflows/nf-core/annotation/ensemblvep/main.nf @@ -0,0 +1,31 @@ +// +// Run VEP to annotate VCF files +// + +include { ENSEMBLVEP } from '../../../../modules/ensemblvep/main' +include { TABIX_BGZIPTABIX } from '../../../../modules/tabix/bgziptabix/main' + +workflow ANNOTATION_ENSEMBLVEP { + take: + vcf // channel: [ val(meta), vcf ] + vep_genome // value: genome to use + vep_species // value: species to use + vep_cache_version // value: cache version to use + vep_cache // path: /path/to/vep/cache (optionnal) + vep_extra_files // channel: [ file1, file2...] (optionnal) + + main: + ch_versions = Channel.empty() + + ENSEMBLVEP(vcf, vep_genome, vep_species, vep_cache_version, vep_cache, vep_extra_files) + TABIX_BGZIPTABIX(ENSEMBLVEP.out.vcf) + + // Gather versions of all tools used + ch_versions = ch_versions.mix(ENSEMBLVEP.out.versions.first()) + ch_versions = ch_versions.mix(TABIX_BGZIPTABIX.out.versions.first()) + + emit: + vcf_tbi = TABIX_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] + reports = ENSEMBLVEP.out.report // path: *.html + versions = ch_versions // path: versions.yml +} diff --git a/subworkflows/nf-core/annotation/ensemblvep/meta.yml b/subworkflows/nf-core/annotation/ensemblvep/meta.yml new file mode 100644 index 00000000..585e003b --- /dev/null +++ b/subworkflows/nf-core/annotation/ensemblvep/meta.yml @@ -0,0 +1,49 @@ +name: annotation_ensemblvep +description: | + Perform annotation with ensemblvep and bgzip + tabix index the resulting VCF file +keywords: + - ensemblvep +modules: + - ensemblvep + - tabix/bgziptabix +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + vcf to annotate + - genome: + type: value + description: | + which genome to annotate with + - species: + type: value + description: | + which species to annotate with + - cache_version: + type: value + description: | + which version of the cache to annotate with + - cache: + type: file + description: | + path to VEP cache (optional) + - extra_files: + type: tuple + description: | + path to file(s) needed for plugins (optional) +output: + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + - vcf_tbi: + type: file + description: Compressed vcf file + tabix index + pattern: "[ *{.vcf.gz,vcf.gz.tbi} ]" +authors: + - "@maxulysse" diff --git a/subworkflows/nf-core/annotation/snpeff/main.nf b/subworkflows/nf-core/annotation/snpeff/main.nf new file mode 100644 index 00000000..dcf06eb0 --- /dev/null +++ b/subworkflows/nf-core/annotation/snpeff/main.nf @@ -0,0 +1,28 @@ +// +// Run SNPEFF to annotate VCF files +// + +include { SNPEFF } from '../../../../modules/snpeff/main' +include { TABIX_BGZIPTABIX } from '../../../../modules/tabix/bgziptabix/main' + +workflow ANNOTATION_SNPEFF { + take: + vcf // channel: [ val(meta), vcf ] + snpeff_db // value: db version to use + snpeff_cache // path: /path/to/snpeff/cache (optionnal) + + main: + ch_versions = Channel.empty() + + SNPEFF(vcf, snpeff_db, snpeff_cache) + TABIX_BGZIPTABIX(SNPEFF.out.vcf) + + // Gather versions of all tools used + ch_versions = ch_versions.mix(SNPEFF.out.versions.first()) + ch_versions = ch_versions.mix(TABIX_BGZIPTABIX.out.versions.first()) + + emit: + vcf_tbi = TABIX_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] + reports = SNPEFF.out.report // path: *.html + versions = ch_versions // path: versions.yml +} diff --git a/subworkflows/nf-core/annotation_snpeff/meta.yml b/subworkflows/nf-core/annotation/snpeff/meta.yml similarity index 66% rename from subworkflows/nf-core/annotation_snpeff/meta.yml rename to subworkflows/nf-core/annotation/snpeff/meta.yml index e0773626..241a00cc 100644 --- a/subworkflows/nf-core/annotation_snpeff/meta.yml +++ b/subworkflows/nf-core/annotation/snpeff/meta.yml @@ -11,11 +11,19 @@ input: type: map description: | Groovy Map containing sample information - e.g. [ id:'test' ] - - input: - type: vcf - description: list containing one vcf file - pattern: "[ *.{vcf,vcf.gz} ]" + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + vcf to annotate + - db: + type: value + description: | + which db to annotate with + - cache: + type: file + description: | + path to snpEff cache (optional) output: - versions: type: file diff --git a/subworkflows/nf-core/annotation_ensemblvep/main.nf b/subworkflows/nf-core/annotation_ensemblvep/main.nf deleted file mode 100644 index 3f3ecc6e..00000000 --- a/subworkflows/nf-core/annotation_ensemblvep/main.nf +++ /dev/null @@ -1,26 +0,0 @@ -// -// Run VEP to annotate VCF files -// - -include { ENSEMBLVEP } from '../../../modules/ensemblvep/main' -include { TABIX_BGZIPTABIX as ANNOTATION_BGZIPTABIX } from '../../../modules/tabix/bgziptabix/main' - -workflow ANNOTATION_ENSEMBLVEP { - take: - vcf // channel: [ val(meta), vcf ] - vep_genome // value: which genome - vep_species // value: which species - vep_cache_version // value: which cache version - vep_cache // path: path_to_vep_cache (optionnal) - - main: - ENSEMBLVEP(vcf, vep_genome, vep_species, vep_cache_version, vep_cache) - ANNOTATION_BGZIPTABIX(ENSEMBLVEP.out.vcf) - - ch_versions = ENSEMBLVEP.out.versions.first().mix(ANNOTATION_BGZIPTABIX.out.versions.first()) - - emit: - vcf_tbi = ANNOTATION_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] - reports = ENSEMBLVEP.out.report // path: *.html - versions = ch_versions // path: versions.yml -} diff --git a/subworkflows/nf-core/annotation_ensemblvep/meta.yml b/subworkflows/nf-core/annotation_ensemblvep/meta.yml deleted file mode 100644 index 991a8b2f..00000000 --- a/subworkflows/nf-core/annotation_ensemblvep/meta.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: annotation_ensemblvep -description: | - Perform annotation with ensemblvep and bgzip + tabix index the resulting VCF file -keywords: - - ensemblvep -modules: - - ensemblvep - - tabix/bgziptabix -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test' ] - - input: - type: vcf - description: list containing one vcf file - pattern: "[ *.{vcf,vcf.gz} ]" -output: - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - vcf_tbi: - type: file - description: Compressed vcf file + tabix index - pattern: "[ *{.vcf.gz,vcf.gz.tbi} ]" -authors: - - "@maxulysse" diff --git a/subworkflows/nf-core/annotation_snpeff/main.nf b/subworkflows/nf-core/annotation_snpeff/main.nf deleted file mode 100644 index add5f9c8..00000000 --- a/subworkflows/nf-core/annotation_snpeff/main.nf +++ /dev/null @@ -1,23 +0,0 @@ -// -// Run SNPEFF to annotate VCF files -// - -include { SNPEFF } from '../../../modules/snpeff/main' -include { TABIX_BGZIPTABIX as ANNOTATION_BGZIPTABIX } from '../../../modules/tabix/bgziptabix/main' - -workflow ANNOTATION_SNPEFF { - take: - vcf // channel: [ val(meta), vcf ] - snpeff_db // value: version of db to use - snpeff_cache // path: path_to_snpeff_cache (optionnal) - - main: - SNPEFF(vcf, snpeff_db, snpeff_cache) - ANNOTATION_BGZIPTABIX(SNPEFF.out.vcf) - ch_versions = SNPEFF.out.versions.first().mix(ANNOTATION_BGZIPTABIX.out.versions.first()) - - emit: - vcf_tbi = ANNOTATION_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ] - reports = SNPEFF.out.report // path: *.html - versions = ch_versions // path: versions.yml -} diff --git a/tests/modules/ensemblvep/main.nf b/tests/modules/ensemblvep/main.nf index 223847c7..30d19957 100644 --- a/tests/modules/ensemblvep/main.nf +++ b/tests/modules/ensemblvep/main.nf @@ -10,5 +10,5 @@ workflow test_ensemblvep { file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] - ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [] ) + ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], [] ) } diff --git a/tests/subworkflows/nf-core/annotation_ensemblvep/main.nf b/tests/subworkflows/nf-core/annotation/ensemblvep/main.nf similarity index 69% rename from tests/subworkflows/nf-core/annotation_ensemblvep/main.nf rename to tests/subworkflows/nf-core/annotation/ensemblvep/main.nf index 0f00c62e..2c599671 100644 --- a/tests/subworkflows/nf-core/annotation_ensemblvep/main.nf +++ b/tests/subworkflows/nf-core/annotation/ensemblvep/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { ANNOTATION_ENSEMBLVEP } from '../../../../subworkflows/nf-core/annotation_ensemblvep/main' +include { ANNOTATION_ENSEMBLVEP } from '../../../../../subworkflows/nf-core/annotation/ensemblvep/main' workflow annotation_ensemblvep { input = [ @@ -10,5 +10,5 @@ workflow annotation_ensemblvep { file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ] - ANNOTATION_ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [] ) + ANNOTATION_ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], [] ) } diff --git a/tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config b/tests/subworkflows/nf-core/annotation/ensemblvep/nextflow.config similarity index 88% rename from tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config rename to tests/subworkflows/nf-core/annotation/ensemblvep/nextflow.config index 4e8d2990..806adb58 100644 --- a/tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config +++ b/tests/subworkflows/nf-core/annotation/ensemblvep/nextflow.config @@ -7,7 +7,7 @@ process { publishDir = [ enabled: false ] } - withName: ANNOTATION_BGZIPTABIX { + withName: TABIX_BGZIPTABIX { ext.prefix = { "${meta.id}_VEP.ann.vcf" } } diff --git a/tests/subworkflows/nf-core/annotation_ensemblvep/test.yml b/tests/subworkflows/nf-core/annotation/ensemblvep/test.yml similarity index 100% rename from tests/subworkflows/nf-core/annotation_ensemblvep/test.yml rename to tests/subworkflows/nf-core/annotation/ensemblvep/test.yml diff --git a/tests/subworkflows/nf-core/annotation_snpeff/main.nf b/tests/subworkflows/nf-core/annotation/snpeff/main.nf similarity index 74% rename from tests/subworkflows/nf-core/annotation_snpeff/main.nf rename to tests/subworkflows/nf-core/annotation/snpeff/main.nf index c80197ee..4aee20ee 100644 --- a/tests/subworkflows/nf-core/annotation_snpeff/main.nf +++ b/tests/subworkflows/nf-core/annotation/snpeff/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { ANNOTATION_SNPEFF } from '../../../../subworkflows/nf-core/annotation_snpeff/main' +include { ANNOTATION_SNPEFF } from '../../../../../subworkflows/nf-core/annotation_snpeff/main' workflow annotation_snpeff { input = [ diff --git a/tests/subworkflows/nf-core/annotation_snpeff/nextflow.config b/tests/subworkflows/nf-core/annotation/snpeff/nextflow.config similarity index 88% rename from tests/subworkflows/nf-core/annotation_snpeff/nextflow.config rename to tests/subworkflows/nf-core/annotation/snpeff/nextflow.config index be76cb4a..31fd635b 100644 --- a/tests/subworkflows/nf-core/annotation_snpeff/nextflow.config +++ b/tests/subworkflows/nf-core/annotation/snpeff/nextflow.config @@ -7,7 +7,7 @@ process { publishDir = [ enabled: false ] } - withName: ANNOTATION_BGZIPTABIX { + withName: TABIX_BGZIPTABIX { ext.prefix = { "${meta.id}_snpEff.ann.vcf" } } diff --git a/tests/subworkflows/nf-core/annotation_snpeff/test.yml b/tests/subworkflows/nf-core/annotation/snpeff/test.yml similarity index 100% rename from tests/subworkflows/nf-core/annotation_snpeff/test.yml rename to tests/subworkflows/nf-core/annotation/snpeff/test.yml From 9083d3bb3dfeae8dc61d6a2e9e097468af5fafcd Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Thu, 5 May 2022 13:51:41 +0200 Subject: [PATCH 281/313] integrating suggestions from PR comments, including recovery of tests for kronadb and more detailed explanation of input database in yml file --- modules/krona/ktimporttaxonomy/meta.yml | 7 +++++-- tests/config/pytest_modules.yml | 4 ++++ tests/modules/krona/kronadb/main.nf | 9 +++++++++ tests/modules/krona/kronadb/nextflow.config | 5 +++++ tests/modules/krona/kronadb/test.yml | 7 +++++++ 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 tests/modules/krona/kronadb/main.nf create mode 100644 tests/modules/krona/kronadb/nextflow.config create mode 100644 tests/modules/krona/kronadb/test.yml diff --git a/modules/krona/ktimporttaxonomy/meta.yml b/modules/krona/ktimporttaxonomy/meta.yml index b65919f8..df0ad1c9 100644 --- a/modules/krona/ktimporttaxonomy/meta.yml +++ b/modules/krona/ktimporttaxonomy/meta.yml @@ -23,8 +23,11 @@ input: Groovy Map containing sample information e.g. [ id:'test'] - database: - type: path - description: "Path to the taxonomy database downloaded by krona/kronadb" + type: file + description: | + Path to the taxonomy database .tab file downloaded by krona/ktUpdateTaxonomy + The file will be saved under a folder named "taxonomy" as "taxonomy/taxonomy.tab". + The parent folder will be passed as argument to ktImportTaxonomy. - report: type: file description: "A tab-delimited file with taxonomy IDs and (optionally) query IDs, magnitudes, and scores. Query IDs are taken from column 1, taxonomy IDs from column 2, and scores from column 3. Lines beginning with # will be ignored." diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index dbf6c196..031f5717 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1054,6 +1054,10 @@ kraken2/kraken2: - modules/untar/** - tests/modules/kraken2/kraken2/** +krona/kronadb: + - modules/krona/kronadb/** + - tests/modules/krona/kronadb/** + krona/ktupdatetaxonomy: - modules/krona/ktupdatetaxonomy/** - tests/modules/krona/ktupdatetaxonomy/** diff --git a/tests/modules/krona/kronadb/main.nf b/tests/modules/krona/kronadb/main.nf new file mode 100644 index 00000000..ed955854 --- /dev/null +++ b/tests/modules/krona/kronadb/main.nf @@ -0,0 +1,9 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { KRONA_KRONADB } from '../../../../modules/krona/kronadb/main.nf' + +workflow test_krona_kronadb { + KRONA_KRONADB ( ) +} diff --git a/tests/modules/krona/kronadb/nextflow.config b/tests/modules/krona/kronadb/nextflow.config new file mode 100644 index 00000000..8730f1c4 --- /dev/null +++ b/tests/modules/krona/kronadb/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} diff --git a/tests/modules/krona/kronadb/test.yml b/tests/modules/krona/kronadb/test.yml new file mode 100644 index 00000000..1d61640f --- /dev/null +++ b/tests/modules/krona/kronadb/test.yml @@ -0,0 +1,7 @@ +- name: krona kronadb test_krona_kronadb + command: nextflow run ./tests/modules/krona/kronadb -entry test_krona_kronadb -c ./tests/config/nextflow.config -c ./tests/modules/krona/kronadb/nextflow.config + tags: + - krona + - krona/kronadb + files: + - path: output/krona/taxonomy/taxonomy.tab From 2542ae1823d57777434a63849e217eabf97b3a8e Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Thu, 5 May 2022 16:33:32 +0200 Subject: [PATCH 282/313] Update modules/busco/main.nf Co-authored-by: Sateesh Peri <33637490+sateeshperi@users.noreply.github.com> --- modules/busco/main.nf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index f6bd63e2..15e7ce5c 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -8,10 +8,10 @@ process BUSCO { 'quay.io/biocontainers/busco:5.3.2--pyhdfd78af_0' }" input: - tuple val(meta), path(fasta, stageAs: 'tmp_input/*') // Required: meta map, and fasta sequence files - each lineage // Required: lineage to check against - path busco_lineages_path // Recommended: path to busco lineages - downloads if not set - path config_file // Optional: busco configuration file + tuple val(meta), path('tmp_input/*') // Required: meta map, and fasta sequence files + each lineage // Required: lineage to check against + path busco_lineages_path // Recommended: path to busco lineages - downloads if not set + path config_file // Optional: busco configuration file output: tuple val(meta), path("*-busco.batch_summary.txt"), emit: batch_summary From 1289626cc99eecb3436bd067cd90a85028957d5f Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Thu, 5 May 2022 16:09:45 +0100 Subject: [PATCH 283/313] Update modules/busco/main.nf --- modules/busco/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index 15e7ce5c..8c1b1dad 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -8,7 +8,7 @@ process BUSCO { 'quay.io/biocontainers/busco:5.3.2--pyhdfd78af_0' }" input: - tuple val(meta), path('tmp_input/*') // Required: meta map, and fasta sequence files + tuple val(meta), path('tmp_input/*') each lineage // Required: lineage to check against path busco_lineages_path // Recommended: path to busco lineages - downloads if not set path config_file // Optional: busco configuration file From ea1f5daf449190dd3b8550c1307f14aa3371413d Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Thu, 5 May 2022 17:28:49 +0200 Subject: [PATCH 284/313] polish python script in view --- modules/cnvpytor/view/main.nf | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/modules/cnvpytor/view/main.nf b/modules/cnvpytor/view/main.nf index 72726615..ad2249b8 100644 --- a/modules/cnvpytor/view/main.nf +++ b/modules/cnvpytor/view/main.nf @@ -29,16 +29,14 @@ process CNVPYTOR_VIEW { python3 < versions.yml From e4e4f8090caa7c2f3fd71caa62792a1ea9ff4b59 Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Thu, 5 May 2022 23:59:12 +0200 Subject: [PATCH 285/313] combine multiple pytor --- modules/cnvpytor/view/main.nf | 16 +++++++++------- tests/modules/cnvpytor/view/main.nf | 6 +++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/modules/cnvpytor/view/main.nf b/modules/cnvpytor/view/main.nf index ad2249b8..1bb61a38 100644 --- a/modules/cnvpytor/view/main.nf +++ b/modules/cnvpytor/view/main.nf @@ -8,7 +8,7 @@ process CNVPYTOR_VIEW { 'quay.io/biocontainers/cnvpytor:1.2.1--pyhdfd78af_0' }" input: - tuple val(meta), path(pytor) + tuple val(meta), path(pytor_files) val bin_sizes val output_format @@ -23,17 +23,18 @@ process CNVPYTOR_VIEW { script: def output_suffix = output_format ?: 'vcf' - def bins = bin_sizes ?: '1000' + def bins = bin_sizes ?: '1000' + def input = pytor_files.join(" ") + def prefix = task.ext.prefix ?: "${meta.id}" """ python3 < versions.yml "${task.process}": diff --git a/tests/modules/cnvpytor/view/main.nf b/tests/modules/cnvpytor/view/main.nf index b865dd6d..3b99c314 100644 --- a/tests/modules/cnvpytor/view/main.nf +++ b/tests/modules/cnvpytor/view/main.nf @@ -8,7 +8,7 @@ workflow test_cnvpytor_view { input = [ [ id:'test'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + [file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true)] ] bin_sizes = "10000 100000" @@ -20,7 +20,7 @@ workflow test_cnvpytor_view_tsvout { input = [ [ id:'test'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + [file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true)] ] output_suffix = "tsv" @@ -32,7 +32,7 @@ workflow test_cnvpytor_view_stub { input = [ [ id:'test'], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true) + [file(params.test_data['homo_sapiens']['illumina']['test_pytor'], checkIfExists: true)] ] bin_sizes = [] From af73544010cc9563ec7d7160aeb825ae28ec217f Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Fri, 6 May 2022 00:13:49 +0200 Subject: [PATCH 286/313] update meta --- modules/cnvpytor/view/meta.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cnvpytor/view/meta.yml b/modules/cnvpytor/view/meta.yml index 1392e90e..e4e68fad 100644 --- a/modules/cnvpytor/view/meta.yml +++ b/modules/cnvpytor/view/meta.yml @@ -17,9 +17,9 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test' ] - - pytor: + - pytor_files: type: file - description: pytor file containing read depth data + description: pytor file containing cnv calls. To merge calls from multiple samples use a list of files. pattern: "*.{pytor}" - bin_sizes: type: string From 313d76e00525c8e975dabce0c34973fd53c3f4dd Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Fri, 6 May 2022 00:18:16 +0200 Subject: [PATCH 287/313] update svdb version --- modules/svdb/merge/main.nf | 6 +++--- modules/svdb/query/main.nf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/svdb/merge/main.nf b/modules/svdb/merge/main.nf index 4a39940c..0d56fea2 100644 --- a/modules/svdb/merge/main.nf +++ b/modules/svdb/merge/main.nf @@ -2,10 +2,10 @@ process SVDB_MERGE { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::svdb=2.6.0" : null) + conda (params.enable_conda ? "bioconda::svdb=2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/svdb:2.6.0--py39h5371cbf_0': - 'quay.io/biocontainers/svdb:2.6.0--py39h5371cbf_0' }" + 'https://depot.galaxyproject.org/singularity/svdb:2.6.1--py39h5371cbf_0': + 'quay.io/biocontainers/svdb:2.6.1--py39h5371cbf_0' }" input: tuple val(meta), path(vcfs) diff --git a/modules/svdb/query/main.nf b/modules/svdb/query/main.nf index c669b5a5..dbab5259 100644 --- a/modules/svdb/query/main.nf +++ b/modules/svdb/query/main.nf @@ -2,10 +2,10 @@ process SVDB_QUERY { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::svdb=2.6.0" : null) + conda (params.enable_conda ? "bioconda::svdb=2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/svdb:2.6.0--py39h5371cbf_0': - 'quay.io/biocontainers/svdb:2.6.0--py39h5371cbf_0' }" + 'https://depot.galaxyproject.org/singularity/svdb:2.6.1--py39h5371cbf_0': + 'quay.io/biocontainers/svdb:2.6.1--py39h5371cbf_0' }" input: tuple val(meta), path(vcf) From 853b623969357753468365aa538eb92b2bcb8ce9 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 09:20:40 +0200 Subject: [PATCH 288/313] new module: md5sum --- modules/md5sum/main.nf | 35 +++++++++++++++++++++++++ modules/md5sum/meta.yml | 39 ++++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 12 ++++++--- tests/modules/md5sum/main.nf | 15 +++++++++++ tests/modules/md5sum/nextflow.config | 3 +++ tests/modules/md5sum/test.yml | 8 ++++++ 6 files changed, 108 insertions(+), 4 deletions(-) create mode 100644 modules/md5sum/main.nf create mode 100644 modules/md5sum/meta.yml create mode 100644 tests/modules/md5sum/main.nf create mode 100644 tests/modules/md5sum/nextflow.config create mode 100644 tests/modules/md5sum/test.yml diff --git a/modules/md5sum/main.nf b/modules/md5sum/main.nf new file mode 100644 index 00000000..0b101811 --- /dev/null +++ b/modules/md5sum/main.nf @@ -0,0 +1,35 @@ +process MD5SUM { + tag "$meta.id" + label 'process_low' + + if (params.enable_conda) { + exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers." + } + container "debian:bullseye-slim" + + input: + tuple val(meta), path(file) + + output: + tuple val(meta), path("*.md5"), emit: checksum + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + md5sum \\ + $args \\ + ${file} \\ + > ${file}.md5 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + md5sum: \$(echo \$(md5sum --version 2>&1 | head -n 1| sed 's/^.*) //;' )) + END_VERSIONS + """ +} diff --git a/modules/md5sum/meta.yml b/modules/md5sum/meta.yml new file mode 100644 index 00000000..d4f1939d --- /dev/null +++ b/modules/md5sum/meta.yml @@ -0,0 +1,39 @@ +name: "md5sum" +description: Create an MD5 (128-bit) checksum +keywords: + - checksum +tools: + - "md5sum": + description: Create an MD5 (128-bit) checksum + homepage: "https://www.gnu.org" + documentation: "https://man7.org/linux/man-pages/man1/md5sum.1.html" + licence: GPLv3+ + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - file: + type: file + description: Any file + 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" + - checksum: + type: file + description: File containing checksum + pattern: "*.md5" + +authors: + - "@matthdsm" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 81f98d59..a5a7c083 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1058,10 +1058,6 @@ krona/kronadb: - modules/krona/kronadb/** - tests/modules/krona/kronadb/** -krona/ktupdatetaxonomy: - - modules/krona/ktupdatetaxonomy/** - - tests/modules/krona/ktupdatetaxonomy/** - krona/ktimporttaxonomy: - modules/krona/ktimporttaxonomy/** - tests/modules/krona/ktimporttaxonomy/** @@ -1070,6 +1066,10 @@ krona/ktimporttext: - modules/krona/ktimporttext/** - tests/modules/krona/ktimporttext/** +krona/ktupdatetaxonomy: + - modules/krona/ktupdatetaxonomy/** + - tests/modules/krona/ktupdatetaxonomy/** + last/dotplot: - modules/last/dotplot/** - tests/modules/last/dotplot/** @@ -1190,6 +1190,10 @@ maxbin2: - modules/maxbin2/** - tests/modules/maxbin2/** +md5sum: + - modules/md5sum/** + - tests/modules/md5sum/** + medaka: - modules/medaka/** - tests/modules/medaka/** diff --git a/tests/modules/md5sum/main.nf b/tests/modules/md5sum/main.nf new file mode 100644 index 00000000..f90642b6 --- /dev/null +++ b/tests/modules/md5sum/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MD5SUM } from '../../../modules/md5sum/main.nf' + +workflow test_md5sum { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + MD5SUM ( input ) +} diff --git a/tests/modules/md5sum/nextflow.config b/tests/modules/md5sum/nextflow.config new file mode 100644 index 00000000..0293c16f --- /dev/null +++ b/tests/modules/md5sum/nextflow.config @@ -0,0 +1,3 @@ +process { + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } +} diff --git a/tests/modules/md5sum/test.yml b/tests/modules/md5sum/test.yml new file mode 100644 index 00000000..1e6517a7 --- /dev/null +++ b/tests/modules/md5sum/test.yml @@ -0,0 +1,8 @@ +- name: md5sum test_md5sum + command: nextflow run tests/modules/md5sum -entry test_md5sum -c tests/config/nextflow.config + tags: + - md5sum + files: + - path: output/md5sum/test.paired_end.bam.md5 + md5sum: 1163095be8fdfb2acb3cc6c027389c4b + - path: output/md5sum/versions.yml From 09e729ad414bc51d91b487edf720e7bb9b80abb7 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 10:28:14 +0200 Subject: [PATCH 289/313] added sha256sum --- modules/shasum/main.nf | 35 ++++++++++++++++++++++++ modules/shasum/meta.yml | 40 ++++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 +++ tests/modules/shasum/main.nf | 15 +++++++++++ tests/modules/shasum/nextflow.config | 5 ++++ tests/modules/shasum/test.yml | 8 ++++++ 6 files changed, 107 insertions(+) create mode 100644 modules/shasum/main.nf create mode 100644 modules/shasum/meta.yml create mode 100644 tests/modules/shasum/main.nf create mode 100644 tests/modules/shasum/nextflow.config create mode 100644 tests/modules/shasum/test.yml diff --git a/modules/shasum/main.nf b/modules/shasum/main.nf new file mode 100644 index 00000000..a2c37da7 --- /dev/null +++ b/modules/shasum/main.nf @@ -0,0 +1,35 @@ +process SHASUM { + tag "$meta.id" + label 'process_low' + + if (params.enable_conda) { + exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers." + } + container "debian:bullseye-slim" + + input: + tuple val(meta), path(file) + + output: + tuple val(meta), path("*.sha256"), emit: checksum + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + + """ + sha256sum \\ + $args \\ + ${file} \\ + > ${file}.sha256 + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + sha256sum: \$(echo \$(sha256sum --version 2>&1 | head -n 1| sed 's/^.*) //;' )) + END_VERSIONS + """ +} diff --git a/modules/shasum/meta.yml b/modules/shasum/meta.yml new file mode 100644 index 00000000..f16e0771 --- /dev/null +++ b/modules/shasum/meta.yml @@ -0,0 +1,40 @@ +name: "shasum" +description: Print SHA256 (256-bit) checksums. +keywords: + - checksum + - sha256 +tools: + - "md5sum": + description: Create an SHA256 (256-bit) checksum. + homepage: "https://www.gnu.org" + documentation: "https://linux.die.net/man/1/shasum" + licence: GPLv3+ + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - file: + type: file + description: Any file + 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" + - checksum: + type: file + description: File containing checksum + pattern: "*.sha256" + +authors: + - "@matthdsm" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index a5a7c083..effe6fe2 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1739,6 +1739,10 @@ seqwish/induce: - modules/seqwish/induce/** - tests/modules/seqwish/induce/** +shasum: + - modules/shasum/** + - tests/modules/shasum/** + shigatyper: - modules/shigatyper/** - tests/modules/shigatyper/** diff --git a/tests/modules/shasum/main.nf b/tests/modules/shasum/main.nf new file mode 100644 index 00000000..817ea6f0 --- /dev/null +++ b/tests/modules/shasum/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SHASUM } from '../../../modules/shasum/main.nf' + +workflow test_shasum { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + SHASUM ( input ) +} diff --git a/tests/modules/shasum/nextflow.config b/tests/modules/shasum/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/shasum/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/shasum/test.yml b/tests/modules/shasum/test.yml new file mode 100644 index 00000000..6778d156 --- /dev/null +++ b/tests/modules/shasum/test.yml @@ -0,0 +1,8 @@ +- name: shasum test_shasum + command: nextflow run tests/modules/shasum -entry test_shasum -c tests/config/nextflow.config + tags: + - shasum + files: + - path: output/shasum/test.paired_end.bam.sha256 + md5sum: 138a19e100f09fc975ea1b717da9b6dd + - path: output/shasum/versions.yml From 77d825e0439c4d9a1d68a329c97012e4b99f3e40 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 10:39:13 +0200 Subject: [PATCH 290/313] fix copy paste errors --- modules/md5sum/main.nf | 2 +- modules/shasum/main.nf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/md5sum/main.nf b/modules/md5sum/main.nf index 0b101811..2cdb8bf6 100644 --- a/modules/md5sum/main.nf +++ b/modules/md5sum/main.nf @@ -3,7 +3,7 @@ process MD5SUM { label 'process_low' if (params.enable_conda) { - exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers." + exit 1, "Conda environments cannot be used when using md5sum. Please use docker or singularity containers." } container "debian:bullseye-slim" diff --git a/modules/shasum/main.nf b/modules/shasum/main.nf index a2c37da7..e7a18da6 100644 --- a/modules/shasum/main.nf +++ b/modules/shasum/main.nf @@ -3,7 +3,7 @@ process SHASUM { label 'process_low' if (params.enable_conda) { - exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers." + exit 1, "Conda environments cannot be used when using sha256sum. Please use docker or singularity containers." } container "debian:bullseye-slim" From 1c7205d68389a899ee6b4f8c11343701c2c07ce8 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 10:44:51 +0200 Subject: [PATCH 291/313] fixed container definitions --- modules/md5sum/main.nf | 8 ++++---- modules/shasum/main.nf | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/md5sum/main.nf b/modules/md5sum/main.nf index 2cdb8bf6..7b66625e 100644 --- a/modules/md5sum/main.nf +++ b/modules/md5sum/main.nf @@ -2,10 +2,10 @@ process MD5SUM { tag "$meta.id" label 'process_low' - if (params.enable_conda) { - exit 1, "Conda environments cannot be used when using md5sum. Please use docker or singularity containers." - } - container "debian:bullseye-slim" + conda (params.enable_conda ? "conda-forge::coreutils=8.25" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/coreutils:8.31--h14c3975_0' : + 'quay.io/biocontainers/coreutils:8.31--h14c3975_0' }" input: tuple val(meta), path(file) diff --git a/modules/shasum/main.nf b/modules/shasum/main.nf index e7a18da6..11f9376c 100644 --- a/modules/shasum/main.nf +++ b/modules/shasum/main.nf @@ -2,10 +2,10 @@ process SHASUM { tag "$meta.id" label 'process_low' - if (params.enable_conda) { - exit 1, "Conda environments cannot be used when using sha256sum. Please use docker or singularity containers." - } - container "debian:bullseye-slim" + conda (params.enable_conda ? "conda-forge::coreutils=8.25" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/coreutils:8.31--h14c3975_0' : + 'quay.io/biocontainers/coreutils:8.31--h14c3975_0' }" input: tuple val(meta), path(file) From 1ccea5ff4d3dffbf9a8e53032481cc9246d4e23d Mon Sep 17 00:00:00 2001 From: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Date: Fri, 6 May 2022 10:56:58 +0200 Subject: [PATCH 292/313] remove prefix def in callcnvs --- modules/cnvpytor/callcnvs/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/cnvpytor/callcnvs/main.nf b/modules/cnvpytor/callcnvs/main.nf index 092f6def..69c9d40e 100644 --- a/modules/cnvpytor/callcnvs/main.nf +++ b/modules/cnvpytor/callcnvs/main.nf @@ -20,7 +20,6 @@ process CNVPYTOR_CALLCNVS { script: def bins = bin_sizes ?: '1000' - def prefix = task.ext.prefix ?: "${meta.id}" """ cnvpytor \\ -root $pytor \\ From bd1b80f36e1b9a978e598e4b47f6705ede34da37 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 11:07:05 +0200 Subject: [PATCH 293/313] fix software definitions --- modules/md5sum/main.nf | 6 +++--- modules/shasum/main.nf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/md5sum/main.nf b/modules/md5sum/main.nf index 7b66625e..2b516f1b 100644 --- a/modules/md5sum/main.nf +++ b/modules/md5sum/main.nf @@ -2,10 +2,10 @@ process MD5SUM { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "conda-forge::coreutils=8.25" : null) + conda (params.enable_conda ? "conda-forge::coreutils=9.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/coreutils:8.31--h14c3975_0' : - 'quay.io/biocontainers/coreutils:8.31--h14c3975_0' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: tuple val(meta), path(file) diff --git a/modules/shasum/main.nf b/modules/shasum/main.nf index 11f9376c..0e288435 100644 --- a/modules/shasum/main.nf +++ b/modules/shasum/main.nf @@ -2,10 +2,10 @@ process SHASUM { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "conda-forge::coreutils=8.25" : null) + conda (params.enable_conda ? "conda-forge::coreutils=9.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/coreutils:8.31--h14c3975_0' : - 'quay.io/biocontainers/coreutils:8.31--h14c3975_0' }" + 'https://depot.galaxyproject.org/singularity/ubuntu:20.04' : + 'ubuntu:20.04' }" input: tuple val(meta), path(file) From 35c5828f43b50bc029b20b133d3878b3bc16ca9d Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Fri, 6 May 2022 11:48:21 +0000 Subject: [PATCH 294/313] Add --auto-lineage option and remove single_end Co-authored-by: Jill V. Hagey, PhD --- modules/busco/main.nf | 5 +-- tests/modules/busco/main.nf | 67 ++++++++++++++++++++++++++---------- tests/modules/busco/test.yml | 30 ++++++++++++++++ 3 files changed, 82 insertions(+), 20 deletions(-) diff --git a/modules/busco/main.nf b/modules/busco/main.nf index 8c1b1dad..f0713862 100644 --- a/modules/busco/main.nf +++ b/modules/busco/main.nf @@ -9,7 +9,7 @@ process BUSCO { input: tuple val(meta), path('tmp_input/*') - each lineage // Required: lineage to check against + each lineage // Required: lineage to check against, "auto" enables --auto-lineage instead path busco_lineages_path // Recommended: path to busco lineages - downloads if not set path config_file // Optional: busco configuration file @@ -27,6 +27,7 @@ process BUSCO { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}-${lineage}" def busco_config = config_file ? "--config $config_file" : '' + def busco_lineage = lineage.equals('auto') ? '--auto-lineage' : "--lineage_dataset ${lineage}" def busco_lineage_dir = busco_lineages_path ? "--offline --download_path ${busco_lineages_path}" : '' """ # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) @@ -63,7 +64,7 @@ process BUSCO { --cpu $task.cpus \\ --in "\$INPUT_SEQS" \\ --out ${prefix}-busco \\ - --lineage_dataset $lineage \\ + $busco_lineage \\ $busco_lineage_dir \\ $busco_config \\ $args diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index f0201d21..e290b965 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -4,28 +4,59 @@ nextflow.enable.dsl = 2 include { BUSCO } from '../../../modules/busco/main.nf' -// This tests genome decompression, empty input channels and data download workflow test_busco_genome_single_fasta { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true) ] BUSCO ( input, - ['bacteria_odb10', 'bacteroidetes_odb10'], + ['auto','bacteria_odb10', 'bacteroidetes_odb10'], // Launch with auto to use --auto-lineage, and specified lineages [], // Download busco lineage [], // No config ) /* Output tree: - /tmp/tmpisa3ktco/busco/ - ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/short_summary.specific.bacteria_odb10.genome.fna.json - ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/short_summary.specific.bacteria_odb10.genome.fna.txt - ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/short_summary.specific.bacteroidetes_odb10.genome.fna.json - ├── short_summary.specific.bacteroidetes_odb10.genome.fna.txt -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/short_summary.specific.bacteroidetes_odb10.genome.fna.txt - ├── test-bacteria_odb10-busco -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/test-bacteria_odb10-busco/ + /tmp/tmp846crjv2/busco/ + ├── short_summary.generic.bacteria_odb10.genome.fna.json -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.generic.bacteria_odb10.genome.fna.json + ├── short_summary.generic.bacteria_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.generic.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidales_odb10.genome.fna.json -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.specific.bacteroidales_odb10.genome.fna.json + ├── short_summary.specific.bacteroidales_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.specific.bacteroidales_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/short_summary.specific.bacteroidetes_odb10.genome.fna.json + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + ├── test-auto-busco -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/test-auto-busco/ + │ ├── genome.fna/ + │ │ ├── auto_lineage/ + │ │ │ ├── run_archaea_odb10/ + │ │ │ ├── run_bacteria_odb10/ + │ │ │ └── run_eukaryota_odb10/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── metaeuk_err.log + │ │ │ ├── metaeuk_out.log + │ │ │ ├── prodigal_err.log + │ │ │ ├── prodigal_out.log + │ │ │ ├── sepp_err.log + │ │ │ └── sepp_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ ├── run_bacteria_odb10 -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/test-auto-busco/genome.fna/auto_lineage/run_bacteria_odb10/ [recursive, not followed] + │ │ └── run_bacteroidales_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-auto-busco.batch_summary.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/test-auto-busco.batch_summary.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/test-bacteria_odb10-busco/ │ ├── genome.fna/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log @@ -43,8 +74,8 @@ workflow test_busco_genome_single_fasta { │ │ └── short_summary.txt │ └── logs/ │ └── busco.log - ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpm91x0mn2/8a/ff5c15baba0942cca15a8d53e98009/test-bacteria_odb10-busco.batch_summary.txt - ├── test-bacteroidetes_odb10-busco -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/test-bacteroidetes_odb10-busco/ + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpi6af66j1/45/107812e983a8e695c380ebc215e7d9/test-bacteria_odb10-busco.batch_summary.txt + ├── test-bacteroidetes_odb10-busco -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/test-bacteroidetes_odb10-busco/ │ ├── genome.fna/ │ │ ├── logs/ │ │ │ ├── hmmsearch_err.log @@ -62,8 +93,8 @@ workflow test_busco_genome_single_fasta { │ │ └── short_summary.txt │ └── logs/ │ └── busco.log - ├── test-bacteroidetes_odb10-busco.batch_summary.txt -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/test-bacteroidetes_odb10-busco.batch_summary.txt - └── versions.yml -> /tmp/tmpm91x0mn2/91/3abf602561d35fcd917711402977a3/versions.yml + ├── test-bacteroidetes_odb10-busco.batch_summary.txt -> /tmp/tmpi6af66j1/a2/eb4a34894f3ac5554759ad6c9f652b/test-bacteroidetes_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/versions.yml */ } @@ -71,7 +102,7 @@ workflow test_busco_genome_single_fasta { workflow test_busco_genome_multi_fasta { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map [ file( params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true), file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['genome_fasta'], checkIfExists: true) @@ -133,7 +164,7 @@ workflow test_busco_genome_multi_fasta { workflow test_busco_eukaryote_metaeuk { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] @@ -174,7 +205,7 @@ workflow test_busco_eukaryote_metaeuk { workflow test_busco_eukaryote_augustus { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map file( params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) ] @@ -218,7 +249,7 @@ workflow test_busco_eukaryote_augustus { workflow test_busco_protein { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map file( params.test_data['candidatus_portiera_aleyrodidarum']['genome']['proteome_fasta'], checkIfExists: true) ] @@ -254,7 +285,7 @@ workflow test_busco_protein { workflow test_busco_transcriptome { input = [ - [ id:'test', single_end:false ], // meta map + [ id:'test' ], // meta map file( params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true) ] diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index 43b810ba..2a801e64 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -3,6 +3,20 @@ tags: - busco files: + - path: output/busco/short_summary.generic.bacteria_odb10.genome.fna.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.generic.bacteria_odb10.genome.fna.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json contains: - "one_line_summary" @@ -17,6 +31,20 @@ - "Complete BUSCOs" - "Missing BUSCOs" - "Dependencies and versions" + - path: output/busco/short_summary.specific.bacteroidales_odb10.genome.fna.json + contains: + - "one_line_summary" + - "input_file" + - "mode" + - "dataset" + - path: output/busco/short_summary.specific.bacteroidales_odb10.genome.fna.txt + contains: + - "BUSCO version" + - "The lineage dataset is" + - "BUSCO was run in mode" + - "Complete BUSCOs" + - "Missing BUSCOs" + - "Dependencies and versions" - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.json contains: - "one_line_summary" @@ -31,6 +59,8 @@ - "Complete BUSCOs" - "Missing BUSCOs" - "Dependencies and versions" + - path: output/busco/test-auto-busco.batch_summary.txt + md5sum: 32f7765c310f33555c31c7a3e64c990e - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt md5sum: e50690742e9ae6abdd2bf99334ff9e12 - path: output/busco/test-bacteroidetes_odb10-busco.batch_summary.txt From 9fa6b6c1fc930830c1d819a9273b4ec12ffacb0a Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Fri, 6 May 2022 11:56:19 +0000 Subject: [PATCH 295/313] Update meta.yml --- modules/busco/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/busco/meta.yml b/modules/busco/meta.yml index 19c2c991..ef8c5245 100644 --- a/modules/busco/meta.yml +++ b/modules/busco/meta.yml @@ -26,7 +26,7 @@ input: pattern: "*.{fasta,fna,fa,fasta.gz,fna.gz,fa.gz}" - lineage: type: value - description: The BUSCO lineage to use. + description: The BUSCO lineage to use, or "auto" to automatically select lineage - busco_lineages_path: type: directory description: Path to local BUSCO lineages directory. From 3930ba227bc49541e25272eb9332a10d01a1b271 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 14:10:44 +0200 Subject: [PATCH 296/313] merge snapaligner modes into one --- modules/snapaligner/{paired => align}/main.nf | 7 +-- .../snapaligner/{paired => align}/meta.yml | 6 +-- modules/snapaligner/single/main.nf | 41 ---------------- modules/snapaligner/single/meta.yml | 48 ------------------- tests/modules/snapaligner/align/main.nf | 29 +++++++++++ .../{paired => align}/nextflow.config | 0 tests/modules/snapaligner/align/test.yml | 19 ++++++++ tests/modules/snapaligner/paired/main.nf | 17 ------- tests/modules/snapaligner/paired/test.yml | 9 ---- tests/modules/snapaligner/single/main.nf | 17 ------- .../snapaligner/single/nextflow.config | 5 -- tests/modules/snapaligner/single/test.yml | 9 ---- 12 files changed, 55 insertions(+), 152 deletions(-) rename modules/snapaligner/{paired => align}/main.nf (87%) rename modules/snapaligner/{paired => align}/meta.yml (86%) delete mode 100644 modules/snapaligner/single/main.nf delete mode 100644 modules/snapaligner/single/meta.yml create mode 100644 tests/modules/snapaligner/align/main.nf rename tests/modules/snapaligner/{paired => align}/nextflow.config (100%) create mode 100644 tests/modules/snapaligner/align/test.yml delete mode 100644 tests/modules/snapaligner/paired/main.nf delete mode 100644 tests/modules/snapaligner/paired/test.yml delete mode 100644 tests/modules/snapaligner/single/main.nf delete mode 100644 tests/modules/snapaligner/single/nextflow.config delete mode 100644 tests/modules/snapaligner/single/test.yml diff --git a/modules/snapaligner/paired/main.nf b/modules/snapaligner/align/main.nf similarity index 87% rename from modules/snapaligner/paired/main.nf rename to modules/snapaligner/align/main.nf index 57044893..ef7af561 100644 --- a/modules/snapaligner/paired/main.nf +++ b/modules/snapaligner/align/main.nf @@ -1,4 +1,4 @@ -process SNAPALIGNER_PAIRED { +process SNAPALIGNER_ALIGN { tag '$meta.id' label 'process_high' @@ -21,15 +21,16 @@ process SNAPALIGNER_PAIRED { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def subcmd = meta.single_end ? "single" : "paired" """ mkdir -p index mv $index index/ - snap-aligner paired \\ + snap-aligner ${subcmd} \\ index \\ ${reads.join(" ")} \\ - -o -bam ${prefix}.bam \\ + -o ${prefix}.bam \\ -t ${task.cpus} \\ $args diff --git a/modules/snapaligner/paired/meta.yml b/modules/snapaligner/align/meta.yml similarity index 86% rename from modules/snapaligner/paired/meta.yml rename to modules/snapaligner/align/meta.yml index b19e0174..611b0b71 100644 --- a/modules/snapaligner/paired/meta.yml +++ b/modules/snapaligner/align/meta.yml @@ -1,5 +1,5 @@ -name: "snapaligner_paired" -description: Performs paired end fastq alignment to a fasta reference using SNAP +name: "snapaligner_align" +description: Performs fastq alignment to a fasta reference using SNAP keywords: - alignment - map @@ -22,7 +22,7 @@ input: e.g. [ id:'test', single_end:false ] - reads: type: file - description: List of input fastq files of size 2 for fastq or 1 for bam + description: List of input fastq files of size 2 for paired fastq or 1 for bam or single fastq pattern: "*.{fastq.gz,fq.gz,fastq,fq,bam}" - index: type: file diff --git a/modules/snapaligner/single/main.nf b/modules/snapaligner/single/main.nf deleted file mode 100644 index b13e1153..00000000 --- a/modules/snapaligner/single/main.nf +++ /dev/null @@ -1,41 +0,0 @@ -process SNAPALIGNER_SINGLE { - tag '$meta.id' - label 'process_high' - - conda (params.enable_conda ? "bioconda::snap-aligner=2.0.1" : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/snap-aligner:2.0.1--hd03093a_1': - 'quay.io/biocontainers/snap-aligner:2.0.1--hd03093a_1' }" - - input: - tuple val(meta), path(reads) - path index - - output: - 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}" - - """ - mkdir -p index - mv $index index/ - - snap-aligner single \\ - index \\ - ${reads.join(" ")} \\ - -o -bam ${prefix}.bam \\ - -t ${task.cpus} \\ - $args - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - snapaligner: \$(snap-aligner 2>&1| head -n 1 | sed 's/^.*version //;s/.\$//') - END_VERSIONS - """ -} diff --git a/modules/snapaligner/single/meta.yml b/modules/snapaligner/single/meta.yml deleted file mode 100644 index e69cc721..00000000 --- a/modules/snapaligner/single/meta.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: "snapaligner_single" -description: Performs single end fastq alignment to a fasta reference using SNAP -keywords: - - alignment - - map - - fastq - - bam - - sam -tools: - - "snapaligner": - description: "Scalable Nucleotide Alignment Program -- a fast and accurate read aligner for high-throughput sequencing data" - homepage: "http://snap.cs.berkeley.edu" - documentation: "https://1drv.ms/b/s!AhuEg_0yZD86hcpblUt-muHKYsG8fA?e=R8ogug" - tool_dev_url: "https://github.com/amplab/snap" - doi: "10.1101/2021.11.23.469039" - licence: "['Apache v2']" -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: List of single end input files - pattern: "*.{fastq.gz,fq.gz,fastq,fq,bam}" - - index: - type: file - description: List of SNAP genome index files - pattern: "{Genome,GenomeIndex,GenomeIndexHash,OverflowTable}" - -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" - - bam: - type: file - description: Aligned BAM file - pattern: "*.{bam}" - -authors: - - "@matthdsm" diff --git a/tests/modules/snapaligner/align/main.nf b/tests/modules/snapaligner/align/main.nf new file mode 100644 index 00000000..4f5943fe --- /dev/null +++ b/tests/modules/snapaligner/align/main.nf @@ -0,0 +1,29 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SNAPALIGNER_INDEX } from '../../../../modules/snapaligner/index/main.nf' +include { SNAPALIGNER_ALIGN as SNAPALIGNER_SINGLE } from '../../../../modules/snapaligner/align/main.nf' +include { SNAPALIGNER_ALIGN as SNAPALIGNER_PAIRED } from '../../../../modules/snapaligner/align/main.nf' + +workflow test_snapaligner_single { + + input = [ + [ id:'test', single_end:true ], // meta map + [file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] + ] + + SNAPALIGNER_INDEX ( file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),[],[],[]) + SNAPALIGNER_SINGLE ( input, SNAPALIGNER_INDEX.out.index ) +} + +workflow test_snapaligner_paired { + + input = [ + [ id:'test', single_end:false ], // meta map + [file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)] + ] + + SNAPALIGNER_INDEX ( file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),[],[],[]) + SNAPALIGNER_PAIRED ( input, SNAPALIGNER_INDEX.out.index ) +} diff --git a/tests/modules/snapaligner/paired/nextflow.config b/tests/modules/snapaligner/align/nextflow.config similarity index 100% rename from tests/modules/snapaligner/paired/nextflow.config rename to tests/modules/snapaligner/align/nextflow.config diff --git a/tests/modules/snapaligner/align/test.yml b/tests/modules/snapaligner/align/test.yml new file mode 100644 index 00000000..9cc7e230 --- /dev/null +++ b/tests/modules/snapaligner/align/test.yml @@ -0,0 +1,19 @@ +- name: snapaligner align test_snapaligner_single + command: nextflow run tests/modules/snapaligner/align -entry test_snapaligner_single -c tests/config/nextflow.config + tags: + - snapaligner/single + - snapaligner + files: + - path: output/snapaligner/test.bam + md5sum: 5d95594e4ef1ee23ce56e6a7cb64f0f2 + - path: output/snapaligner/versions.yml + +- name: snapaligner align test_snapaligner_paired + command: nextflow run tests/modules/snapaligner/align -entry test_snapaligner_paired -c tests/config/nextflow.config + tags: + - snapaligner/paired + - snapaligner + files: + - path: output/snapaligner/test.bam + md5sum: a1405da5876f15dbe8a81516b94c2a15 + - path: output/snapaligner/versions.yml diff --git a/tests/modules/snapaligner/paired/main.nf b/tests/modules/snapaligner/paired/main.nf deleted file mode 100644 index b25ca8c2..00000000 --- a/tests/modules/snapaligner/paired/main.nf +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { SNAPALIGNER_INDEX } from '../../../../modules/snapaligner/index/main.nf' -include { SNAPALIGNER_PAIRED } from '../../../../modules/snapaligner/paired/main.nf' - -workflow test_snapaligner_paired { - - input = [ - [ id:'test', single_end:false ], // meta map - [file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)] - ] - - SNAPALIGNER_INDEX ( file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),[],[],[]) - SNAPALIGNER_PAIRED ( input, SNAPALIGNER_INDEX.out.index ) -} diff --git a/tests/modules/snapaligner/paired/test.yml b/tests/modules/snapaligner/paired/test.yml deleted file mode 100644 index 7df1e02b..00000000 --- a/tests/modules/snapaligner/paired/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: snapaligner paired test_snapaligner_paired - command: nextflow run tests/modules/snapaligner/paired -entry test_snapaligner_paired -c tests/config/nextflow.config - tags: - - snapaligner - - snapaligner/paired - files: - - path: output/snapaligner/test.bam - md5sum: 2ac92e9539fa246dd6db52b5de56fca5 - - path: output/snapaligner/versions.yml diff --git a/tests/modules/snapaligner/single/main.nf b/tests/modules/snapaligner/single/main.nf deleted file mode 100644 index 616e517a..00000000 --- a/tests/modules/snapaligner/single/main.nf +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { SNAPALIGNER_INDEX } from '../../../../modules/snapaligner/index/main.nf' -include { SNAPALIGNER_SINGLE } from '../../../../modules/snapaligner/single/main.nf' - -workflow test_snapaligner_single { - - input = [ - [ id:'test', single_end:false ], // meta map - [file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true)] - ] - - SNAPALIGNER_INDEX ( file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true),[],[],[]) - SNAPALIGNER_SINGLE ( input, SNAPALIGNER_INDEX.out.index ) -} diff --git a/tests/modules/snapaligner/single/nextflow.config b/tests/modules/snapaligner/single/nextflow.config deleted file mode 100644 index 50f50a7a..00000000 --- a/tests/modules/snapaligner/single/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/snapaligner/single/test.yml b/tests/modules/snapaligner/single/test.yml deleted file mode 100644 index bbcbba1f..00000000 --- a/tests/modules/snapaligner/single/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: snapaligner single test_snapaligner_single - command: nextflow run tests/modules/snapaligner/single -entry test_snapaligner_single -c tests/config/nextflow.config - tags: - - snapaligner/single - - snapaligner - files: - - path: output/snapaligner/test.bam - md5sum: 696f7ea8e1aa5f9d7dafb9d0134fe25d - - path: output/snapaligner/versions.yml From 26d2231e854b909fcf0d2a4971c01a7030ae6cf2 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 14:16:38 +0200 Subject: [PATCH 297/313] fix linting --- tests/config/pytest_modules.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index effe6fe2..2c9ea7d4 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1763,13 +1763,9 @@ snapaligner/index: - modules/snapaligner/index/** - tests/modules/snapaligner/index/** -snapaligner/paired: - - modules/snapaligner/paired/** - - tests/modules/snapaligner/paired/** - -snapaligner/single: - - modules/snapaligner/single/** - - tests/modules/snapaligner/single/** +snapaligner/align: + - modules/snapaligner/align/** + - tests/modules/snapaligner/align/** snpdists: - modules/snpdists/** From 0fa36e6777b968d8527966d6963e6ffdc7716592 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Fri, 6 May 2022 15:26:34 +0200 Subject: [PATCH 298/313] fix added correct entry workflow in test.yml --- tests/modules/gatk4/mergebamalignment/test.yml | 2 +- tests/modules/gatk4/mutect2/test.yml | 2 +- tests/modules/gatk4/revertsam/test.yml | 2 +- tests/modules/gatk4/samtofastq/test.yml | 2 +- tests/modules/samtools/view/test.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/modules/gatk4/mergebamalignment/test.yml b/tests/modules/gatk4/mergebamalignment/test.yml index 84a67654..01d9bf46 100644 --- a/tests/modules/gatk4/mergebamalignment/test.yml +++ b/tests/modules/gatk4/mergebamalignment/test.yml @@ -9,7 +9,7 @@ - path: output/gatk4/versions.yml - name: gatk4 mergebamalignment test_gatk4_mergebamalignment_stubs - command: nextflow run ./tests/modules/gatk4/mergebamalignment -entry test_gatk4_mergebamalignment -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mergebamalignment/nextflow.config -stub-run + command: nextflow run ./tests/modules/gatk4/mergebamalignment -entry test_gatk4_mergebamalignment_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mergebamalignment/nextflow.config -stub-run tags: - gatk4 - gatk4/mergebamalignment diff --git a/tests/modules/gatk4/mutect2/test.yml b/tests/modules/gatk4/mutect2/test.yml index 3853801d..27fb40b9 100644 --- a/tests/modules/gatk4/mutect2/test.yml +++ b/tests/modules/gatk4/mutect2/test.yml @@ -71,7 +71,7 @@ - path: output/gatk4/versions.yml - name: gatk4 mutect2 test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs - command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_normal_pair_f1r2 -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config -stub-run + command: nextflow run ./tests/modules/gatk4/mutect2 -entry test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/mutect2/nextflow.config -stub-run tags: - gatk4 - gatk4/mutect2 diff --git a/tests/modules/gatk4/revertsam/test.yml b/tests/modules/gatk4/revertsam/test.yml index 89e78659..fd26d06f 100644 --- a/tests/modules/gatk4/revertsam/test.yml +++ b/tests/modules/gatk4/revertsam/test.yml @@ -9,7 +9,7 @@ - path: output/gatk4/versions.yml - name: gatk4 revertsam test_gatk4_revertsam_stubs - command: nextflow run ./tests/modules/gatk4/revertsam -entry test_gatk4_revertsam -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/revertsam/nextflow.config -stub-run + command: nextflow run ./tests/modules/gatk4/revertsam -entry test_gatk4_revertsam_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/revertsam/nextflow.config -stub-run tags: - gatk4 - gatk4/revertsam diff --git a/tests/modules/gatk4/samtofastq/test.yml b/tests/modules/gatk4/samtofastq/test.yml index 1288a270..bab7fc7a 100644 --- a/tests/modules/gatk4/samtofastq/test.yml +++ b/tests/modules/gatk4/samtofastq/test.yml @@ -21,7 +21,7 @@ - path: output/gatk4/versions.yml - name: gatk4 samtofastq test_gatk4_samtofastq_paired_end_stubs - command: nextflow run ./tests/modules/gatk4/samtofastq -entry test_gatk4_samtofastq_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/samtofastq/nextflow.config -stub-run + command: nextflow run ./tests/modules/gatk4/samtofastq -entry test_gatk4_samtofastq_paired_end_stubs -c ./tests/config/nextflow.config -c ./tests/modules/gatk4/samtofastq/nextflow.config -stub-run tags: - gatk4 - gatk4/samtofastq diff --git a/tests/modules/samtools/view/test.yml b/tests/modules/samtools/view/test.yml index 2718130e..f3ad4552 100644 --- a/tests/modules/samtools/view/test.yml +++ b/tests/modules/samtools/view/test.yml @@ -16,7 +16,7 @@ - path: output/samtools/test.cram - name: samtools view test_samtools_view_stubs - command: nextflow run ./tests/modules/samtools/view -entry test_samtools_view -c ./tests/config/nextflow.config -c ./tests/modules/samtools/view/nextflow.config -stub-run + command: nextflow run ./tests/modules/samtools/view -entry test_samtools_view_stubs -c ./tests/config/nextflow.config -c ./tests/modules/samtools/view/nextflow.config -stub-run tags: - samtools/view - samtools From 7a85760d080d74ea8b883f9255a6d3861fd7d44b Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Fri, 6 May 2022 13:33:27 +0000 Subject: [PATCH 299/313] remove 'auto' test --- tests/modules/busco/main.nf | 48 +++++++++++++++++++++++++++++++++++- tests/modules/busco/test.yml | 30 ---------------------- 2 files changed, 47 insertions(+), 31 deletions(-) diff --git a/tests/modules/busco/main.nf b/tests/modules/busco/main.nf index e290b965..598e148a 100644 --- a/tests/modules/busco/main.nf +++ b/tests/modules/busco/main.nf @@ -13,12 +13,58 @@ workflow test_busco_genome_single_fasta { BUSCO ( input, - ['auto','bacteria_odb10', 'bacteroidetes_odb10'], // Launch with auto to use --auto-lineage, and specified lineages + ['bacteria_odb10', 'bacteroidetes_odb10'], // Launch with 'auto' to use --auto-lineage, and specified lineages // 'auto' removed from test due to memory issues [], // Download busco lineage [], // No config ) /* Output tree: + /tmp/tmpyz_hi62i/busco/ + ├── short_summary.specific.bacteria_odb10.genome.fna.json -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/short_summary.specific.bacteria_odb10.genome.fna.json + ├── short_summary.specific.bacteria_odb10.genome.fna.txt -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/short_summary.specific.bacteria_odb10.genome.fna.txt + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.json -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/short_summary.specific.bacteroidetes_odb10.genome.fna.json + ├── short_summary.specific.bacteroidetes_odb10.genome.fna.txt -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/short_summary.specific.bacteroidetes_odb10.genome.fna.txt + ├── test-bacteria_odb10-busco -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/test-bacteria_odb10-busco/ + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteria_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteria_odb10-busco.batch_summary.txt -> /tmp/tmpza_0dth3/33/7d8c9b2c8931d9ad6a67aa843895e7/test-bacteria_odb10-busco.batch_summary.txt + ├── test-bacteroidetes_odb10-busco -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/test-bacteroidetes_odb10-busco/ + │ ├── genome.fna/ + │ │ ├── logs/ + │ │ │ ├── hmmsearch_err.log + │ │ │ ├── hmmsearch_out.log + │ │ │ ├── prodigal_err.log + │ │ │ └── prodigal_out.log + │ │ ├── prodigal_output/ + │ │ │ └── predicted_genes/ + │ │ └── run_bacteroidetes_odb10/ + │ │ ├── busco_sequences/ + │ │ ├── full_table.tsv + │ │ ├── hmmer_output/ + │ │ ├── missing_busco_list.tsv + │ │ ├── short_summary.json + │ │ └── short_summary.txt + │ └── logs/ + │ └── busco.log + ├── test-bacteroidetes_odb10-busco.batch_summary.txt -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/test-bacteroidetes_odb10-busco.batch_summary.txt + └── versions.yml -> /tmp/tmpza_0dth3/6a/e95a0cd21785ce33d63b8f73a68a51/versions.yml + + Former Output tree -w 'auto': /tmp/tmp846crjv2/busco/ ├── short_summary.generic.bacteria_odb10.genome.fna.json -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.generic.bacteria_odb10.genome.fna.json ├── short_summary.generic.bacteria_odb10.genome.fna.txt -> /tmp/tmpi6af66j1/18/8be22ecd7a71471ff5082bd512972b/short_summary.generic.bacteria_odb10.genome.fna.txt diff --git a/tests/modules/busco/test.yml b/tests/modules/busco/test.yml index 2a801e64..43b810ba 100644 --- a/tests/modules/busco/test.yml +++ b/tests/modules/busco/test.yml @@ -3,20 +3,6 @@ tags: - busco files: - - path: output/busco/short_summary.generic.bacteria_odb10.genome.fna.json - contains: - - "one_line_summary" - - "input_file" - - "mode" - - "dataset" - - path: output/busco/short_summary.generic.bacteria_odb10.genome.fna.txt - contains: - - "BUSCO version" - - "The lineage dataset is" - - "BUSCO was run in mode" - - "Complete BUSCOs" - - "Missing BUSCOs" - - "Dependencies and versions" - path: output/busco/short_summary.specific.bacteria_odb10.genome.fna.json contains: - "one_line_summary" @@ -31,20 +17,6 @@ - "Complete BUSCOs" - "Missing BUSCOs" - "Dependencies and versions" - - path: output/busco/short_summary.specific.bacteroidales_odb10.genome.fna.json - contains: - - "one_line_summary" - - "input_file" - - "mode" - - "dataset" - - path: output/busco/short_summary.specific.bacteroidales_odb10.genome.fna.txt - contains: - - "BUSCO version" - - "The lineage dataset is" - - "BUSCO was run in mode" - - "Complete BUSCOs" - - "Missing BUSCOs" - - "Dependencies and versions" - path: output/busco/short_summary.specific.bacteroidetes_odb10.genome.fna.json contains: - "one_line_summary" @@ -59,8 +31,6 @@ - "Complete BUSCOs" - "Missing BUSCOs" - "Dependencies and versions" - - path: output/busco/test-auto-busco.batch_summary.txt - md5sum: 32f7765c310f33555c31c7a3e64c990e - path: output/busco/test-bacteria_odb10-busco.batch_summary.txt md5sum: e50690742e9ae6abdd2bf99334ff9e12 - path: output/busco/test-bacteroidetes_odb10-busco.batch_summary.txt From 971a17a3ab9f81785d3c6a265746abe3bfe319b0 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Fri, 6 May 2022 15:34:18 +0200 Subject: [PATCH 300/313] fix datatest for stubs --- tests/modules/gatk4/mergebamalignment/main.nf | 8 +++---- tests/modules/gatk4/mutect2/main.nf | 24 +++++++++---------- tests/modules/gatk4/revertsam/main.nf | 2 +- tests/modules/gatk4/samtofastq/main.nf | 4 ++-- tests/modules/samtools/view/main.nf | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/modules/gatk4/mergebamalignment/main.nf b/tests/modules/gatk4/mergebamalignment/main.nf index 0eb6876d..d0949a52 100644 --- a/tests/modules/gatk4/mergebamalignment/main.nf +++ b/tests/modules/gatk4/mergebamalignment/main.nf @@ -17,11 +17,11 @@ workflow test_gatk4_mergebamalignment { workflow test_gatk4_mergebamalignment_stubs { input = [ [ id:'test' ], // meta map - "test_foo.bam", - "test_bar.bam" + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_unaligned_bam'], checkIfExists: true) ] - fasta = "genome.fasta" - dict = "genome.fasta.dict" + 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, fasta, dict ) } diff --git a/tests/modules/gatk4/mutect2/main.nf b/tests/modules/gatk4/mutect2/main.nf index 310e9ca1..fa229eff 100644 --- a/tests/modules/gatk4/mutect2/main.nf +++ b/tests/modules/gatk4/mutect2/main.nf @@ -120,23 +120,23 @@ workflow test_gatk4_mutect2_mitochondria { } workflow test_gatk4_mutect2_tumor_normal_pair_f1r2_stubs { - input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map - [ "foo_paired.bam", - "foo_paired2.bam" + input = [ [ id:'test', normal_id:'normal', tumor_id:'tumour' ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam'], checkIfExists: true) ], - [ "foo_paired.bam.bai", - "foo_paired2.bam.bai" + [ file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true) ], [] ] - fasta = "genome.fasta" - fai = "genome.fasta.fai" - dict = "genome.fasta.dict" - germline_resource = "genome_gnomAD.r2.1.1.vcf.gz" - germline_resource_tbi = "genome_gnomAD.r2.1.1.vcf.gz.tbi" - panel_of_normals = "genome_mills_and_1000G.indels.hg38.vcf.gz" - panel_of_normals_tbi = "genome_mills_and_1000G.indels.hg38.vcf.gz.tbi" + fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true) + dict = file(params.test_data['homo_sapiens']['genome']['genome_21_dict'], checkIfExists: true) + germline_resource = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz'], checkIfExists: true) + germline_resource_tbi = file(params.test_data['homo_sapiens']['genome']['gnomad_r2_1_1_21_vcf_gz_tbi'], checkIfExists: true) + panel_of_normals = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz'], checkIfExists: true) + panel_of_normals_tbi = file(params.test_data['homo_sapiens']['genome']['mills_and_1000g_indels_21_vcf_gz_tbi'], checkIfExists: true) GATK4_MUTECT2_F1R2 ( input, fasta, fai, dict, germline_resource, germline_resource_tbi, panel_of_normals, panel_of_normals_tbi ) } diff --git a/tests/modules/gatk4/revertsam/main.nf b/tests/modules/gatk4/revertsam/main.nf index 738ecd8f..5b14d471 100644 --- a/tests/modules/gatk4/revertsam/main.nf +++ b/tests/modules/gatk4/revertsam/main.nf @@ -14,7 +14,7 @@ workflow test_gatk4_revertsam { workflow test_gatk4_revertsam_stubs { input = [ [ id:'test' ], // meta map - "foo_paired_end.bam" + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] GATK4_REVERTSAM ( input ) diff --git a/tests/modules/gatk4/samtofastq/main.nf b/tests/modules/gatk4/samtofastq/main.nf index 79d04c7c..757b080f 100644 --- a/tests/modules/gatk4/samtofastq/main.nf +++ b/tests/modules/gatk4/samtofastq/main.nf @@ -21,8 +21,8 @@ workflow test_gatk4_samtofastq_paired_end { } workflow test_gatk4_samtofastq_paired_end_stubs { - input = [ [ id:'test', single_end: false ], // meta map - [ "foo_paired_end.bam" ] + input = [ [ id:'test', single_end: true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) ] ] GATK4_SAMTOFASTQ ( input ) diff --git a/tests/modules/samtools/view/main.nf b/tests/modules/samtools/view/main.nf index bdad1078..0e3f597e 100644 --- a/tests/modules/samtools/view/main.nf +++ b/tests/modules/samtools/view/main.nf @@ -25,7 +25,7 @@ workflow test_samtools_view_cram { workflow test_samtools_view_stubs { input = [ [ id:'test', single_end:false ], // meta map - "foo_paired_end.bam", + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true), [] ] From 67481c6d543c8d84940376cb3b258354bb66f988 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Fri, 6 May 2022 15:04:04 +0000 Subject: [PATCH 301/313] Start Meryl count --- modules/meryl/count/main.nf | 45 ++++++++++++++++++++ modules/meryl/count/meta.yml | 51 +++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/meryl/count/main.nf | 15 +++++++ tests/modules/meryl/count/nextflow.config | 7 ++++ tests/modules/meryl/count/test.yml | 8 ++++ 6 files changed, 130 insertions(+) create mode 100644 modules/meryl/count/main.nf create mode 100644 modules/meryl/count/meta.yml create mode 100644 tests/modules/meryl/count/main.nf create mode 100644 tests/modules/meryl/count/nextflow.config create mode 100644 tests/modules/meryl/count/test.yml diff --git a/modules/meryl/count/main.nf b/modules/meryl/count/main.nf new file mode 100644 index 00000000..80491242 --- /dev/null +++ b/modules/meryl/count/main.nf @@ -0,0 +1,45 @@ +process MERYL_COUNT { + tag "$meta.id" + label 'process_medium' + + conda (params.enable_conda ? "bioconda::meryl=1.3" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/meryl:1.3--h87f3376_1': + 'quay.io/biocontainers/meryl:1.3--h87f3376_1' }" + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("*.meryl"), emit: meryl + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + for READ in $reads; do + meryl count \\ + threads=$task.cpus \\ + $args \\ + $reads \\ + output read.\${READ%.f*}.meryl + done + meryl union-sum \\ + threads=$task.cpus \\ + $args2 \\ + output ${prefix}.meryl + + # clean up + rm -rf read.*.meryl + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + meryl: \$( meryl --version |& sed 's/meryl //' ) + END_VERSIONS + """ +} diff --git a/modules/meryl/count/meta.yml b/modules/meryl/count/meta.yml new file mode 100644 index 00000000..885267ec --- /dev/null +++ b/modules/meryl/count/meta.yml @@ -0,0 +1,51 @@ +name: "meryl_count" +## TODO nf-core: Add a description of the module and list keywords +description: write your description here +keywords: + - sort +tools: + - "meryl": + ## TODO nf-core: Add a description and other details for the software below + description: "" + homepage: "{}" + documentation: "{}" + tool_dev_url: "{}" + doi: "" + licence: "['GPL']" + +## TODO nf-core: Add a description of all of the variables used as input +input: + # Only when we have meta + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + # + ## TODO nf-core: Delete / customise this example input + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +## TODO nf-core: Add a description of all of the variables used as output +output: + #Only when we have meta + - 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 + - bam: + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + +authors: + - "@mahesh-panchal" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 62816c50..82c2de61 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1214,6 +1214,10 @@ meningotype: - modules/meningotype/** - tests/modules/meningotype/** +meryl/count: + - modules/meryl/count/** + - tests/modules/meryl/count/** + metabat2/jgisummarizebamcontigdepths: - modules/metabat2/jgisummarizebamcontigdepths/** - tests/modules/metabat2/jgisummarizebamcontigdepths/** diff --git a/tests/modules/meryl/count/main.nf b/tests/modules/meryl/count/main.nf new file mode 100644 index 00000000..8706046a --- /dev/null +++ b/tests/modules/meryl/count/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf' + +workflow test_meryl_count_single_end { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + + MERYL_COUNT ( input ) +} diff --git a/tests/modules/meryl/count/nextflow.config b/tests/modules/meryl/count/nextflow.config new file mode 100644 index 00000000..99e1f846 --- /dev/null +++ b/tests/modules/meryl/count/nextflow.config @@ -0,0 +1,7 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + ext.args = 'k=21' + ext.args2 = 'k=21' + +} diff --git a/tests/modules/meryl/count/test.yml b/tests/modules/meryl/count/test.yml new file mode 100644 index 00000000..0565bd1a --- /dev/null +++ b/tests/modules/meryl/count/test.yml @@ -0,0 +1,8 @@ +- name: meryl count test_meryl_count_single_end + command: nextflow run tests/modules/meryl/count -entry test_meryl_count_single_end -c tests/config/nextflow.config + tags: + - meryl/count + - meryl + files: + - path: output/meryl/versions.yml + md5sum: 5fe537d873925ccbcc4edf0983e9eda0 From ed09978222ca8fba9b4f9a872b84d8a75acdfc5c Mon Sep 17 00:00:00 2001 From: "Moritz E. Beber" Date: Fri, 6 May 2022 14:16:15 +0200 Subject: [PATCH 302/313] chore: update build number --- modules/sratools/prefetch/main.nf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/sratools/prefetch/main.nf b/modules/sratools/prefetch/main.nf index 2233d0aa..75fa17a1 100644 --- a/modules/sratools/prefetch/main.nf +++ b/modules/sratools/prefetch/main.nf @@ -5,8 +5,8 @@ process SRATOOLS_PREFETCH { conda (params.enable_conda ? 'bioconda::sra-tools=2.11.0' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/sra-tools:2.11.0--pl5262h314213e_0' : - 'quay.io/biocontainers/sra-tools:2.11.0--pl5262h314213e_0' }" + 'https://depot.galaxyproject.org/singularity/sra-tools:2.11.0--pl5321ha49a11a_3' : + 'quay.io/biocontainers/sra-tools:2.11.0--pl5321ha49a11a_3' }" input: tuple val(meta), val(id) @@ -30,7 +30,6 @@ process SRATOOLS_PREFETCH { prefetch \\ $args \\ - --progress \\ $id vdb-validate $id From dd1c66783ae5fd2cd8b416687e465d9f1b558282 Mon Sep 17 00:00:00 2001 From: "Moritz E. Beber" Date: Fri, 6 May 2022 17:09:01 +0200 Subject: [PATCH 303/313] refactor: use a template to add retrying --- modules/sratools/prefetch/main.nf | 27 ++------- .../prefetch/templates/retry_with_backoff.sh | 59 +++++++++++++++++++ 2 files changed, 65 insertions(+), 21 deletions(-) create mode 100755 modules/sratools/prefetch/templates/retry_with_backoff.sh diff --git a/modules/sratools/prefetch/main.nf b/modules/sratools/prefetch/main.nf index 75fa17a1..92a66616 100644 --- a/modules/sratools/prefetch/main.nf +++ b/modules/sratools/prefetch/main.nf @@ -12,31 +12,16 @@ process SRATOOLS_PREFETCH { tuple val(meta), val(id) output: - tuple val(meta), path("$id"), emit: sra + 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" - """ - eval "\$(vdb-config -o n NCBI_SETTINGS | sed 's/[" ]//g')" - if [[ ! -f "\${NCBI_SETTINGS}" ]]; then - mkdir -p "\$(dirname "\${NCBI_SETTINGS}")" - printf '${config}' > "\${NCBI_SETTINGS}" - fi + shell: + args = task.ext.args ?: '' + args2 = task.ext.args2 ?: '5 1 100' // + config = "/LIBS/GUID = \"${UUID.randomUUID().toString()}\"\\n/libs/cloud/report_instance_identity = \"true\"\\n" - prefetch \\ - $args \\ - $id - - vdb-validate $id - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sratools: \$(prefetch --version 2>&1 | grep -Eo '[0-9.]+') - END_VERSIONS - """ + template 'retry_with_backoff.sh' } diff --git a/modules/sratools/prefetch/templates/retry_with_backoff.sh b/modules/sratools/prefetch/templates/retry_with_backoff.sh new file mode 100755 index 00000000..fbcb6532 --- /dev/null +++ b/modules/sratools/prefetch/templates/retry_with_backoff.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +set -u + +retry_with_backoff() { + local max_attempts=${1} + local delay=${2} + local max_time=${3} + local attempt=1 + local output= + local status= + + # Remove the first three arguments to this function in order to access + # the 'real' command with `${@}`. + shift 3 + + while [ ${attempt} -le ${max_attempts} ]; do + output=$("${@}") + status=${?} + + if [ ${status} -eq 0 ]; then + break + fi + + if [ ${attempt} -lt ${max_attempts} ]; then + echo "Failed attempt ${attempt} of ${max_attempts}. Retrying in ${delay} s." >&2 + sleep ${delay} + elif [ ${attempt} -eq ${max_attempts} ]; then + echo "Failed after ${attempt} attempts." >&2 + return ${status} + fi + + attempt=$(( ${attempt} + 1 )) + delay=$(( ${delay} * 2 )) + if [ ${delay} -ge ${max_time} ]; then + delay=${max_time} + fi + done + + echo "${output}" +} + +eval "$(vdb-config -o n NCBI_SETTINGS | sed 's/[" ]//g')" +if [[ ! -f "${NCBI_SETTINGS}" ]]; then + mkdir -p "$(dirname "${NCBI_SETTINGS}")" + printf '!{config}' > "${NCBI_SETTINGS}" +fi + +retry_with_backoff !{args2} \ + prefetch \ + !{args} \ + !{id} + +vdb-validate !{id} + +cat <<-END_VERSIONS > versions.yml +"!{task.process}": + sratools: $(prefetch --version 2>&1 | grep -Eo '[0-9.]+') +END_VERSIONS From ea41c753c0d8348260dd552f58dc0aca7bdd4d51 Mon Sep 17 00:00:00 2001 From: "Moritz E. Beber" Date: Fri, 6 May 2022 17:28:56 +0200 Subject: [PATCH 304/313] fix: remove retry label Call gets retried by bash script --- modules/sratools/prefetch/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/sratools/prefetch/main.nf b/modules/sratools/prefetch/main.nf index 92a66616..3408c3e9 100644 --- a/modules/sratools/prefetch/main.nf +++ b/modules/sratools/prefetch/main.nf @@ -1,7 +1,6 @@ process SRATOOLS_PREFETCH { tag "$id" label 'process_low' - label 'error_retry' conda (params.enable_conda ? 'bioconda::sra-tools=2.11.0' : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? From ec7b460fa4a5ed50d7b0e4c73f984a9710bb703d Mon Sep 17 00:00:00 2001 From: "Maxime U. Garcia" Date: Fri, 6 May 2022 17:54:35 +0200 Subject: [PATCH 305/313] add missing file --- tests/config/test_data.config | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index e9a5f4ab..516e6238 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -125,6 +125,7 @@ params { genome_gff3 = "${test_data_dir}/genomics/homo_sapiens/genome/genome.gff3" genome_gtf = "${test_data_dir}/genomics/homo_sapiens/genome/genome.gtf" genome_interval_list = "${test_data_dir}/genomics/homo_sapiens/genome/genome.interval_list" + genome_multi_interval_bed = "${test_data_dir}/genomics/homo_sapiens/genome/multi_intervals.bed" genome_sizes = "${test_data_dir}/genomics/homo_sapiens/genome/genome.sizes" genome_bed = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed" genome_header = "${test_data_dir}/genomics/homo_sapiens/genome/genome.header" From ac217479e9cb4579060a6631405619f6dc8e6a92 Mon Sep 17 00:00:00 2001 From: "Maxime U. Garcia" Date: Fri, 6 May 2022 18:18:32 +0200 Subject: [PATCH 306/313] Update tests/config/test_data.config Co-authored-by: Jose Espinosa-Carrasco --- tests/config/test_data.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 516e6238..6fd65ab7 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -125,7 +125,7 @@ params { genome_gff3 = "${test_data_dir}/genomics/homo_sapiens/genome/genome.gff3" genome_gtf = "${test_data_dir}/genomics/homo_sapiens/genome/genome.gtf" genome_interval_list = "${test_data_dir}/genomics/homo_sapiens/genome/genome.interval_list" - genome_multi_interval_bed = "${test_data_dir}/genomics/homo_sapiens/genome/multi_intervals.bed" + genome_multi_interval_bed = "${test_data_dir}/genomics/homo_sapiens/genome/genome.multi_intervals.bed" genome_sizes = "${test_data_dir}/genomics/homo_sapiens/genome/genome.sizes" genome_bed = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed" genome_header = "${test_data_dir}/genomics/homo_sapiens/genome/genome.header" From dd458e3388d50212e447e85794f1b027abda5c93 Mon Sep 17 00:00:00 2001 From: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> Date: Fri, 6 May 2022 18:57:17 +0200 Subject: [PATCH 307/313] fix tags --- tests/modules/snapaligner/align/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/snapaligner/align/test.yml b/tests/modules/snapaligner/align/test.yml index 9cc7e230..4e4fae61 100644 --- a/tests/modules/snapaligner/align/test.yml +++ b/tests/modules/snapaligner/align/test.yml @@ -1,7 +1,7 @@ - name: snapaligner align test_snapaligner_single command: nextflow run tests/modules/snapaligner/align -entry test_snapaligner_single -c tests/config/nextflow.config tags: - - snapaligner/single + - snapaligner/align - snapaligner files: - path: output/snapaligner/test.bam @@ -11,7 +11,7 @@ - name: snapaligner align test_snapaligner_paired command: nextflow run tests/modules/snapaligner/align -entry test_snapaligner_paired -c tests/config/nextflow.config tags: - - snapaligner/paired + - snapaligner/align - snapaligner files: - path: output/snapaligner/test.bam From 1013be2623c074dc3b0e6ed7a37185188c5305f0 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Sat, 7 May 2022 15:22:52 +0200 Subject: [PATCH 308/313] fix path to script --- tests/subworkflows/nf-core/annotation/snpeff/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/subworkflows/nf-core/annotation/snpeff/main.nf b/tests/subworkflows/nf-core/annotation/snpeff/main.nf index 4aee20ee..bb56b46b 100644 --- a/tests/subworkflows/nf-core/annotation/snpeff/main.nf +++ b/tests/subworkflows/nf-core/annotation/snpeff/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { ANNOTATION_SNPEFF } from '../../../../../subworkflows/nf-core/annotation_snpeff/main' +include { ANNOTATION_SNPEFF } from '../../../../../subworkflows/nf-core/annotation/snpeff/main' workflow annotation_snpeff { input = [ From 3d428e29332f1b332b7ffa1f36f8838a6fd90f0b Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Sat, 7 May 2022 15:28:40 +0200 Subject: [PATCH 309/313] fix spacing --- tests/config/test_data.config | 254 +++++++++++++++++----------------- 1 file changed, 127 insertions(+), 127 deletions(-) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 6fd65ab7..4ff6efd9 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -125,7 +125,7 @@ params { genome_gff3 = "${test_data_dir}/genomics/homo_sapiens/genome/genome.gff3" genome_gtf = "${test_data_dir}/genomics/homo_sapiens/genome/genome.gtf" genome_interval_list = "${test_data_dir}/genomics/homo_sapiens/genome/genome.interval_list" - genome_multi_interval_bed = "${test_data_dir}/genomics/homo_sapiens/genome/genome.multi_intervals.bed" + genome_multi_interval_bed = "${test_data_dir}/genomics/homo_sapiens/genome/genome.multi_intervals.bed" genome_sizes = "${test_data_dir}/genomics/homo_sapiens/genome/genome.sizes" genome_bed = "${test_data_dir}/genomics/homo_sapiens/genome/genome.bed" genome_header = "${test_data_dir}/genomics/homo_sapiens/genome/genome.header" @@ -182,16 +182,16 @@ params { vcfanno_toml = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/vcfanno/vcfanno.toml" } 'pangenome' { - pangenome_fa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa" - pangenome_fa_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz" - 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" - pangenome_smoothxg_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.smoothxg.gfa" - pangenome_gfaffix_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.gfaffix.gfa" + pangenome_fa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa" + pangenome_fa_gz = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.fa.gz" + 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" + pangenome_smoothxg_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.smoothxg.gfa" + pangenome_gfaffix_gfa = "${test_data_dir}/pangenomics/homo_sapiens/pangenome.gfaffix.gfa" 'odgi' { - pangenome_og = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.og" - pangenome_lay = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.lay" + pangenome_og = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.og" + pangenome_lay = "${test_data_dir}/pangenomics/homo_sapiens/odgi/pangenome.lay" } } 'illumina' { @@ -212,131 +212,131 @@ params { test_paired_end_hla = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/example_hla_pe.bam" test_paired_end_hla_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/example_hla_pe.sorted.bam" test_paired_end_hla_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/example_hla_pe.sorted.bam.bai" - test2_paired_end_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam" - test2_paired_end_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam.bai" - test2_paired_end_name_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.name.sorted.bam" - test2_paired_end_markduplicates_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.markduplicates.sorted.bam" - test2_paired_end_markduplicates_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.markduplicates.sorted.bam.bai" - test2_paired_end_recalibrated_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam" - test2_paired_end_recalibrated_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai" - test2_paired_end_umi_consensus_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_consensus.bam" - test2_paired_end_umi_converted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_converted.bam" - test2_paired_end_umi_grouped_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_grouped.bam" - test2_paired_end_umi_histogram_txt = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_histogram.txt" - test2_paired_end_umi_unsorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_unsorted.bam" - test2_paired_end_umi_unsorted_tagged_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.unsorted_tagged.bam" + test2_paired_end_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam" + test2_paired_end_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.sorted.bam.bai" + test2_paired_end_name_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.name.sorted.bam" + test2_paired_end_markduplicates_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.markduplicates.sorted.bam" + test2_paired_end_markduplicates_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.markduplicates.sorted.bam.bai" + test2_paired_end_recalibrated_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam" + test2_paired_end_recalibrated_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai" + test2_paired_end_umi_consensus_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_consensus.bam" + test2_paired_end_umi_converted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_converted.bam" + test2_paired_end_umi_grouped_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_grouped.bam" + test2_paired_end_umi_histogram_txt = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_histogram.txt" + test2_paired_end_umi_unsorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.umi_unsorted.bam" + test2_paired_end_umi_unsorted_tagged_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/umi/test2.paired_end.unsorted_tagged.bam" - mitochon_standin_recalibrated_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/mitochon_standin.recalibrated.sorted.bam" - mitochon_standin_recalibrated_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/mitochon_standin.recalibrated.sorted.bam.bai" + mitochon_standin_recalibrated_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/mitochon_standin.recalibrated.sorted.bam" + mitochon_standin_recalibrated_sorted_bam_bai = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/mitochon_standin.recalibrated.sorted.bam.bai" - test_paired_end_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram" - test_paired_end_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai" - test_paired_end_markduplicates_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.markduplicates.sorted.cram" - test_paired_end_markduplicates_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.markduplicates.sorted.cram.crai" - test_paired_end_recalibrated_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram" - test_paired_end_recalibrated_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai" + test_paired_end_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram" + test_paired_end_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai" + test_paired_end_markduplicates_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.markduplicates.sorted.cram" + test_paired_end_markduplicates_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.markduplicates.sorted.cram.crai" + test_paired_end_recalibrated_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram" + test_paired_end_recalibrated_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test.paired_end.recalibrated.sorted.cram.crai" - test2_paired_end_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.sorted.cram" - test2_paired_end_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.sorted.cram.crai" - test2_paired_end_markduplicates_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.markduplicates.sorted.cram" - test2_paired_end_markduplicates_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.markduplicates.sorted.cram.crai" - test2_paired_end_recalibrated_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram" - test2_paired_end_recalibrated_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram.crai" + test2_paired_end_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.sorted.cram" + test2_paired_end_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.sorted.cram.crai" + test2_paired_end_markduplicates_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.markduplicates.sorted.cram" + test2_paired_end_markduplicates_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.markduplicates.sorted.cram.crai" + test2_paired_end_recalibrated_sorted_cram = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram" + test2_paired_end_recalibrated_sorted_cram_crai = "${test_data_dir}/genomics/homo_sapiens/illumina/cram/test2.paired_end.recalibrated.sorted.cram.crai" - test_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz" - test_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz" - test_umi_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz" - test_umi_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz" - test2_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2_1.fastq.gz" - test2_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2_2.fastq.gz" - test2_umi_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2.umi_1.fastq.gz" - test2_umi_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2.umi_2.fastq.gz" - test_rnaseq_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz" - test_rnaseq_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz" + test_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_1.fastq.gz" + test_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_2.fastq.gz" + test_umi_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.umi_1.fastq.gz" + test_umi_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test.umi_2.fastq.gz" + test2_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2_1.fastq.gz" + test2_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2_2.fastq.gz" + test2_umi_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2.umi_1.fastq.gz" + test2_umi_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test2.umi_2.fastq.gz" + test_rnaseq_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_rnaseq_1.fastq.gz" + test_rnaseq_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/fastq/test_rnaseq_2.fastq.gz" - test_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test.baserecalibrator.table" - test2_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test2.baserecalibrator.table" - test_pileups_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test.pileups.table" - test2_pileups_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test2.pileups.table" + test_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test.baserecalibrator.table" + test2_baserecalibrator_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test2.baserecalibrator.table" + test_pileups_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test.pileups.table" + test2_pileups_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test2.pileups.table" - test_genomicsdb_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_genomicsdb.tar.gz" - test_pon_genomicsdb_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_pon_genomicsdb.tar.gz" + test_genomicsdb_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_genomicsdb.tar.gz" + test_pon_genomicsdb_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_pon_genomicsdb.tar.gz" - test2_haplotc_ann_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz" - test2_haplotc_ann_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi" + test2_haplotc_ann_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz" + test2_haplotc_ann_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.ann.vcf.gz.tbi" - test2_recal = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.recal" - test2_recal_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.recal.idx" - test2_tranches = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.tranches" - test2_allele_specific_recal = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2_allele_specific.recal" - test2_allele_specific_recal_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2_allele_specific.recal.idx" - test2_allele_specific_tranches = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2_allele_specific.tranches" + test2_recal = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.recal" + test2_recal_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.recal.idx" + test2_tranches = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2.tranches" + test2_allele_specific_recal = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2_allele_specific.recal" + test2_allele_specific_recal_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2_allele_specific.recal.idx" + test2_allele_specific_tranches = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/variantrecalibrator/test2_allele_specific.tranches" - test_test2_paired_mutect2_calls_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz" - test_test2_paired_mutect2_calls_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.tbi" - test_test2_paired_mutect2_calls_vcf_gz_stats = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.stats" - test_test2_paired_mutect2_calls_f1r2_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.f1r2.tar.gz" - test_test2_paired_mutect2_calls_artifact_prior_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_test2_paired_mutect2_calls.artifact-prior.tar.gz" - test_test2_paired_segmentation_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_test2_paired.segmentation.table" - test_test2_paired_contamination_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_test2_paired.contamination.table" + test_test2_paired_mutect2_calls_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz" + test_test2_paired_mutect2_calls_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.tbi" + test_test2_paired_mutect2_calls_vcf_gz_stats = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.vcf.gz.stats" + test_test2_paired_mutect2_calls_f1r2_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/paired_mutect2_calls/test_test2_paired_mutect2_calls.f1r2.tar.gz" + test_test2_paired_mutect2_calls_artifact_prior_tar_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_test2_paired_mutect2_calls.artifact-prior.tar.gz" + test_test2_paired_segmentation_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_test2_paired.segmentation.table" + test_test2_paired_contamination_table = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/test_test2_paired.contamination.table" - test_genome_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf" - test_genome_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz" - test_genome_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi" - test_genome_vcf_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.idx" + test_genome_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf" + test_genome_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz" + test_genome_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi" + test_genome_vcf_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.idx" - test2_genome_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf" - test2_genome_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.gz" - test2_genome_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.gz.tbi" - test2_genome_vcf_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.idx" + test2_genome_vcf = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf" + test2_genome_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.gz" + test2_genome_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.gz.tbi" + test2_genome_vcf_idx = "${test_data_dir}/genomics/homo_sapiens/illumina/gvcf/test2.genome.vcf.idx" - test_genome21_indels_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.genome_21.somatic_sv.vcf.gz" - test_genome21_indels_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.genome_21.somatic_sv.vcf.gz.tbi" + test_genome21_indels_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.genome_21.somatic_sv.vcf.gz" + test_genome21_indels_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/vcf/test.genome_21.somatic_sv.vcf.gz.tbi" - test_mpileup = "${test_data_dir}/genomics/homo_sapiens/illumina/mpileup/test.mpileup.gz" - test2_mpileup = "${test_data_dir}/genomics/homo_sapiens/illumina/mpileup/test2.mpileup.gz" + test_mpileup = "${test_data_dir}/genomics/homo_sapiens/illumina/mpileup/test.mpileup.gz" + test2_mpileup = "${test_data_dir}/genomics/homo_sapiens/illumina/mpileup/test2.mpileup.gz" - test_broadpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/broadpeak/test.broadPeak" - test2_broadpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/broadpeak/test2.broadPeak" + test_broadpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/broadpeak/test.broadPeak" + test2_broadpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/broadpeak/test2.broadPeak" - test_narrowpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/narrowpeak/test.narrowPeak" - test2_narrowpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/narrowpeak/test2.narrowPeak" + test_narrowpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/narrowpeak/test.narrowPeak" + test2_narrowpeak = "${test_data_dir}/genomics/homo_sapiens/illumina/narrowpeak/test2.narrowPeak" - test_10x_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/10xgenomics/test_10x_S1_L001_R1_001.fastq.gz" - test_10x_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/10xgenomics/test_10x_S1_L001_R2_001.fastq.gz" + test_10x_1_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/10xgenomics/test_10x_S1_L001_R1_001.fastq.gz" + test_10x_2_fastq_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/10xgenomics/test_10x_S1_L001_R2_001.fastq.gz" - test_yak = "${test_data_dir}/genomics/homo_sapiens/illumina/yak/test.yak" - test2_yak = "${test_data_dir}/genomics/homo_sapiens/illumina/yak/test2.yak" + test_yak = "${test_data_dir}/genomics/homo_sapiens/illumina/yak/test.yak" + test2_yak = "${test_data_dir}/genomics/homo_sapiens/illumina/yak/test2.yak" - cutandrun_bedgraph_test_1 = "${test_data_dir}/genomics/homo_sapiens/illumina/bedgraph/cutandtag_h3k27me3_test_1.bedGraph" - cutandrun_bedgraph_test_2 = "${test_data_dir}/genomics/homo_sapiens/illumina/bedgraph/cutandtag_igg_test_1.bedGraph" + cutandrun_bedgraph_test_1 = "${test_data_dir}/genomics/homo_sapiens/illumina/bedgraph/cutandtag_h3k27me3_test_1.bedGraph" + 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" + 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" - test_pytor = "${test_data_dir}/genomics/homo_sapiens/illumina/pytor/test.pytor" + test_pytor = "${test_data_dir}/genomics/homo_sapiens/illumina/pytor/test.pytor" } 'pacbio' { - primers = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/primers.fasta" - alz = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.bam" - alzpbi = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.bam.pbi" - ccs = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.bam" - ccs_fa = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/alz.ccs.fasta" - ccs_fa_gz = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/alz.ccs.fasta.gz" - ccs_fq = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/alz.ccs.fastq" - ccs_fq_gz = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/alz.ccs.fastq.gz" - ccs_xml = "${test_data_dir}/genomics/homo_sapiens/pacbio/xml/alz.ccs.consensusreadset.xml" - hifi = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/test_hifi.fastq.gz" - lima = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.bam" - refine = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.bam" - cluster = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.bam" - singletons = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.bam" - aligned = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam" - alignedbai = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam.bai" - genemodel1 = "${test_data_dir}/genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.bed" - genemodel2 = "${test_data_dir}/genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.2.bed" - filelist = "${test_data_dir}/genomics/homo_sapiens/pacbio/txt/filelist.txt" + primers = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/primers.fasta" + alz = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.bam" + alzpbi = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.bam.pbi" + ccs = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.bam" + ccs_fa = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/alz.ccs.fasta" + ccs_fa_gz = "${test_data_dir}/genomics/homo_sapiens/pacbio/fasta/alz.ccs.fasta.gz" + ccs_fq = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/alz.ccs.fastq" + ccs_fq_gz = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/alz.ccs.fastq.gz" + ccs_xml = "${test_data_dir}/genomics/homo_sapiens/pacbio/xml/alz.ccs.consensusreadset.xml" + hifi = "${test_data_dir}/genomics/homo_sapiens/pacbio/fastq/test_hifi.fastq.gz" + lima = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.bam" + refine = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.bam" + cluster = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.bam" + singletons = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.bam" + aligned = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam" + alignedbai = "${test_data_dir}/genomics/homo_sapiens/pacbio/bam/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned.bam.bai" + genemodel1 = "${test_data_dir}/genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.bed" + genemodel2 = "${test_data_dir}/genomics/homo_sapiens/pacbio/bed/alz.ccs.fl.NEB_5p--NEB_Clontech_3p.flnc.clustered.singletons.merged.aligned_tc.2.bed" + filelist = "${test_data_dir}/genomics/homo_sapiens/pacbio/txt/filelist.txt" } } 'bacteroides_fragilis' { @@ -394,31 +394,31 @@ params { } 'generic' { 'csv' { - test_csv = "${test_data_dir}/generic/csv/test.csv" + test_csv = "${test_data_dir}/generic/csv/test.csv" } 'notebooks' { - rmarkdown = "${test_data_dir}/generic/notebooks/rmarkdown/rmarkdown_notebook.Rmd" - ipython_md = "${test_data_dir}/generic/notebooks/jupyter/ipython_notebook.md" - ipython_ipynb = "${test_data_dir}/generic/notebooks/jupyter/ipython_notebook.ipynb" + rmarkdown = "${test_data_dir}/generic/notebooks/rmarkdown/rmarkdown_notebook.Rmd" + ipython_md = "${test_data_dir}/generic/notebooks/jupyter/ipython_notebook.md" + ipython_ipynb = "${test_data_dir}/generic/notebooks/jupyter/ipython_notebook.ipynb" } 'tsv' { - test_tsv = "${test_data_dir}/generic/tsv/test.tsv" + test_tsv = "${test_data_dir}/generic/tsv/test.tsv" } 'txt' { - hello = "${test_data_dir}/generic/txt/hello.txt" + hello = "${test_data_dir}/generic/txt/hello.txt" } 'cnn' { - reference = "${test_data_dir}/generic/cnn/reference.cnn" + reference = "${test_data_dir}/generic/cnn/reference.cnn" } 'cooler'{ - test_pairix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz" - test_pairix_pair_gz_px2 = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz.px2" - test_pairs_pair = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.sample1.pairs" - test_tabix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.sorted.possrt.txt.gz" - test_tabix_pair_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.sorted.possrt.txt.gz.tbi" - hg19_chrom_sizes = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.chrom.sizes" - test_merge_cool = "${test_data_dir}/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cool" - test_merge_cool_cp2 = "${test_data_dir}/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cp2.cool" + test_pairix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz" + test_pairix_pair_gz_px2 = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.blksrt.txt.gz.px2" + test_pairs_pair = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.sample1.pairs" + test_tabix_pair_gz = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.sorted.possrt.txt.gz" + test_tabix_pair_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.GM12878-MboI.pairs.subsample.sorted.possrt.txt.gz.tbi" + hg19_chrom_sizes = "${test_data_dir}/genomics/homo_sapiens/cooler/cload/hg19/hg19.chrom.sizes" + test_merge_cool = "${test_data_dir}/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cool" + test_merge_cool_cp2 = "${test_data_dir}/genomics/homo_sapiens/cooler/merge/toy/toy.symm.upper.2.cp2.cool" } } From 4591ea2205d305d6bf27511571eb98ff7e4b9052 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 9 May 2022 07:58:58 +0000 Subject: [PATCH 310/313] atomize --- modules/meryl/count/main.nf | 14 ++------- modules/meryl/count/meta.yml | 37 +++++++++-------------- tests/modules/meryl/count/main.nf | 2 +- tests/modules/meryl/count/nextflow.config | 1 - 4 files changed, 18 insertions(+), 36 deletions(-) diff --git a/modules/meryl/count/main.nf b/modules/meryl/count/main.nf index 80491242..f7a2811d 100644 --- a/modules/meryl/count/main.nf +++ b/modules/meryl/count/main.nf @@ -11,15 +11,14 @@ process MERYL_COUNT { tuple val(meta), path(reads) output: - tuple val(meta), path("*.meryl"), emit: meryl - path "versions.yml" , emit: versions + tuple val(meta), path("*.meryldb"), emit: meryl_db + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ for READ in $reads; do @@ -27,15 +26,8 @@ process MERYL_COUNT { threads=$task.cpus \\ $args \\ $reads \\ - output read.\${READ%.f*}.meryl + output read.\${READ%.f*}.meryldb done - meryl union-sum \\ - threads=$task.cpus \\ - $args2 \\ - output ${prefix}.meryl - - # clean up - rm -rf read.*.meryl cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/meryl/count/meta.yml b/modules/meryl/count/meta.yml index 885267ec..dd59decd 100644 --- a/modules/meryl/count/meta.yml +++ b/modules/meryl/count/meta.yml @@ -1,51 +1,42 @@ name: "meryl_count" -## TODO nf-core: Add a description of the module and list keywords -description: write your description here +description: A genomic k-mer counter (and sequence utility) with nice features. keywords: - - sort + - k-mer + - count tools: - "meryl": - ## TODO nf-core: Add a description and other details for the software below - description: "" - homepage: "{}" - documentation: "{}" - tool_dev_url: "{}" + description: "A genomic k-mer counter (and sequence utility) with nice features. " + homepage: "https://github.com/marbl/meryl" + documentation: "https://meryl.readthedocs.io/en/latest/quick-start.html" + tool_dev_url: "https://github.com/marbl/meryl" doi: "" licence: "['GPL']" -## TODO nf-core: Add a description of all of the variables used as input input: - # Only when we have meta - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - # - ## TODO nf-core: Delete / customise this example input - - bam: + - reads: type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. -## TODO nf-core: Add a description of all of the variables used as output output: - #Only when we have meta - 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 - - bam: - type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + - meryl_db: + type: directory + description: A Meryl k-mer database authors: - "@mahesh-panchal" diff --git a/tests/modules/meryl/count/main.nf b/tests/modules/meryl/count/main.nf index 8706046a..7d65b7dd 100644 --- a/tests/modules/meryl/count/main.nf +++ b/tests/modules/meryl/count/main.nf @@ -4,7 +4,7 @@ nextflow.enable.dsl = 2 include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf' -workflow test_meryl_count_single_end { +workflow test_meryl_count { input = [ [ id:'test' ], // meta map diff --git a/tests/modules/meryl/count/nextflow.config b/tests/modules/meryl/count/nextflow.config index 99e1f846..6d899c50 100644 --- a/tests/modules/meryl/count/nextflow.config +++ b/tests/modules/meryl/count/nextflow.config @@ -2,6 +2,5 @@ process { publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } ext.args = 'k=21' - ext.args2 = 'k=21' } From 9ebeb6a702650f88906ce8d0cbf98bed158832a8 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 9 May 2022 08:05:07 +0000 Subject: [PATCH 311/313] Update test --- tests/modules/meryl/count/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/modules/meryl/count/test.yml b/tests/modules/meryl/count/test.yml index 0565bd1a..5437966c 100644 --- a/tests/modules/meryl/count/test.yml +++ b/tests/modules/meryl/count/test.yml @@ -1,8 +1,8 @@ -- name: meryl count test_meryl_count_single_end - command: nextflow run tests/modules/meryl/count -entry test_meryl_count_single_end -c tests/config/nextflow.config +- name: meryl count test_meryl_count + command: nextflow run tests/modules/meryl/count -entry test_meryl_count -c tests/config/nextflow.config tags: - - meryl/count - meryl + - meryl/count files: - path: output/meryl/versions.yml - md5sum: 5fe537d873925ccbcc4edf0983e9eda0 + md5sum: 9bc9470c2eff996026781d5ff8c2b369 From a43bc940d6aaeaa755b34484cffeb5b41bce92eb Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 9 May 2022 11:15:14 +0000 Subject: [PATCH 312/313] Add suggestions from code review --- modules/meryl/count/meta.yml | 1 + tests/modules/meryl/count/main.nf | 17 +++++++++++++++-- tests/modules/meryl/count/test.yml | 17 +++++++++++++---- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/modules/meryl/count/meta.yml b/modules/meryl/count/meta.yml index dd59decd..854f8759 100644 --- a/modules/meryl/count/meta.yml +++ b/modules/meryl/count/meta.yml @@ -37,6 +37,7 @@ output: - meryl_db: type: directory description: A Meryl k-mer database + pattern: "*.meryldb" authors: - "@mahesh-panchal" diff --git a/tests/modules/meryl/count/main.nf b/tests/modules/meryl/count/main.nf index 7d65b7dd..3c9a64c7 100644 --- a/tests/modules/meryl/count/main.nf +++ b/tests/modules/meryl/count/main.nf @@ -4,12 +4,25 @@ nextflow.enable.dsl = 2 include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf' -workflow test_meryl_count { +workflow test_meryl_count_single_end { input = [ - [ id:'test' ], // meta map + [ id:'test' , single_end: true ], // meta map file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] MERYL_COUNT ( input ) } + +workflow test_meryl_count_paired_end { + + input = [ + [ id:'test' , single_end: false ], // meta map + [ + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) + ] + ] + + MERYL_COUNT ( input ) +} diff --git a/tests/modules/meryl/count/test.yml b/tests/modules/meryl/count/test.yml index 5437966c..6291a62f 100644 --- a/tests/modules/meryl/count/test.yml +++ b/tests/modules/meryl/count/test.yml @@ -1,8 +1,17 @@ -- name: meryl count test_meryl_count - command: nextflow run tests/modules/meryl/count -entry test_meryl_count -c tests/config/nextflow.config +- name: meryl count test_meryl_count_single_end + command: nextflow run tests/modules/meryl/count -entry test_meryl_count_single_end -c tests/config/nextflow.config tags: - - meryl - meryl/count + - meryl files: - path: output/meryl/versions.yml - md5sum: 9bc9470c2eff996026781d5ff8c2b369 + md5sum: 5fe537d873925ccbcc4edf0983e9eda0 + +- name: meryl count test_meryl_count_paired_end + command: nextflow run tests/modules/meryl/count -entry test_meryl_count_paired_end -c tests/config/nextflow.config + tags: + - meryl/count + - meryl + files: + - path: output/meryl/versions.yml + md5sum: 4961f13cfb60ba8764ed666e70dbf12c From 453d5b66a47b0a1e3e06c254a01699703eced3a6 Mon Sep 17 00:00:00 2001 From: Jasmin F <73216762+jasmezz@users.noreply.github.com> Date: Mon, 9 May 2022 14:46:18 +0200 Subject: [PATCH 313/313] Add Bacteroides fragilis GFF file --- tests/config/test_data.config | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 4ff6efd9..c4f470a4 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -345,6 +345,7 @@ params { genome_gbff_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.gbff.gz" genome_paf = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.paf" genome_mapping_potential_arg = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.mapping.potential.ARG" + genome_gff_gz = "${test_data_dir}/genomics/prokaryotes/bacteroides_fragilis/genome/genome.gff.gz" } 'illumina' {