From 38b450d0be865af4f60dd4674a4fc47ddbf1e6e1 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sidorov Date: Tue, 16 Mar 2021 09:54:29 +0000 Subject: [PATCH 001/239] 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/239] 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/239] 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/239] 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/239] 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/239] 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 b412e6dabc99ea1b1bae07e09a4dbcb6e92e5439 Mon Sep 17 00:00:00 2001 From: Priyanka Surana Date: Thu, 27 Jan 2022 14:36:18 +0000 Subject: [PATCH 007/239] 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 008/239] 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 009/239] 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 010/239] 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 9446428976cef86d2cd5d746adb4a08fed4e3ba0 Mon Sep 17 00:00:00 2001 From: Rike Date: Tue, 29 Mar 2022 19:01:01 +0200 Subject: [PATCH 011/239] Fix typo --- modules/controlfreec/freec/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/controlfreec/freec/main.nf b/modules/controlfreec/freec/main.nf index ba48ea1e..eb66eeaa 100644 --- a/modules/controlfreec/freec/main.nf +++ b/modules/controlfreec/freec/main.nf @@ -41,7 +41,7 @@ process CONTROLFREEC_FREEC { def chr_length = fai ? "chrLenFile = \${PWD}/${fai}" : "" def breakpointthreshold = task.ext.args?["general"]?["breakpointthreshold"] ? "breakPointThreshold = ${task.ext.args["general"]["breakpointthreshold"]}" : "" def breakpointtype = task.ext.args?["general"]?["breakpointtype"] ? "breakPointType = ${task.ext.args["general"]["breakpointtype"]}" : "" - def coefficientofvariation = task.ext.args?["general"]?["coefficient"] ? "coefficientOfVariation = ${task.ext.args["general"]["coefficientofvariation"]}" : "" + def coefficientofvariation = task.ext.args?["general"]?["coefficientofvariation"] ? "coefficientOfVariation = ${task.ext.args["general"]["coefficientofvariation"]}" : "" def contamination = task.ext.args?["general"]?["contamination"] ? "contamination = ${task.ext.args["general"]["contamination"]}" : "" def contaminationadjustment = task.ext.args?["general"]?["contaminationadjustment"] ? "contaminationAdjustment = ${task.ext.args["general"]["contaminationadjustment"]}" : "" def degree = task.ext.args?["general"]?["degree"] ? "degree = ${task.ext.args["general"]["degree"]}" : "" From ee04fc27377391c39cacd79641301f87af48cc4d Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Thu, 14 Apr 2022 12:56:42 -0400 Subject: [PATCH 012/239] 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 013/239] 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 014/239] 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 015/239] 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 016/239] 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 017/239] 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 018/239] 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 019/239] 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 020/239] 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 0095bc91f7d8b7a2154f321ba8567ddd8b39bf46 Mon Sep 17 00:00:00 2001 From: "Robert A. Petit III" Date: Thu, 21 Apr 2022 18:49:42 +0000 Subject: [PATCH 021/239] 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 022/239] 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 c2d2399107852aed6bd8e3875cc7bf0cbc89bbb3 Mon Sep 17 00:00:00 2001 From: "Robert A. Petit III" Date: Fri, 22 Apr 2022 08:49:44 -0600 Subject: [PATCH 023/239] 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 024c992ca77d6bf5e4baddae30a38cd14d526042 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 27 Apr 2022 11:12:58 +0200 Subject: [PATCH 024/239] 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 025/239] 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 7956d38e61a8efdd2fffcb6cf33f4a02ad73bc50 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 27 Apr 2022 13:18:46 +0200 Subject: [PATCH 026/239] 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 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 027/239] 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 028/239] 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 029/239] 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 030/239] 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 031/239] 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 032/239] 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 033/239] 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 034/239] 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 035/239] 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 9df830f79dc70a347578120e797a4e3160dfc66d Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 10:23:07 +0200 Subject: [PATCH 036/239] 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 45b4a61a15c8b7ac6c29a447ccc1ece9f08f8efe Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 13:31:37 +0200 Subject: [PATCH 037/239] 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 8c98a78d2a0e12d081184736e17ccde3feee3f44 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 14:07:55 +0200 Subject: [PATCH 038/239] 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 039/239] 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 bf186044716cb0621f31ccc4727ad4a0fb7c81b9 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 14:29:37 +0200 Subject: [PATCH 040/239] 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 041/239] 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 6678ad4426664076d912dab488ea641f44c1fdb6 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Thu, 28 Apr 2022 14:54:20 +0200 Subject: [PATCH 042/239] 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 043/239] 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 044/239] 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 045/239] 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 5be6afd6b1e9b4362ad9f3e43e4a93e0ef4af423 Mon Sep 17 00:00:00 2001 From: "Jill V. Hagey, PhD" Date: Thu, 28 Apr 2022 12:29:39 -0400 Subject: [PATCH 046/239] 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 047/239] 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 048/239] 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 049/239] 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 050/239] 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 051/239] 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 052/239] 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 053/239] 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 054/239] 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 055/239] 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 056/239] 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 20787514d91b5fc699e85b8a1558b5b4de97f451 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Fri, 29 Apr 2022 15:11:21 +0200 Subject: [PATCH 057/239] 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 058/239] 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 059/239] 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 41fd2d15576ba669a7aaec281a9d95de219185f4 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Fri, 29 Apr 2022 17:52:12 +0200 Subject: [PATCH 060/239] 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 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 061/239] 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 062/239] 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 6b64f9cb6c3dd3577931cc3cd032d6fb730000ce Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 10:34:14 +0200 Subject: [PATCH 063/239] 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 064/239] 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 08d5acbeb6c9e1b113ef3a0f4d32a6a1dbe522fe Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 11:59:08 +0200 Subject: [PATCH 065/239] 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 f231291e7730654158cbd3f10b82c292e27fa273 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 12:58:12 +0200 Subject: [PATCH 066/239] 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 067/239] 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 3a4e415fe21982ccb39807d71c16e7d6ad0a1c1a Mon Sep 17 00:00:00 2001 From: Lucpen Date: Mon, 2 May 2022 13:30:18 +0200 Subject: [PATCH 068/239] 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 069/239] 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 070/239] 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 071/239] 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 31dd31079d8f2968dcd39eb3e4eca5687467d634 Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Mon, 2 May 2022 08:41:41 -0400 Subject: [PATCH 072/239] 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 073/239] 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 074/239] 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 075/239] 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 076/239] 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 077/239] 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 078/239] 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 700d6ab3f1a5596a2c9bbdd22c763644061580a8 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 16:55:18 +0200 Subject: [PATCH 079/239] 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 2e4c200a26ecb6dd63f2c95e5ab619d99e7a7582 Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Mon, 2 May 2022 17:13:20 +0200 Subject: [PATCH 080/239] 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 081/239] 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 082/239] 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 083/239] 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 084/239] 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 085/239] 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 086/239] 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 087/239] 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 088/239] 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 089/239] 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 090/239] 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 091/239] 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 092/239] 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 093/239] 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 094/239] 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 095/239] 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 096/239] 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 097/239] 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 098/239] 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 099/239] 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 100/239] 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 101/239] 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 102/239] 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 103/239] 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 104/239] 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 105/239] 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 106/239] 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 107/239] 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 108/239] 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 109/239] 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 110/239] 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 111/239] 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 112/239] 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 113/239] 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 114/239] 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 115/239] 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 116/239] 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 117/239] 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 118/239] 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 119/239] 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 120/239] 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 121/239] 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 122/239] 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 123/239] 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 124/239] 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 125/239] 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 126/239] 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 127/239] 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 128/239] 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 129/239] 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 130/239] 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 131/239] 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 132/239] 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 133/239] 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 134/239] 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 135/239] 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 136/239] 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 137/239] 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 138/239] 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 139/239] 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 140/239] 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 141/239] 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 142/239] 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 143/239] 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 144/239] 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 145/239] 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 146/239] 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 147/239] 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 148/239] 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 149/239] 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 150/239] 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 151/239] 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 152/239] 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 153/239] 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 154/239] 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 155/239] 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 156/239] 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 3c076024435704be6ed13a0fa715a4c11d1c8825 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Wed, 4 May 2022 16:51:09 +0200 Subject: [PATCH 157/239] Added the version.yml --- modules/rtgtools/vcfeval/main.nf | 67 +++++++++++++++++++ modules/rtgtools/vcfeval/meta.yml | 51 ++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/rtgtools/vcfeval/main.nf | 15 +++++ .../modules/rtgtools/vcfeval/nextflow.config | 5 ++ tests/modules/rtgtools/vcfeval/test.yml | 14 ++++ 6 files changed, 156 insertions(+) create mode 100644 modules/rtgtools/vcfeval/main.nf create mode 100644 modules/rtgtools/vcfeval/meta.yml create mode 100644 tests/modules/rtgtools/vcfeval/main.nf create mode 100644 tests/modules/rtgtools/vcfeval/nextflow.config create mode 100644 tests/modules/rtgtools/vcfeval/test.yml diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf new file mode 100644 index 00000000..4fd8aa4b --- /dev/null +++ b/modules/rtgtools/vcfeval/main.nf @@ -0,0 +1,67 @@ +// 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 RTGTOOLS_VCFEVAL { + 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::rtg-tools=3.12.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/rtg-tools:3.12.1--hdfd78af_0': + 'quay.io/biocontainers/rtg-tools:3.12.1--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) + + 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 ;) + """ + cat <<-END_VERSIONS > versions.yml + "${task.process}": + rtgtools: \$(echo \$(rtg version | head -n 1 | awk '{print \$4}')) + END_VERSIONS + """ +} diff --git a/modules/rtgtools/vcfeval/meta.yml b/modules/rtgtools/vcfeval/meta.yml new file mode 100644 index 00000000..512a7734 --- /dev/null +++ b/modules/rtgtools/vcfeval/meta.yml @@ -0,0 +1,51 @@ +name: "rtgtools_vcfeval" +## TODO nf-core: Add a description of the module and list keywords +description: write your description here +keywords: + - sort +tools: + - "rtgtools": + ## TODO nf-core: Add a description and other details for the software below + description: "RealTimeGenomics Tools -- Utilities for accurate VCF comparison and manipulation" + homepage: "None" + documentation: "None" + tool_dev_url: "None" + doi: "" + licence: "['BSD']" + +## 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 32a28477..f702deda 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1591,6 +1591,10 @@ rseqc/tin: - modules/rseqc/tin/** - tests/modules/rseqc/tin/** +rtgtools/vcfeval: + - modules/rtgtools/vcfeval/** + - tests/modules/rtgtools/vcfeval/** + salmon/index: - modules/salmon/index/** - tests/modules/salmon/index/** diff --git a/tests/modules/rtgtools/vcfeval/main.nf b/tests/modules/rtgtools/vcfeval/main.nf new file mode 100644 index 00000000..1a4297fc --- /dev/null +++ b/tests/modules/rtgtools/vcfeval/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { RTGTOOLS_VCFEVAL } from '../../../../modules/rtgtools/vcfeval/main.nf' + +workflow test_rtgtools_vcfeval { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + RTGTOOLS_VCFEVAL ( input ) +} diff --git a/tests/modules/rtgtools/vcfeval/nextflow.config b/tests/modules/rtgtools/vcfeval/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/rtgtools/vcfeval/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/rtgtools/vcfeval/test.yml b/tests/modules/rtgtools/vcfeval/test.yml new file mode 100644 index 00000000..862f4acd --- /dev/null +++ b/tests/modules/rtgtools/vcfeval/test.yml @@ -0,0 +1,14 @@ +## TODO nf-core: Please run the following command to build this file: +# nf-core modules create-test-yml rtgtools/vcfeval +- name: "rtgtools vcfeval" + command: nextflow run ./tests/modules/rtgtools/vcfeval -entry test_rtgtools_vcfeval -c ./tests/config/nextflow.config -c ./tests/modules/rtgtools/vcfeval/nextflow.config + tags: + - "rtgtools" + # + - "rtgtools/vcfeval" + # + files: + - path: "output/rtgtools/test.bam" + md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/rtgtools/versions.yml + md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b From 38faf040ecbae67abbc4d26623f30b1a9b763f2e Mon Sep 17 00:00:00 2001 From: Carpanzano Date: Wed, 4 May 2022 16:54:15 +0200 Subject: [PATCH 158/239] 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 159/239] 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 160/239] 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 161/239] 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 162/239] 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 163/239] 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 164/239] 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 165/239] 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 166/239] 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 167/239] 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 168/239] 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 169/239] 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 170/239] 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 171/239] 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 172/239] 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 173/239] 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 174/239] 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 175/239] 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 176/239] 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 177/239] 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 178/239] 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 179/239] 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 180/239] 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 181/239] 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 182/239] 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 183/239] 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 184/239] 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 84b354ab6a110861db68e0d3eb6b0e746d014845 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 6 May 2022 14:23:40 +0200 Subject: [PATCH 185/239] Added the rtgtools/vcfeval module --- modules/rtgtools/vcfeval/main.nf | 70 ++++++++++--------------- modules/rtgtools/vcfeval/meta.yml | 54 +++++++++++-------- tests/config/test_data.config | 4 ++ tests/modules/rtgtools/vcfeval/main.nf | 32 +++++++++-- tests/modules/rtgtools/vcfeval/test.yml | 29 ++++++---- 5 files changed, 113 insertions(+), 76 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index 4fd8aa4b..0b927a22 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -1,46 +1,18 @@ -// 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 RTGTOOLS_VCFEVAL { 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::rtg-tools=3.12.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/rtg-tools:3.12.1--hdfd78af_0': 'quay.io/biocontainers/rtg-tools:3.12.1--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) + tuple val(meta), path(truth_vcf), path(truth_vcf_tbi), path(query_vcf), path(query_vcf_tbi), path(bed) + path(sdf) 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 + tuple val(meta), path("*.txt"), emit: results path "versions.yml" , emit: versions when: @@ -49,19 +21,35 @@ process RTGTOOLS_VCFEVAL { 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 ;) + def regions = bed ? "--bed-regions=$bed" : "" + def truth_index = truth_vcf_tbi ? "" : "rtg index $truth_vcf" + def query_index = query_vcf_tbi ? "" : "rtg index $query_vcf" + + sdf_basename = sdf.getBaseName().replace(".tar","") + tar_decomp = "" + if((sdf =~ /.tar.gz\b/).find() == true) { + tar_decomp = "tar -xzf $sdf" + } + """ + $tar_decomp + + $truth_index + $query_index + + rtg vcfeval \\ + $args \\ + --baseline=$truth_vcf \\ + $regions \\ + --calls=$query_vcf \\ + --output=$prefix \\ + --template=$sdf_basename \\ + --threads=$task.cpus \\ + > ${prefix}_results.txt + cat <<-END_VERSIONS > versions.yml "${task.process}": - rtgtools: \$(echo \$(rtg version | head -n 1 | awk '{print \$4}')) + rtg-tools: \$(echo \$(rtg version | head -n 1 | awk '{print \$4}')) END_VERSIONS """ } diff --git a/modules/rtgtools/vcfeval/meta.yml b/modules/rtgtools/vcfeval/meta.yml index 512a7734..061ea876 100644 --- a/modules/rtgtools/vcfeval/meta.yml +++ b/modules/rtgtools/vcfeval/meta.yml @@ -1,51 +1,63 @@ name: "rtgtools_vcfeval" -## TODO nf-core: Add a description of the module and list keywords -description: write your description here +description: The VCFeval tool of RTG tools. It is used to evaluate called variants for agreement with a baseline variant set keywords: - - sort + - benchmarking + - vcf + - rtg-tools tools: - "rtgtools": - ## TODO nf-core: Add a description and other details for the software below description: "RealTimeGenomics Tools -- Utilities for accurate VCF comparison and manipulation" - homepage: "None" - documentation: "None" - tool_dev_url: "None" + homepage: "https://www.realtimegenomics.com/products/rtg-tools" + documentation: "https://github.com/RealTimeGenomics/rtg-tools" + tool_dev_url: "https://github.com/RealTimeGenomics/rtg-tools" doi: "" licence: "['BSD']" -## 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: + - truth_vcf: type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: A standard VCF to compare against + pattern: "*.{vcf,vcf.gz}" + - truth_vcf_index: + type: file + description: The index of the standard VCF (optional) + pattern: "*.tbi" + - query_vcf: + type: file + description: A VCF with called variants to benchmark against the standard + pattern: "*.{vcf,vcf.gz}" + - query_vcf_index: + type: file + description: The index of the called VCF (optional) + pattern: "*.tbi" + - bed: + type: file + description: The BED file of the called VCF + pattern: "*.bed" + - sdf: + type: folder/file + description: The SDF (RTG Sequence Data File) of the reference genome. Can be a folder or a tar-zipped folder. + pattern: "*.{,tar.gz}" -## 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: + - results: type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: A text file containing the results of the benchmark + pattern: "*.txt" authors: - "@nvnieuwk" diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 62e38c4d..5a204ae1 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -132,6 +132,7 @@ params { 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" + genome_21_sdf = "${test_data_dir}/genomics/homo_sapiens/genome/genome_sdf.tar.gz" genome_21_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta" genome_21_fasta_fai = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai" genome_21_dict = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.dict" @@ -263,6 +264,9 @@ params { 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_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.vcf.gz" + test2_haplotc_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/illumina/gatk/haplotypecaller_calls/test2_haplotc.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" diff --git a/tests/modules/rtgtools/vcfeval/main.nf b/tests/modules/rtgtools/vcfeval/main.nf index 1a4297fc..baf3c54d 100644 --- a/tests/modules/rtgtools/vcfeval/main.nf +++ b/tests/modules/rtgtools/vcfeval/main.nf @@ -7,9 +7,35 @@ include { RTGTOOLS_VCFEVAL } from '../../../../modules/rtgtools/vcfeval/main.nf' workflow test_rtgtools_vcfeval { input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz_tbi'], checkIfExists: true), + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) ] - RTGTOOLS_VCFEVAL ( input ) + sdf = Channel.value( + file(params.test_data['homo_sapiens']['genome']['genome_21_sdf']) + ) + + RTGTOOLS_VCFEVAL ( input, sdf ) +} + +workflow test_rtgtools_vcfeval_no_index { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), + [], + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz'], checkIfExists: true), + [], + file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + ] + + sdf = Channel.value( + file(params.test_data['homo_sapiens']['genome']['genome_21_sdf']) + ) + + RTGTOOLS_VCFEVAL ( input, sdf ) } diff --git a/tests/modules/rtgtools/vcfeval/test.yml b/tests/modules/rtgtools/vcfeval/test.yml index 862f4acd..73ed8cc6 100644 --- a/tests/modules/rtgtools/vcfeval/test.yml +++ b/tests/modules/rtgtools/vcfeval/test.yml @@ -1,14 +1,21 @@ -## TODO nf-core: Please run the following command to build this file: -# nf-core modules create-test-yml rtgtools/vcfeval -- name: "rtgtools vcfeval" - command: nextflow run ./tests/modules/rtgtools/vcfeval -entry test_rtgtools_vcfeval -c ./tests/config/nextflow.config -c ./tests/modules/rtgtools/vcfeval/nextflow.config +- name: rtgtools vcfeval test_rtgtools_vcfeval + command: nextflow run tests/modules/rtgtools/vcfeval -entry test_rtgtools_vcfeval -c tests/config/nextflow.config tags: - - "rtgtools" - # - - "rtgtools/vcfeval" - # + - rtgtools + - rtgtools/vcfeval files: - - path: "output/rtgtools/test.bam" - md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/rtgtools/test_results.txt + md5sum: 2e011aa6e54d258fcc3b45b2dda02ae4 - path: output/rtgtools/versions.yml - md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b + md5sum: 270ed7a5a8e347b251eb4aa2198f98e8 + +- name: rtgtools vcfeval test_rtgtools_vcfeval_no_index + command: nextflow run tests/modules/rtgtools/vcfeval -entry test_rtgtools_vcfeval_no_index -c tests/config/nextflow.config + tags: + - rtgtools + - rtgtools/vcfeval + files: + - path: output/rtgtools/test_results.txt + md5sum: 2e011aa6e54d258fcc3b45b2dda02ae4 + - path: output/rtgtools/versions.yml + md5sum: 8d0407000988c78fa43fe5cfe3d4449d From 0fa36e6777b968d8527966d6963e6ffdc7716592 Mon Sep 17 00:00:00 2001 From: Lucpen Date: Fri, 6 May 2022 15:26:34 +0200 Subject: [PATCH 186/239] 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 187/239] 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 188/239] 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 8c857dee3a3ea50a41e212ac2e8dda24b50c90f6 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 6 May 2022 16:16:57 +0200 Subject: [PATCH 189/239] Fixed the sdf folder fetching --- 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 5a204ae1..f8d6b948 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -132,7 +132,7 @@ params { 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" - genome_21_sdf = "${test_data_dir}/genomics/homo_sapiens/genome/genome_sdf.tar.gz" + genome_21_sdf = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome_sdf.tar.gz" genome_21_fasta = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta" genome_21_fasta_fai = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai" genome_21_dict = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.dict" From e271410017c52b6ada3008db313a702c8e005263 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Fri, 6 May 2022 16:21:32 +0200 Subject: [PATCH 190/239] Removed some whitespaces --- modules/rtgtools/vcfeval/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index 0b927a22..9daadd05 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -24,11 +24,11 @@ process RTGTOOLS_VCFEVAL { def regions = bed ? "--bed-regions=$bed" : "" def truth_index = truth_vcf_tbi ? "" : "rtg index $truth_vcf" def query_index = query_vcf_tbi ? "" : "rtg index $query_vcf" - + sdf_basename = sdf.getBaseName().replace(".tar","") tar_decomp = "" if((sdf =~ /.tar.gz\b/).find() == true) { - tar_decomp = "tar -xzf $sdf" + tar_decomp = "tar -xzf $sdf" } """ From 67481c6d543c8d84940376cb3b258354bb66f988 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Fri, 6 May 2022 15:04:04 +0000 Subject: [PATCH 191/239] 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 192/239] 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 193/239] 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 194/239] 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 195/239] 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 196/239] 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 197/239] 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 198/239] 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 199/239] 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 6fd9246aef346ba9975db049fcdbc9de7d6074f9 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Mon, 9 May 2022 08:07:33 +0200 Subject: [PATCH 200/239] Update modules/rtgtools/vcfeval/main.nf Co-authored-by: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> --- modules/rtgtools/vcfeval/main.nf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index 9daadd05..97d96d89 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -8,7 +8,8 @@ process RTGTOOLS_VCFEVAL { 'quay.io/biocontainers/rtg-tools:3.12.1--hdfd78af_0' }" input: - tuple val(meta), path(truth_vcf), path(truth_vcf_tbi), path(query_vcf), path(query_vcf_tbi), path(bed) + tuple val(meta), path(query_vcf), path(query_vcf_tbi), path(bed) + tuple path(truth_vcf), path(truth_vcf_tbi), path(sdf) output: From d18af7358a7b3cebb59a81a5b71414e40fc39256 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 9 May 2022 09:20:42 +0200 Subject: [PATCH 201/239] Moved untarring the genome sdf folder to the test itself --- modules/rtgtools/vcfeval/main.nf | 14 ++------ tests/modules/rtgtools/vcfeval/main.nf | 46 +++++++++++++++++++------- 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index 97d96d89..83895b64 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -8,8 +8,8 @@ process RTGTOOLS_VCFEVAL { 'quay.io/biocontainers/rtg-tools:3.12.1--hdfd78af_0' }" input: - tuple val(meta), path(query_vcf), path(query_vcf_tbi), path(bed) - tuple path(truth_vcf), path(truth_vcf_tbi), + tuple val(meta), path(query_vcf), path(query_vcf_tbi), path(bed) + tuple path(truth_vcf), path(truth_vcf_tbi) path(sdf) output: @@ -26,15 +26,7 @@ process RTGTOOLS_VCFEVAL { def truth_index = truth_vcf_tbi ? "" : "rtg index $truth_vcf" def query_index = query_vcf_tbi ? "" : "rtg index $query_vcf" - sdf_basename = sdf.getBaseName().replace(".tar","") - tar_decomp = "" - if((sdf =~ /.tar.gz\b/).find() == true) { - tar_decomp = "tar -xzf $sdf" - } - """ - $tar_decomp - $truth_index $query_index @@ -44,7 +36,7 @@ process RTGTOOLS_VCFEVAL { $regions \\ --calls=$query_vcf \\ --output=$prefix \\ - --template=$sdf_basename \\ + --template=$sdf \\ --threads=$task.cpus \\ > ${prefix}_results.txt diff --git a/tests/modules/rtgtools/vcfeval/main.nf b/tests/modules/rtgtools/vcfeval/main.nf index baf3c54d..35a2206b 100644 --- a/tests/modules/rtgtools/vcfeval/main.nf +++ b/tests/modules/rtgtools/vcfeval/main.nf @@ -3,39 +3,61 @@ nextflow.enable.dsl = 2 include { RTGTOOLS_VCFEVAL } from '../../../../modules/rtgtools/vcfeval/main.nf' +include { UNTAR } from '../../../modules/untar/main.nf' workflow test_rtgtools_vcfeval { input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz'], checkIfExists: true), file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz_tbi'], checkIfExists: true), file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) ] - sdf = Channel.value( - file(params.test_data['homo_sapiens']['genome']['genome_21_sdf']) - ) + truth = [ + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true) + ] - RTGTOOLS_VCFEVAL ( input, sdf ) + compressed_sdf = [ + [], + file(params.test_data['homo_sapiens']['genome']['genome_21_sdf']) + ] + + sdf = UNTAR( compressed_sdf ).untar + .map({ + meta, folder -> + folder + }) + + + RTGTOOLS_VCFEVAL ( input, truth, sdf ) } workflow test_rtgtools_vcfeval_no_index { input = [ [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), - [], file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz'], checkIfExists: true), [], file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) ] - sdf = Channel.value( - file(params.test_data['homo_sapiens']['genome']['genome_21_sdf']) - ) + truth = [ + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz'], checkIfExists: true), + [] + ] - RTGTOOLS_VCFEVAL ( input, sdf ) + compressed_sdf = [ + [], + file(params.test_data['homo_sapiens']['genome']['genome_21_sdf']) + ] + + sdf = UNTAR( compressed_sdf ).untar + .map({ + meta, folder -> + [folder] + }) + + RTGTOOLS_VCFEVAL ( input, truth, sdf ) } From 4591ea2205d305d6bf27511571eb98ff7e4b9052 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 9 May 2022 07:58:58 +0000 Subject: [PATCH 202/239] 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 203/239] 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 ad4f8389cb419a3d23fb4cd4fdbe3b3c77bbc7ad Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 9 May 2022 08:33:21 +0000 Subject: [PATCH 204/239] Add meryl unionsum --- modules/meryl/unionsum/main.nf | 35 +++++++++++++++++ modules/meryl/unionsum/meta.yml | 40 ++++++++++++++++++++ tests/config/pytest_modules.yml | 12 ++++-- tests/modules/meryl/unionsum/main.nf | 20 ++++++++++ tests/modules/meryl/unionsum/nextflow.config | 6 +++ tests/modules/meryl/unionsum/test.yml | 14 +++++++ 6 files changed, 123 insertions(+), 4 deletions(-) create mode 100644 modules/meryl/unionsum/main.nf create mode 100644 modules/meryl/unionsum/meta.yml create mode 100644 tests/modules/meryl/unionsum/main.nf create mode 100644 tests/modules/meryl/unionsum/nextflow.config create mode 100644 tests/modules/meryl/unionsum/test.yml diff --git a/modules/meryl/unionsum/main.nf b/modules/meryl/unionsum/main.nf new file mode 100644 index 00000000..0d7b80b6 --- /dev/null +++ b/modules/meryl/unionsum/main.nf @@ -0,0 +1,35 @@ +process MERYL_UNIONSUM { + tag "$meta.id" + label 'process_low' + + 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(meryl_dbs) + + output: + 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 prefix = task.ext.prefix ?: "${meta.id}" + """ + meryl union-sum \\ + threads=$task.cpus \\ + $args \\ + output ${prefix}.meryl \\ + $meryl_dbs + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + meryl: \$( meryl --version |& sed 's/meryl //' ) + END_VERSIONS + """ +} diff --git a/modules/meryl/unionsum/meta.yml b/modules/meryl/unionsum/meta.yml new file mode 100644 index 00000000..04dabac1 --- /dev/null +++ b/modules/meryl/unionsum/meta.yml @@ -0,0 +1,40 @@ +name: "meryl_unionsum" +description: A genomic k-mer counter (and sequence utility) with nice features. +keywords: + - k-mer + - unionsum +tools: + - "meryl": + 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']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - meryl_dbs: + type: directory + description: Meryl k-mer databases + +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" + - meryl_db: + type: directory + description: A Meryl k-mer database that is the union sum of the input databases + +authors: + - "@mahesh-panchal" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index b9c67363..1122c060 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1214,6 +1214,10 @@ meningotype: - modules/meningotype/** - tests/modules/meningotype/** +meryl/unionsum: + - modules/meryl/unionsum/** + - tests/modules/meryl/unionsum/** + metabat2/jgisummarizebamcontigdepths: - modules/metabat2/jgisummarizebamcontigdepths/** - tests/modules/metabat2/jgisummarizebamcontigdepths/** @@ -1763,14 +1767,14 @@ slimfastq: - modules/slimfastq/** - tests/modules/slimfastq/** -snapaligner/index: - - modules/snapaligner/index/** - - tests/modules/snapaligner/index/** - snapaligner/align: - modules/snapaligner/align/** - tests/modules/snapaligner/align/** +snapaligner/index: + - modules/snapaligner/index/** + - tests/modules/snapaligner/index/** + snpdists: - modules/snpdists/** - tests/modules/snpdists/** diff --git a/tests/modules/meryl/unionsum/main.nf b/tests/modules/meryl/unionsum/main.nf new file mode 100644 index 00000000..7cffe046 --- /dev/null +++ b/tests/modules/meryl/unionsum/main.nf @@ -0,0 +1,20 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf' +include { MERYL_UNIONSUM } from '../../../../modules/meryl/unionsum/main.nf' + +workflow test_meryl_unionsum { + + input = [ + [ id:'test' ], // 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 ) + MERYL_UNIONSUM ( MERYL_COUNT.out.meryl_db ) +} diff --git a/tests/modules/meryl/unionsum/nextflow.config b/tests/modules/meryl/unionsum/nextflow.config new file mode 100644 index 00000000..6d899c50 --- /dev/null +++ b/tests/modules/meryl/unionsum/nextflow.config @@ -0,0 +1,6 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + ext.args = 'k=21' + +} diff --git a/tests/modules/meryl/unionsum/test.yml b/tests/modules/meryl/unionsum/test.yml new file mode 100644 index 00000000..f495e946 --- /dev/null +++ b/tests/modules/meryl/unionsum/test.yml @@ -0,0 +1,14 @@ +## TODO nf-core: Please run the following command to build this file: +# nf-core modules create-test-yml meryl/unionsum +- name: "meryl unionsum" + command: nextflow run ./tests/modules/meryl/unionsum -entry test_meryl_unionsum -c ./tests/config/nextflow.config -c ./tests/modules/meryl/unionsum/nextflow.config + tags: + - "meryl" + # + - "meryl/unionsum" + # + files: + - path: "output/meryl/test.bam" + md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/meryl/versions.yml + md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b From 129f57ccd9adc9016aaa3f2e2e6ab556ba8de7b6 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 9 May 2022 08:50:28 +0000 Subject: [PATCH 205/239] Add meryl histogram --- modules/meryl/histogram/main.nf | 34 +++++++++++++++ modules/meryl/histogram/meta.yml | 41 +++++++++++++++++++ tests/config/pytest_modules.yml | 12 ++++-- tests/modules/meryl/histogram/main.nf | 17 ++++++++ tests/modules/meryl/histogram/nextflow.config | 5 +++ tests/modules/meryl/histogram/test.yml | 14 +++++++ 6 files changed, 119 insertions(+), 4 deletions(-) create mode 100644 modules/meryl/histogram/main.nf create mode 100644 modules/meryl/histogram/meta.yml create mode 100644 tests/modules/meryl/histogram/main.nf create mode 100644 tests/modules/meryl/histogram/nextflow.config create mode 100644 tests/modules/meryl/histogram/test.yml diff --git a/modules/meryl/histogram/main.nf b/modules/meryl/histogram/main.nf new file mode 100644 index 00000000..a1f18f05 --- /dev/null +++ b/modules/meryl/histogram/main.nf @@ -0,0 +1,34 @@ +process MERYL_HISTOGRAM { + tag "$meta.id" + label 'process_low' + + 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(meryl_db) + + output: + tuple val(meta), path("*.hist"), emit: hist + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + """ + meryl histogram \\ + threads=$task.cpus \\ + $args \\ + $meryl_db > ${prefix}.hist + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + meryl: \$( meryl --version |& sed 's/meryl //' ) + END_VERSIONS + """ +} diff --git a/modules/meryl/histogram/meta.yml b/modules/meryl/histogram/meta.yml new file mode 100644 index 00000000..b786e076 --- /dev/null +++ b/modules/meryl/histogram/meta.yml @@ -0,0 +1,41 @@ +name: "meryl_histogram" +description: A genomic k-mer counter (and sequence utility) with nice features. +keywords: + - k-mer + - histogram +tools: + - "meryl": + 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']" + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - meryl_dbs: + type: directory + description: Meryl k-mer database + +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" + - hist: + type: file + description: Histogram of k-mers + pattern: "*.hist" + +authors: + - "@mahesh-panchal" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index b9c67363..2aa9a20d 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1214,6 +1214,10 @@ meningotype: - modules/meningotype/** - tests/modules/meningotype/** +meryl/histogram: + - modules/meryl/histogram/** + - tests/modules/meryl/histogram/** + metabat2/jgisummarizebamcontigdepths: - modules/metabat2/jgisummarizebamcontigdepths/** - tests/modules/metabat2/jgisummarizebamcontigdepths/** @@ -1763,14 +1767,14 @@ slimfastq: - modules/slimfastq/** - tests/modules/slimfastq/** -snapaligner/index: - - modules/snapaligner/index/** - - tests/modules/snapaligner/index/** - snapaligner/align: - modules/snapaligner/align/** - tests/modules/snapaligner/align/** +snapaligner/index: + - modules/snapaligner/index/** + - tests/modules/snapaligner/index/** + snpdists: - modules/snpdists/** - tests/modules/snpdists/** diff --git a/tests/modules/meryl/histogram/main.nf b/tests/modules/meryl/histogram/main.nf new file mode 100644 index 00000000..697a12ef --- /dev/null +++ b/tests/modules/meryl/histogram/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf' +include { MERYL_HISTOGRAM } from '../../../../modules/meryl/histogram/main.nf' + +workflow test_meryl_histogram { + + input = [ + [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + + MERYL_COUNT ( input ) + MERYL_HISTOGRAM ( MERYL_COUNT.out.meryl_db ) +} diff --git a/tests/modules/meryl/histogram/nextflow.config b/tests/modules/meryl/histogram/nextflow.config new file mode 100644 index 00000000..50f50a7a --- /dev/null +++ b/tests/modules/meryl/histogram/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/meryl/histogram/test.yml b/tests/modules/meryl/histogram/test.yml new file mode 100644 index 00000000..ef358943 --- /dev/null +++ b/tests/modules/meryl/histogram/test.yml @@ -0,0 +1,14 @@ +## TODO nf-core: Please run the following command to build this file: +# nf-core modules create-test-yml meryl/histogram +- name: "meryl histogram" + command: nextflow run ./tests/modules/meryl/histogram -entry test_meryl_histogram -c ./tests/config/nextflow.config -c ./tests/modules/meryl/histogram/nextflow.config + tags: + - "meryl" + # + - "meryl/histogram" + # + files: + - path: "output/meryl/test.bam" + md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/meryl/versions.yml + md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b From a43bc940d6aaeaa755b34484cffeb5b41bce92eb Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 9 May 2022 11:15:14 +0000 Subject: [PATCH 206/239] 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 207/239] 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' { From 662176855055f6f9698fa4754d01803e6465ff54 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 9 May 2022 12:54:31 +0000 Subject: [PATCH 208/239] Update pytest outputs --- modules/meryl/unionsum/main.nf | 6 +++--- tests/modules/meryl/unionsum/main.nf | 2 +- tests/modules/meryl/unionsum/test.yml | 16 +++++----------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/modules/meryl/unionsum/main.nf b/modules/meryl/unionsum/main.nf index 0d7b80b6..98baa870 100644 --- a/modules/meryl/unionsum/main.nf +++ b/modules/meryl/unionsum/main.nf @@ -11,8 +11,8 @@ process MERYL_UNIONSUM { tuple val(meta), path(meryl_dbs) output: - tuple val(meta), path("*.meryldb"), emit: meryl_db - path "versions.yml" , emit: versions + tuple val(meta), path("*.unionsum.meryldb"), emit: meryl_db + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -24,7 +24,7 @@ process MERYL_UNIONSUM { meryl union-sum \\ threads=$task.cpus \\ $args \\ - output ${prefix}.meryl \\ + output ${prefix}.unionsum.meryldb \\ $meryl_dbs cat <<-END_VERSIONS > versions.yml diff --git a/tests/modules/meryl/unionsum/main.nf b/tests/modules/meryl/unionsum/main.nf index 7cffe046..e861cceb 100644 --- a/tests/modules/meryl/unionsum/main.nf +++ b/tests/modules/meryl/unionsum/main.nf @@ -8,7 +8,7 @@ include { MERYL_UNIONSUM } from '../../../../modules/meryl/unionsum/main.nf' workflow test_meryl_unionsum { input = [ - [ id:'test' ], // meta map + [ 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) diff --git a/tests/modules/meryl/unionsum/test.yml b/tests/modules/meryl/unionsum/test.yml index f495e946..1ba33a93 100644 --- a/tests/modules/meryl/unionsum/test.yml +++ b/tests/modules/meryl/unionsum/test.yml @@ -1,14 +1,8 @@ -## TODO nf-core: Please run the following command to build this file: -# nf-core modules create-test-yml meryl/unionsum -- name: "meryl unionsum" - command: nextflow run ./tests/modules/meryl/unionsum -entry test_meryl_unionsum -c ./tests/config/nextflow.config -c ./tests/modules/meryl/unionsum/nextflow.config +- name: meryl unionsum test_meryl_unionsum + command: nextflow run tests/modules/meryl/unionsum -entry test_meryl_unionsum -c tests/config/nextflow.config tags: - - "meryl" - # - - "meryl/unionsum" - # + - meryl + - meryl/unionsum files: - - path: "output/meryl/test.bam" - md5sum: e667c7caad0bc4b7ac383fd023c654fc - path: output/meryl/versions.yml - md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b + md5sum: c864aa98f55b9ec7fa1fb2716ec736dd From bf91f9dd9b62c98175d962bd51dbe2d0b7f91d4c Mon Sep 17 00:00:00 2001 From: Annick Renevey <47788523+rannick@users.noreply.github.com> Date: Mon, 9 May 2022 14:54:52 +0200 Subject: [PATCH 209/239] update arriba module --- modules/arriba/main.nf | 32 ++++++++++++++++++++++++++++---- modules/arriba/meta.yml | 22 +++++++++++++++++++++- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/modules/arriba/main.nf b/modules/arriba/main.nf index e0d30b45..b7883acd 100644 --- a/modules/arriba/main.nf +++ b/modules/arriba/main.nf @@ -2,15 +2,20 @@ process ARRIBA { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::arriba=2.1.0" : null) + conda (params.enable_conda ? "bioconda::arriba=2.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/arriba:2.1.0--h3198e80_1' : - 'quay.io/biocontainers/arriba:2.1.0--h3198e80_1' }" + 'https://depot.galaxyproject.org/singularity/arriba:2.2.1--hecb563c_2' : + 'quay.io/biocontainers/arriba:2.2.1--hecb563c_2' }" input: tuple val(meta), path(bam) path fasta path gtf + path blacklist + path known_fusions + path structural_variants + path tags + path protein_domains output: tuple val(meta), path("*.fusions.tsv") , emit: fusions @@ -23,7 +28,12 @@ process ARRIBA { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def blacklist = (args.contains('-b')) ? '' : '-f blacklist' + def blacklist = blacklist ? "-b $blacklist" : "-f blacklist" + def known_fusions = known_fusions ? "-k $known_fusions" : "" + def structural_variants = structural_variants ? "-d $structual_variants" : "" + def tags = tags ? "-t $tags" : "" + def protein_domains = protein_domains ? "-p $protein_domains" : "" + """ arriba \\ -x $bam \\ @@ -32,6 +42,10 @@ process ARRIBA { -o ${prefix}.fusions.tsv \\ -O ${prefix}.fusions.discarded.tsv \\ $blacklist \\ + $known_fusions \\ + $structural_variants \\ + $tags \\ + $protein_domains \\ $args cat <<-END_VERSIONS > versions.yml @@ -39,4 +53,14 @@ process ARRIBA { arriba: \$(arriba -h | grep 'Version:' 2>&1 | sed 's/Version:\s//') END_VERSIONS """ + + stub: + def prefix = task.ext.prefix ?: "${meta.id}" + """ + echo stub > ${prefix}.fusions.tsv + echo stub > ${prefix}.fusions.discarded.tsv + + echo "${task.process}:" > versions.yml + echo ' arriba: 2.2.1' >> versions.yml + """ } diff --git a/modules/arriba/meta.yml b/modules/arriba/meta.yml index 4bde2f08..119dd912 100644 --- a/modules/arriba/meta.yml +++ b/modules/arriba/meta.yml @@ -30,6 +30,26 @@ input: type: file description: Annotation GTF file pattern: "*.{gtf}" + - blacklist: + type: file + description: Blacklist file + pattern: "*.{tsv}" + - known_fusions: + type: file + description: Known fusions file + pattern: "*.{tsv}" + - structural_variants: + type: file + description: Structural variants file + pattern: "*.{tsv}" + - tags: + type: file + description: Tags file + pattern: "*.{tsv}" + - protein_domains: + type: file + description: Protein domains file + pattern: "*.{gff3}" output: - meta: @@ -51,4 +71,4 @@ output: pattern: "*.{fusions.discarded.tsv}" authors: - - "@praveenraj2018" + - "@praveenraj2018,@rannick" From eed874ace79a40a3ce1a50b7d1df560cefecfed4 Mon Sep 17 00:00:00 2001 From: Annick Renevey <47788523+rannick@users.noreply.github.com> Date: Mon, 9 May 2022 14:55:18 +0200 Subject: [PATCH 210/239] update arriba tests --- tests/modules/arriba/main.nf | 4 ++-- tests/modules/arriba/test.yml | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/modules/arriba/main.nf b/tests/modules/arriba/main.nf index 60741275..205adf0f 100644 --- a/tests/modules/arriba/main.nf +++ b/tests/modules/arriba/main.nf @@ -20,7 +20,7 @@ workflow test_arriba_single_end { STAR_GENOMEGENERATE ( fasta, gtf ) STAR_ALIGN ( input, STAR_GENOMEGENERATE.out.index, gtf, star_ignore_sjdbgtf, seq_platform, seq_center ) - ARRIBA ( STAR_ALIGN.out.bam, fasta, gtf ) + ARRIBA ( STAR_ALIGN.out.bam, fasta, gtf , [], [], [], [], []) } workflow test_arriba_paired_end { @@ -38,5 +38,5 @@ workflow test_arriba_paired_end { STAR_GENOMEGENERATE ( fasta, gtf ) STAR_ALIGN ( input, STAR_GENOMEGENERATE.out.index, gtf, star_ignore_sjdbgtf, seq_platform, seq_center ) - ARRIBA ( STAR_ALIGN.out.bam, fasta, gtf ) + ARRIBA ( STAR_ALIGN.out.bam, fasta, gtf, [], [], [], [], []) } diff --git a/tests/modules/arriba/test.yml b/tests/modules/arriba/test.yml index 52743167..c2032df3 100644 --- a/tests/modules/arriba/test.yml +++ b/tests/modules/arriba/test.yml @@ -13,7 +13,7 @@ - path: output/star/star/SA md5sum: 8c3edc46697b72c9e92440d4cf43506c - path: output/star/star/SAindex - md5sum: 9f085c626553b1c52f2827421972ac10 + md5sum: 2a0c675d8b91d8e5e8c1826d3500482e - path: output/star/star/chrLength.txt md5sum: c81f40f27e72606d7d07097c1d56a5b5 - path: output/star/star/chrName.txt @@ -29,7 +29,7 @@ - path: output/star/star/geneInfo.tab md5sum: 8b608537307443ffaee4927d2b428805 - path: output/star/star/genomeParameters.txt - md5sum: 9e42067b1ec70b773257529230dd7b3a + md5sum: 3097677f4d8b2cb66770b9e55d343a7f - path: output/star/star/sjdbInfo.txt md5sum: 5690ea9d9f09f7ff85b7fd47bd234903 - path: output/star/star/sjdbList.fromGTF.out.tab @@ -39,6 +39,7 @@ - path: output/star/star/transcriptInfo.tab md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - path: output/star/test.Aligned.out.bam + md5sum: b9f5e2f6a624b64c300fe25dc3ac801f - path: output/star/test.Log.final.out - path: output/star/test.Log.out - path: output/star/test.Log.progress.out From 57fee2b3d6759c36f2a3e9181ab5f309cf62b6f1 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 9 May 2022 12:56:22 +0000 Subject: [PATCH 211/239] Add description pattern --- modules/meryl/unionsum/meta.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/meryl/unionsum/meta.yml b/modules/meryl/unionsum/meta.yml index 04dabac1..cea7f0f6 100644 --- a/modules/meryl/unionsum/meta.yml +++ b/modules/meryl/unionsum/meta.yml @@ -35,6 +35,7 @@ output: - meryl_db: type: directory description: A Meryl k-mer database that is the union sum of the input databases + pattern: "*.unionsum.meryldb" authors: - "@mahesh-panchal" From f0f414d5192aaf3fa913608b387a073a5fd58b90 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 9 May 2022 13:00:10 +0000 Subject: [PATCH 212/239] Update pytests --- tests/modules/meryl/unionsum/main.nf | 13 ++++++++++++- tests/modules/meryl/unionsum/test.yml | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/tests/modules/meryl/unionsum/main.nf b/tests/modules/meryl/unionsum/main.nf index e861cceb..6dd40c82 100644 --- a/tests/modules/meryl/unionsum/main.nf +++ b/tests/modules/meryl/unionsum/main.nf @@ -5,7 +5,18 @@ nextflow.enable.dsl = 2 include { MERYL_COUNT } from '../../../../modules/meryl/count/main.nf' include { MERYL_UNIONSUM } from '../../../../modules/meryl/unionsum/main.nf' -workflow test_meryl_unionsum { +workflow test_meryl_unionsum_single_end { + + input = [ + [ id:'test', single_end: true ], // meta map + file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + ] + + MERYL_COUNT ( input ) + MERYL_UNIONSUM ( MERYL_COUNT.out.meryl_db ) +} + +workflow test_meryl_unionsum_paired_end { input = [ [ id:'test', single_end: false ], // meta map diff --git a/tests/modules/meryl/unionsum/test.yml b/tests/modules/meryl/unionsum/test.yml index 1ba33a93..10a1a155 100644 --- a/tests/modules/meryl/unionsum/test.yml +++ b/tests/modules/meryl/unionsum/test.yml @@ -1,8 +1,17 @@ -- name: meryl unionsum test_meryl_unionsum - command: nextflow run tests/modules/meryl/unionsum -entry test_meryl_unionsum -c tests/config/nextflow.config +- name: meryl unionsum test_meryl_unionsum_single_end + command: nextflow run tests/modules/meryl/unionsum -entry test_meryl_unionsum_single_end -c tests/config/nextflow.config tags: - meryl - meryl/unionsum files: - path: output/meryl/versions.yml - md5sum: c864aa98f55b9ec7fa1fb2716ec736dd + md5sum: 7de859c6d3a29d72f6c9c976609d0913 + +- name: meryl unionsum test_meryl_unionsum_paired_end + command: nextflow run tests/modules/meryl/unionsum -entry test_meryl_unionsum_paired_end -c tests/config/nextflow.config + tags: + - meryl + - meryl/unionsum + files: + - path: output/meryl/versions.yml + md5sum: a16decdec014ccb9bdab69a4a1d30818 From ac3034696bba9adb98841bda8e9f085ded059c68 Mon Sep 17 00:00:00 2001 From: Annick Renevey <47788523+rannick@users.noreply.github.com> Date: Mon, 9 May 2022 15:19:16 +0200 Subject: [PATCH 213/239] update md5sum --- tests/modules/arriba/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/modules/arriba/test.yml b/tests/modules/arriba/test.yml index c2032df3..b1e34db0 100644 --- a/tests/modules/arriba/test.yml +++ b/tests/modules/arriba/test.yml @@ -4,7 +4,7 @@ - arriba files: - path: output/arriba/test.fusions.discarded.tsv - md5sum: cad8c215b938d1e45b747a5b7898a4c2 + md5sum: 7602ab4ccbbb0c54fbca12a942877e6d - path: output/arriba/test.fusions.tsv md5sum: 7c3383f7eb6d79b84b0bd30a7ef02d70 - path: output/star/star/Genome @@ -13,7 +13,7 @@ - path: output/star/star/SA md5sum: 8c3edc46697b72c9e92440d4cf43506c - path: output/star/star/SAindex - md5sum: 2a0c675d8b91d8e5e8c1826d3500482e + md5sum: 9f085c626553b1c52f2827421972ac10 - path: output/star/star/chrLength.txt md5sum: c81f40f27e72606d7d07097c1d56a5b5 - path: output/star/star/chrName.txt @@ -29,7 +29,7 @@ - path: output/star/star/geneInfo.tab md5sum: 8b608537307443ffaee4927d2b428805 - path: output/star/star/genomeParameters.txt - md5sum: 3097677f4d8b2cb66770b9e55d343a7f + md5sum: 9e42067b1ec70b773257529230dd7b3a - path: output/star/star/sjdbInfo.txt md5sum: 5690ea9d9f09f7ff85b7fd47bd234903 - path: output/star/star/sjdbList.fromGTF.out.tab @@ -39,7 +39,7 @@ - path: output/star/star/transcriptInfo.tab md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - path: output/star/test.Aligned.out.bam - md5sum: b9f5e2f6a624b64c300fe25dc3ac801f + md5sum: 4fa079d11f8938e51015e3e477fa7149 - path: output/star/test.Log.final.out - path: output/star/test.Log.out - path: output/star/test.Log.progress.out @@ -51,7 +51,7 @@ - arriba files: - path: output/arriba/test.fusions.discarded.tsv - md5sum: 85e36c887464e4deaa65f45174d3b8fd + md5sum: cdc6cfbc75e68ce29a766f50f390274d - path: output/arriba/test.fusions.tsv md5sum: 7c3383f7eb6d79b84b0bd30a7ef02d70 - path: output/star/star/Genome From ef5f145342cb0f25be6867f9ac17fe460b11571c Mon Sep 17 00:00:00 2001 From: Rike Date: Mon, 9 May 2022 15:22:54 +0200 Subject: [PATCH 214/239] Generalize Bam2Cram do either conversion --- .../samtools/{bamtocram => convert}/main.nf | 20 ++++++++---- .../samtools/{bamtocram => convert}/meta.yml | 12 +++---- tests/config/pytest_modules.yml | 6 ++-- tests/modules/samtools/bamtocram/main.nf | 17 ---------- .../samtools/bamtocram/nextflow.config | 5 --- tests/modules/samtools/bamtocram/test.yml | 9 ------ tests/modules/samtools/convert/main.nf | 31 +++++++++++++++++++ .../modules/samtools/convert/nextflow.config | 12 +++++++ tests/modules/samtools/convert/test.yml | 21 +++++++++++++ 9 files changed, 87 insertions(+), 46 deletions(-) rename modules/samtools/{bamtocram => convert}/main.nf (59%) rename modules/samtools/{bamtocram => convert}/meta.yml (84%) delete mode 100644 tests/modules/samtools/bamtocram/main.nf delete mode 100644 tests/modules/samtools/bamtocram/nextflow.config delete mode 100644 tests/modules/samtools/bamtocram/test.yml create mode 100644 tests/modules/samtools/convert/main.nf create mode 100644 tests/modules/samtools/convert/nextflow.config create mode 100644 tests/modules/samtools/convert/test.yml diff --git a/modules/samtools/bamtocram/main.nf b/modules/samtools/convert/main.nf similarity index 59% rename from modules/samtools/bamtocram/main.nf rename to modules/samtools/convert/main.nf index b49c308f..a7ec1bda 100644 --- a/modules/samtools/bamtocram/main.nf +++ b/modules/samtools/convert/main.nf @@ -1,5 +1,4 @@ -//There is a -L option to only output alignments in interval, might be an option for exons/panel data? -process SAMTOOLS_BAMTOCRAM { +process SAMTOOLS_CONVERT { tag "$meta.id" label 'process_medium' @@ -14,8 +13,9 @@ process SAMTOOLS_BAMTOCRAM { path fai output: - tuple val(meta), path("*.cram"), path("*.crai"), emit: cram_crai - path "versions.yml" , emit: versions + tuple val(meta), path("*.cram"), path("*.crai") , emit: cram_crai, optional: true + tuple val(meta), path("*.bam"), path("*.bai") , emit: bam_bai, optional:true + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -23,9 +23,17 @@ process SAMTOOLS_BAMTOCRAM { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def file_type = input.getExtension() == "bam" ? "cram" : "bam" + """ - samtools view --threads ${task.cpus} --reference ${fasta} -C $args $input > ${prefix}.cram - samtools index -@${task.cpus} ${prefix}.cram + samtools view \\ + --threads ${task.cpus} \\ + --reference ${fasta} \\ + $args \\ + $input \\ + -o ${prefix}.${file_type} + + samtools index -@${task.cpus} ${prefix}.${file_type} cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/samtools/bamtocram/meta.yml b/modules/samtools/convert/meta.yml similarity index 84% rename from modules/samtools/bamtocram/meta.yml rename to modules/samtools/convert/meta.yml index 037704c6..506febb6 100644 --- a/modules/samtools/bamtocram/meta.yml +++ b/modules/samtools/convert/meta.yml @@ -1,5 +1,5 @@ -name: samtools_bamtocram -description: filter/convert and then index CRAM file +name: samtools_convert +description: convert and then index CRAM -> BAM or BAM -> CRAM file keywords: - view - index @@ -23,12 +23,12 @@ input: e.g. [ id:'test', single_end:false ] - input: type: file - description: BAM/SAM file - pattern: "*.{bam,sam}" + description: BAM/CRAM file + pattern: "*.{bam,cram}" - index: type: file - description: BAM/SAM index file - pattern: "*.{bai,sai}" + description: BAM/CRAM index file + pattern: "*.{bai,crai}" - fasta: type: file description: Reference file to create the CRAM file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index ec7fc321..53aa44b9 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1631,9 +1631,9 @@ samtools/bam2fq: - modules/samtools/bam2fq/** - tests/modules/samtools/bam2fq/** -samtools/bamtocram: - - modules/samtools/bamtocram/** - - tests/modules/samtools/bamtocram/** +samtools/convert: + - modules/samtools/convert/** + - tests/modules/samtools/convert/** samtools/collatefastq: - modules/samtools/collatefastq/** diff --git a/tests/modules/samtools/bamtocram/main.nf b/tests/modules/samtools/bamtocram/main.nf deleted file mode 100644 index b1743310..00000000 --- a/tests/modules/samtools/bamtocram/main.nf +++ /dev/null @@ -1,17 +0,0 @@ -#!/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 deleted file mode 100644 index 8730f1c4..00000000 --- a/tests/modules/samtools/bamtocram/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 3cb82902..00000000 --- a/tests/modules/samtools/bamtocram/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- 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 diff --git a/tests/modules/samtools/convert/main.nf b/tests/modules/samtools/convert/main.nf new file mode 100644 index 00000000..01bdfe7f --- /dev/null +++ b/tests/modules/samtools/convert/main.nf @@ -0,0 +1,31 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { SAMTOOLS_CONVERT as SAMTOOLS_BAMTOCRAM } from '../../../../modules/samtools/convert/main.nf' +include { SAMTOOLS_CONVERT as SAMTOOLS_CRAMTOBAM } from '../../../../modules/samtools/convert/main.nf' + +workflow test_samtools_convert_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 ) +} + +workflow test_samtools_convert_cramtobam { + + input = [ [ id:'test', single_end:false ], // 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) + ] + + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + fai = file(params.test_data['homo_sapiens']['genome']['genome_fasta_fai'], checkIfExists: true) + + SAMTOOLS_CRAMTOBAM ( input, fasta, fai ) +} diff --git a/tests/modules/samtools/convert/nextflow.config b/tests/modules/samtools/convert/nextflow.config new file mode 100644 index 00000000..4f1e83f6 --- /dev/null +++ b/tests/modules/samtools/convert/nextflow.config @@ -0,0 +1,12 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName:SAMTOOLS_BAMTOCRAM{ + ext.args = "-C" + } + + withName:SAMTOOLS_CRAMTOBAM{ + ext.args = "-b" + } +} diff --git a/tests/modules/samtools/convert/test.yml b/tests/modules/samtools/convert/test.yml new file mode 100644 index 00000000..979f36ca --- /dev/null +++ b/tests/modules/samtools/convert/test.yml @@ -0,0 +1,21 @@ +- name: samtools convert test_samtools_convert_bamtocram + command: nextflow run tests/modules/samtools/convert -entry test_samtools_convert_bamtocram -c tests/config/nextflow.config + tags: + - samtools + - samtools/convert + files: + - path: output/samtools/test.cram + - path: output/samtools/test.cram.crai + - path: output/samtools/versions.yml + +- name: samtools convert test_samtools_convert_cramtobam + command: nextflow run tests/modules/samtools/convert -entry test_samtools_convert_cramtobam -c tests/config/nextflow.config + tags: + - samtools + - samtools/convert + files: + - path: output/samtools/test.bam + md5sum: c262b6dc15f9b480bdb47d6d018b4b56 + - path: output/samtools/test.bam.bai + md5sum: 6e8f5034f728401bfa841c8e70c62463 + - path: output/samtools/versions.yml From d6dd4c2e2d094b18c2027bc636eaa88358381fb4 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Mon, 9 May 2022 15:35:16 +0200 Subject: [PATCH 215/239] Update tests/modules/rtgtools/vcfeval/test.yml Co-authored-by: FriederikeHanssen --- tests/modules/rtgtools/vcfeval/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/modules/rtgtools/vcfeval/test.yml b/tests/modules/rtgtools/vcfeval/test.yml index 73ed8cc6..025581a6 100644 --- a/tests/modules/rtgtools/vcfeval/test.yml +++ b/tests/modules/rtgtools/vcfeval/test.yml @@ -18,4 +18,3 @@ - path: output/rtgtools/test_results.txt md5sum: 2e011aa6e54d258fcc3b45b2dda02ae4 - path: output/rtgtools/versions.yml - md5sum: 8d0407000988c78fa43fe5cfe3d4449d From 24d5e7feedfe0eaefe1293f5e233c79fa63a3f9a Mon Sep 17 00:00:00 2001 From: Rike Date: Mon, 9 May 2022 15:42:55 +0200 Subject: [PATCH 216/239] Code review suggestions --- modules/samtools/convert/meta.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/samtools/convert/meta.yml b/modules/samtools/convert/meta.yml index 506febb6..2396f0b3 100644 --- a/modules/samtools/convert/meta.yml +++ b/modules/samtools/convert/meta.yml @@ -43,6 +43,10 @@ output: type: file description: filtered/converted CRAM file + index pattern: "*{.cram,.crai}" + - bam_bai: + type: file + description: filtered/converted BAM file + index + pattern: "*{.bam,.bai}" - version: type: file description: File containing software version From f6262b4a103124c6ebf1bd650a297e6942f437ec Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 9 May 2022 15:47:07 +0200 Subject: [PATCH 217/239] fixed some issues --- modules/rtgtools/vcfeval/main.nf | 3 ++- modules/rtgtools/vcfeval/meta.yml | 6 +++--- tests/modules/rtgtools/vcfeval/main.nf | 12 +++++++----- tests/modules/rtgtools/vcfeval/test.yml | 1 - 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index 83895b64..c7e8a12e 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -8,8 +8,9 @@ process RTGTOOLS_VCFEVAL { 'quay.io/biocontainers/rtg-tools:3.12.1--hdfd78af_0' }" input: - tuple val(meta), path(query_vcf), path(query_vcf_tbi), path(bed) + tuple val(meta), path(query_vcf), path(query_vcf_tbi) tuple path(truth_vcf), path(truth_vcf_tbi) + path(bed) path(sdf) output: diff --git a/modules/rtgtools/vcfeval/meta.yml b/modules/rtgtools/vcfeval/meta.yml index 061ea876..36e1b290 100644 --- a/modules/rtgtools/vcfeval/meta.yml +++ b/modules/rtgtools/vcfeval/meta.yml @@ -40,9 +40,9 @@ input: description: The BED file of the called VCF pattern: "*.bed" - sdf: - type: folder/file - description: The SDF (RTG Sequence Data File) of the reference genome. Can be a folder or a tar-zipped folder. - pattern: "*.{,tar.gz}" + type: file + description: The SDF (RTG Sequence Data File) folder of the reference genome + pattern: "*" output: - meta: diff --git a/tests/modules/rtgtools/vcfeval/main.nf b/tests/modules/rtgtools/vcfeval/main.nf index 35a2206b..9a28e2d7 100644 --- a/tests/modules/rtgtools/vcfeval/main.nf +++ b/tests/modules/rtgtools/vcfeval/main.nf @@ -10,8 +10,7 @@ workflow test_rtgtools_vcfeval { input = [ [ id:'test' ], // meta map file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz_tbi'], checkIfExists: true), - file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz_tbi'], checkIfExists: true), ] truth = [ @@ -19,6 +18,8 @@ workflow test_rtgtools_vcfeval { file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true) ] + bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + compressed_sdf = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_sdf']) @@ -31,7 +32,7 @@ workflow test_rtgtools_vcfeval { }) - RTGTOOLS_VCFEVAL ( input, truth, sdf ) + RTGTOOLS_VCFEVAL ( input, truth, bed, sdf ) } workflow test_rtgtools_vcfeval_no_index { @@ -40,7 +41,6 @@ workflow test_rtgtools_vcfeval_no_index { [ id:'test' ], // meta map file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_vcf_gz'], checkIfExists: true), [], - file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) ] truth = [ @@ -48,6 +48,8 @@ workflow test_rtgtools_vcfeval_no_index { [] ] + bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + compressed_sdf = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_sdf']) @@ -59,5 +61,5 @@ workflow test_rtgtools_vcfeval_no_index { [folder] }) - RTGTOOLS_VCFEVAL ( input, truth, sdf ) + RTGTOOLS_VCFEVAL ( input, truth, bed, sdf ) } diff --git a/tests/modules/rtgtools/vcfeval/test.yml b/tests/modules/rtgtools/vcfeval/test.yml index 025581a6..86252c68 100644 --- a/tests/modules/rtgtools/vcfeval/test.yml +++ b/tests/modules/rtgtools/vcfeval/test.yml @@ -7,7 +7,6 @@ - path: output/rtgtools/test_results.txt md5sum: 2e011aa6e54d258fcc3b45b2dda02ae4 - path: output/rtgtools/versions.yml - md5sum: 270ed7a5a8e347b251eb4aa2198f98e8 - name: rtgtools vcfeval test_rtgtools_vcfeval_no_index command: nextflow run tests/modules/rtgtools/vcfeval -entry test_rtgtools_vcfeval_no_index -c tests/config/nextflow.config From da93beaf606a9f4ea7ae335ed3e25afdeac2bc26 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 9 May 2022 13:50:49 +0000 Subject: [PATCH 218/239] Update pytests --- tests/modules/meryl/histogram/nextflow.config | 5 +++-- tests/modules/meryl/histogram/test.yml | 18 +++++++----------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/tests/modules/meryl/histogram/nextflow.config b/tests/modules/meryl/histogram/nextflow.config index 50f50a7a..6d899c50 100644 --- a/tests/modules/meryl/histogram/nextflow.config +++ b/tests/modules/meryl/histogram/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 = 'k=21' + +} diff --git a/tests/modules/meryl/histogram/test.yml b/tests/modules/meryl/histogram/test.yml index ef358943..dce26b65 100644 --- a/tests/modules/meryl/histogram/test.yml +++ b/tests/modules/meryl/histogram/test.yml @@ -1,14 +1,10 @@ -## TODO nf-core: Please run the following command to build this file: -# nf-core modules create-test-yml meryl/histogram -- name: "meryl histogram" - command: nextflow run ./tests/modules/meryl/histogram -entry test_meryl_histogram -c ./tests/config/nextflow.config -c ./tests/modules/meryl/histogram/nextflow.config +- name: meryl histogram test_meryl_histogram + command: nextflow run tests/modules/meryl/histogram -entry test_meryl_histogram -c tests/config/nextflow.config tags: - - "meryl" - # - - "meryl/histogram" - # + - meryl/histogram + - meryl files: - - path: "output/meryl/test.bam" - md5sum: e667c7caad0bc4b7ac383fd023c654fc + - path: output/meryl/test.hist + md5sum: 4bfdc8b287ee0cfd9922bbfa8cd64650 - path: output/meryl/versions.yml - md5sum: a01fe51bc4c6a3a6226fbf77b2c7cf3b + md5sum: 050038f1b1df79977a393cce1b4b2ddb From 1b63d03f8e6d5b964c3f5215cb3c99f5604098ed Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 9 May 2022 15:51:19 +0200 Subject: [PATCH 219/239] adjusted the bed variable name --- modules/rtgtools/vcfeval/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index c7e8a12e..a2f5244f 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -10,7 +10,7 @@ process RTGTOOLS_VCFEVAL { input: tuple val(meta), path(query_vcf), path(query_vcf_tbi) tuple path(truth_vcf), path(truth_vcf_tbi) - path(bed) + path(truth_regions) path(sdf) output: @@ -23,7 +23,7 @@ process RTGTOOLS_VCFEVAL { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def regions = bed ? "--bed-regions=$bed" : "" + def regions = truth_regions ? "--bed-regions=$truth_regions" : "" def truth_index = truth_vcf_tbi ? "" : "rtg index $truth_vcf" def query_index = query_vcf_tbi ? "" : "rtg index $query_vcf" From bd7e1414a453af7605a67dcc166e3a98aeec3689 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Mon, 9 May 2022 15:55:48 +0200 Subject: [PATCH 220/239] Fixed meta.yml --- modules/rtgtools/vcfeval/main.nf | 2 +- modules/rtgtools/vcfeval/meta.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index a2f5244f..1d981204 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -8,7 +8,7 @@ process RTGTOOLS_VCFEVAL { 'quay.io/biocontainers/rtg-tools:3.12.1--hdfd78af_0' }" input: - tuple val(meta), path(query_vcf), path(query_vcf_tbi) + tuple val(meta), path(query_vcf), path(query_vcf_tbi) tuple path(truth_vcf), path(truth_vcf_tbi) path(truth_regions) path(sdf) diff --git a/modules/rtgtools/vcfeval/meta.yml b/modules/rtgtools/vcfeval/meta.yml index 36e1b290..baf9e87a 100644 --- a/modules/rtgtools/vcfeval/meta.yml +++ b/modules/rtgtools/vcfeval/meta.yml @@ -35,9 +35,9 @@ input: type: file description: The index of the called VCF (optional) pattern: "*.tbi" - - bed: + - truth_regions: type: file - description: The BED file of the called VCF + description: The BED file containing the truth regions pattern: "*.bed" - sdf: type: file From 1de1c2253e2d5c6bc37ebeda5500120f6f023750 Mon Sep 17 00:00:00 2001 From: Rike Date: Mon, 9 May 2022 16:04:58 +0200 Subject: [PATCH 221/239] Combine output after code review --- modules/samtools/convert/main.nf | 7 +++---- modules/samtools/convert/meta.yml | 10 +++------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/modules/samtools/convert/main.nf b/modules/samtools/convert/main.nf index a7ec1bda..b20f2b93 100644 --- a/modules/samtools/convert/main.nf +++ b/modules/samtools/convert/main.nf @@ -13,16 +13,15 @@ process SAMTOOLS_CONVERT { path fai output: - tuple val(meta), path("*.cram"), path("*.crai") , emit: cram_crai, optional: true - tuple val(meta), path("*.bam"), path("*.bai") , emit: bam_bai, optional:true - path "versions.yml" , emit: versions + tuple val(meta), path("*.{cram,bam}"), path("*.{crai,bai}") , emit: aligned_index + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + prefix = task.ext.prefix ?: "${meta.id}" def file_type = input.getExtension() == "bam" ? "cram" : "bam" """ diff --git a/modules/samtools/convert/meta.yml b/modules/samtools/convert/meta.yml index 2396f0b3..87727255 100644 --- a/modules/samtools/convert/meta.yml +++ b/modules/samtools/convert/meta.yml @@ -39,14 +39,10 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - cram_crai: + - aligned_index: type: file - description: filtered/converted CRAM file + index - pattern: "*{.cram,.crai}" - - bam_bai: - type: file - description: filtered/converted BAM file + index - pattern: "*{.bam,.bai}" + description: filtered/converted BAM/CRAM file + index + pattern: "*{.bam/cram,.bai/crai}" - version: type: file description: File containing software version From 5bd456e5e8cdc9cf8a34ce9bc5fc1f949714e0fe Mon Sep 17 00:00:00 2001 From: Rike Date: Mon, 9 May 2022 16:06:22 +0200 Subject: [PATCH 222/239] rename file_type to output extension --- modules/samtools/convert/main.nf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/samtools/convert/main.nf b/modules/samtools/convert/main.nf index b20f2b93..4638d360 100644 --- a/modules/samtools/convert/main.nf +++ b/modules/samtools/convert/main.nf @@ -21,8 +21,8 @@ process SAMTOOLS_CONVERT { script: def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def file_type = input.getExtension() == "bam" ? "cram" : "bam" + def prefix = task.ext.prefix ?: "${meta.id}" + def output_extension = input.getExtension() == "bam" ? "cram" : "bam" """ samtools view \\ @@ -30,9 +30,9 @@ process SAMTOOLS_CONVERT { --reference ${fasta} \\ $args \\ $input \\ - -o ${prefix}.${file_type} + -o ${prefix}.${output_extension} - samtools index -@${task.cpus} ${prefix}.${file_type} + samtools index -@${task.cpus} ${prefix}.${output_extension} cat <<-END_VERSIONS > versions.yml "${task.process}": From da79396f066a96450d9cc9f115c17c9d738595fd Mon Sep 17 00:00:00 2001 From: Rike Date: Mon, 9 May 2022 16:07:49 +0200 Subject: [PATCH 223/239] rename aligned to alignment --- modules/samtools/convert/main.nf | 2 +- modules/samtools/convert/meta.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/samtools/convert/main.nf b/modules/samtools/convert/main.nf index 4638d360..e0e7d725 100644 --- a/modules/samtools/convert/main.nf +++ b/modules/samtools/convert/main.nf @@ -13,7 +13,7 @@ process SAMTOOLS_CONVERT { path fai output: - tuple val(meta), path("*.{cram,bam}"), path("*.{crai,bai}") , emit: aligned_index + tuple val(meta), path("*.{cram,bam}"), path("*.{crai,bai}") , emit: alignment_index path "versions.yml" , emit: versions when: diff --git a/modules/samtools/convert/meta.yml b/modules/samtools/convert/meta.yml index 87727255..937b1403 100644 --- a/modules/samtools/convert/meta.yml +++ b/modules/samtools/convert/meta.yml @@ -39,7 +39,7 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - aligned_index: + - alignment_index: type: file description: filtered/converted BAM/CRAM file + index pattern: "*{.bam/cram,.bai/crai}" From c69d5cc23e76d5560b763111a167a15d8cd08424 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 10 May 2022 09:35:42 +0200 Subject: [PATCH 224/239] Added evaluation-regions and adjusted the output to now contain all output (and not only the summary) --- modules/rtgtools/vcfeval/main.nf | 14 ++--- modules/rtgtools/vcfeval/meta.yml | 10 ++-- tests/modules/rtgtools/vcfeval/main.nf | 14 +++-- tests/modules/rtgtools/vcfeval/test.yml | 69 ++++++++++++++++++++++--- 4 files changed, 87 insertions(+), 20 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index 1d981204..4e27ed6b 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -11,19 +11,21 @@ process RTGTOOLS_VCFEVAL { tuple val(meta), path(query_vcf), path(query_vcf_tbi) tuple path(truth_vcf), path(truth_vcf_tbi) path(truth_regions) + path(evaluation_regions) path(sdf) output: - tuple val(meta), path("*.txt"), emit: results - path "versions.yml" , emit: versions + tuple val(meta), path("${task.ext.prefix ?: meta.id}/*") , emit: results + 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 prefix = task.ext.prefix ?: "${meta.id}" - def regions = truth_regions ? "--bed-regions=$truth_regions" : "" + def bed_regions = truth_regions ? "--bed-regions=$truth_regions" : "" + def eval_regions = evaluation_regions ? "--evaluation-regions=$evaluation_regions" : "" def truth_index = truth_vcf_tbi ? "" : "rtg index $truth_vcf" def query_index = query_vcf_tbi ? "" : "rtg index $query_vcf" @@ -34,12 +36,12 @@ process RTGTOOLS_VCFEVAL { rtg vcfeval \\ $args \\ --baseline=$truth_vcf \\ - $regions \\ + $bed_regions \\ + $eval_regions \\ --calls=$query_vcf \\ --output=$prefix \\ --template=$sdf \\ --threads=$task.cpus \\ - > ${prefix}_results.txt cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/rtgtools/vcfeval/meta.yml b/modules/rtgtools/vcfeval/meta.yml index baf9e87a..1f448fdc 100644 --- a/modules/rtgtools/vcfeval/meta.yml +++ b/modules/rtgtools/vcfeval/meta.yml @@ -37,7 +37,11 @@ input: pattern: "*.tbi" - truth_regions: type: file - description: The BED file containing the truth regions + description: A BED file containining the strict regions where VCFeval should only evaluate the fully overlapping variants (optional) + pattern: "*.bed" + - evaluation_regions: + type: file + description: A BED file containing the regions where VCFeval will evaluate every fully and partially overlapping variant (optional) pattern: "*.bed" - sdf: type: file @@ -56,8 +60,8 @@ output: pattern: "versions.yml" - results: type: file - description: A text file containing the results of the benchmark - pattern: "*.txt" + description: A folder containing all results of the evaluation + pattern: "*" authors: - "@nvnieuwk" diff --git a/tests/modules/rtgtools/vcfeval/main.nf b/tests/modules/rtgtools/vcfeval/main.nf index 9a28e2d7..9a1c3c71 100644 --- a/tests/modules/rtgtools/vcfeval/main.nf +++ b/tests/modules/rtgtools/vcfeval/main.nf @@ -18,7 +18,9 @@ workflow test_rtgtools_vcfeval { file(params.test_data['homo_sapiens']['illumina']['test2_haplotc_ann_vcf_gz_tbi'], checkIfExists: true) ] - bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + truth_regions = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + + evaluation_regions = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) compressed_sdf = [ [], @@ -32,10 +34,10 @@ workflow test_rtgtools_vcfeval { }) - RTGTOOLS_VCFEVAL ( input, truth, bed, sdf ) + RTGTOOLS_VCFEVAL ( input, truth, truth_regions, evaluation_regions, sdf ) } -workflow test_rtgtools_vcfeval_no_index { +workflow test_rtgtools_vcfeval_no_optional_inputs { input = [ [ id:'test' ], // meta map @@ -48,7 +50,9 @@ workflow test_rtgtools_vcfeval_no_index { [] ] - bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true) + truth_regions = [] + + evaluation_regions = [] compressed_sdf = [ [], @@ -61,5 +65,5 @@ workflow test_rtgtools_vcfeval_no_index { [folder] }) - RTGTOOLS_VCFEVAL ( input, truth, bed, sdf ) + RTGTOOLS_VCFEVAL ( input, truth, truth_regions, evaluation_regions, sdf ) } diff --git a/tests/modules/rtgtools/vcfeval/test.yml b/tests/modules/rtgtools/vcfeval/test.yml index 86252c68..06d39701 100644 --- a/tests/modules/rtgtools/vcfeval/test.yml +++ b/tests/modules/rtgtools/vcfeval/test.yml @@ -4,16 +4,73 @@ - rtgtools - rtgtools/vcfeval files: - - path: output/rtgtools/test_results.txt - md5sum: 2e011aa6e54d258fcc3b45b2dda02ae4 + - path: output/rtgtools/test/done + md5sum: 8b5623b26ee9b8722816afbec270bff0 + - path: output/rtgtools/test/fn.vcf.gz + md5sum: 4577a8c3226b9f8ed9e260c3bd4b1259 + - path: output/rtgtools/test/fn.vcf.gz.tbi + md5sum: 092a7a3162e7cff25d273525751eb284 + - path: output/rtgtools/test/fp.vcf.gz + md5sum: 1417bb8ac7a0e202df660291a74de0db + - path: output/rtgtools/test/fp.vcf.gz.tbi + md5sum: 092a7a3162e7cff25d273525751eb284 + - path: output/rtgtools/test/non_snp_roc.tsv.gz + md5sum: 8fd51a1e5084d15d43880cb1e31a0180 + - path: output/rtgtools/test/phasing.txt + md5sum: 133677dbd8be657439ea2b03fdfb8795 + - path: output/rtgtools/test/progress + - path: output/rtgtools/test/snp_roc.tsv.gz + md5sum: ff2ece544adfcefaa06da054876a9ae3 + - path: output/rtgtools/test/summary.txt + md5sum: f4c8df93c8bdab603036bbc27b4a28c3 + - path: output/rtgtools/test/tp-baseline.vcf.gz + md5sum: 4577a8c3226b9f8ed9e260c3bd4b1259 + - path: output/rtgtools/test/tp-baseline.vcf.gz.tbi + md5sum: 092a7a3162e7cff25d273525751eb284 + - path: output/rtgtools/test/tp.vcf.gz + md5sum: 1417bb8ac7a0e202df660291a74de0db + - path: output/rtgtools/test/tp.vcf.gz.tbi + md5sum: 092a7a3162e7cff25d273525751eb284 + - path: output/rtgtools/test/vcfeval.log + - path: output/rtgtools/test/weighted_roc.tsv.gz + md5sum: 5209f1bdeb03704714ae92b183d08e0f - path: output/rtgtools/versions.yml -- name: rtgtools vcfeval test_rtgtools_vcfeval_no_index - command: nextflow run tests/modules/rtgtools/vcfeval -entry test_rtgtools_vcfeval_no_index -c tests/config/nextflow.config +- name: rtgtools vcfeval test_rtgtools_vcfeval_no_optional_inputs + command: nextflow run tests/modules/rtgtools/vcfeval -entry test_rtgtools_vcfeval_no_optional_inputs -c tests/config/nextflow.config tags: - rtgtools - rtgtools/vcfeval files: - - path: output/rtgtools/test_results.txt - md5sum: 2e011aa6e54d258fcc3b45b2dda02ae4 + - path: output/rtgtools/test/done + md5sum: 8b5623b26ee9b8722816afbec270bff0 + - path: output/rtgtools/test/fn.vcf.gz + md5sum: e51420e4be520ae309a2384830bf4c15 + - path: output/rtgtools/test/fn.vcf.gz.tbi + md5sum: 092a7a3162e7cff25d273525751eb284 + - path: output/rtgtools/test/fp.vcf.gz + md5sum: 7d818cf526983de6cbb5cf517c44a8f7 + - path: output/rtgtools/test/fp.vcf.gz.tbi + md5sum: 092a7a3162e7cff25d273525751eb284 + - path: output/rtgtools/test/non_snp_roc.tsv.gz + md5sum: a535fb80081b43b19788347152b6b8b4 + - path: output/rtgtools/test/phasing.txt + md5sum: 133677dbd8be657439ea2b03fdfb8795 + - path: output/rtgtools/test/progress + - path: output/rtgtools/test/snp_roc.tsv.gz + md5sum: 6006656c4a534935c7873398287bc110 + - path: output/rtgtools/test/summary.txt + md5sum: f33feb32f84958fb931063044fba369b + - path: output/rtgtools/test/tp-baseline.vcf.gz + md5sum: ed68ea567a26d3b864ada79e9253bc97 + - path: output/rtgtools/test/tp-baseline.vcf.gz.tbi + md5sum: 3518deff814eed340b0f5386294b5879 + - path: output/rtgtools/test/tp.vcf.gz + md5sum: 92fd51021d101c99da066324655d24c9 + - path: output/rtgtools/test/tp.vcf.gz.tbi + md5sum: 169063c1f570f0055059f3cb3518a8b4 + - path: output/rtgtools/test/vcfeval.log + - path: output/rtgtools/test/weighted_roc.tsv.gz + md5sum: 0ba825084bd6b94accdf54fff23ea18c - path: output/rtgtools/versions.yml + From f0e8f6ce4d748c3eacceedc1f2821d885df47f70 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 10 May 2022 09:36:54 +0200 Subject: [PATCH 225/239] Linting --- tests/modules/rtgtools/vcfeval/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/modules/rtgtools/vcfeval/test.yml b/tests/modules/rtgtools/vcfeval/test.yml index 06d39701..c1cbf236 100644 --- a/tests/modules/rtgtools/vcfeval/test.yml +++ b/tests/modules/rtgtools/vcfeval/test.yml @@ -73,4 +73,3 @@ - path: output/rtgtools/test/weighted_roc.tsv.gz md5sum: 0ba825084bd6b94accdf54fff23ea18c - path: output/rtgtools/versions.yml - From 42fbf80c7273050a1c6de3e1d179bf1c8704ad15 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 10 May 2022 09:57:49 +0200 Subject: [PATCH 226/239] Fixed a test issue with wrong md5sum --- tests/modules/rtgtools/vcfeval/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modules/rtgtools/vcfeval/test.yml b/tests/modules/rtgtools/vcfeval/test.yml index c1cbf236..ea76cb15 100644 --- a/tests/modules/rtgtools/vcfeval/test.yml +++ b/tests/modules/rtgtools/vcfeval/test.yml @@ -5,7 +5,7 @@ - rtgtools/vcfeval files: - path: output/rtgtools/test/done - md5sum: 8b5623b26ee9b8722816afbec270bff0 + contains: - Finished Succesfully in - path: output/rtgtools/test/fn.vcf.gz md5sum: 4577a8c3226b9f8ed9e260c3bd4b1259 - path: output/rtgtools/test/fn.vcf.gz.tbi @@ -43,7 +43,7 @@ - rtgtools/vcfeval files: - path: output/rtgtools/test/done - md5sum: 8b5623b26ee9b8722816afbec270bff0 + contains: - Finished Succesfully in - path: output/rtgtools/test/fn.vcf.gz md5sum: e51420e4be520ae309a2384830bf4c15 - path: output/rtgtools/test/fn.vcf.gz.tbi From 96c3f895b9c8bba0ea629bb31869a14aaf2e9c83 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 10 May 2022 10:19:13 +0200 Subject: [PATCH 227/239] test issue fix? --- tests/modules/rtgtools/vcfeval/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/modules/rtgtools/vcfeval/test.yml b/tests/modules/rtgtools/vcfeval/test.yml index ea76cb15..299fe91c 100644 --- a/tests/modules/rtgtools/vcfeval/test.yml +++ b/tests/modules/rtgtools/vcfeval/test.yml @@ -5,7 +5,8 @@ - rtgtools/vcfeval files: - path: output/rtgtools/test/done - contains: - Finished Succesfully in + contains: + - Finished Succesfully in - path: output/rtgtools/test/fn.vcf.gz md5sum: 4577a8c3226b9f8ed9e260c3bd4b1259 - path: output/rtgtools/test/fn.vcf.gz.tbi @@ -43,7 +44,8 @@ - rtgtools/vcfeval files: - path: output/rtgtools/test/done - contains: - Finished Succesfully in + contains: + - Finished Succesfully in - path: output/rtgtools/test/fn.vcf.gz md5sum: e51420e4be520ae309a2384830bf4c15 - path: output/rtgtools/test/fn.vcf.gz.tbi From 60086196038fd5e0cf9006a9aa6d797cb9c4380a Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 10 May 2022 10:20:54 +0200 Subject: [PATCH 228/239] test issue fix? --- tests/modules/rtgtools/vcfeval/test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/modules/rtgtools/vcfeval/test.yml b/tests/modules/rtgtools/vcfeval/test.yml index 299fe91c..194e0cac 100644 --- a/tests/modules/rtgtools/vcfeval/test.yml +++ b/tests/modules/rtgtools/vcfeval/test.yml @@ -5,8 +5,6 @@ - rtgtools/vcfeval files: - path: output/rtgtools/test/done - contains: - - Finished Succesfully in - path: output/rtgtools/test/fn.vcf.gz md5sum: 4577a8c3226b9f8ed9e260c3bd4b1259 - path: output/rtgtools/test/fn.vcf.gz.tbi @@ -44,8 +42,6 @@ - rtgtools/vcfeval files: - path: output/rtgtools/test/done - contains: - - Finished Succesfully in - path: output/rtgtools/test/fn.vcf.gz md5sum: e51420e4be520ae309a2384830bf4c15 - path: output/rtgtools/test/fn.vcf.gz.tbi From 3a064b0a9952e6e0f00cc8570d2fd72b11aff449 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 10 May 2022 12:05:42 +0200 Subject: [PATCH 229/239] Split the output to different channels --- modules/rtgtools/vcfeval/main.nf | 10 +++- modules/rtgtools/vcfeval/meta.yml | 66 ++++++++++++++++++++++-- tests/modules/rtgtools/vcfeval/test.yml | 68 ++++++++++++------------- 3 files changed, 105 insertions(+), 39 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index 4e27ed6b..1963bfe0 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -15,8 +15,12 @@ process RTGTOOLS_VCFEVAL { path(sdf) output: - tuple val(meta), path("${task.ext.prefix ?: meta.id}/*") , emit: results - path "versions.yml" , emit: versions + tuple val(meta), path("done"), path("progress"), path("*.log") , emit: logs + tuple val(meta), path("*{tp,fn,fp,baseline}.vcf.gz.tbi"), path("*{tp,fn,fp,baseline}.vcf.gz") , emit: vcf + tuple val(meta), path("*.tsv.gz") , emit: roc + tuple val(meta), path("summary.txt") , emit: summary + tuple val(meta), path("phasing.txt") , emit: phasing + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -43,6 +47,8 @@ process RTGTOOLS_VCFEVAL { --template=$sdf \\ --threads=$task.cpus \\ + mv ${prefix}/* . + cat <<-END_VERSIONS > versions.yml "${task.process}": rtg-tools: \$(echo \$(rtg version | head -n 1 | awk '{print \$4}')) diff --git a/modules/rtgtools/vcfeval/meta.yml b/modules/rtgtools/vcfeval/meta.yml index 1f448fdc..e568852c 100644 --- a/modules/rtgtools/vcfeval/meta.yml +++ b/modules/rtgtools/vcfeval/meta.yml @@ -58,10 +58,70 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - results: + - done: type: file - description: A folder containing all results of the evaluation - pattern: "*" + description: A file containing the message on succesful completion + pattern: "done" + - progress: + type: file + description: A file containing the simplified logging of the process + pattern: "progress" + - vcfeval_log: + type: file + description: A file containing the extended logging of the process + pattern: "*.log" + - false_negatives_vcf: + type: file + description: A VCF file containing the false negative variants + pattern: "fn.vcf.gz" + - false_negatives_index: + type: file + description: The index file for the false negatives' VCF file + pattern: "fn.vcf.gz.tbi" + - false_positive_vcf: + type: file + description: A VCF file containing the false positive variants + pattern: "fp.vcf.gz" + - false_positives_index: + type: file + description: The index file for the false positives' VCF file + pattern: "fp.vcf.gz.tbi" + - true_positive_vcf: + type: file + description: A VCF file containing the true positive variants + pattern: "tp.vcf.gz" + - true_positives_index: + type: file + description: The index file for the true positives' VCF file + pattern: "tp.vcf.gz.tbi" + - true_positive_baseline_vcf: + type: file + description: A VCF file containing the true positive baseline variants + pattern: "tp-baseline.vcf.gz" + - true_positives_baseline_index: + type: file + description: The index file for the baseline true positives' VCF file + pattern: "tp-baseline.vcf.gz.tbi" + - non_snp_roc: + type: file + description: A TSV file containing the ROC data for the non-SNP variants + pattern: "non_snp_roc.tsv.gz" + - snp_roc: + type: file + description: A TSV file containing the ROC data for the SNP variants + pattern: "snp_roc.tsv.gz" + - weighted_roc: + type: file + description: A TSV file containing the weighted ROC data + pattern: "weighted_roc.tsv.gz" + - summary: + type: file + description: A TXT file containing the summary of the evaluation + pattern: "summary.txt" + - phasing: + type: file + description: A TXT file containing the data on the phasing + pattern: "phasing.txt" authors: - "@nvnieuwk" diff --git a/tests/modules/rtgtools/vcfeval/test.yml b/tests/modules/rtgtools/vcfeval/test.yml index 194e0cac..70d014bf 100644 --- a/tests/modules/rtgtools/vcfeval/test.yml +++ b/tests/modules/rtgtools/vcfeval/test.yml @@ -4,36 +4,36 @@ - rtgtools - rtgtools/vcfeval files: - - path: output/rtgtools/test/done - - path: output/rtgtools/test/fn.vcf.gz + - path: output/rtgtools/done + - path: output/rtgtools/fn.vcf.gz md5sum: 4577a8c3226b9f8ed9e260c3bd4b1259 - - path: output/rtgtools/test/fn.vcf.gz.tbi + - path: output/rtgtools/fn.vcf.gz.tbi md5sum: 092a7a3162e7cff25d273525751eb284 - - path: output/rtgtools/test/fp.vcf.gz + - path: output/rtgtools/fp.vcf.gz md5sum: 1417bb8ac7a0e202df660291a74de0db - - path: output/rtgtools/test/fp.vcf.gz.tbi + - path: output/rtgtools/fp.vcf.gz.tbi md5sum: 092a7a3162e7cff25d273525751eb284 - - path: output/rtgtools/test/non_snp_roc.tsv.gz + - path: output/rtgtools/non_snp_roc.tsv.gz md5sum: 8fd51a1e5084d15d43880cb1e31a0180 - - path: output/rtgtools/test/phasing.txt + - path: output/rtgtools/phasing.txt md5sum: 133677dbd8be657439ea2b03fdfb8795 - - path: output/rtgtools/test/progress - - path: output/rtgtools/test/snp_roc.tsv.gz + - path: output/rtgtools/progress + - path: output/rtgtools/snp_roc.tsv.gz md5sum: ff2ece544adfcefaa06da054876a9ae3 - - path: output/rtgtools/test/summary.txt + - path: output/rtgtools/summary.txt md5sum: f4c8df93c8bdab603036bbc27b4a28c3 - - path: output/rtgtools/test/tp-baseline.vcf.gz + - path: output/rtgtools/tp-baseline.vcf.gz md5sum: 4577a8c3226b9f8ed9e260c3bd4b1259 - - path: output/rtgtools/test/tp-baseline.vcf.gz.tbi + - path: output/rtgtools/tp-baseline.vcf.gz.tbi md5sum: 092a7a3162e7cff25d273525751eb284 - - path: output/rtgtools/test/tp.vcf.gz + - path: output/rtgtools/tp.vcf.gz md5sum: 1417bb8ac7a0e202df660291a74de0db - - path: output/rtgtools/test/tp.vcf.gz.tbi + - path: output/rtgtools/tp.vcf.gz.tbi md5sum: 092a7a3162e7cff25d273525751eb284 - - path: output/rtgtools/test/vcfeval.log - - path: output/rtgtools/test/weighted_roc.tsv.gz - md5sum: 5209f1bdeb03704714ae92b183d08e0f + - path: output/rtgtools/vcfeval.log - path: output/rtgtools/versions.yml + - path: output/rtgtools/weighted_roc.tsv.gz + md5sum: 5209f1bdeb03704714ae92b183d08e0f - name: rtgtools vcfeval test_rtgtools_vcfeval_no_optional_inputs command: nextflow run tests/modules/rtgtools/vcfeval -entry test_rtgtools_vcfeval_no_optional_inputs -c tests/config/nextflow.config @@ -41,33 +41,33 @@ - rtgtools - rtgtools/vcfeval files: - - path: output/rtgtools/test/done - - path: output/rtgtools/test/fn.vcf.gz + - path: output/rtgtools/done + - path: output/rtgtools/fn.vcf.gz md5sum: e51420e4be520ae309a2384830bf4c15 - - path: output/rtgtools/test/fn.vcf.gz.tbi + - path: output/rtgtools/fn.vcf.gz.tbi md5sum: 092a7a3162e7cff25d273525751eb284 - - path: output/rtgtools/test/fp.vcf.gz + - path: output/rtgtools/fp.vcf.gz md5sum: 7d818cf526983de6cbb5cf517c44a8f7 - - path: output/rtgtools/test/fp.vcf.gz.tbi + - path: output/rtgtools/fp.vcf.gz.tbi md5sum: 092a7a3162e7cff25d273525751eb284 - - path: output/rtgtools/test/non_snp_roc.tsv.gz + - path: output/rtgtools/non_snp_roc.tsv.gz md5sum: a535fb80081b43b19788347152b6b8b4 - - path: output/rtgtools/test/phasing.txt + - path: output/rtgtools/phasing.txt md5sum: 133677dbd8be657439ea2b03fdfb8795 - - path: output/rtgtools/test/progress - - path: output/rtgtools/test/snp_roc.tsv.gz + - path: output/rtgtools/progress + - path: output/rtgtools/snp_roc.tsv.gz md5sum: 6006656c4a534935c7873398287bc110 - - path: output/rtgtools/test/summary.txt + - path: output/rtgtools/summary.txt md5sum: f33feb32f84958fb931063044fba369b - - path: output/rtgtools/test/tp-baseline.vcf.gz + - path: output/rtgtools/tp-baseline.vcf.gz md5sum: ed68ea567a26d3b864ada79e9253bc97 - - path: output/rtgtools/test/tp-baseline.vcf.gz.tbi + - path: output/rtgtools/tp-baseline.vcf.gz.tbi md5sum: 3518deff814eed340b0f5386294b5879 - - path: output/rtgtools/test/tp.vcf.gz + - path: output/rtgtools/tp.vcf.gz md5sum: 92fd51021d101c99da066324655d24c9 - - path: output/rtgtools/test/tp.vcf.gz.tbi + - path: output/rtgtools/tp.vcf.gz.tbi md5sum: 169063c1f570f0055059f3cb3518a8b4 - - path: output/rtgtools/test/vcfeval.log - - path: output/rtgtools/test/weighted_roc.tsv.gz - md5sum: 0ba825084bd6b94accdf54fff23ea18c + - path: output/rtgtools/vcfeval.log - path: output/rtgtools/versions.yml + - path: output/rtgtools/weighted_roc.tsv.gz + md5sum: 0ba825084bd6b94accdf54fff23ea18c From 5db26f9f3588a1934d64690c0627a22adee57d76 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 10 May 2022 12:07:11 +0200 Subject: [PATCH 230/239] Linting --- modules/rtgtools/vcfeval/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index 1963bfe0..b32d544b 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -17,7 +17,7 @@ process RTGTOOLS_VCFEVAL { output: tuple val(meta), path("done"), path("progress"), path("*.log") , emit: logs tuple val(meta), path("*{tp,fn,fp,baseline}.vcf.gz.tbi"), path("*{tp,fn,fp,baseline}.vcf.gz") , emit: vcf - tuple val(meta), path("*.tsv.gz") , emit: roc + tuple val(meta), path("*.tsv.gz") , emit: roc tuple val(meta), path("summary.txt") , emit: summary tuple val(meta), path("phasing.txt") , emit: phasing path "versions.yml" , emit: versions From f3d5584ab0e277310a147ff5ed165c3a9203c6f4 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 10 May 2022 12:08:23 +0200 Subject: [PATCH 231/239] Linting --- modules/rtgtools/vcfeval/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index b32d544b..826fec43 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -17,7 +17,7 @@ process RTGTOOLS_VCFEVAL { output: tuple val(meta), path("done"), path("progress"), path("*.log") , emit: logs tuple val(meta), path("*{tp,fn,fp,baseline}.vcf.gz.tbi"), path("*{tp,fn,fp,baseline}.vcf.gz") , emit: vcf - tuple val(meta), path("*.tsv.gz") , emit: roc + tuple val(meta), path("*.tsv.gz") , emit: roc tuple val(meta), path("summary.txt") , emit: summary tuple val(meta), path("phasing.txt") , emit: phasing path "versions.yml" , emit: versions From ef4857ec541864f41d9068a2a31b20e9b24953fb Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 10 May 2022 12:20:01 +0200 Subject: [PATCH 232/239] Updated meta.yml --- modules/rtgtools/vcfeval/meta.yml | 62 +++++-------------------------- 1 file changed, 9 insertions(+), 53 deletions(-) diff --git a/modules/rtgtools/vcfeval/meta.yml b/modules/rtgtools/vcfeval/meta.yml index e568852c..587c2d3e 100644 --- a/modules/rtgtools/vcfeval/meta.yml +++ b/modules/rtgtools/vcfeval/meta.yml @@ -58,62 +58,18 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - done: + - logging: type: file - description: A file containing the message on succesful completion - pattern: "done" - - progress: + description: Files containing logging from vcfeval + pattern: "*{done,progress,.log}" + - vcf: type: file - description: A file containing the simplified logging of the process - pattern: "progress" - - vcfeval_log: + description: VCF files containing the false negatives, false positives and true positives with their index files + pattern: "*.vcf{.gz,.gz.tbi}" + - roc: type: file - description: A file containing the extended logging of the process - pattern: "*.log" - - false_negatives_vcf: - type: file - description: A VCF file containing the false negative variants - pattern: "fn.vcf.gz" - - false_negatives_index: - type: file - description: The index file for the false negatives' VCF file - pattern: "fn.vcf.gz.tbi" - - false_positive_vcf: - type: file - description: A VCF file containing the false positive variants - pattern: "fp.vcf.gz" - - false_positives_index: - type: file - description: The index file for the false positives' VCF file - pattern: "fp.vcf.gz.tbi" - - true_positive_vcf: - type: file - description: A VCF file containing the true positive variants - pattern: "tp.vcf.gz" - - true_positives_index: - type: file - description: The index file for the true positives' VCF file - pattern: "tp.vcf.gz.tbi" - - true_positive_baseline_vcf: - type: file - description: A VCF file containing the true positive baseline variants - pattern: "tp-baseline.vcf.gz" - - true_positives_baseline_index: - type: file - description: The index file for the baseline true positives' VCF file - pattern: "tp-baseline.vcf.gz.tbi" - - non_snp_roc: - type: file - description: A TSV file containing the ROC data for the non-SNP variants - pattern: "non_snp_roc.tsv.gz" - - snp_roc: - type: file - description: A TSV file containing the ROC data for the SNP variants - pattern: "snp_roc.tsv.gz" - - weighted_roc: - type: file - description: A TSV file containing the weighted ROC data - pattern: "weighted_roc.tsv.gz" + description: TSV files containing ROC data for the evaluated variants + pattern: "*.tsv.gz" - summary: type: file description: A TXT file containing the summary of the evaluation From 29f2d3c28417f935a2688bf5ea9ad8f0e25da679 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 10 May 2022 12:22:49 +0200 Subject: [PATCH 233/239] Update modules/rtgtools/vcfeval/main.nf Co-authored-by: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> --- modules/rtgtools/vcfeval/main.nf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index 826fec43..a34f3514 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -15,11 +15,14 @@ process RTGTOOLS_VCFEVAL { path(sdf) output: - tuple val(meta), path("done"), path("progress"), path("*.log") , emit: logs - tuple val(meta), path("*{tp,fn,fp,baseline}.vcf.gz.tbi"), path("*{tp,fn,fp,baseline}.vcf.gz") , emit: vcf - tuple val(meta), path("*.tsv.gz") , emit: roc - tuple val(meta), path("summary.txt") , emit: summary - tuple val(meta), path("phasing.txt") , emit: phasing + tuple val(meta), path("**{done,progress,.log}") , emit: logs + tuple val(meta), path("**tp.vcf.gz"), path("**tp.vcf.gz.tbi") , emit: tp + tuple val(meta), path("**fn.vcf.gz"), path("**fn.vcf.gz.tbi") , emit: fn + tuple val(meta), path("**fp.vcf.gz"), path("**fp.vcf.gz.tbi") , emit: fp + tuple val(meta), path("**baseline.vcf.gz"), path("**baseline.vcf.gz.tbi") , emit: baseline + tuple val(meta), path("**.tsv.gz") , emit: roc + tuple val(meta), path("**summary.txt") , emit: summary + tuple val(meta), path("**phasing.txt") , emit: phasing path "versions.yml" , emit: versions when: From 2eb77bd64e62f6c050fb95cc7bbc402240c3e7d8 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 10 May 2022 12:22:56 +0200 Subject: [PATCH 234/239] Update modules/rtgtools/vcfeval/main.nf Co-authored-by: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> --- modules/rtgtools/vcfeval/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index a34f3514..8ab73dec 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -50,7 +50,6 @@ process RTGTOOLS_VCFEVAL { --template=$sdf \\ --threads=$task.cpus \\ - mv ${prefix}/* . cat <<-END_VERSIONS > versions.yml "${task.process}": From c18391aa4983cd801211c34b4493f330ffab1a07 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 10 May 2022 12:26:13 +0200 Subject: [PATCH 235/239] Updated meta.yml --- modules/rtgtools/vcfeval/meta.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/rtgtools/vcfeval/meta.yml b/modules/rtgtools/vcfeval/meta.yml index 587c2d3e..c2d286c8 100644 --- a/modules/rtgtools/vcfeval/meta.yml +++ b/modules/rtgtools/vcfeval/meta.yml @@ -62,10 +62,22 @@ output: type: file description: Files containing logging from vcfeval pattern: "*{done,progress,.log}" - - vcf: + - true_positives: type: file - description: VCF files containing the false negatives, false positives and true positives with their index files - pattern: "*.vcf{.gz,.gz.tbi}" + description: VCF files containing true positives with their index files + pattern: "tp.vcf{.gz,.gz.tbi}" + - true_positives_baseline: + type: file + description: VCF files containing baseline true positives with their index files + pattern: "tp-baseline.vcf{.gz,.gz.tbi}" + - false_positives: + type: file + description: VCF files containing false positives with their index files + pattern: "fp.vcf{.gz,.gz.tbi}" + - false_negatives: + type: file + description: VCF files containing false negatives with their index files + pattern: "fn.vcf{.gz,.gz.tbi}" - roc: type: file description: TSV files containing ROC data for the evaluated variants From b7134855e41d77b0fee9349c9b5eb43687e74925 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 10 May 2022 12:34:52 +0200 Subject: [PATCH 236/239] Small update on the output channels --- modules/rtgtools/vcfeval/main.nf | 8 +- tests/modules/rtgtools/vcfeval/test.yml | 98 +++++++++++++------------ 2 files changed, 54 insertions(+), 52 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index 8ab73dec..dd50c54c 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -15,14 +15,14 @@ process RTGTOOLS_VCFEVAL { path(sdf) output: - tuple val(meta), path("**{done,progress,.log}") , emit: logs + tuple val(meta), path("**results/{done,progress,*.log}") , emit: logs tuple val(meta), path("**tp.vcf.gz"), path("**tp.vcf.gz.tbi") , emit: tp tuple val(meta), path("**fn.vcf.gz"), path("**fn.vcf.gz.tbi") , emit: fn tuple val(meta), path("**fp.vcf.gz"), path("**fp.vcf.gz.tbi") , emit: fp tuple val(meta), path("**baseline.vcf.gz"), path("**baseline.vcf.gz.tbi") , emit: baseline tuple val(meta), path("**.tsv.gz") , emit: roc - tuple val(meta), path("**summary.txt") , emit: summary - tuple val(meta), path("**phasing.txt") , emit: phasing + tuple val(meta), path("**results/summary.txt") , emit: summary + tuple val(meta), path("**results/phasing.txt") , emit: phasing path "versions.yml" , emit: versions when: @@ -46,7 +46,7 @@ process RTGTOOLS_VCFEVAL { $bed_regions \\ $eval_regions \\ --calls=$query_vcf \\ - --output=$prefix \\ + --output=${prefix}_results \\ --template=$sdf \\ --threads=$task.cpus \\ diff --git a/tests/modules/rtgtools/vcfeval/test.yml b/tests/modules/rtgtools/vcfeval/test.yml index 70d014bf..33720f66 100644 --- a/tests/modules/rtgtools/vcfeval/test.yml +++ b/tests/modules/rtgtools/vcfeval/test.yml @@ -4,36 +4,37 @@ - rtgtools - rtgtools/vcfeval files: - - path: output/rtgtools/done - - path: output/rtgtools/fn.vcf.gz - md5sum: 4577a8c3226b9f8ed9e260c3bd4b1259 - - path: output/rtgtools/fn.vcf.gz.tbi + - path: output/rtgtools/test_results/done + - path: output/rtgtools/test_results/fn.vcf.gz + md5sum: be9c9106055bfad4c5985bc0d33efd56 + - path: output/rtgtools/test_results/fn.vcf.gz.tbi md5sum: 092a7a3162e7cff25d273525751eb284 - - path: output/rtgtools/fp.vcf.gz - md5sum: 1417bb8ac7a0e202df660291a74de0db - - path: output/rtgtools/fp.vcf.gz.tbi + - path: output/rtgtools/test_results/fp.vcf.gz + md5sum: e0f0ff841dc63e9fb61fd3a5db137ced + - path: output/rtgtools/test_results/fp.vcf.gz.tbi md5sum: 092a7a3162e7cff25d273525751eb284 - - path: output/rtgtools/non_snp_roc.tsv.gz - md5sum: 8fd51a1e5084d15d43880cb1e31a0180 - - path: output/rtgtools/phasing.txt + - path: output/rtgtools/test_results/non_snp_roc.tsv.gz + md5sum: ad5bad32c48f05aef232e2c0e708877a + - path: output/rtgtools/test_results/phasing.txt md5sum: 133677dbd8be657439ea2b03fdfb8795 - - path: output/rtgtools/progress - - path: output/rtgtools/snp_roc.tsv.gz - md5sum: ff2ece544adfcefaa06da054876a9ae3 - - path: output/rtgtools/summary.txt + - path: output/rtgtools/test_results/progress + - path: output/rtgtools/test_results/snp_roc.tsv.gz + md5sum: 6785b83d66486e7e6c75c5a5b1574c09 + - path: output/rtgtools/test_results/summary.txt md5sum: f4c8df93c8bdab603036bbc27b4a28c3 - - path: output/rtgtools/tp-baseline.vcf.gz - md5sum: 4577a8c3226b9f8ed9e260c3bd4b1259 - - path: output/rtgtools/tp-baseline.vcf.gz.tbi + - path: output/rtgtools/test_results/tp-baseline.vcf.gz + md5sum: be9c9106055bfad4c5985bc0d33efd56 + - path: output/rtgtools/test_results/tp-baseline.vcf.gz.tbi md5sum: 092a7a3162e7cff25d273525751eb284 - - path: output/rtgtools/tp.vcf.gz - md5sum: 1417bb8ac7a0e202df660291a74de0db - - path: output/rtgtools/tp.vcf.gz.tbi + - path: output/rtgtools/test_results/tp.vcf.gz + md5sum: e0f0ff841dc63e9fb61fd3a5db137ced + - path: output/rtgtools/test_results/tp.vcf.gz.tbi md5sum: 092a7a3162e7cff25d273525751eb284 - - path: output/rtgtools/vcfeval.log + - path: output/rtgtools/test_results/vcfeval.log + - path: output/rtgtools/test_results/weighted_roc.tsv.gz + md5sum: fa7c046ea0084172f1ef91f19de07b2b - path: output/rtgtools/versions.yml - - path: output/rtgtools/weighted_roc.tsv.gz - md5sum: 5209f1bdeb03704714ae92b183d08e0f + md5sum: 270ed7a5a8e347b251eb4aa2198f98e8 - name: rtgtools vcfeval test_rtgtools_vcfeval_no_optional_inputs command: nextflow run tests/modules/rtgtools/vcfeval -entry test_rtgtools_vcfeval_no_optional_inputs -c tests/config/nextflow.config @@ -41,33 +42,34 @@ - rtgtools - rtgtools/vcfeval files: - - path: output/rtgtools/done - - path: output/rtgtools/fn.vcf.gz - md5sum: e51420e4be520ae309a2384830bf4c15 - - path: output/rtgtools/fn.vcf.gz.tbi + - path: output/rtgtools/test_results/done + - path: output/rtgtools/test_results/fn.vcf.gz + md5sum: c11c889a4f42c8ea325748bd768ea34d + - path: output/rtgtools/test_results/fn.vcf.gz.tbi md5sum: 092a7a3162e7cff25d273525751eb284 - - path: output/rtgtools/fp.vcf.gz - md5sum: 7d818cf526983de6cbb5cf517c44a8f7 - - path: output/rtgtools/fp.vcf.gz.tbi + - path: output/rtgtools/test_results/fp.vcf.gz + md5sum: 138e85c1cd79f8fea9a33e81ce0c734c + - path: output/rtgtools/test_results/fp.vcf.gz.tbi md5sum: 092a7a3162e7cff25d273525751eb284 - - path: output/rtgtools/non_snp_roc.tsv.gz - md5sum: a535fb80081b43b19788347152b6b8b4 - - path: output/rtgtools/phasing.txt + - path: output/rtgtools/test_results/non_snp_roc.tsv.gz + md5sum: 34fb78a008dfc0bef02807b8a7012b07 + - path: output/rtgtools/test_results/phasing.txt md5sum: 133677dbd8be657439ea2b03fdfb8795 - - path: output/rtgtools/progress - - path: output/rtgtools/snp_roc.tsv.gz - md5sum: 6006656c4a534935c7873398287bc110 - - path: output/rtgtools/summary.txt + - path: output/rtgtools/test_results/progress + - path: output/rtgtools/test_results/snp_roc.tsv.gz + md5sum: a4c5761c2653e2d04fc84c1cea13b1f0 + - path: output/rtgtools/test_results/summary.txt md5sum: f33feb32f84958fb931063044fba369b - - path: output/rtgtools/tp-baseline.vcf.gz - md5sum: ed68ea567a26d3b864ada79e9253bc97 - - path: output/rtgtools/tp-baseline.vcf.gz.tbi - md5sum: 3518deff814eed340b0f5386294b5879 - - path: output/rtgtools/tp.vcf.gz - md5sum: 92fd51021d101c99da066324655d24c9 - - path: output/rtgtools/tp.vcf.gz.tbi - md5sum: 169063c1f570f0055059f3cb3518a8b4 - - path: output/rtgtools/vcfeval.log + - path: output/rtgtools/test_results/tp-baseline.vcf.gz + md5sum: d1c2d990899edf127ea5fcca8866fcb0 + - path: output/rtgtools/test_results/tp-baseline.vcf.gz.tbi + md5sum: 3307008fea47adb75c46d395c5567bc0 + - path: output/rtgtools/test_results/tp.vcf.gz + md5sum: e35b4dab82894eee9b77c81f9bc89cca + - path: output/rtgtools/test_results/tp.vcf.gz.tbi + md5sum: 45d8f8793140944f129e728299918c88 + - path: output/rtgtools/test_results/vcfeval.log + - path: output/rtgtools/test_results/weighted_roc.tsv.gz + md5sum: 5b8efc9e9381f604880412800f58e4e9 - path: output/rtgtools/versions.yml - - path: output/rtgtools/weighted_roc.tsv.gz - md5sum: 0ba825084bd6b94accdf54fff23ea18c + md5sum: 55568e4bbe5ab7e634a1f392abb89cc4 From 7fc4cc5a382214c86ec3577da0cb59823d9becb7 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 10 May 2022 13:23:22 +0200 Subject: [PATCH 237/239] Update modules/rtgtools/vcfeval/main.nf Co-authored-by: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> --- modules/rtgtools/vcfeval/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index dd50c54c..67640e87 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -33,8 +33,8 @@ process RTGTOOLS_VCFEVAL { def prefix = task.ext.prefix ?: "${meta.id}" def bed_regions = truth_regions ? "--bed-regions=$truth_regions" : "" def eval_regions = evaluation_regions ? "--evaluation-regions=$evaluation_regions" : "" - def truth_index = truth_vcf_tbi ? "" : "rtg index $truth_vcf" - def query_index = query_vcf_tbi ? "" : "rtg index $query_vcf" + def truth_index = truth_vcf_tbi ?: "rtg index $truth_vcf" + def query_index = query_vcf_tbi ?: "rtg index $query_vcf" """ $truth_index From d3927aae995dbccc4c55d93d96cb4d3fd9e5c6f2 Mon Sep 17 00:00:00 2001 From: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Date: Tue, 10 May 2022 13:26:14 +0200 Subject: [PATCH 238/239] Update modules/rtgtools/vcfeval/main.nf Co-authored-by: Matthias De Smet <11850640+matthdsm@users.noreply.github.com> --- modules/rtgtools/vcfeval/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index 67640e87..dd50c54c 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -33,8 +33,8 @@ process RTGTOOLS_VCFEVAL { def prefix = task.ext.prefix ?: "${meta.id}" def bed_regions = truth_regions ? "--bed-regions=$truth_regions" : "" def eval_regions = evaluation_regions ? "--evaluation-regions=$evaluation_regions" : "" - def truth_index = truth_vcf_tbi ?: "rtg index $truth_vcf" - def query_index = query_vcf_tbi ?: "rtg index $query_vcf" + def truth_index = truth_vcf_tbi ? "" : "rtg index $truth_vcf" + def query_index = query_vcf_tbi ? "" : "rtg index $query_vcf" """ $truth_index From fa7c947c35b153ce58ca4806b208b382ecb9a712 Mon Sep 17 00:00:00 2001 From: Nicolas Vannieuwkerke Date: Tue, 10 May 2022 13:33:37 +0200 Subject: [PATCH 239/239] Adjusted meta --- modules/rtgtools/vcfeval/main.nf | 4 ++-- modules/rtgtools/vcfeval/meta.yml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/rtgtools/vcfeval/main.nf b/modules/rtgtools/vcfeval/main.nf index dd50c54c..1bad4231 100644 --- a/modules/rtgtools/vcfeval/main.nf +++ b/modules/rtgtools/vcfeval/main.nf @@ -20,10 +20,10 @@ process RTGTOOLS_VCFEVAL { tuple val(meta), path("**fn.vcf.gz"), path("**fn.vcf.gz.tbi") , emit: fn tuple val(meta), path("**fp.vcf.gz"), path("**fp.vcf.gz.tbi") , emit: fp tuple val(meta), path("**baseline.vcf.gz"), path("**baseline.vcf.gz.tbi") , emit: baseline - tuple val(meta), path("**.tsv.gz") , emit: roc + tuple val(meta), path("**.tsv.gz") , emit: roc tuple val(meta), path("**results/summary.txt") , emit: summary tuple val(meta), path("**results/phasing.txt") , emit: phasing - path "versions.yml" , emit: versions + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when diff --git a/modules/rtgtools/vcfeval/meta.yml b/modules/rtgtools/vcfeval/meta.yml index c2d286c8..5a5f452e 100644 --- a/modules/rtgtools/vcfeval/meta.yml +++ b/modules/rtgtools/vcfeval/meta.yml @@ -62,21 +62,21 @@ output: type: file description: Files containing logging from vcfeval pattern: "*{done,progress,.log}" - - true_positives: + - tp: type: file - description: VCF files containing true positives with their index files + description: A tuple containing the VCF and TBI file for the true positive variants pattern: "tp.vcf{.gz,.gz.tbi}" - - true_positives_baseline: + - baseline: type: file - description: VCF files containing baseline true positives with their index files + description: A tuple containing the VCF and TBI file for the baseline true positive variants pattern: "tp-baseline.vcf{.gz,.gz.tbi}" - - false_positives: + - fp: type: file - description: VCF files containing false positives with their index files + description: A tuple containing the VCF and TBI file for the false positive variants pattern: "fp.vcf{.gz,.gz.tbi}" - - false_negatives: + - fn: type: file - description: VCF files containing false negatives with their index files + description: A tuple containing the VCF and TBI file for the false negative variants pattern: "fn.vcf{.gz,.gz.tbi}" - roc: type: file