From 10502399ad50e061afe443a872fb49722af57e34 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 21 Jul 2021 10:00:48 +0200 Subject: [PATCH 01/36] Replaced param with input val channel (#595) * Replaced param with input val channel * Apply suggestions from code review Co-authored-by: Jose Espinosa-Carrasco Co-authored-by: Harshil Patel * Apply suggestions from code review Co-authored-by: Harshil Patel * Apply suggestions from code review (missed one) * YAML lint Co-authored-by: Jose Espinosa-Carrasco Co-authored-by: Harshil Patel --- modules/fastp/main.nf | 5 ++-- tests/modules/fastp/main.nf | 30 ++++++++++++++++++++++-- tests/modules/fastp/test.yml | 45 ++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 4 deletions(-) diff --git a/modules/fastp/main.nf b/modules/fastp/main.nf index 6d703615..acba864a 100644 --- a/modules/fastp/main.nf +++ b/modules/fastp/main.nf @@ -20,6 +20,7 @@ process FASTP { input: tuple val(meta), path(reads) + val save_trimmed_fail output: tuple val(meta), path('*.trim.fastq.gz'), emit: reads @@ -34,7 +35,7 @@ process FASTP { def software = getSoftwareName(task.process) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" if (meta.single_end) { - def fail_fastq = params.save_trimmed_fail ? "--failed_out ${prefix}.fail.fastq.gz" : '' + def fail_fastq = save_trimmed_fail ? "--failed_out ${prefix}.fail.fastq.gz" : '' """ [ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz fastp \\ @@ -49,7 +50,7 @@ process FASTP { echo \$(fastp --version 2>&1) | sed -e "s/fastp //g" > ${software}.version.txt """ } else { - def fail_fastq = params.save_trimmed_fail ? "--unpaired1 ${prefix}_1.fail.fastq.gz --unpaired2 ${prefix}_2.fail.fastq.gz" : '' + def fail_fastq = save_trimmed_fail ? "--unpaired1 ${prefix}_1.fail.fastq.gz --unpaired2 ${prefix}_2.fail.fastq.gz" : '' """ [ ! -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 diff --git a/tests/modules/fastp/main.nf b/tests/modules/fastp/main.nf index 012f4c6c..f4129c09 100644 --- a/tests/modules/fastp/main.nf +++ b/tests/modules/fastp/main.nf @@ -11,8 +11,9 @@ workflow test_fastp_single_end { input = [ [ id:'test', single_end:true ], // meta map [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] ] + save_trimmed_fail = false - FASTP ( input ) + FASTP ( input, save_trimmed_fail ) } // @@ -23,7 +24,32 @@ workflow test_fastp_paired_end { [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] ] + save_trimmed_fail = false - FASTP ( input ) + FASTP ( input, save_trimmed_fail ) } +// +// Test with single-end data with saving trimming fails +// +workflow test_fastp_single_end_trim_fail { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + save_trimmed_fail = true + + FASTP ( input, save_trimmed_fail ) +} + +// +// Test with paired-end data with saving trimming fails +// +workflow test_fastp_paired_end_trim_fail { + 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) ] + ] + save_trimmed_fail = true + + FASTP ( input, save_trimmed_fail ) +} diff --git a/tests/modules/fastp/test.yml b/tests/modules/fastp/test.yml index eb9de964..a6e253af 100644 --- a/tests/modules/fastp/test.yml +++ b/tests/modules/fastp/test.yml @@ -36,3 +36,48 @@ md5sum: e2257263668dc8a75d95475099fb472d - path: output/fastp/test_2.trim.fastq.gz md5sum: 9eff7203596580cc5e42aceab4a469df + +- name: fastp test_fastp_single_end_trim_fail + command: nextflow run tests/modules/fastp -entry test_fastp_single_end_trim_fail -c tests/config/nextflow.config + tags: + - fastp + files: + - path: output/fastp/test.fastp.html + contains: + - "Q20 bases:12.922000 K (92.984097%)" + - "single end (151 cycles)" + - path: output/fastp/test.fastp.log + contains: + - "Q20 bases: 12922(92.9841%)" + - "reads passed filter: 99" + - path: output/fastp/test.trim.fastq.gz + md5sum: e2257263668dc8a75d95475099fb472d + - path: output/fastp/test.fastp.json + md5sum: ee65a46d6e59fa556f112727b8a902ce + - path: output/fastp/test.fail.fastq.gz + md5sum: de315d397c994d8e66bafc7a8dc11070 + +- name: fastp test_fastp_paired_end_trim_fail + command: nextflow run tests/modules/fastp -entry test_fastp_paired_end_trim_fail -c tests/config/nextflow.config + tags: + - fastp + files: + - path: output/fastp/test.fastp.html + contains: + - "Q20 bases:25.719000 K (93.033098%)" + - "The input has little adapter percentage (~0.000000%), probably it's trimmed before." + - path: output/fastp/test.fastp.log + contains: + - "No adapter detected for read1" + - "Q30 bases: 12281(88.3716%)" + - path: output/fastp/test.fastp.json + contains: + - '"passed_filter_reads": 198' + - path: output/fastp/test_1.trim.fastq.gz + md5sum: e2257263668dc8a75d95475099fb472d + - path: output/fastp/test_2.trim.fastq.gz + md5sum: 9eff7203596580cc5e42aceab4a469df + - path: output/fastp/test_1.fail.fastq.gz + md5sum: e62ff0123a74adfc6903d59a449cbdb0 + - path: output/fastp/test_2.fail.fastq.gz + md5sum: f52309b35a7c15cbd56a9c3906ef98a5 From f892f273fe55f545b2f851e772c0999f49d9a798 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 21 Jul 2021 12:03:49 +0200 Subject: [PATCH 02/36] Updated optional input definition (#599) * Updated optional input definition * Update README.md Co-authored-by: Harshil Patel Co-authored-by: Harshil Patel --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e06162c..2e78d970 100644 --- a/README.md +++ b/README.md @@ -443,7 +443,7 @@ using a combination of `bwa` and `samtools` to output a BAM file instead of a SA - Named file extensions MUST be emitted for ALL output channels e.g. `path "*.txt", emit: txt`. -- Optional inputs are not currently supported by Nextflow. However, "fake files" MAY be used to work around this issue. +- Optional inputs are not currently supported by Nextflow. However, passing an empty list (`[]`) instead of a file as a module parameter can be used to work around this issue. #### Resource requirements From 1a26d48104a94089f1012630790a17736ffb5546 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 21 Jul 2021 13:48:07 +0200 Subject: [PATCH 03/36] module: picard sortsam (#603) * Add picard/sortsam module * Fix container links * Changes after code review * Input meta in the right place --- modules/picard/sortsam/functions.nf | 68 +++++++++++++++++++++++++++ modules/picard/sortsam/main.nf | 49 +++++++++++++++++++ modules/picard/sortsam/meta.yml | 47 ++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/picard/sortsam/main.nf | 14 ++++++ tests/modules/picard/sortsam/test.yml | 8 ++++ 6 files changed, 190 insertions(+) create mode 100644 modules/picard/sortsam/functions.nf create mode 100644 modules/picard/sortsam/main.nf create mode 100644 modules/picard/sortsam/meta.yml create mode 100644 tests/modules/picard/sortsam/main.nf create mode 100644 tests/modules/picard/sortsam/test.yml diff --git a/modules/picard/sortsam/functions.nf b/modules/picard/sortsam/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/picard/sortsam/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/picard/sortsam/main.nf b/modules/picard/sortsam/main.nf new file mode 100644 index 00000000..dc2a8136 --- /dev/null +++ b/modules/picard/sortsam/main.nf @@ -0,0 +1,49 @@ + +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process PICARD_SORTSAM { + tag "$meta.id" + label 'process_low' + publishDir "${params.outdir}", + mode: params.publish_dir_mode, + saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::picard=2.25.6" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/picard:2.25.6--hdfd78af_0" + } else { + container "quay.io/biocontainers/picard:2.25.6--hdfd78af_0" + } + + input: + tuple val(meta), path(bam) + val sort_order + + output: + tuple val(meta), path("*.sorted.bam"), emit: bam + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + def avail_mem = 3 + if (!task.memory) { + log.info '[Picard SortSam] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + """ + picard \\ + SortSam \\ + -Xmx${avail_mem}g \\ + --INPUT $bam \\ + --OUTPUT ${prefix}.sorted.bam \\ + --SORT_ORDER $sort_order + + echo \$(picard SortSam --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d: > ${software}.version.txt + """ +} diff --git a/modules/picard/sortsam/meta.yml b/modules/picard/sortsam/meta.yml new file mode 100644 index 00000000..ea4b2c89 --- /dev/null +++ b/modules/picard/sortsam/meta.yml @@ -0,0 +1,47 @@ +name: picard_sortsam +description: Sorts BAM/SAM files based on a variety of picard specific criteria +keywords: + - sort + - bam + - sam +tools: + - picard: + description: | + A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) + data and formats such as SAM/BAM/CRAM and VCF. + homepage: https://broadinstitute.github.io/picard/ + documentation: https://broadinstitute.github.io/picard/ + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,sam}" + - sort_order: + type: value + description: Picard sort order type + pattern: "unsorted|queryname|coordinate|duplicate|unknown" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + - bam: + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*sorted.{bam}" + + +authors: + - "@jfy133" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index d56a8695..2604d8e6 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -567,6 +567,10 @@ picard/mergesamfiles: - modules/picard/mergesamfiles/** - tests/modules/picard/mergesamfiles/** +picard/sortsam: + - modules/picard/sortsam/** + - tests/modules/picard/sortsam/** + plasmidid: - modules/plasmidid/** - tests/modules/plasmidid/** diff --git a/tests/modules/picard/sortsam/main.nf b/tests/modules/picard/sortsam/main.nf new file mode 100644 index 00000000..71ae75d6 --- /dev/null +++ b/tests/modules/picard/sortsam/main.nf @@ -0,0 +1,14 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PICARD_SORTSAM } from '../../../../modules/picard/sortsam/main.nf' addParams( options: [:] ) + +workflow test_picard_sortsam { + + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) ] + sort_order = "queryname" + + PICARD_SORTSAM ( input, sort_order ) +} diff --git a/tests/modules/picard/sortsam/test.yml b/tests/modules/picard/sortsam/test.yml new file mode 100644 index 00000000..4443228e --- /dev/null +++ b/tests/modules/picard/sortsam/test.yml @@ -0,0 +1,8 @@ +- name: picard sortsam + command: nextflow run ./tests/modules/picard/sortsam -entry test_picard_sortsam -c tests/config/nextflow.config + tags: + - picard + - picard/sortsam + files: + - path: output/picard/test.sorted.bam + md5sum: b44a6ca04811a9470c7813c3c9465fd5 From f43778b0e641a9643ae73fe1f2fe2d5bb81edffc Mon Sep 17 00:00:00 2001 From: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com> Date: Wed, 21 Jul 2021 14:30:52 +0200 Subject: [PATCH 04/36] Updated the version of STAR in align and genomegenerate modules (#604) * Updated the version of STAR in align and genomegenerate modules * Changes in test.yml * Changes in test.yml Co-authored-by: Harshil Patel --- modules/star/align/main.nf | 6 +- modules/star/genomegenerate/main.nf | 6 +- tests/modules/star/align/main.nf | 35 ++-- tests/modules/star/align/test.yml | 179 ++++++++++++++------- tests/modules/star/genomegenerate/test.yml | 62 +++---- 5 files changed, 184 insertions(+), 104 deletions(-) diff --git a/modules/star/align/main.nf b/modules/star/align/main.nf index e85ddb79..6e085f9b 100644 --- a/modules/star/align/main.nf +++ b/modules/star/align/main.nf @@ -12,11 +12,11 @@ process STAR_ALIGN { saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } // Note: 2.7X indices incompatible with AWS iGenomes. - conda (params.enable_conda ? 'bioconda::star=2.6.1d' : null) + conda (params.enable_conda ? 'bioconda::star=2.7.9a' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container 'https://depot.galaxyproject.org/singularity/star:2.6.1d--0' + container 'https://depot.galaxyproject.org/singularity/star:2.7.9a--h9ee0642_0' } else { - container 'quay.io/biocontainers/star:2.6.1d--0' + container 'quay.io/biocontainers/star:2.7.9a--h9ee0642_0' } input: diff --git a/modules/star/genomegenerate/main.nf b/modules/star/genomegenerate/main.nf index b440b415..9335b9b5 100644 --- a/modules/star/genomegenerate/main.nf +++ b/modules/star/genomegenerate/main.nf @@ -12,11 +12,11 @@ process STAR_GENOMEGENERATE { saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:'index', meta:[:], publish_by_meta:[]) } // Note: 2.7X indices incompatible with AWS iGenomes. - conda (params.enable_conda ? "bioconda::star=2.6.1d bioconda::samtools=1.10 conda-forge::gawk=5.1.0" : null) + conda (params.enable_conda ? "bioconda::star=2.7.9a bioconda::samtools=1.13 conda-forge::gawk=5.1.0" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0" + container "https://depot.galaxyproject.org/singularity/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:a7908dfb0485a80ca94e4d17b0ac991532e4e989-0" } else { - container "quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:59cdd445419f14abac76b31dd0d71217994cbcc9-0" + container "quay.io/biocontainers/mulled-v2-1fa26d1ce03c295fe2fdcf85831a92fbcbd7e8c2:a7908dfb0485a80ca94e4d17b0ac991532e4e989-0" } input: diff --git a/tests/modules/star/align/main.nf b/tests/modules/star/align/main.nf index d280aeae..2a68d7cd 100644 --- a/tests/modules/star/align/main.nf +++ b/tests/modules/star/align/main.nf @@ -2,28 +2,43 @@ nextflow.enable.dsl = 2 -include { STAR_GENOMEGENERATE } from '../../../../modules/star/genomegenerate/main.nf' addParams( options: [args: '--genomeSAindexNbases 9'] ) -include { STAR_ALIGN } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat'] ) +include { STAR_GENOMEGENERATE } from '../../../../modules/star/genomegenerate/main.nf' addParams( options: [args: '--genomeSAindexNbases 9'] ) +include { STAR_ALIGN } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat'] ) +include { STAR_ALIGN as STAR_FOR_ARRIBA } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat --outSAMtype BAM Unsorted --outSAMunmapped Within --outBAMcompression 0 --outFilterMultimapNmax 50 --peOverlapNbasesMin 10 --alignSplicedMateMapLminOverLmate 0.5 --alignSJstitchMismatchNmax 5 -1 5 5 --chimSegmentMin 10 --chimOutType WithinBAM HardClip --chimJunctionOverhangMin 10 --chimScoreDropMax 30 --chimScoreJunctionNonGTAG 0 --chimScoreSeparation 1 --chimSegmentReadGapMax 3 --chimMultimapNmax 50'] ) + workflow test_star_alignment_single_end { input = [ [ id:'test', single_end:true ], // meta map - [ file("${launchDir}/tests/data/generic/fastq/test_single_end.fastq.gz", checkIfExists: true) ] + [ file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true) ] ] - fasta = file("${launchDir}/tests/data/generic/fasta/GCF_000019425.1_ASM1942v1_genomic.fna", checkIfExists: true) - gtf = file("${launchDir}/tests/data/generic/gtf/GCF_000019425.1_ASM1942v1_genomic.gtf", checkIfExists: true) - + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) + STAR_GENOMEGENERATE ( fasta, gtf ) STAR_ALIGN ( input, STAR_GENOMEGENERATE.out.index, gtf ) } workflow test_star_alignment_paired_end { input = [ [ id:'test', single_end:false ], // meta map - [ file("${launchDir}/tests/data/generic/fastq/test_R1.fastq.gz", checkIfExists: true), - file("${launchDir}/tests/data/generic/fastq/test_R2.fastq.gz", checkIfExists: true) ] + [ file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true) ] ] - fasta = file("${launchDir}/tests/data/generic/fasta/GCF_000019425.1_ASM1942v1_genomic.fna", checkIfExists: true) - gtf = file("${launchDir}/tests/data/generic/gtf/GCF_000019425.1_ASM1942v1_genomic.gtf", checkIfExists: true) + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) STAR_GENOMEGENERATE ( fasta, gtf ) STAR_ALIGN ( input, STAR_GENOMEGENERATE.out.index, gtf ) } + + +workflow test_star_alignment_paired_end_for_fusion { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true) ] + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) + + STAR_GENOMEGENERATE ( fasta, gtf ) + STAR_FOR_ARRIBA ( input, STAR_GENOMEGENERATE.out.index, gtf ) +} diff --git a/tests/modules/star/align/test.yml b/tests/modules/star/align/test.yml index d6bfb7fa..87413c2c 100644 --- a/tests/modules/star/align/test.yml +++ b/tests/modules/star/align/test.yml @@ -1,73 +1,132 @@ -- name: star align single-end - command: nextflow run ./tests/modules/star/align -entry test_star_alignment_single_end -c tests/config/nextflow.config +- name: star align test_star_alignment_single_end + command: nextflow run tests/modules/star/align -entry test_star_alignment_single_end -c tests/config/nextflow.config tags: - star - star/align files: - - path: output/star/star/Genome - md5sum: 323c992bac354f93073ce0fc43f222f8 - - path: output/star/star/SA - md5sum: 3e70e4fc6d031e1915bb510727f2c559 - - path: output/star/star/SAindex - md5sum: a94198b95a245d4f64af2a7133b6ec7b - - path: output/star/star/chrLength.txt - md5sum: f2bea3725fe1c01420c57fb73bdeb31a - - path: output/star/star/chrNameLength.txt - md5sum: c7ceb0a8827b2ea91c386933bee48742 - - path: output/star/star/chrStart.txt - md5sum: faf5c55020c99eceeef3e34188ac0d2f - - path: output/star/star/exonGeTrInfo.tab - md5sum: aec6e7a1ae3fc8c638ce5a9ce9c886b6 - - path: output/star/star/exonInfo.tab - md5sum: 42eca6ebc2dc72d9d6e6b3acd3714343 - - path: output/star/star/genomeParameters.txt - md5sum: 05e1041cbfb7f81686e17bc80b3ddcea - - path: output/star/star/sjdbInfo.txt - md5sum: 1082ab459363b3f2f7aabcef0979c1ed - - path: output/star/star/sjdbList.fromGTF.out.tab - md5sum: d41d8cd98f00b204e9800998ecf8427e - - path: output/star/star/sjdbList.out.tab - md5sum: d41d8cd98f00b204e9800998ecf8427e - - path: output/star/star/transcriptInfo.tab - md5sum: 8fbe69abbbef4f89da3854873984dbac + - path: output/index/star/Genome + md5sum: a654229fbca6071dcb6b01ce7df704da + - path: output/index/star/Log.out + - path: output/index/star/SA + md5sum: 8c3edc46697b72c9e92440d4cf43506c + - path: output/index/star/SAindex + md5sum: 2a0c675d8b91d8e5e8c1826d3500482e + - path: output/index/star/chrLength.txt + md5sum: c81f40f27e72606d7d07097c1d56a5b5 + - path: output/index/star/chrName.txt + md5sum: 5ae68a67b70976ee95342a7451cb5af1 + - path: output/index/star/chrNameLength.txt + md5sum: b190587cae0531f3cf25552d8aa674db + - path: output/index/star/chrStart.txt + md5sum: 8d3291e6bcdbe9902fbd7c887494173f + - path: output/index/star/exonGeTrInfo.tab + md5sum: d04497f69d6ef889efd4d34fe63edcc4 + - path: output/index/star/exonInfo.tab + md5sum: 0d560290fab688b7268d88d5494bf9fe + - path: output/index/star/geneInfo.tab + md5sum: 8b608537307443ffaee4927d2b428805 + - path: output/index/star/genomeParameters.txt + md5sum: 3097677f4d8b2cb66770b9e55d343a7f + - path: output/index/star/sjdbInfo.txt + md5sum: 5690ea9d9f09f7ff85b7fd47bd234903 + - path: output/index/star/sjdbList.fromGTF.out.tab + md5sum: 8760c33e966dad0b39f440301ebbdee4 + - path: output/index/star/sjdbList.out.tab + md5sum: 9e4f991abbbfeb3935a2bb21b9e258f1 + - path: output/index/star/transcriptInfo.tab + md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - path: output/star/test.Aligned.out.bam - md5sum: b7f113f12ff62e09d16fa0ace290d03e + md5sum: 509d7f1fba3350913c8ea13f01917085 + - path: output/star/test.Log.final.out + - path: output/star/test.Log.out + - path: output/star/test.Log.progress.out - path: output/star/test.SJ.out.tab - md5sum: d41d8cd98f00b204e9800998ecf8427e -- name: star align paired-end - command: nextflow run ./tests/modules/star/align -entry test_star_alignment_paired_end -c tests/config/nextflow.config +- name: star align test_star_alignment_paired_end + command: nextflow run tests/modules/star/align -entry test_star_alignment_paired_end -c tests/config/nextflow.config tags: - star - star/align files: - - path: output/star/star/Genome - md5sum: 323c992bac354f93073ce0fc43f222f8 - - path: output/star/star/SA - md5sum: 3e70e4fc6d031e1915bb510727f2c559 - - path: output/star/star/SAindex - md5sum: a94198b95a245d4f64af2a7133b6ec7b - - path: output/star/star/chrLength.txt - md5sum: f2bea3725fe1c01420c57fb73bdeb31a - - path: output/star/star/chrNameLength.txt - md5sum: c7ceb0a8827b2ea91c386933bee48742 - - path: output/star/star/chrStart.txt - md5sum: faf5c55020c99eceeef3e34188ac0d2f - - path: output/star/star/exonGeTrInfo.tab - md5sum: aec6e7a1ae3fc8c638ce5a9ce9c886b6 - - path: output/star/star/exonInfo.tab - md5sum: 42eca6ebc2dc72d9d6e6b3acd3714343 - - path: output/star/star/genomeParameters.txt - md5sum: 05e1041cbfb7f81686e17bc80b3ddcea - - path: output/star/star/sjdbInfo.txt - md5sum: 1082ab459363b3f2f7aabcef0979c1ed - - path: output/star/star/sjdbList.fromGTF.out.tab - md5sum: d41d8cd98f00b204e9800998ecf8427e - - path: output/star/star/sjdbList.out.tab - md5sum: d41d8cd98f00b204e9800998ecf8427e - - path: output/star/star/transcriptInfo.tab - md5sum: 8fbe69abbbef4f89da3854873984dbac + - path: output/index/star/Genome + md5sum: a654229fbca6071dcb6b01ce7df704da + - path: output/index/star/Log.out + - path: output/index/star/SA + md5sum: 8c3edc46697b72c9e92440d4cf43506c + - path: output/index/star/SAindex + md5sum: 2a0c675d8b91d8e5e8c1826d3500482e + - path: output/index/star/chrLength.txt + md5sum: c81f40f27e72606d7d07097c1d56a5b5 + - path: output/index/star/chrName.txt + md5sum: 5ae68a67b70976ee95342a7451cb5af1 + - path: output/index/star/chrNameLength.txt + md5sum: b190587cae0531f3cf25552d8aa674db + - path: output/index/star/chrStart.txt + md5sum: 8d3291e6bcdbe9902fbd7c887494173f + - path: output/index/star/exonGeTrInfo.tab + md5sum: d04497f69d6ef889efd4d34fe63edcc4 + - path: output/index/star/exonInfo.tab + md5sum: 0d560290fab688b7268d88d5494bf9fe + - path: output/index/star/geneInfo.tab + md5sum: 8b608537307443ffaee4927d2b428805 + - path: output/index/star/genomeParameters.txt + md5sum: 3097677f4d8b2cb66770b9e55d343a7f + - path: output/index/star/sjdbInfo.txt + md5sum: 5690ea9d9f09f7ff85b7fd47bd234903 + - path: output/index/star/sjdbList.fromGTF.out.tab + md5sum: 8760c33e966dad0b39f440301ebbdee4 + - path: output/index/star/sjdbList.out.tab + md5sum: 9e4f991abbbfeb3935a2bb21b9e258f1 + - path: output/index/star/transcriptInfo.tab + md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - path: output/star/test.Aligned.out.bam - md5sum: a1f92e8dbeb954b6b8d3d7cc6b9814fb + md5sum: 64b408fb1d61e2de8ff51c847cd5bc52 + - path: output/star/test.Log.final.out + - path: output/star/test.Log.out + - path: output/star/test.Log.progress.out - path: output/star/test.SJ.out.tab - md5sum: d41d8cd98f00b204e9800998ecf8427e + +- name: star align test_star_alignment_paired_end_for_fusion + command: nextflow run tests/modules/star/align -entry test_star_alignment_paired_end_for_fusion -c tests/config/nextflow.config + tags: + - star + - star/align + files: + - path: output/index/star/Genome + md5sum: a654229fbca6071dcb6b01ce7df704da + - path: output/index/star/Log.out + - path: output/index/star/SA + md5sum: 8c3edc46697b72c9e92440d4cf43506c + - path: output/index/star/SAindex + md5sum: 2a0c675d8b91d8e5e8c1826d3500482e + - path: output/index/star/chrLength.txt + md5sum: c81f40f27e72606d7d07097c1d56a5b5 + - path: output/index/star/chrName.txt + md5sum: 5ae68a67b70976ee95342a7451cb5af1 + - path: output/index/star/chrNameLength.txt + md5sum: b190587cae0531f3cf25552d8aa674db + - path: output/index/star/chrStart.txt + md5sum: 8d3291e6bcdbe9902fbd7c887494173f + - path: output/index/star/exonGeTrInfo.tab + md5sum: d04497f69d6ef889efd4d34fe63edcc4 + - path: output/index/star/exonInfo.tab + md5sum: 0d560290fab688b7268d88d5494bf9fe + - path: output/index/star/geneInfo.tab + md5sum: 8b608537307443ffaee4927d2b428805 + - path: output/index/star/genomeParameters.txt + md5sum: 3097677f4d8b2cb66770b9e55d343a7f + - path: output/index/star/sjdbInfo.txt + md5sum: 5690ea9d9f09f7ff85b7fd47bd234903 + - path: output/index/star/sjdbList.fromGTF.out.tab + md5sum: 8760c33e966dad0b39f440301ebbdee4 + - path: output/index/star/sjdbList.out.tab + md5sum: 9e4f991abbbfeb3935a2bb21b9e258f1 + - path: output/index/star/transcriptInfo.tab + md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 + - path: output/star/test.Aligned.out.bam + md5sum: d724ca90a102347b9c5052a33ea4d308 + - path: output/star/test.Log.final.out + - path: output/star/test.Log.out + - path: output/star/test.Log.progress.out + - path: output/star/test.SJ.out.tab + md5sum: 5155c9fd1f787ad6d7d80987fb06219c diff --git a/tests/modules/star/genomegenerate/test.yml b/tests/modules/star/genomegenerate/test.yml index 4e9c2247..0a4bff80 100644 --- a/tests/modules/star/genomegenerate/test.yml +++ b/tests/modules/star/genomegenerate/test.yml @@ -1,31 +1,37 @@ -- name: star genomegenerate - command: nextflow run ./tests/modules/star/genomegenerate -entry test_star_genomegenerate -c tests/config/nextflow.config +- name: star genomegenerate test_star_genomegenerate + command: nextflow run tests/modules/star/genomegenerate -entry test_star_genomegenerate -c tests/config/nextflow.config tags: - - star - star/genomegenerate + - star files: - - path: ./output/index/star/Genome - md5sum: 323c992bac354f93073ce0fc43f222f8 - - path: ./output/index/star/SA - md5sum: 3e70e4fc6d031e1915bb510727f2c559 - - path: ./output/index/star/SAindex - md5sum: a94198b95a245d4f64af2a7133b6ec7b - - path: ./output/index/star/chrLength.txt - md5sum: f2bea3725fe1c01420c57fb73bdeb31a - - path: ./output/index/star/chrNameLength.txt - md5sum: c7ceb0a8827b2ea91c386933bee48742 - - path: ./output/index/star/chrStart.txt - md5sum: faf5c55020c99eceeef3e34188ac0d2f - - path: ./output/index/star/exonGeTrInfo.tab - md5sum: aec6e7a1ae3fc8c638ce5a9ce9c886b6 - - path: ./output/index/star/exonInfo.tab - md5sum: 42eca6ebc2dc72d9d6e6b3acd3714343 - - path: ./output/index/star/sjdbInfo.txt - md5sum: 1082ab459363b3f2f7aabcef0979c1ed - - path: ./output/index/star/sjdbList.fromGTF.out.tab - md5sum: d41d8cd98f00b204e9800998ecf8427e - - path: ./output/index/star/sjdbList.out.tab - md5sum: d41d8cd98f00b204e9800998ecf8427e - - path: ./output/index/star/transcriptInfo.tab - md5sum: 8fbe69abbbef4f89da3854873984dbac - - path: ./output/index/star/genomeParameters.txt + - path: output/index/star/Genome + md5sum: a654229fbca6071dcb6b01ce7df704da + - path: output/index/star/Log.out + - path: output/index/star/SA + md5sum: 8c3edc46697b72c9e92440d4cf43506c + - path: output/index/star/SAindex + md5sum: d0fbf2789ee1e9f60c352ba3655d9de4 + - path: output/index/star/chrLength.txt + md5sum: c81f40f27e72606d7d07097c1d56a5b5 + - path: output/index/star/chrName.txt + md5sum: 5ae68a67b70976ee95342a7451cb5af1 + - path: output/index/star/chrNameLength.txt + md5sum: b190587cae0531f3cf25552d8aa674db + - path: output/index/star/chrStart.txt + md5sum: 8d3291e6bcdbe9902fbd7c887494173f + - path: output/index/star/exonGeTrInfo.tab + md5sum: d04497f69d6ef889efd4d34fe63edcc4 + - path: output/index/star/exonInfo.tab + md5sum: 0d560290fab688b7268d88d5494bf9fe + - path: output/index/star/geneInfo.tab + md5sum: 8b608537307443ffaee4927d2b428805 + - path: output/index/star/genomeParameters.txt + md5sum: 5a1ec027e575c3d7c1851e6b80fb8c5d + - path: output/index/star/sjdbInfo.txt + md5sum: 5690ea9d9f09f7ff85b7fd47bd234903 + - path: output/index/star/sjdbList.fromGTF.out.tab + md5sum: 8760c33e966dad0b39f440301ebbdee4 + - path: output/index/star/sjdbList.out.tab + md5sum: 9e4f991abbbfeb3935a2bb21b9e258f1 + - path: output/index/star/transcriptInfo.tab + md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 From a0019d41754f750a380084b2d0a015b88af02053 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 21 Jul 2021 15:34:21 +0200 Subject: [PATCH 05/36] fix: picard sortsam (#605) * Add picard/sortsam module * Fix container links * Changes after code review * Input meta in the right place * Correct output file suffix * Define only `bam` in output tuple --- modules/picard/sortsam/main.nf | 4 ++-- tests/modules/picard/sortsam/main.nf | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/picard/sortsam/main.nf b/modules/picard/sortsam/main.nf index dc2a8136..2af28496 100644 --- a/modules/picard/sortsam/main.nf +++ b/modules/picard/sortsam/main.nf @@ -24,7 +24,7 @@ process PICARD_SORTSAM { val sort_order output: - tuple val(meta), path("*.sorted.bam"), emit: bam + tuple val(meta), path("*.bam"), emit: bam path "*.version.txt" , emit: version script: @@ -41,7 +41,7 @@ process PICARD_SORTSAM { SortSam \\ -Xmx${avail_mem}g \\ --INPUT $bam \\ - --OUTPUT ${prefix}.sorted.bam \\ + --OUTPUT ${prefix}.bam \\ --SORT_ORDER $sort_order echo \$(picard SortSam --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d: > ${software}.version.txt diff --git a/tests/modules/picard/sortsam/main.nf b/tests/modules/picard/sortsam/main.nf index 71ae75d6..0130fad6 100644 --- a/tests/modules/picard/sortsam/main.nf +++ b/tests/modules/picard/sortsam/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { PICARD_SORTSAM } from '../../../../modules/picard/sortsam/main.nf' addParams( options: [:] ) +include { PICARD_SORTSAM } from '../../../../modules/picard/sortsam/main.nf' addParams( options: [suffix:'.sorted'] ) workflow test_picard_sortsam { From 217303f5c1a92effb8a97c29294ee9f2e19f697e Mon Sep 17 00:00:00 2001 From: Jose Espinosa-Carrasco Date: Wed, 21 Jul 2021 15:38:40 +0200 Subject: [PATCH 06/36] Add option -p to set the # of cpus on stringtie (#601) * Add option -p to set the # of cpus on stringtie * Bump version 2.1.7 to stringtie modules * Output stringtie/merge version * Fix padding * Apply suggestions from code review * Defining software variable * Fix test, gff can't be md5 check, contains instead Co-authored-by: Harshil Patel --- modules/stringtie/merge/main.nf | 10 +++++++--- modules/stringtie/stringtie/main.nf | 9 +++++---- tests/modules/stringtie/merge/test.yml | 10 ++++++++-- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/modules/stringtie/merge/main.nf b/modules/stringtie/merge/main.nf index 3c88d494..f0820be1 100644 --- a/modules/stringtie/merge/main.nf +++ b/modules/stringtie/merge/main.nf @@ -11,11 +11,11 @@ process STRINGTIE_MERGE { saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } // Note: 2.7X indices incompatible with AWS iGenomes. - conda (params.enable_conda ? "bioconda::stringtie=2.1.4" : null) + conda (params.enable_conda ? "bioconda::stringtie=2.1.7" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/stringtie:2.1.4--h7e0af3c_0" + container "https://depot.galaxyproject.org/singularity/stringtie:2.1.7--h978d192_0" } else { - container "quay.io/biocontainers/stringtie:2.1.4--h7e0af3c_0" + container "quay.io/biocontainers/stringtie:2.1.7--h978d192_0" } input: @@ -24,12 +24,16 @@ process STRINGTIE_MERGE { output: path "stringtie.merged.gtf", emit: gtf + path "*.version.txt" , emit: version script: + def software = getSoftwareName(task.process) """ stringtie \\ --merge $stringtie_gtf \\ -G $annotation_gtf \\ -o stringtie.merged.gtf + + echo \$(stringtie --version 2>&1) > ${software}.version.txt """ } diff --git a/modules/stringtie/stringtie/main.nf b/modules/stringtie/stringtie/main.nf index eb751321..6cff993a 100644 --- a/modules/stringtie/stringtie/main.nf +++ b/modules/stringtie/stringtie/main.nf @@ -11,11 +11,11 @@ process STRINGTIE { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::stringtie=2.1.4" : null) + conda (params.enable_conda ? "bioconda::stringtie=2.1.7" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/stringtie:2.1.4--h7e0af3c_0" + container "https://depot.galaxyproject.org/singularity/stringtie:2.1.7--h978d192_0" } else { - container "quay.io/biocontainers/stringtie:2.1.4--h7e0af3c_0" + container "quay.io/biocontainers/stringtie:2.1.7--h978d192_0" } input: @@ -48,8 +48,9 @@ process STRINGTIE { -A ${prefix}.gene.abundance.txt \\ -C ${prefix}.coverage.gtf \\ -b ${prefix}.ballgown \\ + -p $task.cpus \\ $options.args - stringtie --version > ${software}.version.txt + echo \$(stringtie --version 2>&1) > ${software}.version.txt """ } diff --git a/tests/modules/stringtie/merge/test.yml b/tests/modules/stringtie/merge/test.yml index 57488377..e49122be 100644 --- a/tests/modules/stringtie/merge/test.yml +++ b/tests/modules/stringtie/merge/test.yml @@ -5,7 +5,10 @@ - stringtie/merge files: - path: ./output/test_stringtie_forward_merge/stringtie.merged.gtf - md5sum: 676aa20a2d7a3db18136cdc7ba183099 + contains: + - 'stringtie' + - 'merge' + - 'chr22' - name: stringtie reverse-strand merge command: nextflow run ./tests/modules/stringtie/merge/ -entry test_stringtie_reverse_merge -c tests/config/nextflow.config @@ -14,4 +17,7 @@ - stringtie/merge files: - path: ./output/test_stringtie_reverse_merge/stringtie.merged.gtf - md5sum: 67e5102722ecaeea1fb44d1ec0953474 + contains: + - 'stringtie' + - 'merge' + - 'chr22' From 2d26b037a11190e65a060ac5c6809a458ff5536b Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 21 Jul 2021 15:51:33 +0200 Subject: [PATCH 07/36] (another) fix: picard sortsam (#606) * Add picard/sortsam module * Fix container links * Changes after code review * Input meta in the right place * Correct output file suffix * Define only `bam` in output tuple * Correct output meta Co-authored-by: Harshil Patel --- modules/picard/sortsam/meta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/picard/sortsam/meta.yml b/modules/picard/sortsam/meta.yml index ea4b2c89..42de6eab 100644 --- a/modules/picard/sortsam/meta.yml +++ b/modules/picard/sortsam/meta.yml @@ -40,7 +40,7 @@ output: - bam: type: file description: Sorted BAM/CRAM/SAM file - pattern: "*sorted.{bam}" + pattern: "*.{bam}" authors: From 3cc43838e1e05f650845e7f668a18714d5b63efe Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 21 Jul 2021 16:22:19 +0200 Subject: [PATCH 08/36] module: picard filtersamreads (#602) * Start work filtersamreads * Refactored to allow optional input * Use proper readlist test data * Remove typo * Fix if else condition * Remove debugging code * Fix container URLs * Add required input specification meta * Cleanup * Apply suggestions from code review Co-authored-by: Harshil Patel * Fix suffixing * Additional formatting tweaks * Update modules/picard/filtersamreads/main.nf Co-authored-by: Harshil Patel * Update modules/picard/filtersamreads/meta.yml Co-authored-by: Harshil Patel --- modules/picard/filtersamreads/functions.nf | 68 ++++++++++++++++++++ modules/picard/filtersamreads/main.nf | 65 +++++++++++++++++++ modules/picard/filtersamreads/meta.yml | 51 +++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/config/test_data.config | 4 +- tests/modules/picard/filtersamreads/main.nf | 27 ++++++++ tests/modules/picard/filtersamreads/test.yml | 18 ++++++ 7 files changed, 236 insertions(+), 1 deletion(-) create mode 100644 modules/picard/filtersamreads/functions.nf create mode 100644 modules/picard/filtersamreads/main.nf create mode 100644 modules/picard/filtersamreads/meta.yml create mode 100644 tests/modules/picard/filtersamreads/main.nf create mode 100644 tests/modules/picard/filtersamreads/test.yml diff --git a/modules/picard/filtersamreads/functions.nf b/modules/picard/filtersamreads/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/picard/filtersamreads/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/picard/filtersamreads/main.nf b/modules/picard/filtersamreads/main.nf new file mode 100644 index 00000000..b7c00349 --- /dev/null +++ b/modules/picard/filtersamreads/main.nf @@ -0,0 +1,65 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process PICARD_FILTERSAMREADS { + tag "$meta.id" + label 'process_low' + publishDir "${params.outdir}", + mode: params.publish_dir_mode, + saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::picard=2.25.6" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/picard:2.25.6--hdfd78af_0" + } else { + container "quay.io/biocontainers/picard:2.25.6--hdfd78af_0" + } + + input: + tuple val(meta), path(bam) + val filter + path readlist + + output: + tuple val(meta), path("*.bam"), emit: bam + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + def avail_mem = 3 + if (!task.memory) { + log.info '[Picard FilterSamReads] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + if ( filter == 'includeAligned' || filter == 'excludeAligned' ) { + """ + picard \\ + FilterSamReads \\ + -Xmx${avail_mem}g \\ + --INPUT $bam \\ + --OUTPUT ${prefix}.bam \\ + --FILTER $filter \\ + $options.args + + echo \$(picard FilterSamReads --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d: > ${software}.version.txt + """ + } else if ( filter == 'includeReadList' || filter == 'excludeReadList' ) { + """ + picard \\ + FilterSamReads \\ + -Xmx${avail_mem}g \\ + --INPUT $bam \\ + --OUTPUT ${prefix}.bam \\ + --FILTER $filter \\ + --READ_LIST_FILE $readlist \\ + $options.args + + echo \$(picard FilterSamReads --version 2>&1) | grep -o 'Version:.*' | cut -f2- -d: > ${software}.version.txt + """ + } +} diff --git a/modules/picard/filtersamreads/meta.yml b/modules/picard/filtersamreads/meta.yml new file mode 100644 index 00000000..b5beba90 --- /dev/null +++ b/modules/picard/filtersamreads/meta.yml @@ -0,0 +1,51 @@ +name: picard_filtersamreads +description: Filters SAM/BAM files to include/exclude either aligned/unaligned reads or based on a read list +keywords: + - bam + - filter +tools: + - picard: + description: | + A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) + data and formats such as SAM/BAM/CRAM and VCF. + homepage: https://broadinstitute.github.io/picard/ + documentation: https://broadinstitute.github.io/picard/ + tool_dev_url: https://github.com/broadinstitute/picard + doi: "" + licence: ['MIT'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: List of BAM files. If filtering without read list must be sorted by queryname with picard sortsam + pattern: "*.{bam}" + - filter: + type: value + description: Picard filter type + pattern: "includeAligned|excludeAligned|includeReadList|excludeReadList" + - readlist: + type: file + description: Optional text file containing reads IDs to include or exclude + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: Filtered BAM file + pattern: "*.{bam}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + +authors: + - "@jfy133" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 2604d8e6..46dd9141 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -559,6 +559,10 @@ picard/collectwgsmetrics: - modules/picard/collectwgsmetrics/** - tests/modules/picard/collectwgsmetrics/** +picard/filtersamreads: + - modules/picard/filtersamreads/** + - tests/modules/picard/filtersamreads/** + picard/markduplicates: - modules/picard/markduplicates/** - tests/modules/picard/markduplicates/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 7b6e3cfd..3f86d7ba 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -74,12 +74,14 @@ params { scaffolds_fasta = "${test_data_dir}/genomics/sarscov2/illumina/fasta/scaffolds.fasta" assembly_gfa = "${test_data_dir}/genomics/sarscov2/illumina/gfa/assembly.gfa" + + test_single_end_bam_readlist_txt = "${test_data_dir}/genomics/sarscov2/illumina/picard/test.single_end.bam.readlist.txt" } 'nanopore' { test_sorted_bam = "${test_data_dir}/genomics/sarscov2/nanopore/bam/test.sorted.bam" test_sorted_bam_bai = "${test_data_dir}/genomics/sarscov2/nanopore/bam/test.sorted.bam.bai" - fast5_tar_gz = "${test_data_dir}/genomics/sarscov2/nanopore/fast5/fast5.tar.gz" + fast5_tar_gz = "${test_data_dir}/genomics/sarscov2/nanopore/fast5/fast5.tar.gz" test_fastq_gz = "${test_data_dir}/genomics/sarscov2/nanopore/fastq/test.fastq.gz" diff --git a/tests/modules/picard/filtersamreads/main.nf b/tests/modules/picard/filtersamreads/main.nf new file mode 100644 index 00000000..b09594cc --- /dev/null +++ b/tests/modules/picard/filtersamreads/main.nf @@ -0,0 +1,27 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PICARD_SORTSAM } from '../../../../modules/picard/sortsam/main.nf' addParams( options: [suffix:'.sorted'] ) +include { PICARD_FILTERSAMREADS } from '../../../../modules/picard/filtersamreads/main.nf' addParams( options: [suffix:'.filtered'] ) + +workflow test_picard_filtersamreads { + + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) ] + sort_order = 'queryname' + filter = 'includeAligned' + + PICARD_SORTSAM ( input, sort_order ) + PICARD_FILTERSAMREADS ( PICARD_SORTSAM.out.bam, filter, [] ) +} + +workflow test_picard_filtersamreads_readlist { + + input = [ [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) ] + filter = 'includeReadList' + readlist = file(params.test_data['sarscov2']['illumina']['test_single_end_bam_readlist_txt'], checkIfExists: true) + + PICARD_FILTERSAMREADS ( input, filter, readlist ) +} diff --git a/tests/modules/picard/filtersamreads/test.yml b/tests/modules/picard/filtersamreads/test.yml new file mode 100644 index 00000000..34dd85c4 --- /dev/null +++ b/tests/modules/picard/filtersamreads/test.yml @@ -0,0 +1,18 @@ +- name: picard filtersamreads + command: nextflow run ./tests/modules/picard/filtersamreads -entry test_picard_filtersamreads -c tests/config/nextflow.config + tags: + - picard + - picard/filtersamreads + files: + - path: output/picard/test.filtered.bam + md5sum: b44a6ca04811a9470c7813c3c9465fd5 + + +- name: picard filtersamreads_readlist + command: nextflow run ./tests/modules/picard/filtersamreads -entry test_picard_filtersamreads_readlist -c tests/config/nextflow.config + tags: + - picard + - picard/filtersamreads + files: + - path: output/picard/test.filtered.bam + md5sum: 1e86b738b56f2c2b09f4cab52baf05c7 From 553f51d6bfdb376079d8ff913ee75ea809e081a3 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 22 Jul 2021 12:19:51 +0200 Subject: [PATCH 09/36] fix: picard filtersamreads input (#610) * Move readlist into same input channel as bam * Update test reflecting input restructuring * Update tests/modules/picard/filtersamreads/main.nf Co-authored-by: Harshil Patel * fix test Co-authored-by: Harshil Patel --- modules/picard/filtersamreads/main.nf | 3 +-- tests/modules/picard/filtersamreads/main.nf | 13 +++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/picard/filtersamreads/main.nf b/modules/picard/filtersamreads/main.nf index b7c00349..c22bbaa3 100644 --- a/modules/picard/filtersamreads/main.nf +++ b/modules/picard/filtersamreads/main.nf @@ -19,9 +19,8 @@ process PICARD_FILTERSAMREADS { } input: - tuple val(meta), path(bam) + tuple val(meta), path(bam), path(readlist) val filter - path readlist output: tuple val(meta), path("*.bam"), emit: bam diff --git a/tests/modules/picard/filtersamreads/main.nf b/tests/modules/picard/filtersamreads/main.nf index b09594cc..a03471dd 100644 --- a/tests/modules/picard/filtersamreads/main.nf +++ b/tests/modules/picard/filtersamreads/main.nf @@ -13,15 +13,20 @@ workflow test_picard_filtersamreads { filter = 'includeAligned' PICARD_SORTSAM ( input, sort_order ) - PICARD_FILTERSAMREADS ( PICARD_SORTSAM.out.bam, filter, [] ) + PICARD_SORTSAM.out.bam + .map { + [ it[0], it[1], [] ] + } + .set{ ch_sorted_for_filtersamreads } + PICARD_FILTERSAMREADS ( ch_sorted_for_filtersamreads, filter ) } workflow test_picard_filtersamreads_readlist { input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) ] + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_single_end_bam_readlist_txt'], checkIfExists: true) ] filter = 'includeReadList' - readlist = file(params.test_data['sarscov2']['illumina']['test_single_end_bam_readlist_txt'], checkIfExists: true) - PICARD_FILTERSAMREADS ( input, filter, readlist ) + PICARD_FILTERSAMREADS ( input, filter ) } From 3cabc95d0ed8a5a4e07b8f9b1d1f7ff9a70f61e1 Mon Sep 17 00:00:00 2001 From: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com> Date: Thu, 22 Jul 2021 16:19:42 +0200 Subject: [PATCH 10/36] Added module arriba (#611) * Updated the version of STAR in align and genomegenerate modules * Changes in test.yml * Changes in test.yml * Added module arriba * Changes in test configs * Added module Arriba for fusion detection * Fixed review comments * Added an output option for discarded fusions * Resolved some conflits * conflicts * Apply suggestions from code review Co-authored-by: Harshil Patel --- modules/arriba/functions.nf | 68 ++++++++++++++++++++++++ modules/arriba/main.nf | 47 +++++++++++++++++ modules/arriba/meta.yml | 54 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/arriba/main.nf | 36 +++++++++++++ tests/modules/arriba/test.yml | 93 +++++++++++++++++++++++++++++++++ 6 files changed, 302 insertions(+) create mode 100644 modules/arriba/functions.nf create mode 100644 modules/arriba/main.nf create mode 100644 modules/arriba/meta.yml create mode 100644 tests/modules/arriba/main.nf create mode 100644 tests/modules/arriba/test.yml diff --git a/modules/arriba/functions.nf b/modules/arriba/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/arriba/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/arriba/main.nf b/modules/arriba/main.nf new file mode 100644 index 00000000..739922ef --- /dev/null +++ b/modules/arriba/main.nf @@ -0,0 +1,47 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process ARRIBA { + 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), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::arriba=2.1.0" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/arriba:2.1.0--h3198e80_1" + } else { + container "quay.io/biocontainers/arriba:2.1.0--h3198e80_1" + } + + input: + tuple val(meta), path(bam) + path fasta + path gtf + + output: + tuple val(meta), path("*.fusions.tsv") , emit: fusions + tuple val(meta), path("*.fusions.discarded.tsv"), emit: fusions_fail + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + def blacklist = (options.args.contains('-b')) ? '' : '-f blacklist' + """ + arriba \\ + -x $bam \\ + -a $fasta \\ + -g $gtf \\ + -o ${prefix}.fusions.tsv \\ + -O ${prefix}.fusions.discarded.tsv \\ + $blacklist \\ + $options.args + + echo \$(arriba -h | grep 'Version:' 2>&1) | sed 's/Version:\s//' > ${software}.version.txt + """ +} diff --git a/modules/arriba/meta.yml b/modules/arriba/meta.yml new file mode 100644 index 00000000..370f82ec --- /dev/null +++ b/modules/arriba/meta.yml @@ -0,0 +1,54 @@ +name: arriba +description: Arriba is a command-line tool for the detection of gene fusions from RNA-Seq data. +keywords: + - fusion + - arriba +tools: + - arriba: + description: Fast and accurate gene fusion detection from RNA-Seq data + homepage: https://github.com/suhrig/arriba + documentation: https://arriba.readthedocs.io/en/latest/ + tool_dev_url: https://github.com/suhrig/arriba + doi: "10.1101/gr.257246.119" + licence: ['MIT'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + - fasta: + type: file + description: Assembly FASTA file + pattern: "*.{fasta}" + - gtf: + type: file + description: Annotation GTF file + pattern: "*.{gtf}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + - fusions: + type: file + description: File contains fusions which pass all of Arriba's filters. + pattern: "*.{fusions.tsv}" + - fusions_fail: + type: file + description: File contains fusions that Arriba classified as an artifact or that are also observed in healthy tissue. + pattern: "*.{fusions.discarded.tsv}" + +authors: + - "@praveenraj2018" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 46dd9141..429b0ebd 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -10,6 +10,10 @@ allelecounter: - modules/allelecounter/** - tests/modules/allelecounter/** +arriba: + - modules/arriba/** + - tests/modules/arriba/** + artic/guppyplex: - modules/artic/guppyplex/** - tests/modules/artic/guppyplex/** diff --git a/tests/modules/arriba/main.nf b/tests/modules/arriba/main.nf new file mode 100644 index 00000000..833742d6 --- /dev/null +++ b/tests/modules/arriba/main.nf @@ -0,0 +1,36 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { STAR_GENOMEGENERATE } from '../../../modules/star/genomegenerate/main.nf' addParams( options: [args: '--genomeSAindexNbases 11'] ) +include { STAR_ALIGN } from '../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat --outSAMtype BAM Unsorted --outSAMunmapped Within --outBAMcompression 0 --outFilterMultimapNmax 50 --peOverlapNbasesMin 10 --alignSplicedMateMapLminOverLmate 0.5 --alignSJstitchMismatchNmax 5 -1 5 5 --chimSegmentMin 10 --chimOutType WithinBAM HardClip --chimJunctionOverhangMin 10 --chimScoreDropMax 30 --chimScoreJunctionNonGTAG 0 --chimScoreSeparation 1 --chimSegmentReadGapMax 3 --chimMultimapNmax 50'] ) +include { ARRIBA } from '../../../modules/arriba/main.nf' addParams( options: [:] ) + +workflow test_arriba_single_end { + + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], 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) + gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) + + STAR_GENOMEGENERATE ( fasta, gtf ) + STAR_ALIGN ( input, STAR_GENOMEGENERATE.out.index, gtf ) + ARRIBA ( STAR_ALIGN.out.bam, fasta, gtf ) +} + +workflow test_arriba_paired_end { + + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], 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) + gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) + + STAR_GENOMEGENERATE ( fasta, gtf ) + STAR_ALIGN ( input, STAR_GENOMEGENERATE.out.index, gtf ) + ARRIBA ( STAR_ALIGN.out.bam, fasta, gtf ) +} diff --git a/tests/modules/arriba/test.yml b/tests/modules/arriba/test.yml new file mode 100644 index 00000000..c1dc7c1e --- /dev/null +++ b/tests/modules/arriba/test.yml @@ -0,0 +1,93 @@ +- name: arriba test_arriba_single_end + command: nextflow run tests/modules/arriba -entry test_arriba_single_end -c tests/config/nextflow.config + tags: + - arriba + files: + - path: output/arriba/test.fusions.discarded.tsv + md5sum: cad8c215b938d1e45b747a5b7898a4c2 + - path: output/arriba/test.fusions.tsv + md5sum: 7c3383f7eb6d79b84b0bd30a7ef02d70 + - path: output/index/star/Genome + md5sum: a654229fbca6071dcb6b01ce7df704da + - path: output/index/star/Log.out + - path: output/index/star/SA + md5sum: 8c3edc46697b72c9e92440d4cf43506c + - path: output/index/star/SAindex + md5sum: 9f085c626553b1c52f2827421972ac10 + - path: output/index/star/chrLength.txt + md5sum: c81f40f27e72606d7d07097c1d56a5b5 + - path: output/index/star/chrName.txt + md5sum: 5ae68a67b70976ee95342a7451cb5af1 + - path: output/index/star/chrNameLength.txt + md5sum: b190587cae0531f3cf25552d8aa674db + - path: output/index/star/chrStart.txt + md5sum: 8d3291e6bcdbe9902fbd7c887494173f + - path: output/index/star/exonGeTrInfo.tab + md5sum: d04497f69d6ef889efd4d34fe63edcc4 + - path: output/index/star/exonInfo.tab + md5sum: 0d560290fab688b7268d88d5494bf9fe + - path: output/index/star/geneInfo.tab + md5sum: 8b608537307443ffaee4927d2b428805 + - path: output/index/star/genomeParameters.txt + md5sum: 9e42067b1ec70b773257529230dd7b3a + - path: output/index/star/sjdbInfo.txt + md5sum: 5690ea9d9f09f7ff85b7fd47bd234903 + - path: output/index/star/sjdbList.fromGTF.out.tab + md5sum: 8760c33e966dad0b39f440301ebbdee4 + - path: output/index/star/sjdbList.out.tab + md5sum: 9e4f991abbbfeb3935a2bb21b9e258f1 + - path: output/index/star/transcriptInfo.tab + md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 + - path: output/star/test.Aligned.out.bam + md5sum: 29c99195dcc79ff4df1f754ff16aac78 + - path: output/star/test.Log.final.out + - path: output/star/test.Log.out + - path: output/star/test.Log.progress.out + - path: output/star/test.SJ.out.tab + +- name: arriba test_arriba_paired_end + command: nextflow run tests/modules/arriba -entry test_arriba_paired_end -c tests/config/nextflow.config + tags: + - arriba + files: + - path: output/arriba/test.fusions.discarded.tsv + md5sum: 85e36c887464e4deaa65f45174d3b8fd + - path: output/arriba/test.fusions.tsv + md5sum: 7c3383f7eb6d79b84b0bd30a7ef02d70 + - path: output/index/star/Genome + md5sum: a654229fbca6071dcb6b01ce7df704da + - path: output/index/star/Log.out + - path: output/index/star/SA + md5sum: 8c3edc46697b72c9e92440d4cf43506c + - path: output/index/star/SAindex + md5sum: 9f085c626553b1c52f2827421972ac10 + - path: output/index/star/chrLength.txt + md5sum: c81f40f27e72606d7d07097c1d56a5b5 + - path: output/index/star/chrName.txt + md5sum: 5ae68a67b70976ee95342a7451cb5af1 + - path: output/index/star/chrNameLength.txt + md5sum: b190587cae0531f3cf25552d8aa674db + - path: output/index/star/chrStart.txt + md5sum: 8d3291e6bcdbe9902fbd7c887494173f + - path: output/index/star/exonGeTrInfo.tab + md5sum: d04497f69d6ef889efd4d34fe63edcc4 + - path: output/index/star/exonInfo.tab + md5sum: 0d560290fab688b7268d88d5494bf9fe + - path: output/index/star/geneInfo.tab + md5sum: 8b608537307443ffaee4927d2b428805 + - path: output/index/star/genomeParameters.txt + md5sum: 9e42067b1ec70b773257529230dd7b3a + - path: output/index/star/sjdbInfo.txt + md5sum: 5690ea9d9f09f7ff85b7fd47bd234903 + - path: output/index/star/sjdbList.fromGTF.out.tab + md5sum: 8760c33e966dad0b39f440301ebbdee4 + - path: output/index/star/sjdbList.out.tab + md5sum: 9e4f991abbbfeb3935a2bb21b9e258f1 + - path: output/index/star/transcriptInfo.tab + md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 + - path: output/star/test.Aligned.out.bam + md5sum: d724ca90a102347b9c5052a33ea4d308 + - path: output/star/test.Log.final.out + - path: output/star/test.Log.out + - path: output/star/test.Log.progress.out + - path: output/star/test.SJ.out.tab From 6f561b3b419ffd4b83434ffa8bae8eb387f15a4d Mon Sep 17 00:00:00 2001 From: Johnathan D <28043284+bjohnnyd@users.noreply.github.com> Date: Fri, 23 Jul 2021 10:44:00 +0100 Subject: [PATCH 11/36] enhance module fastp: add `save_merged` (#598) (#614) * enhance module fastp: add `save_merged` (#598) * removed md5sum checks from log and json --- modules/fastp/main.nf | 18 +++++++++++------- modules/fastp/meta.yml | 6 +++++- tests/modules/fastp/main.nf | 26 ++++++++++++++++++++++---- tests/modules/fastp/test.yml | 25 +++++++++++++++++++++++++ 4 files changed, 63 insertions(+), 12 deletions(-) diff --git a/modules/fastp/main.nf b/modules/fastp/main.nf index acba864a..652ffe80 100644 --- a/modules/fastp/main.nf +++ b/modules/fastp/main.nf @@ -21,14 +21,16 @@ process FASTP { input: tuple val(meta), path(reads) val save_trimmed_fail + val save_merged output: - tuple val(meta), path('*.trim.fastq.gz'), emit: reads - tuple val(meta), path('*.json') , emit: json - tuple val(meta), path('*.html') , emit: html - tuple val(meta), path('*.log') , emit: log - path '*.version.txt' , emit: version - tuple val(meta), path('*.fail.fastq.gz'), optional:true, emit: reads_fail + tuple val(meta), path('*.trim.fastq.gz') , emit: reads + tuple val(meta), path('*.json') , emit: json + tuple val(meta), path('*.html') , emit: html + tuple val(meta), path('*.log') , emit: log + path '*.version.txt' , emit: version + tuple val(meta), path('*.fail.fastq.gz') , optional:true, emit: reads_fail + tuple val(meta), path('*.merged.fastq.gz'), optional:true, emit: reads_merged script: // Added soft-links to original fastqs for consistent naming in MultiQC @@ -50,7 +52,8 @@ process FASTP { echo \$(fastp --version 2>&1) | sed -e "s/fastp //g" > ${software}.version.txt """ } else { - def fail_fastq = save_trimmed_fail ? "--unpaired1 ${prefix}_1.fail.fastq.gz --unpaired2 ${prefix}_2.fail.fastq.gz" : '' + def fail_fastq = save_trimmed_fail ? "--unpaired1 ${prefix}_1.fail.fastq.gz --unpaired2 ${prefix}_2.fail.fastq.gz" : '' + def merge_fastq = save_merged ? "-m --merged_out ${prefix}.merged.fastq.gz" : '' """ [ ! -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 @@ -62,6 +65,7 @@ process FASTP { --json ${prefix}.fastp.json \\ --html ${prefix}.fastp.html \\ $fail_fastq \\ + $merge_fastq \\ --thread $task.cpus \\ --detect_adapter_for_pe \\ $options.args \\ diff --git a/modules/fastp/meta.yml b/modules/fastp/meta.yml index 1fc3dfb6..d9130d6d 100644 --- a/modules/fastp/meta.yml +++ b/modules/fastp/meta.yml @@ -30,7 +30,7 @@ output: e.g. [ id:'test', single_end:false ] - reads: type: file - description: The trimmed/modified fastq reads + description: The trimmed/modified/unmerged fastq reads pattern: "*trim.fastq.gz" - json: type: file @@ -52,6 +52,10 @@ output: type: file description: Reads the failed the preprocessing pattern: "*fail.fastq.gz" + - reads_merged: + type: file + description: Reads that were successfully merged + pattern: "*.{merged.fastq.gz}" authors: - "@drpatelh" - "@kevinmenden" diff --git a/tests/modules/fastp/main.nf b/tests/modules/fastp/main.nf index f4129c09..c8e5112f 100644 --- a/tests/modules/fastp/main.nf +++ b/tests/modules/fastp/main.nf @@ -12,8 +12,9 @@ workflow test_fastp_single_end { [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] ] save_trimmed_fail = false + save_merged = false - FASTP ( input, save_trimmed_fail ) + FASTP ( input, save_trimmed_fail, save_merged ) } // @@ -25,8 +26,9 @@ workflow test_fastp_paired_end { file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] ] save_trimmed_fail = false + save_merged = false - FASTP ( input, save_trimmed_fail ) + FASTP ( input, save_trimmed_fail, save_merged ) } // @@ -37,8 +39,9 @@ workflow test_fastp_single_end_trim_fail { [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] ] save_trimmed_fail = true + save_merged = false - FASTP ( input, save_trimmed_fail ) + FASTP ( input, save_trimmed_fail, save_merged ) } // @@ -50,6 +53,21 @@ workflow test_fastp_paired_end_trim_fail { file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ] ] save_trimmed_fail = true + save_merged = false - FASTP ( input, save_trimmed_fail ) + FASTP ( input, save_trimmed_fail, save_merged ) +} + +// +// Test with paired-end data with merging +// +workflow test_fastp_paired_end_merged { + 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) ] + ] + save_trimmed_fail = false + save_merged = true + + FASTP ( input, save_trimmed_fail, save_merged ) } diff --git a/tests/modules/fastp/test.yml b/tests/modules/fastp/test.yml index a6e253af..365ce025 100644 --- a/tests/modules/fastp/test.yml +++ b/tests/modules/fastp/test.yml @@ -81,3 +81,28 @@ md5sum: e62ff0123a74adfc6903d59a449cbdb0 - path: output/fastp/test_2.fail.fastq.gz md5sum: f52309b35a7c15cbd56a9c3906ef98a5 + +- name: fastp test_fastp_paired_end_merged + command: nextflow run tests/modules/fastp -entry test_fastp_paired_end_merged -c tests/config/nextflow.config + tags: + - fastp + files: + - path: output/fastp/test.fastp.html + contains: + - "
" + - path: output/fastp/test.fastp.json + contains: + - '"merged_and_filtered": {' + - '"total_reads": 75' + - '"total_bases": 13683' + - path: output/fastp/test.fastp.log + contains: + - "Merged and filtered:" + - "total reads: 75" + - "total bases: 13683" + - path: output/fastp/test.merged.fastq.gz + md5sum: ce88539076ced5aff11f866836ea1f40 + - path: output/fastp/test_1.trim.fastq.gz + md5sum: 65d75c13abbfbfd993914e1379634100 + - path: output/fastp/test_2.trim.fastq.gz + md5sum: 0d87ce4d8ef29fb35f337eb0f6c9fcb4 From a813e2e3a6b45585603c6f09d946d9bbbab914f6 Mon Sep 17 00:00:00 2001 From: Johnathan D <28043284+bjohnnyd@users.noreply.github.com> Date: Fri, 23 Jul 2021 22:24:19 +0100 Subject: [PATCH 12/36] Add bcftools reheader (#585) (#608) * local tests and linting passing (#585) * fix: picard filtersamreads input (#610) * Move readlist into same input channel as bam * Update test reflecting input restructuring * Update tests/modules/picard/filtersamreads/main.nf Co-authored-by: Harshil Patel * fix test Co-authored-by: Harshil Patel * Added module arriba (#611) * Updated the version of STAR in align and genomegenerate modules * Changes in test.yml * Changes in test.yml * Added module arriba * Changes in test configs * Added module Arriba for fusion detection * Fixed review comments * Added an output option for discarded fusions * Resolved some conflits * conflicts * Apply suggestions from code review Co-authored-by: Harshil Patel * added test for new header * enhance module fastp: add `save_merged` (#598) (#614) * enhance module fastp: add `save_merged` (#598) * removed md5sum checks from log and json * Apply suggestions from code review Co-authored-by: James A. Fellows Yates Co-authored-by: Harshil Patel Co-authored-by: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com> --- modules/bcftools/reheader/functions.nf | 68 ++++++++++++++++++++++++ modules/bcftools/reheader/main.nf | 47 ++++++++++++++++ modules/bcftools/reheader/meta.yml | 51 ++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/bcftools/reheader/main.nf | 40 ++++++++++++++ tests/modules/bcftools/reheader/test.yml | 26 +++++++++ 6 files changed, 236 insertions(+) create mode 100644 modules/bcftools/reheader/functions.nf create mode 100644 modules/bcftools/reheader/main.nf create mode 100644 modules/bcftools/reheader/meta.yml create mode 100644 tests/modules/bcftools/reheader/main.nf create mode 100644 tests/modules/bcftools/reheader/test.yml diff --git a/modules/bcftools/reheader/functions.nf b/modules/bcftools/reheader/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/bcftools/reheader/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/bcftools/reheader/main.nf b/modules/bcftools/reheader/main.nf new file mode 100644 index 00000000..53b00411 --- /dev/null +++ b/modules/bcftools/reheader/main.nf @@ -0,0 +1,47 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process BCFTOOLS_REHEADER { + tag "$meta.id" + label 'process_low' + publishDir "${params.outdir}", + mode: params.publish_dir_mode, + saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::bcftools=1.13" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0" + } else { + container "quay.io/biocontainers/bcftools:1.13--h3a49de5_0" + } + + input: + tuple val(meta), path(vcf) + path fai + path header + + output: + tuple val(meta), path("*.vcf.gz"), emit: vcf + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + def update_sequences = fai ? "-f $fai" : "" + def new_header = header ? "-h $header" : "" + """ + bcftools \\ + reheader \\ + $update_sequences \\ + $new_header \\ + $options.args \\ + --threads $task.cpus \\ + -o ${prefix}.vcf.gz \\ + $vcf + + echo \$(bcftools --version 2>&1) | sed 's/^.*bcftools //; s/ .*\$//' > ${software}.version.txt + """ +} diff --git a/modules/bcftools/reheader/meta.yml b/modules/bcftools/reheader/meta.yml new file mode 100644 index 00000000..1b9c1a8b --- /dev/null +++ b/modules/bcftools/reheader/meta.yml @@ -0,0 +1,51 @@ +name: bcftools_reheader +description: Reheader a VCF file +keywords: + - reheader + - vcf + - update header +tools: + - reheader: + description: | + Modify header of VCF/BCF files, change sample names. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://samtools.github.io/bcftools/bcftools.html#reheader + doi: 10.1093/gigascience/giab008 + licence: ['GPL'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF/BCF file + pattern: "*.{vcf.gz,vcf,bcf}" + - fai: + type: file + description: Fasta index to update header sequences with + pattern: "*.{fai}" + - header: + type: file + description: New header to add to the VCF + pattern: "*.{header.txt}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + - vcf: + type: file + description: VCF with updated header + pattern: "*.{vcf.gz}" + +authors: + - "@bjohnnyd" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 429b0ebd..69e39d91 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -50,6 +50,10 @@ bcftools/mpileup: - modules/bcftools/mpileup/** - tests/modules/bcftools/mpileup/** +bcftools/reheader: + - modules/bcftools/reheader/** + - tests/modules/bcftools/reheader/** + bcftools/stats: - modules/bcftools/stats/** - tests/modules/bcftools/stats/** diff --git a/tests/modules/bcftools/reheader/main.nf b/tests/modules/bcftools/reheader/main.nf new file mode 100644 index 00000000..40863331 --- /dev/null +++ b/tests/modules/bcftools/reheader/main.nf @@ -0,0 +1,40 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCFTOOLS_REHEADER } from '../../../../modules/bcftools/reheader/main.nf' addParams( options: [suffix: '.updated'] ) + +workflow test_bcftools_reheader_update_sequences { + + input = [ + [ id:'test', single_end:false ], + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) + ] + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + header = [] + BCFTOOLS_REHEADER ( input, fai, header ) +} + +workflow test_bcftools_reheader_new_header { + + input = [ + [ id:'test', single_end:false ], + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) + ] + fai = [] + header = file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + + BCFTOOLS_REHEADER ( input, fai, header ) +} + +workflow test_bcftools_reheader_new_header_update_sequences { + + input = [ + [ id:'test', single_end:false ], + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true) + ] + fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) + header = file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) + + BCFTOOLS_REHEADER ( input, fai, header ) +} diff --git a/tests/modules/bcftools/reheader/test.yml b/tests/modules/bcftools/reheader/test.yml new file mode 100644 index 00000000..78337206 --- /dev/null +++ b/tests/modules/bcftools/reheader/test.yml @@ -0,0 +1,26 @@ +- name: bcftools reheader test_bcftools_reheader_update_sequences + command: nextflow run tests/modules/bcftools/reheader -entry test_bcftools_reheader_update_sequences -c tests/config/nextflow.config + tags: + - bcftools/reheader + - bcftools + files: + - path: output/bcftools/test.updated.vcf.gz + md5sum: 9e29f28038bfce77ee00022627209ed6 + +- name: bcftools reheader test_bcftools_reheader_new_header + command: nextflow run tests/modules/bcftools/reheader -entry test_bcftools_reheader_new_header -c tests/config/nextflow.config + tags: + - bcftools/reheader + - bcftools + files: + - path: output/bcftools/test.updated.vcf.gz + md5sum: f7f536d889bbf5be40243252c394ee1f + +- name: bcftools reheader test_bcftools_reheader_new_header_update_sequences + command: nextflow run tests/modules/bcftools/reheader -entry test_bcftools_reheader_new_header_update_sequences -c tests/config/nextflow.config + tags: + - bcftools/reheader + - bcftools + files: + - path: output/bcftools/test.updated.vcf.gz + md5sum: 9e29f28038bfce77ee00022627209ed6 From df909015b6651dadb52626cf471f15a6d33985a2 Mon Sep 17 00:00:00 2001 From: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com> Date: Mon, 26 Jul 2021 19:03:30 +0200 Subject: [PATCH 13/36] Added an optional output junction channel in STAR (#621) * Added an optional output channel for chimeric junctions * Fix in test.yml * Apply suggestions from code review Co-authored-by: Harshil Patel --- modules/star/align/main.nf | 1 + modules/star/align/meta.yml | 5 ++++ tests/modules/star/align/main.nf | 20 ++++++++++--- tests/modules/star/align/test.yml | 47 ++++++++++++++++++++++++++++++- 4 files changed, 68 insertions(+), 5 deletions(-) diff --git a/modules/star/align/main.nf b/modules/star/align/main.nf index 6e085f9b..c06daf24 100644 --- a/modules/star/align/main.nf +++ b/modules/star/align/main.nf @@ -36,6 +36,7 @@ process STAR_ALIGN { tuple val(meta), path('*Aligned.unsort.out.bam') , optional:true, emit: bam_unsorted tuple val(meta), path('*fastq.gz') , optional:true, emit: fastq tuple val(meta), path('*.tab') , optional:true, emit: tab + tuple val(meta), path('*.out.junction') , optional:true, emit: junction script: def software = getSoftwareName(task.process) diff --git a/modules/star/align/meta.yml b/modules/star/align/meta.yml index 01bc2ecf..a589d145 100644 --- a/modules/star/align/meta.yml +++ b/modules/star/align/meta.yml @@ -69,7 +69,12 @@ output: type: file description: STAR output tab file(s) (optional) pattern: "*.tab" + - junction: + type: file + description: STAR chimeric junction output file (optional) + pattern: "*.out.junction" authors: - "@kevinmenden" - "@drpatelh" + - "@praveenraj2018" diff --git a/tests/modules/star/align/main.nf b/tests/modules/star/align/main.nf index 2a68d7cd..ff278efd 100644 --- a/tests/modules/star/align/main.nf +++ b/tests/modules/star/align/main.nf @@ -2,10 +2,10 @@ nextflow.enable.dsl = 2 -include { STAR_GENOMEGENERATE } from '../../../../modules/star/genomegenerate/main.nf' addParams( options: [args: '--genomeSAindexNbases 9'] ) -include { STAR_ALIGN } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat'] ) -include { STAR_ALIGN as STAR_FOR_ARRIBA } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat --outSAMtype BAM Unsorted --outSAMunmapped Within --outBAMcompression 0 --outFilterMultimapNmax 50 --peOverlapNbasesMin 10 --alignSplicedMateMapLminOverLmate 0.5 --alignSJstitchMismatchNmax 5 -1 5 5 --chimSegmentMin 10 --chimOutType WithinBAM HardClip --chimJunctionOverhangMin 10 --chimScoreDropMax 30 --chimScoreJunctionNonGTAG 0 --chimScoreSeparation 1 --chimSegmentReadGapMax 3 --chimMultimapNmax 50'] ) - +include { STAR_GENOMEGENERATE } from '../../../../modules/star/genomegenerate/main.nf' addParams( options: [args: '--genomeSAindexNbases 9'] ) +include { STAR_ALIGN } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat'] ) +include { STAR_ALIGN as STAR_FOR_ARRIBA } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat --outSAMtype BAM Unsorted --outSAMunmapped Within --outBAMcompression 0 --outFilterMultimapNmax 50 --peOverlapNbasesMin 10 --alignSplicedMateMapLminOverLmate 0.5 --alignSJstitchMismatchNmax 5 -1 5 5 --chimSegmentMin 10 --chimOutType WithinBAM HardClip --chimJunctionOverhangMin 10 --chimScoreDropMax 30 --chimScoreJunctionNonGTAG 0 --chimScoreSeparation 1 --chimSegmentReadGapMax 3 --chimMultimapNmax 50'] ) +include { STAR_ALIGN as STAR_FOR_STARFUSION } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat --outSAMtype BAM Unsorted --outReadsUnmapped None --twopassMode Basic --outSAMstrandField intronMotif --outSAMunmapped Within --chimSegmentMin 12 --chimJunctionOverhangMin 8 --chimOutJunctionFormat 1 --alignSJDBoverhangMin 10 --alignMatesGapMax 100000 --alignIntronMax 100000 --alignSJstitchMismatchNmax 5 -1 5 5 --chimMultimapScoreRange 3 --chimScoreJunctionNonGTAG -4 --chimMultimapNmax 20 --chimNonchimScoreDropMin 10 --peOverlapNbasesMin 12 --peOverlapMMp 0.1 --alignInsertionFlush Right --alignSplicedMateMapLminOverLmate 0 --alignSplicedMateMapLmin 30'] ) workflow test_star_alignment_single_end { input = [ [ id:'test', single_end:true ], // meta map @@ -42,3 +42,15 @@ workflow test_star_alignment_paired_end_for_fusion { STAR_GENOMEGENERATE ( fasta, gtf ) STAR_FOR_ARRIBA ( input, STAR_GENOMEGENERATE.out.index, gtf ) } + +workflow test_star_alignment_paired_end_for_starfusion { + input = [ [ id:'test', single_end:false ], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_1_fastq_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_rnaseq_2_fastq_gz'], checkIfExists: true) ] + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) + + STAR_GENOMEGENERATE ( fasta, gtf ) + STAR_FOR_STARFUSION ( input, STAR_GENOMEGENERATE.out.index, gtf ) +} diff --git a/tests/modules/star/align/test.yml b/tests/modules/star/align/test.yml index 87413c2c..1d3b548d 100644 --- a/tests/modules/star/align/test.yml +++ b/tests/modules/star/align/test.yml @@ -129,4 +129,49 @@ - path: output/star/test.Log.out - path: output/star/test.Log.progress.out - path: output/star/test.SJ.out.tab - md5sum: 5155c9fd1f787ad6d7d80987fb06219c + +- name: star align test_star_alignment_paired_end_for_starfusion + command: nextflow run tests/modules/star/align -entry test_star_alignment_paired_end_for_starfusion -c tests/config/nextflow.config + tags: + - star + - star/align + files: + - path: output/index/star/Genome + md5sum: a654229fbca6071dcb6b01ce7df704da + - path: output/index/star/Log.out + - path: output/index/star/SA + md5sum: 8c3edc46697b72c9e92440d4cf43506c + - path: output/index/star/SAindex + md5sum: 2a0c675d8b91d8e5e8c1826d3500482e + - path: output/index/star/chrLength.txt + md5sum: c81f40f27e72606d7d07097c1d56a5b5 + - path: output/index/star/chrName.txt + md5sum: 5ae68a67b70976ee95342a7451cb5af1 + - path: output/index/star/chrNameLength.txt + md5sum: b190587cae0531f3cf25552d8aa674db + - path: output/index/star/chrStart.txt + md5sum: 8d3291e6bcdbe9902fbd7c887494173f + - path: output/index/star/exonGeTrInfo.tab + md5sum: d04497f69d6ef889efd4d34fe63edcc4 + - path: output/index/star/exonInfo.tab + md5sum: 0d560290fab688b7268d88d5494bf9fe + - path: output/index/star/geneInfo.tab + md5sum: 8b608537307443ffaee4927d2b428805 + - path: output/index/star/genomeParameters.txt + md5sum: 3097677f4d8b2cb66770b9e55d343a7f + - path: output/index/star/sjdbInfo.txt + md5sum: 5690ea9d9f09f7ff85b7fd47bd234903 + - path: output/index/star/sjdbList.fromGTF.out.tab + md5sum: 8760c33e966dad0b39f440301ebbdee4 + - path: output/index/star/sjdbList.out.tab + md5sum: 9e4f991abbbfeb3935a2bb21b9e258f1 + - path: output/index/star/transcriptInfo.tab + md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 + - path: output/star/test.Aligned.out.bam + md5sum: a1bd1b40950a58ea2776908076160052 + - path: output/star/test.Chimeric.out.junction + md5sum: 327629eb54032212f29e1c32cbac6975 + - path: output/star/test.Log.final.out + - path: output/star/test.Log.out + - path: output/star/test.Log.progress.out + - path: output/star/test.SJ.out.tab From a21cc95c690e39874ded387cb4ebd160845614cb Mon Sep 17 00:00:00 2001 From: Johnathan D <28043284+bjohnnyd@users.noreply.github.com> Date: Mon, 26 Jul 2021 19:07:29 +0100 Subject: [PATCH 14/36] Add variantbam (#618) * template created for variantbam (#616) * Add bcftools reheader (#585) (#608) * local tests and linting passing (#585) * fix: picard filtersamreads input (#610) * Move readlist into same input channel as bam * Update test reflecting input restructuring * Update tests/modules/picard/filtersamreads/main.nf Co-authored-by: Harshil Patel * fix test Co-authored-by: Harshil Patel * Added module arriba (#611) * Updated the version of STAR in align and genomegenerate modules * Changes in test.yml * Changes in test.yml * Added module arriba * Changes in test configs * Added module Arriba for fusion detection * Fixed review comments * Added an output option for discarded fusions * Resolved some conflits * conflicts * Apply suggestions from code review Co-authored-by: Harshil Patel * added test for new header * enhance module fastp: add `save_merged` (#598) (#614) * enhance module fastp: add `save_merged` (#598) * removed md5sum checks from log and json * Apply suggestions from code review Co-authored-by: James A. Fellows Yates Co-authored-by: Harshil Patel Co-authored-by: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com> * fixed autogenerated biocontainter links * variantbam module passing all tests/lints (#616) * Added an optional output junction channel in STAR (#621) * Added an optional output channel for chimeric junctions * Fix in test.yml * Apply suggestions from code review Co-authored-by: Harshil Patel * removed qcreport output fixes #616 Co-authored-by: James A. Fellows Yates Co-authored-by: Harshil Patel Co-authored-by: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com> --- modules/variantbam/functions.nf | 68 +++++++++++++++++++++++++++++++ modules/variantbam/main.nf | 41 +++++++++++++++++++ modules/variantbam/meta.yml | 46 +++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/variantbam/main.nf | 13 ++++++ tests/modules/variantbam/test.yml | 7 ++++ 6 files changed, 179 insertions(+) create mode 100644 modules/variantbam/functions.nf create mode 100644 modules/variantbam/main.nf create mode 100644 modules/variantbam/meta.yml create mode 100644 tests/modules/variantbam/main.nf create mode 100644 tests/modules/variantbam/test.yml diff --git a/modules/variantbam/functions.nf b/modules/variantbam/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/variantbam/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/variantbam/main.nf b/modules/variantbam/main.nf new file mode 100644 index 00000000..dc29de58 --- /dev/null +++ b/modules/variantbam/main.nf @@ -0,0 +1,41 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +def VERSION = '1.4.4a' + +process VARIANTBAM { + 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), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::variantbam=1.4.4a" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/variantbam:1.4.4a--h7d7f7ad_5" + } else { + container "quay.io/biocontainers/variantbam:1.4.4a--h7d7f7ad_5" + } + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.bam") , emit: bam + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + """ + variant \\ + $bam \\ + -o ${prefix}.bam \\ + $options.args + + echo $VERSION > ${software}.version.txt + """ +} diff --git a/modules/variantbam/meta.yml b/modules/variantbam/meta.yml new file mode 100644 index 00000000..da0ff5e0 --- /dev/null +++ b/modules/variantbam/meta.yml @@ -0,0 +1,46 @@ +name: variantbam +description: Filtering, downsampling and profiling alignments in BAM/CRAM formats +keywords: + - filter + - bam + - subsample + - downsample + - downsample bam + - subsample bam +tools: + - variantbam: + description: Filtering and profiling of next-generational sequencing data using region-specific rules + homepage: https://github.com/walaj/VariantBam + documentation: https://github.com/walaj/VariantBam#table-of-contents + tool_dev_url: https://github.com/walaj/VariantBam + doi: 10.1093/bioinformatics/btw111 + licence: ['Apache2'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + - bam: + type: file + description: Filtered or downsampled BAM file + pattern: "*.{bam}" + +authors: + - "@bjohnnyd" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 69e39d91..30de48cb 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -831,6 +831,10 @@ untar: - modules/untar/** - tests/modules/untar/** +variantbam: + - modules/variantbam/** + - tests/modules/variantbam/** + vcftools: - modules/vcftools/** - tests/modules/vcftools/** diff --git a/tests/modules/variantbam/main.nf b/tests/modules/variantbam/main.nf new file mode 100644 index 00000000..3ea09197 --- /dev/null +++ b/tests/modules/variantbam/main.nf @@ -0,0 +1,13 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { VARIANTBAM } from '../../../modules/variantbam/main.nf' addParams( options: [args: '-m 1'] ) + +workflow test_variantbam { + + input = [ [ id:'test', single_end:false ], + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] + + VARIANTBAM ( input ) +} diff --git a/tests/modules/variantbam/test.yml b/tests/modules/variantbam/test.yml new file mode 100644 index 00000000..51b824cd --- /dev/null +++ b/tests/modules/variantbam/test.yml @@ -0,0 +1,7 @@ +- name: variantbam test_variantbam + command: nextflow run tests/modules/variantbam -entry test_variantbam -c tests/config/nextflow.config + tags: + - variantbam + files: + - path: output/variantbam/test.bam + md5sum: fc08f065475d60b3b06ee32920564d4b From 45dee96bdf53c4867ccce7c72c8b8a28977b9faf Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Tue, 27 Jul 2021 09:13:48 +0200 Subject: [PATCH 15/36] module: bwa/aln (#624) * Specify more guidelines on input channels * Linting * Updates based on code review * Update README.md * Fix broken sentence * Add bwa/aln module * Also output reads as required with SAI * fix container paths * Sync bwa version samese/sampe * Apply suggestions from code review Co-authored-by: Harshil Patel --- README.md | 16 +++++--- modules/bwa/aln/functions.nf | 68 +++++++++++++++++++++++++++++++++ modules/bwa/aln/main.nf | 67 ++++++++++++++++++++++++++++++++ modules/bwa/aln/meta.yml | 54 ++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/bwa/aln/main.nf | 33 ++++++++++++++++ tests/modules/bwa/aln/test.yml | 39 +++++++++++++++++++ 7 files changed, 275 insertions(+), 6 deletions(-) create mode 100644 modules/bwa/aln/functions.nf create mode 100644 modules/bwa/aln/main.nf create mode 100644 modules/bwa/aln/meta.yml create mode 100644 tests/modules/bwa/aln/main.nf create mode 100644 tests/modules/bwa/aln/test.yml diff --git a/README.md b/README.md index 2e78d970..7239b24d 100644 --- a/README.md +++ b/README.md @@ -429,6 +429,16 @@ using a combination of `bwa` and `samtools` to output a BAM file instead of a SA - All function names MUST follow the `camelCase` convention. +#### Input/output options + +- Input channel declarations MUST be defined for all _possible_ input files (i.e. both required and optional files). + - Directly associated auxiliary files to an input file MAY be defined within the same input channel alongside the main input channel (e.g. [BAM and BAI](https://github.com/nf-core/modules/blob/e937c7950af70930d1f34bb961403d9d2aa81c7d/modules/samtools/flagstat/main.nf#L22)). + - Other generic auxiliary files used across different input files (e.g. common reference sequences) MAY be defined using a dedicated input channel (e.g. [reference files](https://github.com/nf-core/modules/blob/3cabc95d0ed8a5a4e07b8f9b1d1f7ff9a70f61e1/modules/bwa/mem/main.nf#L21-L23)). + +- Named file extensions MUST be emitted for ALL output channels e.g. `path "*.txt", emit: txt`. + +- Optional inputs are not currently supported by Nextflow. However, passing an empty list (`[]`) instead of a file as a module parameter can be used to work around this issue. + #### Module parameters - A module file SHOULD only define input and output files as command-line parameters to be executed within the process. @@ -439,12 +449,6 @@ using a combination of `bwa` and `samtools` to output a BAM file instead of a SA - 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 within the process. -#### Input/output options - -- Named file extensions MUST be emitted for ALL output channels e.g. `path "*.txt", emit: txt`. - -- Optional inputs are not currently supported by Nextflow. However, passing an empty list (`[]`) instead of a file as a module parameter can be used to work around this issue. - #### Resource requirements - An appropriate resource `label` MUST be provided for the module as listed in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/conf/base.config#L29-L46) e.g. `process_low`, `process_medium` or `process_high`. diff --git a/modules/bwa/aln/functions.nf b/modules/bwa/aln/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/bwa/aln/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/bwa/aln/main.nf b/modules/bwa/aln/main.nf new file mode 100644 index 00000000..d9c2ba13 --- /dev/null +++ b/modules/bwa/aln/main.nf @@ -0,0 +1,67 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process BWA_ALN { + 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), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::bwa=0.7.17" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/bwa:0.7.17--h5bf99c6_8" + } else { + container "quay.io/biocontainers/bwa:0.7.17--h5bf99c6_8" + } + + input: + tuple val(meta), path(reads) + path index + + output: + tuple val(meta), path(reads), path("*.sai"), emit: sai + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + + if (meta.single_end) { + """ + INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` + + bwa aln \\ + $options.args \\ + -t $task.cpus \\ + -f ${prefix}.sai \\ + \$INDEX \\ + ${reads} + + echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt + """ + } else { + """ + INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` + + bwa aln \\ + $options.args \\ + -t $task.cpus \\ + -f ${prefix}.1.sai \\ + \$INDEX \\ + ${reads[0]} + + bwa aln \\ + $options.args \\ + -t $task.cpus \\ + -f ${prefix}.2.sai \\ + \$INDEX \\ + ${reads[1]} + + echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt + """ + } +} diff --git a/modules/bwa/aln/meta.yml b/modules/bwa/aln/meta.yml new file mode 100644 index 00000000..eac1f509 --- /dev/null +++ b/modules/bwa/aln/meta.yml @@ -0,0 +1,54 @@ +name: bwa_aln +description: Find SA coordinates of the input reads for bwa short-read mapping +keywords: + - bwa + - aln + - short-read + - align + - reference + - fasta + - map + - fastq +tools: + - bwa: + description: | + BWA is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bio-bwa.sourceforge.net/ + documentation: http://bio-bwa.sourceforge.net/ + doi: "10.1093/bioinformatics/btp324" + licence: ['GPL v3'] + +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. + - index: + type: file + description: BWA genome index files + pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + - sai: + type: file + description: SA coordinate file + pattern: "*.sai" + +authors: + - "@jfy133" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 30de48cb..885978df 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -158,6 +158,10 @@ bowtie2/build: - modules/bowtie2/build/** - tests/modules/bowtie2/build_test/** +bwa/aln: + - modules/bwa/aln/** + - tests/modules/bwa/aln/** + bwa/index: - modules/bwa/index/** - tests/modules/bwa/index/** diff --git a/tests/modules/bwa/aln/main.nf b/tests/modules/bwa/aln/main.nf new file mode 100644 index 00000000..feb7473d --- /dev/null +++ b/tests/modules/bwa/aln/main.nf @@ -0,0 +1,33 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BWA_INDEX } from '../../../../modules/bwa/index/main.nf' addParams( options: [:] ) +include { BWA_ALN } from '../../../../modules/bwa/aln/main.nf' addParams( options: [:] ) + +// +// Test with single-end data +// +workflow test_bwa_aln_single_end { + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BWA_INDEX ( fasta ) + BWA_ALN ( input, BWA_INDEX.out.index ) +} + +// +// Test with paired-end data +// +workflow test_bwa_aln_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) ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BWA_INDEX ( fasta ) + BWA_ALN ( input, BWA_INDEX.out.index ) +} diff --git a/tests/modules/bwa/aln/test.yml b/tests/modules/bwa/aln/test.yml new file mode 100644 index 00000000..08848143 --- /dev/null +++ b/tests/modules/bwa/aln/test.yml @@ -0,0 +1,39 @@ +- name: bwa aln single-end + command: nextflow run ./tests/modules/bwa/aln -entry test_bwa_aln_single_end -c tests/config/nextflow.config + tags: + - bwa + - bwa/aln + files: + - path: ./output/bwa/test.sai + md5sum: aaaf39b6814c96ca1a5eacc662adf926 + - path: ./output/index/bwa/genome.bwt + md5sum: 0469c30a1e239dd08f68afe66fde99da + - path: ./output/index/bwa/genome.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: ./output/index/bwa/genome.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: ./output/index/bwa/genome.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: ./output/index/bwa/genome.sa + md5sum: ab3952cabf026b48cd3eb5bccbb636d1 + +- name: bwa aln paired-end + command: nextflow run ./tests/modules/bwa/aln -entry test_bwa_aln_paired_end -c tests/config/nextflow.config + tags: + - bwa + - bwa/aln + files: + - path: ./output/bwa/test.1.sai + md5sum: aaaf39b6814c96ca1a5eacc662adf926 + - path: ./output/bwa/test.2.sai + md5sum: b4f185d9b4cb256dd5c377070a536124 + - path: ./output/index/bwa/genome.bwt + md5sum: 0469c30a1e239dd08f68afe66fde99da + - path: ./output/index/bwa/genome.amb + md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e + - path: ./output/index/bwa/genome.ann + md5sum: c32e11f6c859f166c7525a9c1d583567 + - path: ./output/index/bwa/genome.pac + md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 + - path: ./output/index/bwa/genome.sa + md5sum: ab3952cabf026b48cd3eb5bccbb636d1 From c41c9487e9bcc4888103151df8d15ff229608fc6 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Tue, 27 Jul 2021 09:36:03 +0200 Subject: [PATCH 16/36] Specify more guidelines on input channels (#615) * Specify more guidelines on input channels * Linting * Updates based on code review * Update README.md * Fix broken sentence From e1951d54be3d7ca25999cf362096817a74f72277 Mon Sep 17 00:00:00 2001 From: Michael L Heuer Date: Tue, 27 Jul 2021 09:32:18 -0500 Subject: [PATCH 17/36] Update dsh-bio to 2.0.5 (#628) --- modules/dshbio/filterbed/main.nf | 6 +++--- modules/dshbio/filtergff3/main.nf | 6 +++--- modules/dshbio/splitbed/main.nf | 6 +++--- modules/dshbio/splitgff3/main.nf | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/dshbio/filterbed/main.nf b/modules/dshbio/filterbed/main.nf index 92aadc41..cc1daa7d 100644 --- a/modules/dshbio/filterbed/main.nf +++ b/modules/dshbio/filterbed/main.nf @@ -11,11 +11,11 @@ process DSHBIO_FILTERBED { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.4" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.5" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/dsh-bio:2.0.4--hdfd78af_0" + container "https://depot.galaxyproject.org/singularity/dsh-bio:2.0.5--hdfd78af_0" } else { - container "quay.io/biocontainers/dsh-bio:2.0.4--hdfd78af_0" + container "quay.io/biocontainers/dsh-bio:2.0.5--hdfd78af_0" } input: diff --git a/modules/dshbio/filtergff3/main.nf b/modules/dshbio/filtergff3/main.nf index bb3a4abd..596c6b8f 100644 --- a/modules/dshbio/filtergff3/main.nf +++ b/modules/dshbio/filtergff3/main.nf @@ -11,11 +11,11 @@ process DSHBIO_FILTERGFF3 { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.4" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.5" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/dsh-bio:2.0.4--hdfd78af_0" + container "https://depot.galaxyproject.org/singularity/dsh-bio:2.0.5--hdfd78af_0" } else { - container "quay.io/biocontainers/dsh-bio:2.0.4--hdfd78af_0" + container "quay.io/biocontainers/dsh-bio:2.0.5--hdfd78af_0" } input: diff --git a/modules/dshbio/splitbed/main.nf b/modules/dshbio/splitbed/main.nf index 233b5319..75307b14 100644 --- a/modules/dshbio/splitbed/main.nf +++ b/modules/dshbio/splitbed/main.nf @@ -11,11 +11,11 @@ process DSHBIO_SPLITBED { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.4" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.5" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/dsh-bio:2.0.4--hdfd78af_0" + container "https://depot.galaxyproject.org/singularity/dsh-bio:2.0.5--hdfd78af_0" } else { - container "quay.io/biocontainers/dsh-bio:2.0.4--hdfd78af_0" + container "quay.io/biocontainers/dsh-bio:2.0.5--hdfd78af_0" } input: diff --git a/modules/dshbio/splitgff3/main.nf b/modules/dshbio/splitgff3/main.nf index 62f72241..fa434b75 100644 --- a/modules/dshbio/splitgff3/main.nf +++ b/modules/dshbio/splitgff3/main.nf @@ -11,11 +11,11 @@ process DSHBIO_SPLITGFF3 { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::dsh-bio=2.0.4" : null) + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.5" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/dsh-bio:2.0.4--hdfd78af_0" + container "https://depot.galaxyproject.org/singularity/dsh-bio:2.0.5--hdfd78af_0" } else { - container "quay.io/biocontainers/dsh-bio:2.0.4--hdfd78af_0" + container "quay.io/biocontainers/dsh-bio:2.0.5--hdfd78af_0" } input: From c5235a983d454787fa0c3247b02086969217163b Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 28 Jul 2021 09:10:44 +0100 Subject: [PATCH 18/36] nf-core modules bump-versions for all modules (#630) * Add blacklist of modules that shouldn't be updated to .nf-core.yml * nf-core modules bump-versions for all modules * Remove TODO statements identified by linting * Fix md5sums for failing tests * Fix more tests --- .nf-core.yml | 9 ++++ modules/allelecounter/main.nf | 6 +-- modules/bcftools/consensus/main.nf | 6 +-- modules/bcftools/filter/main.nf | 6 +-- modules/bcftools/isec/main.nf | 6 +-- modules/bcftools/merge/main.nf | 6 +-- modules/bcftools/mpileup/main.nf | 6 +-- modules/bcftools/stats/main.nf | 6 +-- modules/blast/blastn/main.nf | 6 +-- modules/blast/makeblastdb/main.nf | 6 +-- modules/bowtie2/build/main.nf | 6 +-- modules/cnvkit/main.nf | 6 +-- modules/cutadapt/main.nf | 6 +-- modules/deeptools/computematrix/main.nf | 6 +-- modules/deeptools/plotfingerprint/main.nf | 6 +-- modules/deeptools/plotheatmap/main.nf | 6 +-- modules/deeptools/plotprofile/main.nf | 6 +-- modules/gubbins/main.nf | 6 +-- modules/hisat2/build/main.nf | 6 +-- modules/hisat2/extractsplicesites/main.nf | 6 +-- modules/iqtree/main.nf | 6 +-- modules/kallistobustools/count/main.nf | 54 +++++++++---------- modules/kallistobustools/count/meta.yml | 26 +++------ modules/kallistobustools/ref/main.nf | 6 +-- modules/last/dotplot/main.nf | 6 +-- modules/last/lastal/main.nf | 6 +-- modules/last/lastdb/main.nf | 6 +-- modules/last/mafconvert/main.nf | 6 +-- modules/last/mafswap/main.nf | 6 +-- modules/last/postmask/main.nf | 6 +-- modules/last/split/main.nf | 6 +-- modules/last/train/main.nf | 6 +-- modules/metaphlan3/main.nf | 6 +-- modules/methyldackel/extract/main.nf | 6 +-- modules/methyldackel/mbias/main.nf | 6 +-- modules/minimap2/align/main.nf | 6 +-- modules/minimap2/index/main.nf | 6 +-- modules/mosdepth/main.nf | 6 +-- modules/multiqc/main.nf | 6 +-- modules/nanoplot/main.nf | 6 +-- modules/picard/collectmultiplemetrics/main.nf | 6 +-- modules/picard/collectwgsmetrics/main.nf | 6 +-- modules/picard/filtersamreads/main.nf | 6 +-- modules/picard/markduplicates/main.nf | 6 +-- modules/picard/mergesamfiles/main.nf | 6 +-- modules/picard/sortsam/main.nf | 6 +-- modules/prodigal/meta.yml | 10 +--- modules/raxmlng/main.nf | 6 +-- modules/salmon/index/main.nf | 6 +-- modules/salmon/quant/main.nf | 6 +-- modules/samtools/faidx/main.nf | 6 +-- modules/samtools/fastq/main.nf | 6 +-- modules/samtools/flagstat/main.nf | 6 +-- modules/samtools/idxstats/main.nf | 6 +-- modules/samtools/index/main.nf | 6 +-- modules/samtools/merge/main.nf | 6 +-- modules/samtools/mpileup/main.nf | 6 +-- modules/samtools/sort/main.nf | 6 +-- modules/samtools/stats/main.nf | 6 +-- modules/samtools/view/main.nf | 6 +-- modules/seqkit/split2/main.nf | 6 +-- modules/seqwish/induce/main.nf | 6 +-- modules/shovill/meta.yml | 8 ++- modules/spades/main.nf | 6 +-- modules/tabix/bgzip/main.nf | 6 +-- modules/tabix/bgziptabix/main.nf | 6 +-- modules/tabix/tabix/main.nf | 6 +-- modules/trimgalore/main.nf | 6 +-- tests/modules/bcftools/filter/test.yml | 2 +- tests/modules/bcftools/mpileup/test.yml | 6 +-- tests/modules/bcftools/stats/test.yml | 2 +- tests/modules/blast/blastn/test.yml | 4 +- tests/modules/blast/makeblastdb/test.yml | 4 +- .../deeptools/plotfingerprint/test.yml | 6 +-- tests/modules/gubbins/test.yml | 8 +-- tests/modules/hisat2/align/test.yml | 4 +- tests/modules/hisat2/build_test/test.yml | 2 +- tests/modules/kallistobustools/count/main.nf | 30 +++++------ tests/modules/kallistobustools/count/test.yml | 36 ++++++------- tests/modules/kallistobustools/ref/test.yml | 15 ------ tests/modules/last/lastal/test.yml | 4 +- tests/modules/last/lastdb/test.yml | 4 +- tests/modules/minimap2/align/test.yml | 4 +- tests/modules/picard/markduplicates/test.yml | 2 +- tests/modules/picard/mergesamfiles/test.yml | 2 +- tests/modules/salmon/index/test.yml | 2 +- tests/modules/salmon/quant/test.yml | 12 ++--- tests/modules/samtools/fastq/test.yml | 4 +- tests/modules/samtools/flagstat/test.yml | 2 +- tests/modules/samtools/mpileup/test.yml | 2 +- tests/modules/samtools/sort/test.yml | 2 +- tests/modules/samtools/stats/test.yml | 2 +- tests/modules/spades/test.yml | 10 ++-- tests/modules/tabix/bgzip/test.yml | 2 +- tests/modules/tabix/bgziptabix/test.yml | 4 +- tests/modules/tabix/tabix/test.yml | 6 +-- 96 files changed, 321 insertions(+), 347 deletions(-) create mode 100644 .nf-core.yml diff --git a/.nf-core.yml b/.nf-core.yml new file mode 100644 index 00000000..72971af8 --- /dev/null +++ b/.nf-core.yml @@ -0,0 +1,9 @@ +bump-versions: + rseqc/junctionannotation: False + rseqc/bamstat: False + rseqc/readduplication: False + rseqc/readdistribution: False + rseqc/junctionsaturation: False + rseqc/inferexperiment: False + rseqc/innerdistance: False + sortmerna: False diff --git a/modules/allelecounter/main.nf b/modules/allelecounter/main.nf index 8f090566..ad24b3c1 100644 --- a/modules/allelecounter/main.nf +++ b/modules/allelecounter/main.nf @@ -11,11 +11,11 @@ process ALLELECOUNTER { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::cancerit-allelecount=4.2.1" : null) + conda (params.enable_conda ? 'bioconda::cancerit-allelecount=4.3.0' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/cancerit-allelecount:4.2.1--h3ecb661_0" + container "https://depot.galaxyproject.org/singularity/cancerit-allelecount:4.3.0--h41abebc_0" } else { - container "quay.io/biocontainers/cancerit-allelecount:4.2.1--h3ecb661_0" + container "quay.io/biocontainers/cancerit-allelecount:4.3.0--h41abebc_0" } input: diff --git a/modules/bcftools/consensus/main.nf b/modules/bcftools/consensus/main.nf index 67321fc2..0403f050 100644 --- a/modules/bcftools/consensus/main.nf +++ b/modules/bcftools/consensus/main.nf @@ -11,11 +11,11 @@ process BCFTOOLS_CONSENSUS { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? 'bioconda::bcftools=1.11' : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container 'https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0' + container 'https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0' } else { - container 'quay.io/biocontainers/bcftools:1.11--h7c999a4_0' + container 'quay.io/biocontainers/bcftools:1.13--h3a49de5_0' } input: diff --git a/modules/bcftools/filter/main.nf b/modules/bcftools/filter/main.nf index d7ec0d2b..fbdac0de 100644 --- a/modules/bcftools/filter/main.nf +++ b/modules/bcftools/filter/main.nf @@ -11,11 +11,11 @@ process BCFTOOLS_FILTER { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::bcftools=1.11" : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0" + container "https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0" } else { - container "quay.io/biocontainers/bcftools:1.11--h7c999a4_0" + container "quay.io/biocontainers/bcftools:1.13--h3a49de5_0" } input: diff --git a/modules/bcftools/isec/main.nf b/modules/bcftools/isec/main.nf index b0bde522..28c6103e 100644 --- a/modules/bcftools/isec/main.nf +++ b/modules/bcftools/isec/main.nf @@ -11,11 +11,11 @@ process BCFTOOLS_ISEC { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::bcftools=1.11" : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0" + container "https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0" } else { - container "quay.io/biocontainers/bcftools:1.11--h7c999a4_0" + container "quay.io/biocontainers/bcftools:1.13--h3a49de5_0" } input: diff --git a/modules/bcftools/merge/main.nf b/modules/bcftools/merge/main.nf index 09bc2e7d..66c52281 100644 --- a/modules/bcftools/merge/main.nf +++ b/modules/bcftools/merge/main.nf @@ -11,11 +11,11 @@ process BCFTOOLS_MERGE { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::bcftools=1.11" : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0" + container "https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0" } else { - container "quay.io/biocontainers/bcftools:1.11--h7c999a4_0" + container "quay.io/biocontainers/bcftools:1.13--h3a49de5_0" } input: diff --git a/modules/bcftools/mpileup/main.nf b/modules/bcftools/mpileup/main.nf index 287a0c9d..de9b951f 100644 --- a/modules/bcftools/mpileup/main.nf +++ b/modules/bcftools/mpileup/main.nf @@ -11,11 +11,11 @@ process BCFTOOLS_MPILEUP { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::bcftools=1.11" : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0" + container "https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0" } else { - container "quay.io/biocontainers/bcftools:1.11--h7c999a4_0" + container "quay.io/biocontainers/bcftools:1.13--h3a49de5_0" } input: diff --git a/modules/bcftools/stats/main.nf b/modules/bcftools/stats/main.nf index 84e48c05..90be5d2b 100644 --- a/modules/bcftools/stats/main.nf +++ b/modules/bcftools/stats/main.nf @@ -11,11 +11,11 @@ process BCFTOOLS_STATS { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::bcftools=1.11" : null) + conda (params.enable_conda ? 'bioconda::bcftools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0" + container "https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0" } else { - container "quay.io/biocontainers/bcftools:1.11--h7c999a4_0" + container "quay.io/biocontainers/bcftools:1.13--h3a49de5_0" } input: diff --git a/modules/blast/blastn/main.nf b/modules/blast/blastn/main.nf index 8d519613..87e012e2 100644 --- a/modules/blast/blastn/main.nf +++ b/modules/blast/blastn/main.nf @@ -11,11 +11,11 @@ process BLAST_BLASTN { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? 'bioconda::blast=2.10.1' : null) + conda (params.enable_conda ? 'bioconda::blast=2.12.0' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container 'https://depot.galaxyproject.org/singularity/blast:2.10.1--pl526he19e7b1_3' + container 'https://depot.galaxyproject.org/singularity/blast:2.12.0--pl5262h3289130_0' } else { - container 'quay.io/biocontainers/blast:2.10.1--pl526he19e7b1_3' + container 'quay.io/biocontainers/blast:2.12.0--pl5262h3289130_0' } input: diff --git a/modules/blast/makeblastdb/main.nf b/modules/blast/makeblastdb/main.nf index 3e3b74c2..c938e8f6 100644 --- a/modules/blast/makeblastdb/main.nf +++ b/modules/blast/makeblastdb/main.nf @@ -11,11 +11,11 @@ process BLAST_MAKEBLASTDB { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } - conda (params.enable_conda ? 'bioconda::blast=2.10.1' : null) + conda (params.enable_conda ? 'bioconda::blast=2.12.0' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container 'https://depot.galaxyproject.org/singularity/blast:2.10.1--pl526he19e7b1_3' + container 'https://depot.galaxyproject.org/singularity/blast:2.12.0--pl5262h3289130_0' } else { - container 'quay.io/biocontainers/blast:2.10.1--pl526he19e7b1_3' + container 'quay.io/biocontainers/blast:2.12.0--pl5262h3289130_0' } input: diff --git a/modules/bowtie2/build/main.nf b/modules/bowtie2/build/main.nf index 42ff1d20..442fed18 100644 --- a/modules/bowtie2/build/main.nf +++ b/modules/bowtie2/build/main.nf @@ -11,11 +11,11 @@ process BOWTIE2_BUILD { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:'index', meta:[:], publish_by_meta:[]) } - conda (params.enable_conda ? 'bioconda::bowtie2=2.4.2' : null) + conda (params.enable_conda ? 'bioconda::bowtie2=2.4.4' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container 'https://depot.galaxyproject.org/singularity/bowtie2:2.4.2--py38h1c8e9b9_1' + container 'https://depot.galaxyproject.org/singularity/bowtie2:2.4.4--py39hbb4e92a_0' } else { - container 'quay.io/biocontainers/bowtie2:2.4.2--py38h1c8e9b9_1' + container 'quay.io/biocontainers/bowtie2:2.4.4--py36hd4290be_0' } input: diff --git a/modules/cnvkit/main.nf b/modules/cnvkit/main.nf index dee6051d..4416919e 100755 --- a/modules/cnvkit/main.nf +++ b/modules/cnvkit/main.nf @@ -11,11 +11,11 @@ process CNVKIT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::cnvkit=0.9.8" : null) + conda (params.enable_conda ? 'bioconda::cnvkit=0.9.9' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/cnvkit:0.9.8--py_0" + container "https://depot.galaxyproject.org/singularity/cnvkit:0.9.9--pyhdfd78af_0" } else { - container "quay.io/biocontainers/cnvkit:0.9.8--py_0" + container "quay.io/biocontainers/cnvkit:0.9.9--pyhdfd78af_0" } input: diff --git a/modules/cutadapt/main.nf b/modules/cutadapt/main.nf index c392367e..6dccc2bc 100644 --- a/modules/cutadapt/main.nf +++ b/modules/cutadapt/main.nf @@ -11,11 +11,11 @@ process CUTADAPT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? 'bioconda::cutadapt=3.2' : null) + conda (params.enable_conda ? 'bioconda::cutadapt=3.4' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container 'https://depot.galaxyproject.org/singularity/cutadapt:3.2--py38h0213d0e_0' + container 'https://depot.galaxyproject.org/singularity/cutadapt:3.4--py39h38f01e4_1' } else { - container 'quay.io/biocontainers/cutadapt:3.2--py38h0213d0e_0' + container 'quay.io/biocontainers/cutadapt:3.4--py37h73a75cf_1' } input: diff --git a/modules/deeptools/computematrix/main.nf b/modules/deeptools/computematrix/main.nf index bee16d3c..739e7cc1 100644 --- a/modules/deeptools/computematrix/main.nf +++ b/modules/deeptools/computematrix/main.nf @@ -11,11 +11,11 @@ process DEEPTOOLS_COMPUTEMATRIX { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::deeptools=3.5.0" : null) + conda (params.enable_conda ? 'bioconda::deeptools=3.5.1' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/deeptools:3.5.0--py_0" + container "https://depot.galaxyproject.org/singularity/deeptools:3.5.1--py_0" } else { - container "quay.io/biocontainers/deeptools:3.5.0--py_0" + container "quay.io/biocontainers/deeptools:3.5.1--py_0" } input: diff --git a/modules/deeptools/plotfingerprint/main.nf b/modules/deeptools/plotfingerprint/main.nf index 42d5e6a2..56ecb688 100644 --- a/modules/deeptools/plotfingerprint/main.nf +++ b/modules/deeptools/plotfingerprint/main.nf @@ -11,11 +11,11 @@ process DEEPTOOLS_PLOTFINGERPRINT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::deeptools=3.5.0" : null) + conda (params.enable_conda ? 'bioconda::deeptools=3.5.1' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/deeptools:3.5.0--py_0" + container "https://depot.galaxyproject.org/singularity/deeptools:3.5.1--py_0" } else { - container "quay.io/biocontainers/deeptools:3.5.0--py_0" + container "quay.io/biocontainers/deeptools:3.5.1--py_0" } input: diff --git a/modules/deeptools/plotheatmap/main.nf b/modules/deeptools/plotheatmap/main.nf index 552dc117..8e25d96f 100644 --- a/modules/deeptools/plotheatmap/main.nf +++ b/modules/deeptools/plotheatmap/main.nf @@ -11,11 +11,11 @@ process DEEPTOOLS_PLOTHEATMAP { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::deeptools=3.5.0" : null) + conda (params.enable_conda ? 'bioconda::deeptools=3.5.1' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/deeptools:3.5.0--py_0" + container "https://depot.galaxyproject.org/singularity/deeptools:3.5.1--py_0" } else { - container "quay.io/biocontainers/deeptools:3.5.0--py_0" + container "quay.io/biocontainers/deeptools:3.5.1--py_0" } input: diff --git a/modules/deeptools/plotprofile/main.nf b/modules/deeptools/plotprofile/main.nf index 59bfacd3..95f65c84 100644 --- a/modules/deeptools/plotprofile/main.nf +++ b/modules/deeptools/plotprofile/main.nf @@ -11,11 +11,11 @@ process DEEPTOOLS_PLOTPROFILE { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::deeptools=3.5.0" : null) + conda (params.enable_conda ? 'bioconda::deeptools=3.5.1' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/deeptools:3.5.0--py_0" + container "https://depot.galaxyproject.org/singularity/deeptools:3.5.1--py_0" } else { - container "quay.io/biocontainers/deeptools:3.5.0--py_0" + container "quay.io/biocontainers/deeptools:3.5.1--py_0" } input: diff --git a/modules/gubbins/main.nf b/modules/gubbins/main.nf index 9129d14b..7f0041c8 100644 --- a/modules/gubbins/main.nf +++ b/modules/gubbins/main.nf @@ -10,11 +10,11 @@ process GUBBINS { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } - conda (params.enable_conda ? "bioconda::gubbins=2.4.1" : null) + conda (params.enable_conda ? 'bioconda::gubbins=3.0.0' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/gubbins:2.4.1--py38h197edbe_1" + container "https://depot.galaxyproject.org/singularity/gubbins:3.0.0--py39h5bf99c6_0" } else { - container "quay.io/biocontainers/gubbins:2.4.1--py38h197edbe_1" + container "quay.io/biocontainers/gubbins:3.0.0--py39h5bf99c6_0" } input: diff --git a/modules/hisat2/build/main.nf b/modules/hisat2/build/main.nf index ce8bfb26..3e74b1d4 100644 --- a/modules/hisat2/build/main.nf +++ b/modules/hisat2/build/main.nf @@ -14,11 +14,11 @@ process HISAT2_BUILD { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:'index', meta:[:], publish_by_meta:[]) } - conda (params.enable_conda ? "bioconda::hisat2=2.2.0" : null) + conda (params.enable_conda ? 'bioconda::hisat2=2.2.1' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/hisat2:2.2.0--py37hfa133b6_4" + container "https://depot.galaxyproject.org/singularity/hisat2:2.2.1--h1b792b2_3" } else { - container "quay.io/biocontainers/hisat2:2.2.0--py37hfa133b6_4" + container "quay.io/biocontainers/hisat2:2.2.1--h1b792b2_3" } input: diff --git a/modules/hisat2/extractsplicesites/main.nf b/modules/hisat2/extractsplicesites/main.nf index 57f4dedb..d97fdb89 100644 --- a/modules/hisat2/extractsplicesites/main.nf +++ b/modules/hisat2/extractsplicesites/main.nf @@ -13,11 +13,11 @@ process HISAT2_EXTRACTSPLICESITES { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } - conda (params.enable_conda ? "bioconda::hisat2=2.2.0" : null) + conda (params.enable_conda ? 'bioconda::hisat2=2.2.1' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/hisat2:2.2.0--py37hfa133b6_4" + container "https://depot.galaxyproject.org/singularity/hisat2:2.2.1--h1b792b2_3" } else { - container "quay.io/biocontainers/hisat2:2.2.0--py37hfa133b6_4" + container "quay.io/biocontainers/hisat2:2.2.1--h1b792b2_3" } input: diff --git a/modules/iqtree/main.nf b/modules/iqtree/main.nf index 1eeb3a2a..3bd0f3b1 100644 --- a/modules/iqtree/main.nf +++ b/modules/iqtree/main.nf @@ -11,11 +11,11 @@ process IQTREE { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } - conda (params.enable_conda ? "bioconda::iqtree=2.1.2" : null) + conda (params.enable_conda ? 'bioconda::iqtree=2.1.4_beta' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/iqtree:2.1.2--h56fc30b_0" + container "https://depot.galaxyproject.org/singularity/iqtree:2.1.4_beta--hdcc8f71_0" } else { - container "quay.io/biocontainers/iqtree:2.1.2--h56fc30b_0" + container "quay.io/biocontainers/iqtree:2.1.4_beta--hdcc8f71_0" } input: diff --git a/modules/kallistobustools/count/main.nf b/modules/kallistobustools/count/main.nf index 5b7416ea..86172fc3 100644 --- a/modules/kallistobustools/count/main.nf +++ b/modules/kallistobustools/count/main.nf @@ -11,47 +11,45 @@ process KALLISTOBUSTOOLS_COUNT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::kb-python=0.26.0" : null) + conda (params.enable_conda ? 'bioconda::kb-python=0.26.3' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/kb-python:0.26.0--pyhdfd78af_0" + container "https://depot.galaxyproject.org/singularity/kb-python:0.26.3--pyhdfd78af_0" } else { - container "quay.io/biocontainers/kb-python:0.26.0--pyhdfd78af_0" + container "quay.io/biocontainers/kb-python:0.26.3--pyhdfd78af_0" } input: - tuple val(meta), path(reads) - path index - path t2g - path t1c - path t2c - val use_t1c - val use_t2c - val workflow - val technology + tuple val(meta), path(reads) + path index + path t2g + path t1c + path t2c + val workflow + val technology output: - tuple val(meta), path ("*_kallistobustools_count") , emit: kallistobustools_count - path "*.version.txt" , emit: version + tuple val(meta), path ("*.count"), emit: count + path "*.version.txt" , emit: version script: def software = getSoftwareName(task.process) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" - def cdna = use_t1c ? "-c1 $t1c" : '' - def introns = use_t2c ? "-c2 $t2c" : '' + def cdna = t1c ? "-c1 $t1c" : '' + def introns = t2c ? "-c2 $t2c" : '' """ kb \\ - count \\ - -t $task.cpus \\ - -i $index \\ - -g $t2g \\ - $cdna \\ - $introns \\ - --workflow $workflow \\ - -x $technology \\ - $options.args \\ - -o ${prefix}_kallistobustools_count \\ - ${reads[0]} \\ - ${reads[1]} + count \\ + -t $task.cpus \\ + -i $index \\ + -g $t2g \\ + $cdna \\ + $introns \\ + --workflow $workflow \\ + -x $technology \\ + $options.args \\ + -o ${prefix}.count \\ + ${reads[0]} \\ + ${reads[1]} echo \$(kb 2>&1) | sed 's/^kb_python //; s/Usage.*\$//' > ${software}.version.txt """ diff --git a/modules/kallistobustools/count/meta.yml b/modules/kallistobustools/count/meta.yml index 9e6fa720..688dfdef 100644 --- a/modules/kallistobustools/count/meta.yml +++ b/modules/kallistobustools/count/meta.yml @@ -18,14 +18,11 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - fastq1: - type: file - description: Read 1 fastq file - pattern: "*.{fastq,fastq.gz}" - - fastq2: - type: file - description: Read 2 fastq file - pattern: "*.{fastq,fastq.gz}" + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. - index: type: file description: kb-ref index file (.idx) @@ -38,17 +35,11 @@ input: type: file description: kb ref's c1 spliced_t2c file pattern: "*.{cdna_t2c.txt}" - - use_t1c: - type: boolean - description: Whether to use the c1 txt file for RNA velocity and nucleus workflows - t2c: type: file description: kb ref's c2 unspliced_t2c file pattern: "*.{introns_t2c.txt}" - - use_t2c: - type: boolean - description: Whether to use the c2 txt file for RNA velocity and nucleus workflows - - kb_workflow: + - workflow: type: value description: String value defining worfklow to use, can be one of "standard", "lamanno", "nucleus" pattern: "{standard,lamanno,nucleus,kite}" @@ -57,17 +48,16 @@ input: description: String value defining the sequencing technology used. pattern: "{10XV1,10XV2,10XV3,CELSEQ,CELSEQ2,DROPSEQ,INDROPSV1,INDROPSV2,INDROPSV3,SCRUBSEQ,SURECELL,SMARTSEQ}" - output: - meta: type: map description: | Groovy Map containing sample information e.g. [ id:'test'] - - kallistobustools_count: + - count: type: file description: kb count output folder - pattern: "*_{kallistobustools_count}" + pattern: "*.{count}" - version: type: file description: File containing software version diff --git a/modules/kallistobustools/ref/main.nf b/modules/kallistobustools/ref/main.nf index 427251cc..ffcd643e 100644 --- a/modules/kallistobustools/ref/main.nf +++ b/modules/kallistobustools/ref/main.nf @@ -11,11 +11,11 @@ process KALLISTOBUSTOOLS_REF { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } - conda (params.enable_conda ? "bioconda::kb-python=0.26.0" : null) + conda (params.enable_conda ? 'bioconda::kb-python=0.26.3' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/kb-python:0.26.0--pyhdfd78af_0" + container "https://depot.galaxyproject.org/singularity/kb-python:0.26.3--pyhdfd78af_0" } else { - container "quay.io/biocontainers/kb-python:0.26.0--pyhdfd78af_0" + container "quay.io/biocontainers/kb-python:0.26.3--pyhdfd78af_0" } input: diff --git a/modules/last/dotplot/main.nf b/modules/last/dotplot/main.nf index 4771aa4c..3644a18e 100644 --- a/modules/last/dotplot/main.nf +++ b/modules/last/dotplot/main.nf @@ -11,11 +11,11 @@ process LAST_DOTPLOT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::last=1238" : null) + conda (params.enable_conda ? 'bioconda::last=1250' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0" + container "https://depot.galaxyproject.org/singularity/last:1250--h2e03b76_0" } else { - container "quay.io/biocontainers/last:1238--h2e03b76_0" + container "quay.io/biocontainers/last:1250--h2e03b76_0" } input: diff --git a/modules/last/lastal/main.nf b/modules/last/lastal/main.nf index 4d1cb9c7..e42653cc 100644 --- a/modules/last/lastal/main.nf +++ b/modules/last/lastal/main.nf @@ -11,11 +11,11 @@ process LAST_LASTAL { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::last=1238" : null) + conda (params.enable_conda ? 'bioconda::last=1250' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0" + container "https://depot.galaxyproject.org/singularity/last:1250--h2e03b76_0" } else { - container "quay.io/biocontainers/last:1238--h2e03b76_0" + container "quay.io/biocontainers/last:1250--h2e03b76_0" } input: diff --git a/modules/last/lastdb/main.nf b/modules/last/lastdb/main.nf index ca376f67..a8cd4921 100644 --- a/modules/last/lastdb/main.nf +++ b/modules/last/lastdb/main.nf @@ -11,11 +11,11 @@ process LAST_LASTDB { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::last=1238" : null) + conda (params.enable_conda ? 'bioconda::last=1250' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0" + container "https://depot.galaxyproject.org/singularity/last:1250--h2e03b76_0" } else { - container "quay.io/biocontainers/last:1238--h2e03b76_0" + container "quay.io/biocontainers/last:1250--h2e03b76_0" } input: diff --git a/modules/last/mafconvert/main.nf b/modules/last/mafconvert/main.nf index 89c7d818..eea53dd1 100644 --- a/modules/last/mafconvert/main.nf +++ b/modules/last/mafconvert/main.nf @@ -11,11 +11,11 @@ process LAST_MAFCONVERT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::last=1238" : null) + conda (params.enable_conda ? 'bioconda::last=1250' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0" + container "https://depot.galaxyproject.org/singularity/last:1250--h2e03b76_0" } else { - container "quay.io/biocontainers/last:1238--h2e03b76_0" + container "quay.io/biocontainers/last:1250--h2e03b76_0" } input: diff --git a/modules/last/mafswap/main.nf b/modules/last/mafswap/main.nf index e0a697f4..03292c81 100644 --- a/modules/last/mafswap/main.nf +++ b/modules/last/mafswap/main.nf @@ -11,11 +11,11 @@ process LAST_MAFSWAP { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::last=1238" : null) + conda (params.enable_conda ? 'bioconda::last=1250' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0" + container "https://depot.galaxyproject.org/singularity/last:1250--h2e03b76_0" } else { - container "quay.io/biocontainers/last:1238--h2e03b76_0" + container "quay.io/biocontainers/last:1250--h2e03b76_0" } input: diff --git a/modules/last/postmask/main.nf b/modules/last/postmask/main.nf index 72584b3e..677b23f6 100644 --- a/modules/last/postmask/main.nf +++ b/modules/last/postmask/main.nf @@ -11,11 +11,11 @@ process LAST_POSTMASK { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::last=1238" : null) + conda (params.enable_conda ? 'bioconda::last=1250' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0" + container "https://depot.galaxyproject.org/singularity/last:1250--h2e03b76_0" } else { - container "quay.io/biocontainers/last:1238--h2e03b76_0" + container "quay.io/biocontainers/last:1250--h2e03b76_0" } input: diff --git a/modules/last/split/main.nf b/modules/last/split/main.nf index 021b1bbf..a6fe1dda 100644 --- a/modules/last/split/main.nf +++ b/modules/last/split/main.nf @@ -11,11 +11,11 @@ process LAST_SPLIT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::last=1238" : null) + conda (params.enable_conda ? 'bioconda::last=1250' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0" + container "https://depot.galaxyproject.org/singularity/last:1250--h2e03b76_0" } else { - container "quay.io/biocontainers/last:1238--h2e03b76_0" + container "quay.io/biocontainers/last:1250--h2e03b76_0" } input: diff --git a/modules/last/train/main.nf b/modules/last/train/main.nf index d6fd4007..cc1fa544 100644 --- a/modules/last/train/main.nf +++ b/modules/last/train/main.nf @@ -11,11 +11,11 @@ process LAST_TRAIN { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::last=1238" : null) + conda (params.enable_conda ? 'bioconda::last=1250' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/last:1238--h2e03b76_0" + container "https://depot.galaxyproject.org/singularity/last:1250--h2e03b76_0" } else { - container "quay.io/biocontainers/last:1238--h2e03b76_0" + container "quay.io/biocontainers/last:1250--h2e03b76_0" } input: diff --git a/modules/metaphlan3/main.nf b/modules/metaphlan3/main.nf index 83bb9883..6c75c2a0 100644 --- a/modules/metaphlan3/main.nf +++ b/modules/metaphlan3/main.nf @@ -11,11 +11,11 @@ process METAPHLAN3 { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::metaphlan=3.0.10" : null) + conda (params.enable_conda ? 'bioconda::metaphlan=3.0.12' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/metaphlan:3.0.10--pyhb7b1952_0" + container "https://depot.galaxyproject.org/singularity/metaphlan:3.0.12--pyhb7b1952_0" } else { - container "quay.io/biocontainers/metaphlan:3.0.10--pyhb7b1952_0" + container "quay.io/biocontainers/metaphlan:3.0.12--pyhb7b1952_0" } input: diff --git a/modules/methyldackel/extract/main.nf b/modules/methyldackel/extract/main.nf index d0a0b58d..4c7da3f4 100644 --- a/modules/methyldackel/extract/main.nf +++ b/modules/methyldackel/extract/main.nf @@ -11,11 +11,11 @@ process METHYLDACKEL_EXTRACT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::methyldackel=0.5.2" : null) + conda (params.enable_conda ? 'bioconda::methyldackel=0.6.0' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/methyldackel:0.5.2--h7435645_0" + container "https://depot.galaxyproject.org/singularity/methyldackel:0.6.0--h22771d5_0" } else { - container "quay.io/biocontainers/methyldackel:0.5.2--h7435645_0" + container "quay.io/biocontainers/methyldackel:0.6.0--h22771d5_0" } input: diff --git a/modules/methyldackel/mbias/main.nf b/modules/methyldackel/mbias/main.nf index dcff677e..7c18197f 100644 --- a/modules/methyldackel/mbias/main.nf +++ b/modules/methyldackel/mbias/main.nf @@ -11,11 +11,11 @@ process METHYLDACKEL_MBIAS { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::methyldackel=0.5.2" : null) + conda (params.enable_conda ? 'bioconda::methyldackel=0.6.0' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/methyldackel:0.5.2--h7435645_0" + container "https://depot.galaxyproject.org/singularity/methyldackel:0.6.0--h22771d5_0" } else { - container "quay.io/biocontainers/methyldackel:0.5.2--h7435645_0" + container "quay.io/biocontainers/methyldackel:0.6.0--h22771d5_0" } input: diff --git a/modules/minimap2/align/main.nf b/modules/minimap2/align/main.nf index 71b745a3..ec5f6a07 100644 --- a/modules/minimap2/align/main.nf +++ b/modules/minimap2/align/main.nf @@ -11,11 +11,11 @@ process MINIMAP2_ALIGN { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::minimap2=2.17" : null) + conda (params.enable_conda ? 'bioconda::minimap2=2.21' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/minimap2:2.17--hed695b0_3" + container "https://depot.galaxyproject.org/singularity/minimap2:2.21--h5bf99c6_0" } else { - container "quay.io/biocontainers/minimap2:2.17--hed695b0_3" + container "quay.io/biocontainers/minimap2:2.21--h5bf99c6_0" } input: diff --git a/modules/minimap2/index/main.nf b/modules/minimap2/index/main.nf index ee0c1b36..e143bd62 100644 --- a/modules/minimap2/index/main.nf +++ b/modules/minimap2/index/main.nf @@ -10,11 +10,11 @@ process MINIMAP2_INDEX { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:['']) } - conda (params.enable_conda ? "bioconda::minimap2=2.17" : null) + conda (params.enable_conda ? 'bioconda::minimap2=2.21' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/minimap2:2.17--hed695b0_3" + container "https://depot.galaxyproject.org/singularity/minimap2:2.21--h5bf99c6_0" } else { - container "quay.io/biocontainers/minimap2:2.17--hed695b0_3" + container "quay.io/biocontainers/minimap2:2.21--h5bf99c6_0" } input: diff --git a/modules/mosdepth/main.nf b/modules/mosdepth/main.nf index 618efd79..6beea37a 100644 --- a/modules/mosdepth/main.nf +++ b/modules/mosdepth/main.nf @@ -11,11 +11,11 @@ process MOSDEPTH { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? 'bioconda::mosdepth=0.3.1' : null) + conda (params.enable_conda ? 'bioconda::mosdepth=0.3.2' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/mosdepth:0.3.1--ha7ba039_0" + container "https://depot.galaxyproject.org/singularity/mosdepth:0.3.2--h01d7912_0" } else { - container "quay.io/biocontainers/mosdepth:0.3.1--ha7ba039_0" + container "quay.io/biocontainers/mosdepth:0.3.2--h01d7912_0" } input: diff --git a/modules/multiqc/main.nf b/modules/multiqc/main.nf index da780800..8b6d6f0c 100644 --- a/modules/multiqc/main.nf +++ b/modules/multiqc/main.nf @@ -10,11 +10,11 @@ process MULTIQC { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } - conda (params.enable_conda ? "bioconda::multiqc=1.10.1" : null) + conda (params.enable_conda ? 'bioconda::multiqc=1.11' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/multiqc:1.10.1--py_0" + container "https://depot.galaxyproject.org/singularity/multiqc:1.11--pyhdfd78af_0" } else { - container "quay.io/biocontainers/multiqc:1.10.1--py_0" + container "quay.io/biocontainers/multiqc:1.11--pyhdfd78af_0" } input: diff --git a/modules/nanoplot/main.nf b/modules/nanoplot/main.nf index af080dc8..f5fffe13 100644 --- a/modules/nanoplot/main.nf +++ b/modules/nanoplot/main.nf @@ -11,11 +11,11 @@ process NANOPLOT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::nanoplot=1.36.1" : null) + conda (params.enable_conda ? 'bioconda::nanoplot=1.38.0' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/nanoplot:1.36.1--pyhdfd78af_0" + container "https://depot.galaxyproject.org/singularity/nanoplot:1.38.0--pyhdfd78af_0" } else { - container "quay.io/biocontainers/nanoplot:1.36.1--pyhdfd78af_0" + container "quay.io/biocontainers/nanoplot:1.38.0--pyhdfd78af_0" } input: diff --git a/modules/picard/collectmultiplemetrics/main.nf b/modules/picard/collectmultiplemetrics/main.nf index c0059a40..81547e84 100644 --- a/modules/picard/collectmultiplemetrics/main.nf +++ b/modules/picard/collectmultiplemetrics/main.nf @@ -11,11 +11,11 @@ process PICARD_COLLECTMULTIPLEMETRICS { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::picard=2.23.9" : null) + conda (params.enable_conda ? 'bioconda::picard=2.25.7' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/picard:2.23.9--0" + container "https://depot.galaxyproject.org/singularity/picard:2.25.7--hdfd78af_0" } else { - container "quay.io/biocontainers/picard:2.23.9--0" + container "quay.io/biocontainers/picard:2.25.7--hdfd78af_0" } input: diff --git a/modules/picard/collectwgsmetrics/main.nf b/modules/picard/collectwgsmetrics/main.nf index f1c69d28..2f01354c 100644 --- a/modules/picard/collectwgsmetrics/main.nf +++ b/modules/picard/collectwgsmetrics/main.nf @@ -11,11 +11,11 @@ process PICARD_COLLECTWGSMETRICS { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::picard=2.25.0" : null) + conda (params.enable_conda ? 'bioconda::picard=2.25.7' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/picard:2.25.0--0" + container "https://depot.galaxyproject.org/singularity/picard:2.25.7--hdfd78af_0" } else { - container "quay.io/biocontainers/picard:2.25.0--0" + container "quay.io/biocontainers/picard:2.25.7--hdfd78af_0" } input: diff --git a/modules/picard/filtersamreads/main.nf b/modules/picard/filtersamreads/main.nf index c22bbaa3..22b8c5a8 100644 --- a/modules/picard/filtersamreads/main.nf +++ b/modules/picard/filtersamreads/main.nf @@ -11,11 +11,11 @@ process PICARD_FILTERSAMREADS { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::picard=2.25.6" : null) + conda (params.enable_conda ? 'bioconda::picard=2.25.7' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/picard:2.25.6--hdfd78af_0" + container "https://depot.galaxyproject.org/singularity/picard:2.25.7--hdfd78af_0" } else { - container "quay.io/biocontainers/picard:2.25.6--hdfd78af_0" + container "quay.io/biocontainers/picard:2.25.7--hdfd78af_0" } input: diff --git a/modules/picard/markduplicates/main.nf b/modules/picard/markduplicates/main.nf index d7647414..d20014bf 100644 --- a/modules/picard/markduplicates/main.nf +++ b/modules/picard/markduplicates/main.nf @@ -11,11 +11,11 @@ process PICARD_MARKDUPLICATES { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::picard=2.23.9" : null) + conda (params.enable_conda ? 'bioconda::picard=2.25.7' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/picard:2.23.9--0" + container "https://depot.galaxyproject.org/singularity/picard:2.25.7--hdfd78af_0" } else { - container "quay.io/biocontainers/picard:2.23.9--0" + container "quay.io/biocontainers/picard:2.25.7--hdfd78af_0" } input: diff --git a/modules/picard/mergesamfiles/main.nf b/modules/picard/mergesamfiles/main.nf index abbfae8f..9fd28af6 100644 --- a/modules/picard/mergesamfiles/main.nf +++ b/modules/picard/mergesamfiles/main.nf @@ -11,11 +11,11 @@ process PICARD_MERGESAMFILES { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::picard=2.23.9" : null) + conda (params.enable_conda ? 'bioconda::picard=2.25.7' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/picard:2.23.9--0" + container "https://depot.galaxyproject.org/singularity/picard:2.25.7--hdfd78af_0" } else { - container "quay.io/biocontainers/picard:2.23.9--0" + container "quay.io/biocontainers/picard:2.25.7--hdfd78af_0" } input: diff --git a/modules/picard/sortsam/main.nf b/modules/picard/sortsam/main.nf index 2af28496..bb815c8f 100644 --- a/modules/picard/sortsam/main.nf +++ b/modules/picard/sortsam/main.nf @@ -12,11 +12,11 @@ process PICARD_SORTSAM { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::picard=2.25.6" : null) + conda (params.enable_conda ? 'bioconda::picard=2.25.7' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/picard:2.25.6--hdfd78af_0" + container "https://depot.galaxyproject.org/singularity/picard:2.25.7--hdfd78af_0" } else { - container "quay.io/biocontainers/picard:2.25.6--hdfd78af_0" + container "quay.io/biocontainers/picard:2.25.7--hdfd78af_0" } input: diff --git a/modules/prodigal/meta.yml b/modules/prodigal/meta.yml index 10e0a3eb..f48fe96d 100644 --- a/modules/prodigal/meta.yml +++ b/modules/prodigal/meta.yml @@ -1,32 +1,27 @@ name: prodigal -## TODO nf-core: Add a description of the module and list keywords -description: write your description here +description: Prodigal (Prokaryotic Dynamic Programming Genefinding Algorithm) is a microbial (bacterial and archaeal) gene finding program keywords: - sort tools: - prodigal: - ## TODO nf-core: Add a description and other details for the software below description: Prodigal (Prokaryotic Dynamic Programming Genefinding Algorithm) is a microbial (bacterial and archaeal) gene finding program homepage: {} documentation: {} tool_dev_url: {} doi: "" - licence: ['GPL v3'] + licence: ["GPL v3"] -## TODO nf-core: Add a description of all of the variables used as input input: - 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: - meta: type: map @@ -37,7 +32,6 @@ output: type: file description: File containing software version pattern: "*.{version.txt}" - ## TODO nf-core: Delete / customise this example output - bam: type: file description: Sorted BAM/CRAM/SAM file diff --git a/modules/raxmlng/main.nf b/modules/raxmlng/main.nf index 02c01927..9f8597b5 100644 --- a/modules/raxmlng/main.nf +++ b/modules/raxmlng/main.nf @@ -10,11 +10,11 @@ process RAXMLNG { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } - conda (params.enable_conda ? "bioconda::raxml-ng=1.0.2" : null) + conda (params.enable_conda ? 'bioconda::raxml-ng=1.0.3' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/raxml-ng:1.0.2--h7447c1b_0" + container "https://depot.galaxyproject.org/singularity/raxml-ng:1.0.3--h32fcf60_0" } else { - container "quay.io/biocontainers/raxml-ng:1.0.2--h7447c1b_0" + container "quay.io/biocontainers/raxml-ng:1.0.3--h32fcf60_0" } input: diff --git a/modules/salmon/index/main.nf b/modules/salmon/index/main.nf index 17d5bc06..e72ff121 100644 --- a/modules/salmon/index/main.nf +++ b/modules/salmon/index/main.nf @@ -11,11 +11,11 @@ process SALMON_INDEX { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:'index', meta:[:], publish_by_meta:[]) } - conda (params.enable_conda ? "bioconda::salmon=1.4.0" : null) + conda (params.enable_conda ? 'bioconda::salmon=1.5.2' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/salmon:1.4.0--hf69c8f4_0" + container "https://depot.galaxyproject.org/singularity/salmon:1.5.2--h84f40af_0" } else { - container "quay.io/biocontainers/salmon:1.4.0--hf69c8f4_0" + container "quay.io/biocontainers/salmon:1.5.2--h84f40af_0" } input: diff --git a/modules/salmon/quant/main.nf b/modules/salmon/quant/main.nf index 093137de..1b9b5803 100644 --- a/modules/salmon/quant/main.nf +++ b/modules/salmon/quant/main.nf @@ -11,11 +11,11 @@ process SALMON_QUANT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::salmon=1.4.0" : null) + conda (params.enable_conda ? 'bioconda::salmon=1.5.2' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/salmon:1.4.0--hf69c8f4_0" + container "https://depot.galaxyproject.org/singularity/salmon:1.5.2--h84f40af_0" } else { - container "quay.io/biocontainers/salmon:1.4.0--hf69c8f4_0" + container "quay.io/biocontainers/salmon:1.5.2--h84f40af_0" } input: diff --git a/modules/samtools/faidx/main.nf b/modules/samtools/faidx/main.nf index 6c023f1c..a89ff2bb 100644 --- a/modules/samtools/faidx/main.nf +++ b/modules/samtools/faidx/main.nf @@ -11,11 +11,11 @@ process SAMTOOLS_FAIDX { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } - conda (params.enable_conda ? "bioconda::samtools=1.12" : null) + conda (params.enable_conda ? 'bioconda::samtools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/samtools:1.12--hd5e65b6_0" + container "https://depot.galaxyproject.org/singularity/samtools:1.13--h8c37831_0" } else { - container "quay.io/biocontainers/samtools:1.12--hd5e65b6_0" + container "quay.io/biocontainers/samtools:1.13--h8c37831_0" } input: diff --git a/modules/samtools/fastq/main.nf b/modules/samtools/fastq/main.nf index 48b3a43f..6bedbb4e 100644 --- a/modules/samtools/fastq/main.nf +++ b/modules/samtools/fastq/main.nf @@ -11,11 +11,11 @@ process SAMTOOLS_FASTQ { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::samtools=1.12" : null) + conda (params.enable_conda ? 'bioconda::samtools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/samtools:1.12--hd5e65b6_0" + container "https://depot.galaxyproject.org/singularity/samtools:1.13--h8c37831_0" } else { - container "quay.io/biocontainers/samtools:1.12--hd5e65b6_0" + container "quay.io/biocontainers/samtools:1.13--h8c37831_0" } input: diff --git a/modules/samtools/flagstat/main.nf b/modules/samtools/flagstat/main.nf index a66ea56d..d4852c66 100644 --- a/modules/samtools/flagstat/main.nf +++ b/modules/samtools/flagstat/main.nf @@ -11,11 +11,11 @@ process SAMTOOLS_FLAGSTAT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::samtools=1.12" : null) + conda (params.enable_conda ? 'bioconda::samtools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/samtools:1.12--hd5e65b6_0" + container "https://depot.galaxyproject.org/singularity/samtools:1.13--h8c37831_0" } else { - container "quay.io/biocontainers/samtools:1.12--hd5e65b6_0" + container "quay.io/biocontainers/samtools:1.13--h8c37831_0" } input: diff --git a/modules/samtools/idxstats/main.nf b/modules/samtools/idxstats/main.nf index ff3cd9a6..14a07cfb 100644 --- a/modules/samtools/idxstats/main.nf +++ b/modules/samtools/idxstats/main.nf @@ -11,11 +11,11 @@ process SAMTOOLS_IDXSTATS { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::samtools=1.12" : null) + conda (params.enable_conda ? 'bioconda::samtools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/samtools:1.12--hd5e65b6_0" + container "https://depot.galaxyproject.org/singularity/samtools:1.13--h8c37831_0" } else { - container "quay.io/biocontainers/samtools:1.12--hd5e65b6_0" + container "quay.io/biocontainers/samtools:1.13--h8c37831_0" } input: diff --git a/modules/samtools/index/main.nf b/modules/samtools/index/main.nf index 778e9384..e1966fb3 100644 --- a/modules/samtools/index/main.nf +++ b/modules/samtools/index/main.nf @@ -11,11 +11,11 @@ process SAMTOOLS_INDEX { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::samtools=1.12" : null) + conda (params.enable_conda ? 'bioconda::samtools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/samtools:1.12--hd5e65b6_0" + container "https://depot.galaxyproject.org/singularity/samtools:1.13--h8c37831_0" } else { - container "quay.io/biocontainers/samtools:1.12--hd5e65b6_0" + container "quay.io/biocontainers/samtools:1.13--h8c37831_0" } input: diff --git a/modules/samtools/merge/main.nf b/modules/samtools/merge/main.nf index 23b31e2f..0182b9fd 100644 --- a/modules/samtools/merge/main.nf +++ b/modules/samtools/merge/main.nf @@ -11,11 +11,11 @@ process SAMTOOLS_MERGE { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::samtools=1.12" : null) + conda (params.enable_conda ? 'bioconda::samtools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/samtools:1.12--hd5e65b6_0" + container "https://depot.galaxyproject.org/singularity/samtools:1.13--h8c37831_0" } else { - container "quay.io/biocontainers/samtools:1.12--hd5e65b6_0" + container "quay.io/biocontainers/samtools:1.13--h8c37831_0" } input: diff --git a/modules/samtools/mpileup/main.nf b/modules/samtools/mpileup/main.nf index 8f2cebd1..f736e9c7 100644 --- a/modules/samtools/mpileup/main.nf +++ b/modules/samtools/mpileup/main.nf @@ -11,11 +11,11 @@ process SAMTOOLS_MPILEUP { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::samtools=1.12" : null) + conda (params.enable_conda ? 'bioconda::samtools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/samtools:1.12--hd5e65b6_0" + container "https://depot.galaxyproject.org/singularity/samtools:1.13--h8c37831_0" } else { - container "quay.io/biocontainers/samtools:1.12--hd5e65b6_0" + container "quay.io/biocontainers/samtools:1.13--h8c37831_0" } input: diff --git a/modules/samtools/sort/main.nf b/modules/samtools/sort/main.nf index 240e8e9f..0a6b7048 100644 --- a/modules/samtools/sort/main.nf +++ b/modules/samtools/sort/main.nf @@ -11,11 +11,11 @@ process SAMTOOLS_SORT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::samtools=1.12" : null) + conda (params.enable_conda ? 'bioconda::samtools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/samtools:1.12--hd5e65b6_0" + container "https://depot.galaxyproject.org/singularity/samtools:1.13--h8c37831_0" } else { - container "quay.io/biocontainers/samtools:1.12--hd5e65b6_0" + container "quay.io/biocontainers/samtools:1.13--h8c37831_0" } input: diff --git a/modules/samtools/stats/main.nf b/modules/samtools/stats/main.nf index 6bb0a4c7..8c72d725 100644 --- a/modules/samtools/stats/main.nf +++ b/modules/samtools/stats/main.nf @@ -11,11 +11,11 @@ process SAMTOOLS_STATS { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::samtools=1.12" : null) + conda (params.enable_conda ? 'bioconda::samtools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/samtools:1.12--hd5e65b6_0" + container "https://depot.galaxyproject.org/singularity/samtools:1.13--h8c37831_0" } else { - container "quay.io/biocontainers/samtools:1.12--hd5e65b6_0" + container "quay.io/biocontainers/samtools:1.13--h8c37831_0" } input: diff --git a/modules/samtools/view/main.nf b/modules/samtools/view/main.nf index ec6c747f..2ca57032 100644 --- a/modules/samtools/view/main.nf +++ b/modules/samtools/view/main.nf @@ -11,11 +11,11 @@ process SAMTOOLS_VIEW { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::samtools=1.12" : null) + conda (params.enable_conda ? 'bioconda::samtools=1.13' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/samtools:1.12--hd5e65b6_0" + container "https://depot.galaxyproject.org/singularity/samtools:1.13--h8c37831_0" } else { - container "quay.io/biocontainers/samtools:1.12--hd5e65b6_0" + container "quay.io/biocontainers/samtools:1.13--h8c37831_0" } input: diff --git a/modules/seqkit/split2/main.nf b/modules/seqkit/split2/main.nf index 4c516c93..5eeb0ad0 100644 --- a/modules/seqkit/split2/main.nf +++ b/modules/seqkit/split2/main.nf @@ -12,12 +12,12 @@ process SEQKIT_SPLIT2 { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::seqkit=0.16.0" : null) + conda (params.enable_conda ? 'bioconda::seqkit=0.16.1' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/seqkit:0.16.0--h9ee0642_0" + container "https://depot.galaxyproject.org/singularity/seqkit:0.16.1--h9ee0642_0" } else { - container "quay.io/biocontainers/seqkit:0.16.0--h9ee0642_0" + container "quay.io/biocontainers/seqkit:0.16.1--h9ee0642_0" } input: diff --git a/modules/seqwish/induce/main.nf b/modules/seqwish/induce/main.nf index 64ecd595..defd86e2 100644 --- a/modules/seqwish/induce/main.nf +++ b/modules/seqwish/induce/main.nf @@ -12,12 +12,12 @@ process SEQWISH_INDUCE { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::seqwish=0.4.1" : null) + conda (params.enable_conda ? 'bioconda::seqwish=0.7.1' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/seqwish:0.4.1--h8b12597_0" + container "https://depot.galaxyproject.org/singularity/seqwish:0.7.1--h2e03b76_0" } else { - container "quay.io/biocontainers/seqwish:0.4.1--h8b12597_0" + container "quay.io/biocontainers/seqwish:0.7.1--h2e03b76_0" } input: diff --git a/modules/shovill/meta.yml b/modules/shovill/meta.yml index 0a8661b1..b8f24e34 100644 --- a/modules/shovill/meta.yml +++ b/modules/shovill/meta.yml @@ -1,5 +1,4 @@ name: shovill -## TODO nf-core: Add a description of the module and list keywords description: Assemble bacterial isolate genomes from Illumina paired-end reads keywords: - bacterial @@ -8,11 +7,10 @@ keywords: tools: - shovill: - ## TODO nf-core: Add a description and other details for the software below description: Microbial assembly pipeline for Illumina paired-end reads homepage: https://github.com/tseemann/shovill documentation: https://github.com/tseemann/shovill/blob/master/README.md - licence: ['GPL v2'] + licence: ["GPL v2"] input: - meta: @@ -21,8 +19,8 @@ input: Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - reads: - type: file - description: List of input paired-end FastQ files + type: file + description: List of input paired-end FastQ files output: - meta: diff --git a/modules/spades/main.nf b/modules/spades/main.nf index c6208053..e78500f2 100644 --- a/modules/spades/main.nf +++ b/modules/spades/main.nf @@ -11,11 +11,11 @@ process SPADES { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::spades=3.15.2" : null) + conda (params.enable_conda ? 'bioconda::spades=3.15.3' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/spades:3.15.2--h95f258a_1" + container "https://depot.galaxyproject.org/singularity/spades:3.15.3--h95f258a_0" } else { - container "quay.io/biocontainers/spades:3.15.2--h95f258a_1" + container "quay.io/biocontainers/spades:3.15.3--h95f258a_0" } input: diff --git a/modules/tabix/bgzip/main.nf b/modules/tabix/bgzip/main.nf index 56a351db..e9d2e96e 100644 --- a/modules/tabix/bgzip/main.nf +++ b/modules/tabix/bgzip/main.nf @@ -11,11 +11,11 @@ process TABIX_BGZIP { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::tabix=0.2.6" : null) + conda (params.enable_conda ? 'bioconda::tabix=1.11' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/tabix:0.2.6--ha92aebf_0" + container "https://depot.galaxyproject.org/singularity/tabix:1.11--hdfd78af_0" } else { - container "quay.io/biocontainers/tabix:0.2.6--ha92aebf_0" + container "quay.io/biocontainers/tabix:1.11--hdfd78af_0" } input: diff --git a/modules/tabix/bgziptabix/main.nf b/modules/tabix/bgziptabix/main.nf index 866a8bf8..6cc3322f 100644 --- a/modules/tabix/bgziptabix/main.nf +++ b/modules/tabix/bgziptabix/main.nf @@ -11,11 +11,11 @@ process TABIX_BGZIPTABIX { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::tabix=0.2.6" : null) + conda (params.enable_conda ? 'bioconda::tabix=1.11' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/tabix:0.2.6--ha92aebf_0" + container "https://depot.galaxyproject.org/singularity/tabix:1.11--hdfd78af_0" } else { - container "quay.io/biocontainers/tabix:0.2.6--ha92aebf_0" + container "quay.io/biocontainers/tabix:1.11--hdfd78af_0" } input: diff --git a/modules/tabix/tabix/main.nf b/modules/tabix/tabix/main.nf index da23f535..df1e84ee 100644 --- a/modules/tabix/tabix/main.nf +++ b/modules/tabix/tabix/main.nf @@ -11,11 +11,11 @@ process TABIX_TABIX { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::tabix=0.2.6" : null) + conda (params.enable_conda ? 'bioconda::tabix=1.11' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/tabix:0.2.6--ha92aebf_0" + container "https://depot.galaxyproject.org/singularity/tabix:1.11--hdfd78af_0" } else { - container "quay.io/biocontainers/tabix:0.2.6--ha92aebf_0" + container "quay.io/biocontainers/tabix:1.11--hdfd78af_0" } input: diff --git a/modules/trimgalore/main.nf b/modules/trimgalore/main.nf index 44b36e71..3c16d66f 100644 --- a/modules/trimgalore/main.nf +++ b/modules/trimgalore/main.nf @@ -11,11 +11,11 @@ process TRIMGALORE { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::trim-galore=0.6.6" : null) + conda (params.enable_conda ? 'bioconda::trim-galore=0.6.7' : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/trim-galore:0.6.6--0" + container "https://depot.galaxyproject.org/singularity/trim-galore:0.6.7--hdfd78af_0" } else { - container "quay.io/biocontainers/trim-galore:0.6.6--0" + container "quay.io/biocontainers/trim-galore:0.6.7--hdfd78af_0" } input: diff --git a/tests/modules/bcftools/filter/test.yml b/tests/modules/bcftools/filter/test.yml index a998f441..0f8e48eb 100644 --- a/tests/modules/bcftools/filter/test.yml +++ b/tests/modules/bcftools/filter/test.yml @@ -5,4 +5,4 @@ - bcftools files: - path: output/bcftools/test.vcf.gz - md5sum: 9d491cfa84067450342ba8e66c75e5b8 + md5sum: fc178eb342a91dc0d1d568601ad8f8e2 diff --git a/tests/modules/bcftools/mpileup/test.yml b/tests/modules/bcftools/mpileup/test.yml index c0c8d6a6..71877e29 100644 --- a/tests/modules/bcftools/mpileup/test.yml +++ b/tests/modules/bcftools/mpileup/test.yml @@ -5,8 +5,8 @@ - bcftools files: - path: output/bcftools/test.bcftools_stats.txt - md5sum: 2d506e32837a53a01fea0fc90402632a + md5sum: 74863ef525eef8d87e3119146d281bcf - path: output/bcftools/test.vcf.gz.tbi - md5sum: 11d90b5b35e4adf6b44fc53bec93bed3 + md5sum: 0772419c5d819b4caa4aebfcad010c6e - path: output/bcftools/test.vcf.gz - md5sum: 2cf273a9fa3784383799b6b24df2f88c + md5sum: 9811674bb8da7ff30581319a910f2396 diff --git a/tests/modules/bcftools/stats/test.yml b/tests/modules/bcftools/stats/test.yml index f863bfca..cd25fe66 100644 --- a/tests/modules/bcftools/stats/test.yml +++ b/tests/modules/bcftools/stats/test.yml @@ -5,4 +5,4 @@ - bcftools/stats files: - path: output/bcftools/test.bcftools_stats.txt - md5sum: c4c5938add12a20050eec3782c8ad623 + md5sum: d3543531396cf7012f13ebdce639cbc8 diff --git a/tests/modules/blast/blastn/test.yml b/tests/modules/blast/blastn/test.yml index ebc03e45..98f76921 100644 --- a/tests/modules/blast/blastn/test.yml +++ b/tests/modules/blast/blastn/test.yml @@ -13,10 +13,10 @@ - path: ./output/blast/blast_db/genome.fasta.nhr md5sum: f4b4ddb034fd3dd7b25c89e9d50c004e - path: ./output/blast/blast_db/genome.fasta.ndb - md5sum: 45f2daf9769957ff80868dd3d80d30a3 + md5sum: 0d553c830656469211de113c5022f06d - path: ./output/blast/blast_db/genome.fasta.not md5sum: 1e53e9d08f1d23af0299cfa87478a7bb - path: ./output/blast/blast_db/genome.fasta.nto md5sum: 33cdeccccebe80329f1fdbee7f5874cb - path: ./output/blast/blast_db/genome.fasta.ntf - md5sum: 1f6027d443e67a98ad0edc2d39971b0c + md5sum: de1250813f0c7affc6d12dac9d0fb6bb diff --git a/tests/modules/blast/makeblastdb/test.yml b/tests/modules/blast/makeblastdb/test.yml index c060ba59..7df17968 100644 --- a/tests/modules/blast/makeblastdb/test.yml +++ b/tests/modules/blast/makeblastdb/test.yml @@ -12,10 +12,10 @@ - path: ./output/blast/blast_db/genome.fasta.nhr md5sum: f4b4ddb034fd3dd7b25c89e9d50c004e - path: ./output/blast/blast_db/genome.fasta.ndb - md5sum: 45f2daf9769957ff80868dd3d80d30a3 + md5sum: 0d553c830656469211de113c5022f06d - path: ./output/blast/blast_db/genome.fasta.not md5sum: 1e53e9d08f1d23af0299cfa87478a7bb - path: ./output/blast/blast_db/genome.fasta.nto md5sum: 33cdeccccebe80329f1fdbee7f5874cb - path: ./output/blast/blast_db/genome.fasta.ntf - md5sum: 1f6027d443e67a98ad0edc2d39971b0c + md5sum: de1250813f0c7affc6d12dac9d0fb6bb diff --git a/tests/modules/deeptools/plotfingerprint/test.yml b/tests/modules/deeptools/plotfingerprint/test.yml index bb96fbe2..b7803a6e 100644 --- a/tests/modules/deeptools/plotfingerprint/test.yml +++ b/tests/modules/deeptools/plotfingerprint/test.yml @@ -7,7 +7,7 @@ - path: output/deeptools/test.plotFingerprint.pdf - path: output/deeptools/test.plotFingerprint.qcmetrics.txt contains: - - "AUC" - - "0.24184576629880325" + - "AUC" + - "0.24184576629880325" - path: output/deeptools/test.plotFingerprint.raw.txt - md5sum: e2a9ff341a315f49e7c8387a3323bdfb + md5sum: aff8e53de0ddd893aa9d8f9d4ce7e291 diff --git a/tests/modules/gubbins/test.yml b/tests/modules/gubbins/test.yml index 31e426b1..7bc0216b 100644 --- a/tests/modules/gubbins/test.yml +++ b/tests/modules/gubbins/test.yml @@ -10,14 +10,14 @@ - path: output/gubbins/all_sites.recombination_predictions.gff md5sum: f95871e79968340cb82532e2c9b0c92b - path: output/gubbins/all_sites.branch_base_reconstruction.embl - md5sum: 02e6fb268f7422bfe34b27ecd3b2c245 + md5sum: 9e051646d630f528fff58f1f73286006 - path: output/gubbins/all_sites.summary_of_snp_distribution.vcf md5sum: 276e62e888ea811577c8ffb2da0b3aff - path: output/gubbins/all_sites.per_branch_statistics.csv - md5sum: 94b09b25d10504b56aa0307beae98a98 + md5sum: 25e4fdb6681c3709a9add1d5632bbf3e - path: output/gubbins/all_sites.filtered_polymorphic_sites.phylip md5sum: 0a77f397a7797c5c3386832745b0c97a - path: output/gubbins/all_sites.final_tree.tre - md5sum: e3c7ea18e2c5c49774c0e2ff78bd1818 + md5sum: 6cb251b58307aab11cb4b48792d6cda1 - path: output/gubbins/all_sites.node_labelled.final_tree.tre - md5sum: 7727b4c4111ebf49cc8a4f1fdd25092c + md5sum: e01f965a15924b4f97603b8011c8d3f7 diff --git a/tests/modules/hisat2/align/test.yml b/tests/modules/hisat2/align/test.yml index 9a1fb271..1c6c8ac2 100644 --- a/tests/modules/hisat2/align/test.yml +++ b/tests/modules/hisat2/align/test.yml @@ -14,7 +14,7 @@ - path: output/index/hisat2/genome.7.ht2 md5sum: 9013eccd91ad614d7893c739275a394f - path: output/index/hisat2/genome.1.ht2 - md5sum: 3ea3dc41304941ad8d047e4d71b4899e + md5sum: 057cfa8a22b97ee9cff4c8d342498803 - path: output/index/hisat2/genome.2.ht2 md5sum: 47b153cd1319abc88dda532462651fcf - path: output/index/hisat2/genome.6.ht2 @@ -42,7 +42,7 @@ - path: output/index/hisat2/genome.7.ht2 md5sum: 9013eccd91ad614d7893c739275a394f - path: output/index/hisat2/genome.1.ht2 - md5sum: 3ea3dc41304941ad8d047e4d71b4899e + md5sum: 057cfa8a22b97ee9cff4c8d342498803 - path: output/index/hisat2/genome.2.ht2 md5sum: 47b153cd1319abc88dda532462651fcf - path: output/index/hisat2/genome.6.ht2 diff --git a/tests/modules/hisat2/build_test/test.yml b/tests/modules/hisat2/build_test/test.yml index 2a8fe324..a8bb2390 100644 --- a/tests/modules/hisat2/build_test/test.yml +++ b/tests/modules/hisat2/build_test/test.yml @@ -11,7 +11,7 @@ - path: output/index/hisat2/genome.7.ht2 md5sum: 9013eccd91ad614d7893c739275a394f - path: output/index/hisat2/genome.1.ht2 - md5sum: 3ea3dc41304941ad8d047e4d71b4899e + md5sum: 057cfa8a22b97ee9cff4c8d342498803 - path: output/index/hisat2/genome.2.ht2 md5sum: 47b153cd1319abc88dda532462651fcf - path: output/index/hisat2/genome.6.ht2 diff --git a/tests/modules/kallistobustools/count/main.nf b/tests/modules/kallistobustools/count/main.nf index 051195af..4400976a 100644 --- a/tests/modules/kallistobustools/count/main.nf +++ b/tests/modules/kallistobustools/count/main.nf @@ -5,20 +5,20 @@ nextflow.enable.dsl = 2 include { KALLISTOBUSTOOLS_COUNT } from '../../../../modules/kallistobustools/count/main.nf' addParams( options: [args:"--cellranger"] ) workflow test_kallistobustools_count { - - input = [ [id:'test_standard'], // meta map - [file("https://github.com/nf-core/test-datasets/blob/modules/data/genomics/homo_sapiens/illumina/10xgenomics/test_1.fastq.gz?raw=true", checkIfExists: true), - file("https://github.com/nf-core/test-datasets/blob/modules/data/genomics/homo_sapiens/illumina/10xgenomics/test_2.fastq.gz?raw=true", checkIfExists: true)] - ] - - index = file("https://github.com/FloWuenne/test-datasets/blob/scrnaseq/reference/kallistobustools/kb_ref.idx?raw=true", checkIfExists: true) - t2g = file("https://raw.githubusercontent.com/FloWuenne/test-datasets/scrnaseq/reference/kallistobustools/t2g.txt", checkIfExists: true) - t1c = file('t1c_dummy') - t2c = file('t2c_dummy') - use_t1c = false - use_t2c = false - workflow = "standard" - technology = "10XV3" - KALLISTOBUSTOOLS_COUNT (input,index,t2g,t1c,t2c,use_t1c,use_t2c,workflow,technology) + input = [ + [id:'test'], // meta map + [ file(params.test_data['homo_sapiens']['illumina']['test_10x_1_fastq_gz'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_10x_2_fastq_gz'], checkIfExists: true) + ] + ] + + index = file("https://github.com/FloWuenne/test-datasets/blob/scrnaseq/reference/kallistobustools/kb_ref.idx?raw=true", checkIfExists: true) + t2g = file("https://raw.githubusercontent.com/FloWuenne/test-datasets/scrnaseq/reference/kallistobustools/t2g.txt", checkIfExists: true) + t1c = [] + t2c = [] + workflow = "standard" + technology = "10XV3" + + KALLISTOBUSTOOLS_COUNT ( input, index, t2g, t1c, t2c, workflow, technology ) } diff --git a/tests/modules/kallistobustools/count/test.yml b/tests/modules/kallistobustools/count/test.yml index 8ff9a66f..766d5b57 100644 --- a/tests/modules/kallistobustools/count/test.yml +++ b/tests/modules/kallistobustools/count/test.yml @@ -4,33 +4,33 @@ - kallistobustools/count - kallistobustools files: - - path: output/kallistobustools/test_standard_kallistobustools_count/10xv3_whitelist.txt + - path: output/kallistobustools/test.count/10x_version3_whitelist.txt md5sum: 3d36d0a4021fd292b265e2b5e72aaaf3 - - path: output/kallistobustools/test_standard_kallistobustools_count/counts_unfiltered/cellranger/barcodes.tsv + - path: output/kallistobustools/test.count/counts_unfiltered/cellranger/barcodes.tsv md5sum: 8f734732c46f52c4d1c025bfe4134bd2 - - path: output/kallistobustools/test_standard_kallistobustools_count/counts_unfiltered/cellranger/genes.tsv + - path: output/kallistobustools/test.count/counts_unfiltered/cellranger/genes.tsv md5sum: fbebf995a3de568db8ac028cd0c5d993 - - path: output/kallistobustools/test_standard_kallistobustools_count/counts_unfiltered/cellranger/matrix.mtx + - path: output/kallistobustools/test.count/counts_unfiltered/cellranger/matrix.mtx md5sum: 4847bae27c41961496d504bcfe9890ba - - path: output/kallistobustools/test_standard_kallistobustools_count/counts_unfiltered/cells_x_genes.barcodes.txt + - path: output/kallistobustools/test.count/counts_unfiltered/cells_x_genes.barcodes.txt md5sum: cafdf96423987e3d9e807cdc16139541 - - path: output/kallistobustools/test_standard_kallistobustools_count/counts_unfiltered/cells_x_genes.genes.txt + - path: output/kallistobustools/test.count/counts_unfiltered/cells_x_genes.genes.txt md5sum: 52d0627aaf0418bebe3ef75ad77da53f - - path: output/kallistobustools/test_standard_kallistobustools_count/counts_unfiltered/cells_x_genes.mtx + - path: output/kallistobustools/test.count/counts_unfiltered/cells_x_genes.mtx md5sum: d05e1582385ba5f215fa73c470343c06 - - path: output/kallistobustools/test_standard_kallistobustools_count/inspect.json + - path: output/kallistobustools/test.count/inspect.json md5sum: d3d23063f3fc07f7fbd24748aa4271a9 - - path: output/kallistobustools/test_standard_kallistobustools_count/kb_info.json - contains: - - 'kallisto' - - path: output/kallistobustools/test_standard_kallistobustools_count/matrix.ec + - path: output/kallistobustools/test.count/kb_info.json + contains: + - "kallisto" + - path: output/kallistobustools/test.count/matrix.ec md5sum: cd8340e3fb78d74ad85fabdbe0a778f0 - - path: output/kallistobustools/test_standard_kallistobustools_count/output.bus + - path: output/kallistobustools/test.count/output.bus md5sum: f4702922bd0c142e34b3680c2251426a - - path: output/kallistobustools/test_standard_kallistobustools_count/output.unfiltered.bus + - path: output/kallistobustools/test.count/output.unfiltered.bus md5sum: e38f99748e598e33fe035b89e7c89fb5 - - path: output/kallistobustools/test_standard_kallistobustools_count/run_info.json - contains: - - 'n_targets' - - path: output/kallistobustools/test_standard_kallistobustools_count/transcripts.txt + - path: output/kallistobustools/test.count/run_info.json + contains: + - "n_targets" + - path: output/kallistobustools/test.count/transcripts.txt md5sum: 6d583083eaf6ca81e409332a40d2e74c diff --git a/tests/modules/kallistobustools/ref/test.yml b/tests/modules/kallistobustools/ref/test.yml index 1821533a..54954085 100644 --- a/tests/modules/kallistobustools/ref/test.yml +++ b/tests/modules/kallistobustools/ref/test.yml @@ -5,11 +5,8 @@ - kallistobustools files: - path: output/kallistobustools/cdna.fa - md5sum: 0de7fdac9e7418576987ed93640927c7 - path: output/kallistobustools/kb_ref_out.idx - md5sum: 7d5cd0731e7c467e5521d761f7d79895 - path: output/kallistobustools/t2g.txt - md5sum: d5bcfd61ff078aa92e576abf8cc4fc08 - name: kallistobustools ref test_kallistobustools_ref_lamanno command: nextflow run tests/modules/kallistobustools/ref -entry test_kallistobustools_ref_lamanno -c tests/config/nextflow.config @@ -18,17 +15,11 @@ - kallistobustools files: - path: output/kallistobustools/cdna.fa - md5sum: 0de7fdac9e7418576987ed93640927c7 - path: output/kallistobustools/cdna_t2c.txt - md5sum: 6d583083eaf6ca81e409332a40d2e74c - path: output/kallistobustools/intron.fa - md5sum: ca5ca147afa0a25f6a730edfb39a6098 - path: output/kallistobustools/intron_t2c.txt - md5sum: 728480007abfdbdb248f7ba9de6026ef - path: output/kallistobustools/kb_ref_out.idx - md5sum: 48ca8323aadd30b1762d4e8f5a7d7aee - path: output/kallistobustools/t2g.txt - md5sum: 7cae93dfb9a26f70adf4a57fe2a83027 - name: kallistobustools ref test_kallistobustools_ref_nucleus command: nextflow run tests/modules/kallistobustools/ref -entry test_kallistobustools_ref_nucleus -c tests/config/nextflow.config @@ -37,14 +28,8 @@ - kallistobustools files: - path: output/kallistobustools/cdna.fa - md5sum: 0de7fdac9e7418576987ed93640927c7 - path: output/kallistobustools/cdna_t2c.txt - md5sum: 6d583083eaf6ca81e409332a40d2e74c - path: output/kallistobustools/intron.fa - md5sum: ca5ca147afa0a25f6a730edfb39a6098 - path: output/kallistobustools/intron_t2c.txt - md5sum: 728480007abfdbdb248f7ba9de6026ef - path: output/kallistobustools/kb_ref_out.idx - md5sum: 48ca8323aadd30b1762d4e8f5a7d7aee - path: output/kallistobustools/t2g.txt - md5sum: 7cae93dfb9a26f70adf4a57fe2a83027 diff --git a/tests/modules/last/lastal/test.yml b/tests/modules/last/lastal/test.yml index c6966a5f..48b0d223 100644 --- a/tests/modules/last/lastal/test.yml +++ b/tests/modules/last/lastal/test.yml @@ -5,7 +5,7 @@ - last/lastal files: - path: output/last/contigs.genome.maf.gz - md5sum: 2fc56553282d0826310bdef16a55e587 + md5sum: 670f4fa1a94b23690cdb6fc603813c75 - path: output/untar/lastdb/genome.bck md5sum: 5519879b9b6c4d1fc508da7f17f88f2e - path: output/untar/lastdb/genome.des @@ -28,7 +28,7 @@ - last/lastal files: - path: output/last/contigs.genome.maf.gz - md5sum: f50557bed5430b42de7b0d5d61075cf0 + md5sum: b0202b013e1caa9163516cd4ff4fbdbc - path: output/untar/lastdb/genome.bck md5sum: 5519879b9b6c4d1fc508da7f17f88f2e - path: output/untar/lastdb/genome.des diff --git a/tests/modules/last/lastdb/test.yml b/tests/modules/last/lastdb/test.yml index fed274eb..c69ecfac 100644 --- a/tests/modules/last/lastdb/test.yml +++ b/tests/modules/last/lastdb/test.yml @@ -9,7 +9,7 @@ - path: output/last/lastdb/test.des md5sum: 3a9ea6d336e113a74d7fdca5e7b623fc - path: output/last/lastdb/test.prj - md5sum: 2c981eb9b9d2012d8413946a5b378f20 + md5sum: 6948d17d2a10e470ea545f659930a543 - path: output/last/lastdb/test.sds md5sum: 2cd381f4f8a9c52cfcd323a2863eccb2 - path: output/last/lastdb/test.ssp @@ -30,7 +30,7 @@ - path: output/last/lastdb/test.des md5sum: 26ab49015cc572172b9efa50fc5190bc - path: output/last/lastdb/test.prj - md5sum: aec51a18da1c2361aaca70dd16eb7b7b + md5sum: d253fc4320d9b4d7fcfc43b2734412ee - path: output/last/lastdb/test.sds md5sum: cad9927d4bd161257e98165ad755d8e4 - path: output/last/lastdb/test.ssp diff --git a/tests/modules/minimap2/align/test.yml b/tests/modules/minimap2/align/test.yml index 484fa9f7..f9b762bb 100644 --- a/tests/modules/minimap2/align/test.yml +++ b/tests/modules/minimap2/align/test.yml @@ -5,7 +5,7 @@ - minimap2/align files: - path: ./output/minimap2/test.paf - md5sum: 5a9648fc67c30a2c83b0ef094171faa0 + md5sum: 70e8cf299ee3ecd33e629d10c1f588ce - name: minimap2 align paired-end command: nextflow run ./tests/modules/minimap2/align -entry test_minimap2_align_paired_end -c tests/config/nextflow.config @@ -14,4 +14,4 @@ - minimap2/align files: - path: ./output/minimap2/test.paf - md5sum: e7b952be872bdbef16bf99d512690df7 + md5sum: 5e7b55a26bf0ea3a2843423d3e0b9a28 diff --git a/tests/modules/picard/markduplicates/test.yml b/tests/modules/picard/markduplicates/test.yml index db3cf253..24f468ce 100644 --- a/tests/modules/picard/markduplicates/test.yml +++ b/tests/modules/picard/markduplicates/test.yml @@ -6,7 +6,7 @@ files: - path: ./output/picard/test.MarkDuplicates.metrics.txt - path: ./output/picard/test.bam - md5sum: fe8ed25b4bd25be0cc7a8730fc3b2f30 + md5sum: 3270bb142039e86aaf2ab83c540225d5 - name: picard markduplicates on unsorted bam command: nextflow run ./tests/modules/picard/markduplicates -entry test_picard_markduplicates_unsorted_bam -c tests/config/nextflow.config diff --git a/tests/modules/picard/mergesamfiles/test.yml b/tests/modules/picard/mergesamfiles/test.yml index be82034f..114c1f01 100644 --- a/tests/modules/picard/mergesamfiles/test.yml +++ b/tests/modules/picard/mergesamfiles/test.yml @@ -5,4 +5,4 @@ - picard/mergesamfiles files: - path: ./output/picard/test.bam - md5sum: b8bd6c22f36c6ebc91bca98bd637a2eb + md5sum: 82bb91735aff82eae4f0b631114e9e15 diff --git a/tests/modules/salmon/index/test.yml b/tests/modules/salmon/index/test.yml index 722cd24f..156bc5ca 100644 --- a/tests/modules/salmon/index/test.yml +++ b/tests/modules/salmon/index/test.yml @@ -8,7 +8,7 @@ - path: ./output/index/salmon/refseq.bin md5sum: 79c4ddf34be3a98d5a7b9d153629a6f7 - path: ./output/index/salmon/versionInfo.json - md5sum: 204865f645102587c4953fccb256797c + md5sum: 6c764bd219b7bc17168a99d232c0fe09 - path: ./output/index/salmon/complete_ref_lens.bin md5sum: f57562f1fca3ae7b133f895ae13c3d08 - path: ./output/index/salmon/mphf.bin diff --git a/tests/modules/salmon/quant/test.yml b/tests/modules/salmon/quant/test.yml index 5a1ebdd8..d7ed0d0f 100644 --- a/tests/modules/salmon/quant/test.yml +++ b/tests/modules/salmon/quant/test.yml @@ -9,7 +9,7 @@ md5sum: 687368b9963874c1797d210310b38516 - path: ./output/salmon/test/lib_format_counts.json - path: ./output/salmon/test/quant.genes.sf - md5sum: ad4d31437f06db49b2436abeec29c78e + md5sum: af6d88f109e0d0d6a0826bdf2b3b7e97 - path: ./output/salmon/test/logs/salmon_quant.log - path: ./output/salmon/test/aux_info/expected_bias.gz md5sum: 24ee10af39b41ecf4f4e08faaaf537ee @@ -27,7 +27,7 @@ - path: ./output/index/salmon/refseq.bin md5sum: 79c4ddf34be3a98d5a7b9d153629a6f7 - path: ./output/index/salmon/versionInfo.json - md5sum: 204865f645102587c4953fccb256797c + md5sum: 6c764bd219b7bc17168a99d232c0fe09 - path: ./output/index/salmon/complete_ref_lens.bin md5sum: f57562f1fca3ae7b133f895ae13c3d08 - path: ./output/index/salmon/mphf.bin @@ -60,7 +60,7 @@ md5sum: 4abd35d0a60b5279b394424f0e6ea42d - path: ./output/salmon/test/lib_format_counts.json - path: ./output/salmon/test/quant.genes.sf - md5sum: d750f8c9f248e30c3a6d0c2678bf9c6a + md5sum: 29c8cd26f609cacd4fb88713df9c71c2 - path: ./output/salmon/test/logs/salmon_quant.log - path: ./output/salmon/test/aux_info/expected_bias.gz md5sum: 24ee10af39b41ecf4f4e08faaaf537ee @@ -78,7 +78,7 @@ - path: ./output/index/salmon/refseq.bin md5sum: 79c4ddf34be3a98d5a7b9d153629a6f7 - path: ./output/index/salmon/versionInfo.json - md5sum: 204865f645102587c4953fccb256797c + md5sum: 6c764bd219b7bc17168a99d232c0fe09 - path: ./output/index/salmon/complete_ref_lens.bin md5sum: f57562f1fca3ae7b133f895ae13c3d08 - path: ./output/index/salmon/mphf.bin @@ -112,7 +112,7 @@ md5sum: 687368b9963874c1797d210310b38516 - path: ./output/salmon/test/lib_format_counts.json - path: ./output/salmon/test/quant.genes.sf - md5sum: ad4d31437f06db49b2436abeec29c78e + md5sum: af6d88f109e0d0d6a0826bdf2b3b7e97 - path: ./output/salmon/test/logs/salmon_quant.log - path: output/salmon/test/aux_info/expected_bias.gz md5sum: 24ee10af39b41ecf4f4e08faaaf537ee @@ -130,7 +130,7 @@ - path: output/index/salmon/refseq.bin md5sum: 79c4ddf34be3a98d5a7b9d153629a6f7 - path: output/index/salmon/versionInfo.json - md5sum: 204865f645102587c4953fccb256797c + md5sum: 6c764bd219b7bc17168a99d232c0fe09 - path: output/index/salmon/complete_ref_lens.bin md5sum: f57562f1fca3ae7b133f895ae13c3d08 - path: output/index/salmon/mphf.bin diff --git a/tests/modules/samtools/fastq/test.yml b/tests/modules/samtools/fastq/test.yml index 3fdc0ef6..bfcf5c92 100644 --- a/tests/modules/samtools/fastq/test.yml +++ b/tests/modules/samtools/fastq/test.yml @@ -5,6 +5,6 @@ - samtools/fastq files: - path: output/samtools/test_2.fastq.gz - md5sum: 229daf1a62d114cae42c65801e8c0114 + md5sum: 3b1c92f33a44a78d82f8360ab4fdfd61 - path: output/samtools/test_1.fastq.gz - md5sum: 4cab81f76e66361611621377f1b69d1d + md5sum: 5a3f9c69a032c4ffd9071ea31a14e6f9 diff --git a/tests/modules/samtools/flagstat/test.yml b/tests/modules/samtools/flagstat/test.yml index 18671e25..0da6c2f4 100644 --- a/tests/modules/samtools/flagstat/test.yml +++ b/tests/modules/samtools/flagstat/test.yml @@ -5,4 +5,4 @@ - samtools/flagstat files: - path: ./output/samtools/test.paired_end.sorted.bam.flagstat - md5sum: 6d7934c303b15ce473f64d502b79984e + md5sum: 4f7ffd1e6a5e85524d443209ac97d783 diff --git a/tests/modules/samtools/mpileup/test.yml b/tests/modules/samtools/mpileup/test.yml index 31d35c0f..25c39d63 100644 --- a/tests/modules/samtools/mpileup/test.yml +++ b/tests/modules/samtools/mpileup/test.yml @@ -5,4 +5,4 @@ - samtools/mpileup files: - path: ./output/samtools/test.mpileup - md5sum: 3608af83ffe3efbb1337f0ffb205337d + md5sum: 958e6bead4103d72026f80153b6b5150 diff --git a/tests/modules/samtools/sort/test.yml b/tests/modules/samtools/sort/test.yml index 2ce00247..477574fe 100644 --- a/tests/modules/samtools/sort/test.yml +++ b/tests/modules/samtools/sort/test.yml @@ -5,4 +5,4 @@ - samtools/sort files: - path: output/samtools/test.bam - md5sum: 3997667dee6b45d682865c6bf82d0378 + md5sum: bdc2d9e3f579f84df1e242207b627f89 diff --git a/tests/modules/samtools/stats/test.yml b/tests/modules/samtools/stats/test.yml index 32854c05..cf44b846 100644 --- a/tests/modules/samtools/stats/test.yml +++ b/tests/modules/samtools/stats/test.yml @@ -5,4 +5,4 @@ - samtools/stats files: - path: ./output/samtools/test.paired_end.sorted.bam.stats - md5sum: 95f7edae5d02c10c4004d9ab1d7d8ef3 + md5sum: a7f36cf11fd3bf97e0a0ae29c0627296 diff --git a/tests/modules/spades/test.yml b/tests/modules/spades/test.yml index eeff24cd..35beb1a7 100644 --- a/tests/modules/spades/test.yml +++ b/tests/modules/spades/test.yml @@ -4,11 +4,11 @@ - spades files: - path: output/spades/test.assembly.gfa - md5sum: b2616d2beba83ab7d361b54778d1e759 + md5sum: a995d1d413031534180d2b3b715fa921 - path: output/spades/test.contigs.fa - md5sum: 2690fefde046bc904e90df09a065257a + md5sum: 65ba6a517c152dbe219bf4b5b92bdad7 - path: output/spades/test.scaffolds.fa - md5sum: 2690fefde046bc904e90df09a065257a + md5sum: 65ba6a517c152dbe219bf4b5b92bdad7 - path: output/spades/test.spades.log - name: spades paired end @@ -17,7 +17,7 @@ - spades files: - path: output/spades/test.assembly.gfa - md5sum: faf76135ee390606b899c0197dc38e04 + md5sum: bb053ef4e9250829c980ca17fbdbe3e9 - path: output/spades/test.contigs.fa - md5sum: 6148e25b33890c80f176f90f2dd88989 + md5sum: 4476d409da70d9f7fc2aa8f25bbaf7fd - path: output/spades/test.spades.log diff --git a/tests/modules/tabix/bgzip/test.yml b/tests/modules/tabix/bgzip/test.yml index e254daed..58412979 100644 --- a/tests/modules/tabix/bgzip/test.yml +++ b/tests/modules/tabix/bgzip/test.yml @@ -5,4 +5,4 @@ - tabix/bgzip files: - path: ./output/tabix/test.vcf.gz - md5sum: 0f1c94af3aa3e7e203d9e034ef6f8f4d + md5sum: fc178eb342a91dc0d1d568601ad8f8e2 diff --git a/tests/modules/tabix/bgziptabix/test.yml b/tests/modules/tabix/bgziptabix/test.yml index c0b9c247..31048109 100644 --- a/tests/modules/tabix/bgziptabix/test.yml +++ b/tests/modules/tabix/bgziptabix/test.yml @@ -5,6 +5,6 @@ - tabix/bgziptabix files: - path: ./output/tabix/test.gz - md5sum: 0f1c94af3aa3e7e203d9e034ef6f8f4d + md5sum: fc178eb342a91dc0d1d568601ad8f8e2 - path: ./output/tabix/test.gz.tbi - md5sum: bbec39fd53cf2834909d52094980d094 + md5sum: 36e11bf96ed0af4a92caa91a68612d64 diff --git a/tests/modules/tabix/tabix/test.yml b/tests/modules/tabix/tabix/test.yml index 41c4a940..646215c8 100644 --- a/tests/modules/tabix/tabix/test.yml +++ b/tests/modules/tabix/tabix/test.yml @@ -5,7 +5,7 @@ - tabix/tabix files: - path: ./output/tabix/test.bed.gz.tbi - md5sum: 115922d881d24879b15d20c3734495ac + md5sum: 5b40851ab6b8ccf7946313c86481c0df - name: tabix tabix gff command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_gff -c tests/config/nextflow.config tags: @@ -13,7 +13,7 @@ - tabix/tabix files: - path: ./output/tabix/genome.gff3.gz.tbi - md5sum: 4059fe4762568194cf293fc6df7b358b + md5sum: f79a67d95a98076e04fbe0455d825926 - name: tabix tabix vcf command: nextflow run ./tests/modules/tabix/tabix -entry test_tabix_tabix_vcf -c tests/config/nextflow.config tags: @@ -21,4 +21,4 @@ - tabix/tabix files: - path: output/tabix/test.vcf.gz.tbi - md5sum: bbec39fd53cf2834909d52094980d094 + md5sum: 36e11bf96ed0af4a92caa91a68612d64 From 29c847424034eb04765d7378fb384ad3094a66a6 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Wed, 28 Jul 2021 19:49:50 +0100 Subject: [PATCH 19/36] Update Nextclade to output all files by default (#638) --- modules/nextclade/main.nf | 25 +++++++++--------------- modules/nextclade/meta.yml | 7 +------ tests/modules/nextclade/main.nf | 33 +++++++------------------------- tests/modules/nextclade/test.yml | 22 ++------------------- 4 files changed, 19 insertions(+), 68 deletions(-) diff --git a/modules/nextclade/main.nf b/modules/nextclade/main.nf index 24ca7309..8319f6b1 100755 --- a/modules/nextclade/main.nf +++ b/modules/nextclade/main.nf @@ -20,35 +20,28 @@ process NEXTCLADE { input: tuple val(meta), path(fasta) - val output_format output: - tuple val(meta), path("${prefix}.csv") , optional:true, emit: csv - tuple val(meta), path("${prefix}.json") , optional:true, emit: json - tuple val(meta), path("${prefix}.tree.json") , optional:true, emit: json_tree - tuple val(meta), path("${prefix}.tsv") , optional:true, emit: tsv + tuple val(meta), path("${prefix}.csv") , emit: csv + tuple val(meta), path("${prefix}.json") , emit: json + tuple val(meta), path("${prefix}.tree.json") , emit: json_tree + tuple val(meta), path("${prefix}.tsv") , emit: tsv tuple val(meta), path("${prefix}.clades.tsv"), optional:true, emit: tsv_clades path "*.version.txt" , emit: version script: def software = getSoftwareName(task.process) prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" - def format = output_format - if (!(format in ['json', 'csv', 'tsv', 'tree', 'tsv-clades-only'])) { - format = 'json' - } - def extension = format - if (format in ['tsv-clades-only']) { - extension = '.clades.tsv' - } else if (format in ['tree']) { - extension = 'tree.json' - } """ nextclade \\ $options.args \\ --jobs $task.cpus \\ --input-fasta $fasta \\ - --output-${format} ${prefix}.${extension} + --output-json ${prefix}.json \\ + --output-csv ${prefix}.csv \\ + --output-tsv ${prefix}.tsv \\ + --output-tsv-clades-only ${prefix}.clades.tsv \\ + --output-tree ${prefix}.tree.json echo \$(nextclade --version 2>&1) > ${software}.version.txt """ diff --git a/modules/nextclade/meta.yml b/modules/nextclade/meta.yml index 8e0eabd7..d321e08f 100755 --- a/modules/nextclade/meta.yml +++ b/modules/nextclade/meta.yml @@ -11,7 +11,7 @@ tools: documentation: None tool_dev_url: https://github.com/nextstrain/nextclade doi: "" - licence: ['MIT'] + licence: ["MIT"] input: - meta: @@ -23,11 +23,6 @@ input: type: file description: FASTA file containing one or more consensus sequences pattern: "*.{fasta,fa}" - - output_format: - type: string - description: | - String for output format supported by nextclade - i.e one of 'json', 'csv', 'tsv', 'tree', 'tsv-clades-only' output: - meta: diff --git a/tests/modules/nextclade/main.nf b/tests/modules/nextclade/main.nf index fe8f72c9..93c50ca5 100755 --- a/tests/modules/nextclade/main.nf +++ b/tests/modules/nextclade/main.nf @@ -4,30 +4,11 @@ nextflow.enable.dsl = 2 include { NEXTCLADE } from '../../../modules/nextclade/main.nf' addParams( options: [:] ) -workflow test_nextclade_json { - input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] - NEXTCLADE ( input, 'json' ) -} - -workflow test_nextclade_csv { - input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] - NEXTCLADE ( input, 'csv' ) -} - -workflow test_nextclade_tsv { - input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] - NEXTCLADE ( input, 'tsv' ) -} - -workflow test_nextclade_tree { - input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] - NEXTCLADE ( input, 'tree' ) +workflow test_nextclade { + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + NEXTCLADE ( input ) } diff --git a/tests/modules/nextclade/test.yml b/tests/modules/nextclade/test.yml index 9826dbad..4d1d7743 100755 --- a/tests/modules/nextclade/test.yml +++ b/tests/modules/nextclade/test.yml @@ -1,31 +1,13 @@ -- name: nextclade test_nextclade_json - command: nextflow run tests/modules/nextclade -entry test_nextclade_json -c tests/config/nextflow.config +- name: nextclade test_nextclade + command: nextflow run tests/modules/nextclade -entry test_nextclade -c tests/config/nextflow.config tags: - nextclade files: - path: output/nextclade/test.json md5sum: cab92830c5cb66076e7d6c054ea98362 - -- name: nextclade test_nextclade_csv - command: nextflow run tests/modules/nextclade -entry test_nextclade_csv -c tests/config/nextflow.config - tags: - - nextclade - files: - path: output/nextclade/test.csv md5sum: 4f7096df9be51f99a0d62a38653b29cf - -- name: nextclade test_nextclade_tsv - command: nextflow run tests/modules/nextclade -entry test_nextclade_tsv -c tests/config/nextflow.config - tags: - - nextclade - files: - path: output/nextclade/test.tsv md5sum: fe07dc4ffcd81742ca9bef93f88e8836 - -- name: nextclade test_nextclade_tree - command: nextflow run tests/modules/nextclade -entry test_nextclade_tree -c tests/config/nextflow.config - tags: - - nextclade - files: - path: output/nextclade/test.tree.json md5sum: 5c57dd724bc2b5cfde8f42a17ff2865a From 2a7c60e9652fc37ad39e784f1b87b218fae8c94c Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Sat, 31 Jul 2021 11:30:26 +0200 Subject: [PATCH 20/36] Guidelines update: describe workaround for modules called `build` (#647) * Specify more guidelines on input channels * Linting * Updates based on code review * Update README.md * Fix broken sentence * Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 7239b24d..02638474 100644 --- a/README.md +++ b/README.md @@ -381,6 +381,8 @@ Please follow the steps below to run the tests locally: - See [docs on running pytest-workflow](https://pytest-workflow.readthedocs.io/en/stable/#running-pytest-workflow) for more info. +> :warning: if you have a module named `build` this can conflict with some pytest internal behaviour. This results in no tests being run (i.e. recieving a message of `collected 0 items`). In this case rename the `tests//build` directry to `tests//build_test`, and update the corresponding `test.yml` accordingly. An example can be seen with the [`bowtie2/build` module tests](https://github.com/nf-core/modules/tree/master/tests/modules/bowtie2/build_test). + ### Uploading to `nf-core/modules` [Fork](https://help.github.com/articles/fork-a-repo/) the `nf-core/modules` repository to your own GitHub account. Within the local clone of your fork add the module file to the [`modules/`](modules) directory. Please try and keep PRs as atomic as possible to aid the reviewing process - ideally, one module addition/update per PR. From e01a98a7048a4e648b73c880586e9f4f39fd542c Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Mon, 2 Aug 2021 09:40:57 +0200 Subject: [PATCH 21/36] module: unzip (#642) * Specify more guidelines on input channels * Linting * Updates based on code review * Update README.md * Fix broken sentence * Add unzip module * Remove missing TODOs update mtea * Apply changes after code-review from @grst * Account for user trying to supply two input archives * Remove debugging test * Update modules/unzip/main.nf Co-authored-by: Jose Espinosa-Carrasco * Correct output path Co-authored-by: Jose Espinosa-Carrasco --- modules/unzip/functions.nf | 68 +++++++++++++++++++++++++++++++++ modules/unzip/main.nf | 43 +++++++++++++++++++++ modules/unzip/meta.yml | 31 +++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/config/test_data.config | 1 + tests/modules/unzip/main.nf | 12 ++++++ tests/modules/unzip/test.yml | 7 ++++ 7 files changed, 166 insertions(+) create mode 100644 modules/unzip/functions.nf create mode 100644 modules/unzip/main.nf create mode 100644 modules/unzip/meta.yml create mode 100644 tests/modules/unzip/main.nf create mode 100644 tests/modules/unzip/test.yml diff --git a/modules/unzip/functions.nf b/modules/unzip/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/unzip/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/unzip/main.nf b/modules/unzip/main.nf new file mode 100644 index 00000000..b52fbb04 --- /dev/null +++ b/modules/unzip/main.nf @@ -0,0 +1,43 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process UNZIP { + tag "$archive" + label 'process_low' + publishDir "${params.outdir}", + mode: params.publish_dir_mode, + saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } + + + conda (params.enable_conda ? "bioconda::p7zip=15.09" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/p7zip:15.09--h2d50403_4" + } else { + container "quay.io/biocontainers/p7zip:15.09--h2d50403_4" + } + + input: + path archive + + output: + path "${archive.baseName}/" , emit: unzipped_archive + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + + if ( archive instanceof List && archive.name.size > 1 ) { exit 1, "[UNZIP] error: 7za only accepts a single archive as input. Please check module input." } + + """ + 7za \\ + e \\ + -o"${archive.baseName}"/ \\ + $options.args \\ + $archive + + echo \$(7za --help) | grep Version | sed 's/.*p7zip Version//; s/(.*//' 1> ${software}.version.txt + """ +} diff --git a/modules/unzip/meta.yml b/modules/unzip/meta.yml new file mode 100644 index 00000000..97b1f1fc --- /dev/null +++ b/modules/unzip/meta.yml @@ -0,0 +1,31 @@ +name: unzip +description: Unzip ZIP archive files +keywords: + - unzip + - decompression +tools: + - unzip: + description: p7zip is a quick port of 7z.exe and 7za.exe (command line version of 7zip, see www.7-zip.org) for Unix. + homepage: https://sourceforge.net/projects/p7zip/ + documentation: https://sourceforge.net/projects/p7zip/ + tool_dev_url: https://sourceforge.net/projects/p7zip" + licence: "GNU LPGL" + +input: + - archive: + type: file + description: ZIP file + pattern: "*.zip" + +output: + - version: + type: file + description: File or directory of decompressed archive + pattern: "*.{version.txt}" + - unzipped_archive: + type: directory + description: Directory contents of the unzipped archive + pattern: '${archive.baseName}/' + +authors: + - "@jfy133" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 885978df..343c9813 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -835,6 +835,10 @@ untar: - modules/untar/** - tests/modules/untar/** +unzip: + - modules/unzip/** + - tests/modules/unzip/** + variantbam: - modules/variantbam/** - tests/modules/variantbam/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 3f86d7ba..5643c364 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -7,6 +7,7 @@ params { 'genome' { genome_fasta = "${test_data_dir}/genomics/sarscov2/genome/genome.fasta" genome_fasta_fai = "${test_data_dir}/genomics/sarscov2/genome/genome.fasta.fai" + genome_fasta_zip = "${test_data_dir}/genomics/sarscov2/genome/genome.fasta.zip" genome_dict = "${test_data_dir}/genomics/sarscov2/genome/genome.dict" genome_gff3 = "${test_data_dir}/genomics/sarscov2/genome/genome.gff3" genome_gff3_gz = "${test_data_dir}/genomics/sarscov2/genome/genome.gff3.gz" diff --git a/tests/modules/unzip/main.nf b/tests/modules/unzip/main.nf new file mode 100644 index 00000000..b7f668b1 --- /dev/null +++ b/tests/modules/unzip/main.nf @@ -0,0 +1,12 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNZIP } from '../../../modules/unzip/main.nf' addParams( options: [:] ) + +workflow test_unzip { + + archive = file(params.test_data['sarscov2']['genome']['genome_fasta_zip'], checkIfExists: true) + + UNZIP ( archive ) +} diff --git a/tests/modules/unzip/test.yml b/tests/modules/unzip/test.yml new file mode 100644 index 00000000..93066eb0 --- /dev/null +++ b/tests/modules/unzip/test.yml @@ -0,0 +1,7 @@ +- name: unzip + command: nextflow run ./tests/modules/unzip -entry test_unzip -c tests/config/nextflow.config + tags: + - unzip + files: + - path: output/unzip/genome.fasta/genome.fasta + md5sum: 6e9fe4042a72f2345f644f239272b7e6 From 8a2f01c4168ef1f5ceb5ab4206a8545423cefc9b Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Mon, 2 Aug 2021 15:21:23 +0200 Subject: [PATCH 22/36] module: bwa/samse (#626) * Specify more guidelines on input channels * Linting * Updates based on code review * Update README.md * Fix broken sentence * Add bwa/aln module * Also output reads as required with SAI * Add bwa samse * Fix container paths * remove TODO comment * Updated based on code from from @grst on bwa/sampe * Clarify output docs --- modules/bwa/samse/functions.nf | 68 ++++++++++++++++++++++++++++++++ modules/bwa/samse/main.nf | 46 +++++++++++++++++++++ modules/bwa/samse/meta.yml | 59 +++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/bwa/samse/main.nf | 19 +++++++++ tests/modules/bwa/samse/test.yml | 8 ++++ 6 files changed, 204 insertions(+) create mode 100644 modules/bwa/samse/functions.nf create mode 100644 modules/bwa/samse/main.nf create mode 100644 modules/bwa/samse/meta.yml create mode 100644 tests/modules/bwa/samse/main.nf create mode 100644 tests/modules/bwa/samse/test.yml diff --git a/modules/bwa/samse/functions.nf b/modules/bwa/samse/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/bwa/samse/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/bwa/samse/main.nf b/modules/bwa/samse/main.nf new file mode 100644 index 00000000..3fe8bdd8 --- /dev/null +++ b/modules/bwa/samse/main.nf @@ -0,0 +1,46 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process BWA_SAMSE { + 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), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0" + } else { + container "quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0" + } + + input: + tuple val(meta), path(reads), path(sai) + path index + + output: + tuple val(meta), path("*.bam"), emit: bam + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + def read_group = meta.read_group ? "-r ${meta.read_group}" : "" + + """ + INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` + + bwa samse \\ + $options.args \\ + $read_group \\ + \$INDEX \\ + $sai \\ + $reads | samtools sort -@ ${task.cpus - 1} -O bam - > ${prefix}.bam + + echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt + """ +} diff --git a/modules/bwa/samse/meta.yml b/modules/bwa/samse/meta.yml new file mode 100644 index 00000000..89917703 --- /dev/null +++ b/modules/bwa/samse/meta.yml @@ -0,0 +1,59 @@ +name: bwa_samse +description: Convert bwa SA coordinate file to SAM format +keywords: + - bwa + - aln + - short-read + - align + - reference + - fasta + - map + - sam + - bam + +tools: + - bwa: + description: | + BWA is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bio-bwa.sourceforge.net/ + documentation: http://bio-bwa.sourceforge.net/ + doi: "10.1093/bioinformatics/btp324" + licence: ['GPL v3'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information. + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: FASTQ files specified alongside meta in input channel. + pattern: "*.{fastq,fq}.gz" + - sai: + type: file + description: SAI file specified alongside meta and reads in input channel. + pattern: "*.sai" + - index: + type: directory + description: Directory containing BWA index files (amb,ann,bwt,pac,sa) from BWA_INDEX + pattern: "bwa/" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + - bam: + type: file + description: BAM file + pattern: "*.bam" + +authors: + - "@jfy133" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 343c9813..150549d3 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -170,6 +170,10 @@ bwa/mem: - modules/bwa/mem/** - tests/modules/bwa/mem/** +bwa/samse: + - modules/bwa/samse/** + - tests/modules/bwa/samse/** + bwamem2/index: - modules/bwamem2/index/** - tests/modules/bwamem2/index/** diff --git a/tests/modules/bwa/samse/main.nf b/tests/modules/bwa/samse/main.nf new file mode 100644 index 00000000..5a5d8d2b --- /dev/null +++ b/tests/modules/bwa/samse/main.nf @@ -0,0 +1,19 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BWA_INDEX } from '../../../../modules/bwa/index/main.nf' addParams( options: [:] ) +include { BWA_ALN } from '../../../../modules/bwa/aln/main.nf' addParams( options: [:] ) +include { BWA_SAMSE } from '../../../../modules/bwa/samse/main.nf' addParams( options: [:] ) + +workflow test_bwa_samse { + + input = [ [ id:'test', single_end:true ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BWA_INDEX ( fasta ) + BWA_ALN ( input, BWA_INDEX.out.index ) + BWA_SAMSE ( BWA_ALN.out.sai, BWA_INDEX.out.index ) +} diff --git a/tests/modules/bwa/samse/test.yml b/tests/modules/bwa/samse/test.yml new file mode 100644 index 00000000..597844d4 --- /dev/null +++ b/tests/modules/bwa/samse/test.yml @@ -0,0 +1,8 @@ +- name: bwa samse + command: nextflow run ./tests/modules/bwa/samse -entry test_bwa_samse -c tests/config/nextflow.config + tags: + - bwa + - bwa/samse + files: + - path: output/bwa/test.bam + md5sum: 27eb91146e45dee65664c18596be4262 From 4f1c1601cf73329dc717cbd3db95ffa82c97b86d Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Mon, 2 Aug 2021 15:37:48 +0200 Subject: [PATCH 23/36] module: bwa/sampe (#625) * Specify more guidelines on input channels * Linting * Updates based on code review * Update README.md * Fix broken sentence * Add bwa/aln module * Also output reads as required with SAI * Add sampe * Fix container paths * Update based on code review from @grst * Update input docs --- modules/bwa/sampe/functions.nf | 68 ++++++++++++++++++++++++++++++++ modules/bwa/sampe/main.nf | 46 +++++++++++++++++++++ modules/bwa/sampe/meta.yml | 58 +++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/bwa/sampe/main.nf | 20 ++++++++++ tests/modules/bwa/sampe/test.yml | 8 ++++ 6 files changed, 204 insertions(+) create mode 100644 modules/bwa/sampe/functions.nf create mode 100644 modules/bwa/sampe/main.nf create mode 100644 modules/bwa/sampe/meta.yml create mode 100644 tests/modules/bwa/sampe/main.nf create mode 100644 tests/modules/bwa/sampe/test.yml diff --git a/modules/bwa/sampe/functions.nf b/modules/bwa/sampe/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/bwa/sampe/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/bwa/sampe/main.nf b/modules/bwa/sampe/main.nf new file mode 100644 index 00000000..7a724908 --- /dev/null +++ b/modules/bwa/sampe/main.nf @@ -0,0 +1,46 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process BWA_SAMPE { + 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), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::bwa=0.7.17 bioconda::samtools=1.12" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0" + } else { + container "quay.io/biocontainers/mulled-v2-fe8faa35dbf6dc65a0f7f5d4ea12e31a79f73e40:66ed1b38d280722529bb8a0167b0cf02f8a0b488-0" + } + + input: + tuple val(meta), path(reads), path(sai) + path index + + output: + tuple val(meta), path("*.bam"), emit: bam + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + def read_group = meta.read_group ? "-r ${meta.read_group}" : "" + + """ + INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` + + bwa sampe \\ + $options.args \\ + $read_group \\ + \$INDEX \\ + $sai \\ + $reads | samtools sort -@ ${task.cpus - 1} -O bam - > ${prefix}.bam + + echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt + """ +} diff --git a/modules/bwa/sampe/meta.yml b/modules/bwa/sampe/meta.yml new file mode 100644 index 00000000..6dc1bcc5 --- /dev/null +++ b/modules/bwa/sampe/meta.yml @@ -0,0 +1,58 @@ +name: bwa_sampe +description: Convert paired-end bwa SA coordinate files to SAM format +keywords: + - bwa + - aln + - short-read + - align + - reference + - fasta + - map + - sam + - bam +tools: + - bwa: + description: | + BWA is a software package for mapping DNA sequences against + a large reference genome, such as the human genome. + homepage: http://bio-bwa.sourceforge.net/ + documentation: http://bio-bwa.sourceforge.net/ + doi: "10.1093/bioinformatics/btp324" + licence: ['GPL v3'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information. + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: FASTQ files specified alongside meta in input channel. + pattern: "*.{fastq,fq}.gz" + - sai: + type: file + description: SAI file specified alongside meta and reads in input channel. + pattern: "*.sai" + - index: + type: directory + description: Directory containing BWA index files (amb,ann,bwt,pac,sa) from BWA_INDEX + pattern: "bwa/" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + - bam: + type: file + description: BAM file + pattern: "*.bam" + +authors: + - "@jfy133" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 150549d3..2d410e7f 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -170,6 +170,10 @@ bwa/mem: - modules/bwa/mem/** - tests/modules/bwa/mem/** +bwa/sampe: + - modules/bwa/sampe/** + - tests/modules/bwa/sampe/** + bwa/samse: - modules/bwa/samse/** - tests/modules/bwa/samse/** diff --git a/tests/modules/bwa/sampe/main.nf b/tests/modules/bwa/sampe/main.nf new file mode 100644 index 00000000..86b019b5 --- /dev/null +++ b/tests/modules/bwa/sampe/main.nf @@ -0,0 +1,20 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BWA_INDEX } from '../../../../modules/bwa/index/main.nf' addParams( options: [:] ) +include { BWA_ALN } from '../../../../modules/bwa/aln/main.nf' addParams( options: [:] ) +include { BWA_SAMPE } from '../../../../modules/bwa/sampe/main.nf' addParams( options: [:] ) + +workflow test_bwa_sampe { + + 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) ] + ] + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BWA_INDEX ( fasta ) + BWA_ALN ( input, BWA_INDEX.out.index ) + BWA_SAMPE ( BWA_ALN.out.sai, BWA_INDEX.out.index ) +} diff --git a/tests/modules/bwa/sampe/test.yml b/tests/modules/bwa/sampe/test.yml new file mode 100644 index 00000000..ba5e704d --- /dev/null +++ b/tests/modules/bwa/sampe/test.yml @@ -0,0 +1,8 @@ +- name: bwa sampe + command: nextflow run ./tests/modules/bwa/sampe -entry test_bwa_sampe -c tests/config/nextflow.config + tags: + - bwa + - bwa/sampe + files: + - path: output/bwa/test.bam + md5sum: f6ad85d66d44c5d26e692109d2e34100 From 6913da9d2dd73b20c6c939a77ee174165001eac2 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Tue, 3 Aug 2021 16:24:19 +0200 Subject: [PATCH 24/36] module: MALT/BUILD (#645) * Specify more guidelines on input channels * Linting * Updates based on code review * Update README.md * Fix broken sentence * Start MALT-build * Start MALT build (missing meta files and outputs specS) * Local tests * Correct test map_type * Finished module, just waiting for UNZIP module to finalise tests * Correct tests in preparation for Unzip * Ouptut log file too * Update meta.yml * Rename log file * Rename log file * Remove debugging stuff * Add Unzip module * Linting update * Linting update * Fix input db * Fix db file in cmd * Update modules/malt/build/main.nf * Update modules/malt/build/main.nf * Update main.nf --- .nf-core.yml | 1 + modules/malt/build/functions.nf | 68 ++++++++++++++++++++++++++ modules/malt/build/main.nf | 58 ++++++++++++++++++++++ modules/malt/build/meta.yml | 55 +++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/malt/build | 1 + tests/modules/malt/build_test/main.nf | 26 ++++++++++ tests/modules/malt/build_test/test.yml | 48 ++++++++++++++++++ 8 files changed, 261 insertions(+) create mode 100644 modules/malt/build/functions.nf create mode 100644 modules/malt/build/main.nf create mode 100644 modules/malt/build/meta.yml create mode 120000 tests/modules/malt/build create mode 100644 tests/modules/malt/build_test/main.nf create mode 100644 tests/modules/malt/build_test/test.yml diff --git a/.nf-core.yml b/.nf-core.yml index 72971af8..4f3bae33 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -7,3 +7,4 @@ bump-versions: rseqc/inferexperiment: False rseqc/innerdistance: False sortmerna: False + malt/build: False diff --git a/modules/malt/build/functions.nf b/modules/malt/build/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/malt/build/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/malt/build/main.nf b/modules/malt/build/main.nf new file mode 100644 index 00000000..efadf9cf --- /dev/null +++ b/modules/malt/build/main.nf @@ -0,0 +1,58 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process MALT_BUILD { + + label 'process_high' + publishDir "${params.outdir}", + mode: params.publish_dir_mode, + saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } + + // Do not **auto-bump** due to problem with change of version numbering between 0.4.1 and 0.5.2 + // (originally 0.4.1 was listed as 0.41, so is always selected as 'latest' even though it is not!) + conda (params.enable_conda ? "bioconda::malt=0.5.2" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/malt:0.5.2--0" + } else { + container "quay.io/biocontainers/malt:0.5.2--0" + } + + input: + path fastas + val seq_type + path gff + path map_db + + output: + path "malt_index/" , emit: index + path "*.version.txt" , emit: version + path "malt-build.log", emit: log + + script: + def software = getSoftwareName(task.process) + def avail_mem = 6 + if (!task.memory) { + log.info '[MALT_BUILD] Available memory not known - defaulting to 6GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + def igff = gff ? "-igff ${gff}" : "" + + """ + malt-build \\ + -J-Xmx${avail_mem}g \\ + -v \\ + --input ${fastas.join(' ')} \\ + -s $seq_type \\ + $igff \\ + -d 'malt_index/' \\ + -t ${task.cpus} \\ + $options.args \\ + -mdb ${map_db}/*.db |&tee malt-build.log + + malt-build --help |& tail -n 3 | head -n 1 | cut -f 2 -d'(' | cut -f 1 -d ',' | cut -d ' ' -f 2 > ${software}.version.txt + """ +} diff --git a/modules/malt/build/meta.yml b/modules/malt/build/meta.yml new file mode 100644 index 00000000..5ace4d29 --- /dev/null +++ b/modules/malt/build/meta.yml @@ -0,0 +1,55 @@ +name: malt_build +description: MALT, an acronym for MEGAN alignment tool, is a sequence alignment and analysis tool designed for processing high-throughput sequencing data, especially in the context of metagenomics. +keywords: + - malt + - alignment + - metagenomics + - ancient DNA + - aDNA + - palaeogenomics + - archaeogenomics + - microbiome + - database +tools: + - malt: + description: A tool for mapping metagenomic data + homepage: https://www.wsi.uni-tuebingen.de/lehrstuehle/algorithms-in-bioinformatics/software/malt/ + documentation: https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf + tool_dev_url: None + doi: "10.1038/s41559-017-0446-6" + licence: ['GPL v3'] + +input: + - fastas: + type: file + description: Directory of, or FASTA reference files for indexing + pattern: "*/|*.fasta" + - seq_type: + type: string + description: Type of input data + pattern: "DNA|Protein" + - gff: + type: file + description: Directory of, or GFF3 files of input FASTA files + pattern: "*/|*.gff|*.gff3" + - map_db: + type: file + description: MEGAN .db file from https://software-ab.informatik.uni-tuebingen.de/download/megan6/welcome.html + pattern: + +output: + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + - index: + type: directory + description: Directory containing MALT database index directory + pattern: "malt_index/" + - log: + type: file + description: Log file from STD out of malt-build + pattern: "malt-build.log" + +authors: + - "@jfy133" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 2d410e7f..dffe106a 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -474,6 +474,10 @@ lofreq/indelqual: - modules/lofreq/indelqual/** - tests/modules/lofreq/indelqual/** +malt/build: + - modules/malt/build/** + - tests/modules/malt/build_test/** + mash/sketch: - modules/mash/sketch/** - tests/modules/mash/sketch/** diff --git a/tests/modules/malt/build b/tests/modules/malt/build new file mode 120000 index 00000000..942cadb7 --- /dev/null +++ b/tests/modules/malt/build @@ -0,0 +1 @@ +build_test/ \ No newline at end of file diff --git a/tests/modules/malt/build_test/main.nf b/tests/modules/malt/build_test/main.nf new file mode 100644 index 00000000..b2f3eaf6 --- /dev/null +++ b/tests/modules/malt/build_test/main.nf @@ -0,0 +1,26 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNZIP } from '../../../../modules/unzip/main.nf' addParams( options: [:] ) +include { MALT_BUILD } from '../../../../modules/malt/build/main.nf' addParams( options: [:] ) + +workflow test_malt_build { + fastas = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + seq_type = "DNA" + gff = [] + map_db = file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) + + UNZIP ( map_db ) + MALT_BUILD ( fastas, seq_type, gff, UNZIP.out.unzipped_archive ) +} + +workflow test_malt_build_gff { + fastas = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + seq_type = "DNA" + gff = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) + map_db = file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) + + UNZIP ( map_db ) + MALT_BUILD ( fastas, seq_type, gff, UNZIP.out.unzipped_archive ) +} diff --git a/tests/modules/malt/build_test/test.yml b/tests/modules/malt/build_test/test.yml new file mode 100644 index 00000000..23ca4550 --- /dev/null +++ b/tests/modules/malt/build_test/test.yml @@ -0,0 +1,48 @@ +- name: malt build + command: nextflow run ./tests/modules/malt/build_test -entry test_malt_build -c tests/config/nextflow.config + tags: + - malt + - malt/build + files: + - path: output/malt/malt_index/index0.idx + md5sum: 1954f2c00b418d00112829b0a6adb8ce + - path: output/malt/malt_index/ref.db + md5sum: 772a09aeb162515485b037604399f2bd + - path: output/malt/malt_index/ref.idx + md5sum: 7dea362b3fac8e00956a4952a3d4f474 + - path: output/malt/malt_index/ref.inf + md5sum: b146842067cf278ef1d23e6c2e7c0c35 + - path: output/malt/malt_index/table0.db + - path: output/malt/malt_index/table0.idx + - path: output/malt/malt_index/taxonomy.idx + md5sum: bb335e7c378a5bd85761b6eeed16d984 + - path: output/malt/malt_index/taxonomy.map + md5sum: ae2ea08b2119eba932a9cbcd9e634917 + - path: output/malt/malt_index/taxonomy.tre + md5sum: 511ec8ff4fd8aaa20d59b5a91ed4e852 +- name: malt build gff + command: nextflow run ./tests/modules/malt/build_test -entry test_malt_build_gff -c tests/config/nextflow.config + tags: + - malt + - malt/build + files: + - path: output/malt/malt_index/aadd.dbx + md5sum: 4e2ed57e713d5372bd09350f447cdf53 + - path: output/malt/malt_index/aadd.idx + md5sum: 0994061bc8673ebd283fa6546c3dd12c + - path: output/malt/malt_index/index0.idx + md5sum: 1954f2c00b418d00112829b0a6adb8ce + - path: output/malt/malt_index/ref.db + md5sum: 772a09aeb162515485b037604399f2bd + - path: output/malt/malt_index/ref.idx + md5sum: 7dea362b3fac8e00956a4952a3d4f474 + - path: output/malt/malt_index/ref.inf + md5sum: b146842067cf278ef1d23e6c2e7c0c35 + - path: output/malt/malt_index/table0.db + - path: output/malt/malt_index/table0.idx + - path: output/malt/malt_index/taxonomy.idx + md5sum: bb335e7c378a5bd85761b6eeed16d984 + - path: output/malt/malt_index/taxonomy.map + md5sum: ae2ea08b2119eba932a9cbcd9e634917 + - path: output/malt/malt_index/taxonomy.tre + md5sum: 511ec8ff4fd8aaa20d59b5a91ed4e852 From 292e8eceb9616b5b85df28fd72231a3aa73d50a5 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 4 Aug 2021 11:06:08 +0200 Subject: [PATCH 25/36] module: MALT/RUN (#646) * Specify more guidelines on input channels * Linting * Updates based on code review * Update README.md * Fix broken sentence * Add MALT with incomplete tests * Parameter typo fix * Clean up test yaml * Finish MALT module prior UNZIP and MALT_BUILD modiules * Add required modules for tests * Sync test out with malt-build * Fix input parameters in tests based on final build module * Update modules/malt/run/meta.yml Co-authored-by: Gregor Sturm Co-authored-by: Gregor Sturm --- modules/malt/run/functions.nf | 68 +++++++++++++++++++++++++++++++++ modules/malt/run/main.nf | 54 ++++++++++++++++++++++++++ modules/malt/run/meta.yml | 53 +++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/malt/run/main.nf | 21 ++++++++++ tests/modules/malt/run/test.yml | 11 ++++++ 6 files changed, 211 insertions(+) create mode 100644 modules/malt/run/functions.nf create mode 100644 modules/malt/run/main.nf create mode 100644 modules/malt/run/meta.yml create mode 100644 tests/modules/malt/run/main.nf create mode 100644 tests/modules/malt/run/test.yml diff --git a/modules/malt/run/functions.nf b/modules/malt/run/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/malt/run/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/malt/run/main.nf b/modules/malt/run/main.nf new file mode 100644 index 00000000..7b327d6e --- /dev/null +++ b/modules/malt/run/main.nf @@ -0,0 +1,54 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process MALT_RUN { + + label 'process_high_memory' + publishDir "${params.outdir}", + mode: params.publish_dir_mode, + saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) } + + conda (params.enable_conda ? "bioconda::malt=0.5.2" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/malt:0.5.2--0" + } else { + container "quay.io/biocontainers/malt:0.5.2--0" + } + + input: + path fastqs + val mode + path index + + output: + path "*.rma6" , emit: rma6 + path "*.{tab,text,sam}", optional:true, emit: alignments + path "*.log" , emit: log + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def avail_mem = 6 + if (!task.memory) { + log.info '[MALT_RUN] Available memory not known - defaulting to 6GB. Specify process memory requirements to change this.' + } else { + avail_mem = task.memory.giga + } + + """ + malt-run \\ + -J-Xmx${avail_mem}g \\ + -t ${task.cpus} \\ + -v \\ + -o . \\ + $options.args \\ + --inFile ${fastqs.join(' ')} \\ + -m $mode \\ + --index $index/ |&tee malt-run.log + + echo \$(malt-run --help 2>&1) | grep -o 'version.* ' | cut -f 1 -d ',' | cut -f2 -d ' ' > ${software}.version.txt + """ +} diff --git a/modules/malt/run/meta.yml b/modules/malt/run/meta.yml new file mode 100644 index 00000000..30421a48 --- /dev/null +++ b/modules/malt/run/meta.yml @@ -0,0 +1,53 @@ +name: malt_run +description: MALT, an acronym for MEGAN alignment tool, is a sequence alignment and analysis tool designed for processing high-throughput sequencing data, especially in the context of metagenomics. +keywords: + - malt + - alignment + - metagenomics + - ancient DNA + - aDNA + - palaeogenomics + - archaeogenomics + - microbiome +tools: + - malt: + description: A tool for mapping metagenomic data + homepage: https://www.wsi.uni-tuebingen.de/lehrstuehle/algorithms-in-bioinformatics/software/malt/ + documentation: https://software-ab.informatik.uni-tuebingen.de/download/malt/manual.pdf + tool_dev_url: None + doi: "10.1038/s41559-017-0446-6" + licence: ['GPL v3'] + +input: + - fastqs: + type: file + description: Input FASTQ files + pattern: "*.{fastq.gz,fq.gz}" + - mode: + type: string + description: Program mode + pattern: 'Unknown|BlastN|BlastP|BlastX|Classifier' + - index: + type: directory + description: Index/database directory from malt-build + pattern: '*/' +output: + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + - rma6: + type: file + description: MEGAN6 RMA6 file + pattern: "*.rma6" + - sam: + type: file + description: Alignment files in Tab, Text or MEGAN-compatible SAM format + pattern: "*.{tab,txt,sam}" + - log: + type: file + description: Log of verbose MALT stdout + pattern: "malt-run.log" + +authors: + - "@jfy133" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index dffe106a..39b267c7 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -478,6 +478,10 @@ malt/build: - modules/malt/build/** - tests/modules/malt/build_test/** +malt/run: + - modules/malt/run/** + - tests/modules/malt/run/** + mash/sketch: - modules/mash/sketch/** - tests/modules/mash/sketch/** diff --git a/tests/modules/malt/run/main.nf b/tests/modules/malt/run/main.nf new file mode 100644 index 00000000..6292ca61 --- /dev/null +++ b/tests/modules/malt/run/main.nf @@ -0,0 +1,21 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UNZIP } from '../../../../modules/unzip/main.nf' addParams( options: [:] ) +include { MALT_BUILD } from '../../../../modules/malt/build/main.nf' addParams( options: [:] ) +include { MALT_RUN } from '../../../../modules/malt/run/main.nf' addParams( options: [:] ) + +workflow test_malt_run { + + fastas = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + gff = file(params.test_data['sarscov2']['genome']['genome_gff3'], checkIfExists: true) + seq_type = "DNA" + map_db = file("https://software-ab.informatik.uni-tuebingen.de/download/megan6/megan-nucl-Jan2021.db.zip", checkIfExists: true) + input = file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true) + mode = "BlastN" + + UNZIP ( map_db ) + MALT_BUILD ( fastas, seq_type, gff, UNZIP.out.unzipped_archive ) + MALT_RUN ( input, mode, MALT_BUILD.out.index ) +} diff --git a/tests/modules/malt/run/test.yml b/tests/modules/malt/run/test.yml new file mode 100644 index 00000000..cc6f5fac --- /dev/null +++ b/tests/modules/malt/run/test.yml @@ -0,0 +1,11 @@ +## TODO nf-core: Please run the following command to build this file: +# nf-core modules create-test-yml malt/run +- name: malt run + command: nextflow run ./tests/modules/malt/run -entry test_malt_run -c tests/config/nextflow.config + tags: + - malt + - malt/run + files: + - path: output/malt/test_1.rma6 + - path: output/malt/malt-run.log + From 5de3f2c50e063bda30316342b6606b485a12e38c Mon Sep 17 00:00:00 2001 From: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com> Date: Wed, 4 Aug 2021 11:16:51 +0200 Subject: [PATCH 26/36] Added PL tag in read group information for downstream analysis (#649) Co-authored-by: Maxime U. Garcia --- modules/star/align/main.nf | 11 ++++++----- tests/modules/star/align/main.nf | 10 +++------- tests/modules/star/align/test.yml | 15 +++++++-------- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/modules/star/align/main.nf b/modules/star/align/main.nf index c06daf24..d5d88ce8 100644 --- a/modules/star/align/main.nf +++ b/modules/star/align/main.nf @@ -39,11 +39,12 @@ process STAR_ALIGN { tuple val(meta), path('*.out.junction') , optional:true, emit: junction script: - def software = getSoftwareName(task.process) - def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" - def ignore_gtf = params.star_ignore_sjdbgtf ? '' : "--sjdbGTFfile $gtf" - def seq_center = params.seq_center ? "--outSAMattrRGline ID:$prefix 'CN:$params.seq_center' 'SM:$prefix'" : "--outSAMattrRGline ID:$prefix 'SM:$prefix'" - def out_sam_type = (options.args.contains('--outSAMtype')) ? '' : '--outSAMtype BAM Unsorted' + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + def ignore_gtf = params.star_ignore_sjdbgtf ? '' : "--sjdbGTFfile $gtf" + def seq_platform = params.seq_platform ? "'PL:$params.seq_platform'" : "" + def seq_center = params.seq_center ? "--outSAMattrRGline ID:$prefix 'CN:$params.seq_center' 'SM:$prefix' $seq_platform " : "--outSAMattrRGline ID:$prefix 'SM:$prefix' $seq_platform " + def out_sam_type = (options.args.contains('--outSAMtype')) ? '' : '--outSAMtype BAM Unsorted' def mv_unsorted_bam = (options.args.contains('--outSAMtype BAM Unsorted SortedByCoordinate')) ? "mv ${prefix}.Aligned.out.bam ${prefix}.Aligned.unsort.out.bam" : '' """ STAR \\ diff --git a/tests/modules/star/align/main.nf b/tests/modules/star/align/main.nf index ff278efd..d7a7ef96 100644 --- a/tests/modules/star/align/main.nf +++ b/tests/modules/star/align/main.nf @@ -2,9 +2,9 @@ nextflow.enable.dsl = 2 -include { STAR_GENOMEGENERATE } from '../../../../modules/star/genomegenerate/main.nf' addParams( options: [args: '--genomeSAindexNbases 9'] ) -include { STAR_ALIGN } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat'] ) -include { STAR_ALIGN as STAR_FOR_ARRIBA } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat --outSAMtype BAM Unsorted --outSAMunmapped Within --outBAMcompression 0 --outFilterMultimapNmax 50 --peOverlapNbasesMin 10 --alignSplicedMateMapLminOverLmate 0.5 --alignSJstitchMismatchNmax 5 -1 5 5 --chimSegmentMin 10 --chimOutType WithinBAM HardClip --chimJunctionOverhangMin 10 --chimScoreDropMax 30 --chimScoreJunctionNonGTAG 0 --chimScoreSeparation 1 --chimSegmentReadGapMax 3 --chimMultimapNmax 50'] ) +include { STAR_GENOMEGENERATE } from '../../../../modules/star/genomegenerate/main.nf' addParams( options: [args: '--genomeSAindexNbases 9']) +include { STAR_ALIGN } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat'], seq_platform: 'illumina') +include { STAR_ALIGN as STAR_FOR_ARRIBA } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat --outSAMtype BAM Unsorted --outSAMunmapped Within --outBAMcompression 0 --outFilterMultimapNmax 50 --peOverlapNbasesMin 10 --alignSplicedMateMapLminOverLmate 0.5 --alignSJstitchMismatchNmax 5 -1 5 5 --chimSegmentMin 10 --chimOutType WithinBAM HardClip --chimJunctionOverhangMin 10 --chimScoreDropMax 30 --chimScoreJunctionNonGTAG 0 --chimScoreSeparation 1 --chimSegmentReadGapMax 3 --chimMultimapNmax 50'], seq_platform: 'illumina') include { STAR_ALIGN as STAR_FOR_STARFUSION } from '../../../../modules/star/align/main.nf' addParams( options: [args: '--readFilesCommand zcat --outSAMtype BAM Unsorted --outReadsUnmapped None --twopassMode Basic --outSAMstrandField intronMotif --outSAMunmapped Within --chimSegmentMin 12 --chimJunctionOverhangMin 8 --chimOutJunctionFormat 1 --alignSJDBoverhangMin 10 --alignMatesGapMax 100000 --alignIntronMax 100000 --alignSJstitchMismatchNmax 5 -1 5 5 --chimMultimapScoreRange 3 --chimScoreJunctionNonGTAG -4 --chimMultimapNmax 20 --chimNonchimScoreDropMin 10 --peOverlapNbasesMin 12 --peOverlapMMp 0.1 --alignInsertionFlush Right --alignSplicedMateMapLminOverLmate 0 --alignSplicedMateMapLmin 30'] ) workflow test_star_alignment_single_end { @@ -13,7 +13,6 @@ workflow test_star_alignment_single_end { ] fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) - STAR_GENOMEGENERATE ( fasta, gtf ) STAR_ALIGN ( input, STAR_GENOMEGENERATE.out.index, gtf ) } @@ -25,7 +24,6 @@ workflow test_star_alignment_paired_end { ] fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) - STAR_GENOMEGENERATE ( fasta, gtf ) STAR_ALIGN ( input, STAR_GENOMEGENERATE.out.index, gtf ) } @@ -38,7 +36,6 @@ workflow test_star_alignment_paired_end_for_fusion { ] fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) - STAR_GENOMEGENERATE ( fasta, gtf ) STAR_FOR_ARRIBA ( input, STAR_GENOMEGENERATE.out.index, gtf ) } @@ -50,7 +47,6 @@ workflow test_star_alignment_paired_end_for_starfusion { ] fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) gtf = file(params.test_data['homo_sapiens']['genome']['genome_gtf'], checkIfExists: true) - STAR_GENOMEGENERATE ( fasta, gtf ) STAR_FOR_STARFUSION ( input, STAR_GENOMEGENERATE.out.index, gtf ) } diff --git a/tests/modules/star/align/test.yml b/tests/modules/star/align/test.yml index 1d3b548d..79ab38f1 100644 --- a/tests/modules/star/align/test.yml +++ b/tests/modules/star/align/test.yml @@ -1,8 +1,8 @@ - name: star align test_star_alignment_single_end command: nextflow run tests/modules/star/align -entry test_star_alignment_single_end -c tests/config/nextflow.config tags: - - star - star/align + - star files: - path: output/index/star/Genome md5sum: a654229fbca6071dcb6b01ce7df704da @@ -36,7 +36,7 @@ - path: output/index/star/transcriptInfo.tab md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - path: output/star/test.Aligned.out.bam - md5sum: 509d7f1fba3350913c8ea13f01917085 + md5sum: b9f5e2f6a624b64c300fe25dc3ac801f - path: output/star/test.Log.final.out - path: output/star/test.Log.out - path: output/star/test.Log.progress.out @@ -45,8 +45,8 @@ - name: star align test_star_alignment_paired_end command: nextflow run tests/modules/star/align -entry test_star_alignment_paired_end -c tests/config/nextflow.config tags: - - star - star/align + - star files: - path: output/index/star/Genome md5sum: a654229fbca6071dcb6b01ce7df704da @@ -80,8 +80,7 @@ - path: output/index/star/transcriptInfo.tab md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - path: output/star/test.Aligned.out.bam - md5sum: 64b408fb1d61e2de8ff51c847cd5bc52 - - path: output/star/test.Log.final.out + md5sum: 38d08f0b944a2a1b981a250d675aa0d9 - path: output/star/test.Log.out - path: output/star/test.Log.progress.out - path: output/star/test.SJ.out.tab @@ -89,8 +88,8 @@ - name: star align test_star_alignment_paired_end_for_fusion command: nextflow run tests/modules/star/align -entry test_star_alignment_paired_end_for_fusion -c tests/config/nextflow.config tags: - - star - star/align + - star files: - path: output/index/star/Genome md5sum: a654229fbca6071dcb6b01ce7df704da @@ -124,7 +123,7 @@ - path: output/index/star/transcriptInfo.tab md5sum: 0c3a5adb49d15e5feff81db8e29f2e36 - path: output/star/test.Aligned.out.bam - md5sum: d724ca90a102347b9c5052a33ea4d308 + md5sum: c740d5177067c1fcc48ab7a16cd639d7 - path: output/star/test.Log.final.out - path: output/star/test.Log.out - path: output/star/test.Log.progress.out @@ -133,8 +132,8 @@ - name: star align test_star_alignment_paired_end_for_starfusion command: nextflow run tests/modules/star/align -entry test_star_alignment_paired_end_for_starfusion -c tests/config/nextflow.config tags: - - star - star/align + - star files: - path: output/index/star/Genome md5sum: a654229fbca6071dcb6b01ce7df704da From 28b023e6f4d0d2745406d9dc6e38006882804e67 Mon Sep 17 00:00:00 2001 From: Christian Mertes Date: Thu, 5 Aug 2021 19:59:56 +0200 Subject: [PATCH 27/36] Require r-base>=3.5 for RSeqC Conda envs (#654) * require conda-forge::r-base>=3.5 for conda-envs * have same conda requirements for all rseqc submodules --- modules/rseqc/bamstat/main.nf | 2 +- modules/rseqc/inferexperiment/main.nf | 2 +- modules/rseqc/innerdistance/main.nf | 2 +- modules/rseqc/junctionannotation/main.nf | 2 +- modules/rseqc/junctionsaturation/main.nf | 2 +- modules/rseqc/readdistribution/main.nf | 2 +- modules/rseqc/readduplication/main.nf | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/rseqc/bamstat/main.nf b/modules/rseqc/bamstat/main.nf index ac80b6d0..913c3f53 100644 --- a/modules/rseqc/bamstat/main.nf +++ b/modules/rseqc/bamstat/main.nf @@ -11,7 +11,7 @@ process RSEQC_BAMSTAT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null) + conda (params.enable_conda ? "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1" } else { diff --git a/modules/rseqc/inferexperiment/main.nf b/modules/rseqc/inferexperiment/main.nf index da0958d4..a887e6e6 100644 --- a/modules/rseqc/inferexperiment/main.nf +++ b/modules/rseqc/inferexperiment/main.nf @@ -11,7 +11,7 @@ process RSEQC_INFEREXPERIMENT { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null) + conda (params.enable_conda ? "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1" } else { diff --git a/modules/rseqc/innerdistance/main.nf b/modules/rseqc/innerdistance/main.nf index 2688fca6..e2e8f909 100644 --- a/modules/rseqc/innerdistance/main.nf +++ b/modules/rseqc/innerdistance/main.nf @@ -11,7 +11,7 @@ process RSEQC_INNERDISTANCE { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null) + conda (params.enable_conda ? "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1" } else { diff --git a/modules/rseqc/junctionannotation/main.nf b/modules/rseqc/junctionannotation/main.nf index ace4fe61..30bdcd11 100644 --- a/modules/rseqc/junctionannotation/main.nf +++ b/modules/rseqc/junctionannotation/main.nf @@ -11,7 +11,7 @@ process RSEQC_JUNCTIONANNOTATION { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null) + conda (params.enable_conda ? "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1" } else { diff --git a/modules/rseqc/junctionsaturation/main.nf b/modules/rseqc/junctionsaturation/main.nf index e6e21638..837006d0 100644 --- a/modules/rseqc/junctionsaturation/main.nf +++ b/modules/rseqc/junctionsaturation/main.nf @@ -11,7 +11,7 @@ process RSEQC_JUNCTIONSATURATION { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null) + conda (params.enable_conda ? "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1" } else { diff --git a/modules/rseqc/readdistribution/main.nf b/modules/rseqc/readdistribution/main.nf index a6ed6c9f..1b09908e 100644 --- a/modules/rseqc/readdistribution/main.nf +++ b/modules/rseqc/readdistribution/main.nf @@ -11,7 +11,7 @@ process RSEQC_READDISTRIBUTION { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null) + conda (params.enable_conda ? "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1" } else { diff --git a/modules/rseqc/readduplication/main.nf b/modules/rseqc/readduplication/main.nf index 6fb06f63..c86b05b6 100644 --- a/modules/rseqc/readduplication/main.nf +++ b/modules/rseqc/readduplication/main.nf @@ -11,7 +11,7 @@ process RSEQC_READDUPLICATION { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } - conda (params.enable_conda ? "bioconda::rseqc=3.0.1" : null) + conda (params.enable_conda ? "bioconda::rseqc=3.0.1 'conda-forge::r-base>=3.5'" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container "https://depot.galaxyproject.org/singularity/rseqc:3.0.1--py37h516909a_1" } else { From 67cc3bd116a4dc56af79a8b84511f18b96fcad5c Mon Sep 17 00:00:00 2001 From: Abhinav Sharma Date: Tue, 10 Aug 2021 15:10:27 +0200 Subject: [PATCH 28/36] Add bcftools/concat module. (#641) * draft for bcftools modules [ci skip] * initial test for bcftools concat * Update the params for testing * fix tests * Accomodate code review [ci skip] Co-authored-by: James A. Fellows Yates * Update the meta file and open PR for review * Update the keyword * Update the tags for module [ci skip[ * add threads Co-authored-by: James A. Fellows Yates --- modules/bcftools/concat/functions.nf | 68 ++++++++++++++++++++++++++ modules/bcftools/concat/main.nf | 40 +++++++++++++++ modules/bcftools/concat/meta.yml | 42 ++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/bcftools/concat/main.nf | 16 ++++++ tests/modules/bcftools/concat/test.yml | 8 +++ 6 files changed, 178 insertions(+) create mode 100644 modules/bcftools/concat/functions.nf create mode 100644 modules/bcftools/concat/main.nf create mode 100644 modules/bcftools/concat/meta.yml create mode 100644 tests/modules/bcftools/concat/main.nf create mode 100644 tests/modules/bcftools/concat/test.yml diff --git a/modules/bcftools/concat/functions.nf b/modules/bcftools/concat/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/bcftools/concat/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/bcftools/concat/main.nf b/modules/bcftools/concat/main.nf new file mode 100644 index 00000000..0266f4f0 --- /dev/null +++ b/modules/bcftools/concat/main.nf @@ -0,0 +1,40 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process BCFTOOLS_CONCAT { + 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), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::bcftools=1.11" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/bcftools:1.11--h7c999a4_0" + } else { + container "quay.io/biocontainers/bcftools:1.11--h7c999a4_0" + } + + input: + tuple val(meta), path(vcfs) + + output: + tuple val(meta), path("*.gz"), emit: vcf + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + """ + bcftools concat \\ + --output ${prefix}.vcf.gz \\ + $options.args \\ + --threads $task.cpus \\ + ${vcfs} + + echo \$(bcftools --version 2>&1) | sed 's/^.*bcftools //; s/ .*\$//' > ${software}.version.txt + """ +} diff --git a/modules/bcftools/concat/meta.yml b/modules/bcftools/concat/meta.yml new file mode 100644 index 00000000..566e6dba --- /dev/null +++ b/modules/bcftools/concat/meta.yml @@ -0,0 +1,42 @@ +name: bcftools_concat +description: Concatenate VCF files +keywords: + - variant calling + - concat + - bcftools + - VCF + +tools: + - concat: + description: | + Concatenate VCF files. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + doi: 10.1093/bioinformatics/btp352 +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcfs: + type: files + description: | + List containing 2 or more vcf files + e.g. [ 'file1.vcf', 'file2.vcf' ] +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF concatenated output file + pattern: "*.{vcf.gz}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" +authors: + - "@abhi18av" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 39b267c7..dc9933d9 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -30,6 +30,10 @@ bbmap/bbduk: - modules/bbmap/bbduk/** - tests/modules/bbmap/bbduk/** +bcftools/concat: + - modules/bcftools/concat/** + - tests/modules/bcftools/concat/** + bcftools/consensus: - modules/bcftools/consensus/** - tests/modules/bcftools/consensus/** diff --git a/tests/modules/bcftools/concat/main.nf b/tests/modules/bcftools/concat/main.nf new file mode 100644 index 00000000..8869a3d7 --- /dev/null +++ b/tests/modules/bcftools/concat/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCFTOOLS_CONCAT } from '../../../../modules/bcftools/concat/main.nf' addParams( options: ['args': '--no-version'] ) + +workflow test_bcftools_concat { + + input = [ [ id:'test3' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test2_vcf_gz'], checkIfExists: true) ] + ] + + + BCFTOOLS_CONCAT ( input ) +} diff --git a/tests/modules/bcftools/concat/test.yml b/tests/modules/bcftools/concat/test.yml new file mode 100644 index 00000000..413fe798 --- /dev/null +++ b/tests/modules/bcftools/concat/test.yml @@ -0,0 +1,8 @@ +- name: bcftools concat test_bcftools_concat + command: nextflow run tests/modules/bcftools/concat -entry test_bcftools_concat -c tests/config/nextflow.config + tags: + - bcftools/concat + - bcftools + files: + - path: output/bcftools/test3.vcf.gz + md5sum: c400c7458524d889e0967b06ed72534f From 653e9e05b1c48bf0e72ded63940586f7bc8b714f Mon Sep 17 00:00:00 2001 From: "Robert A. Petit III" Date: Mon, 16 Aug 2021 03:51:30 -0600 Subject: [PATCH 29/36] add module for dragonflye (#633) * add module for dragonflye * fix tests for dragonflye * Update test.yml * Update meta.yml * Update main.nf * Update main.nf * Update modules/dragonflye/meta.yml Co-authored-by: Gregor Sturm --- modules/dragonflye/functions.nf | 68 +++++++++++++++++++++++++++++++ modules/dragonflye/main.nf | 45 ++++++++++++++++++++ modules/dragonflye/meta.yml | 57 ++++++++++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/dragonflye/main.nf | 22 ++++++++++ tests/modules/dragonflye/test.yml | 25 ++++++++++++ 6 files changed, 221 insertions(+) create mode 100644 modules/dragonflye/functions.nf create mode 100644 modules/dragonflye/main.nf create mode 100644 modules/dragonflye/meta.yml create mode 100644 tests/modules/dragonflye/main.nf create mode 100644 tests/modules/dragonflye/test.yml diff --git a/modules/dragonflye/functions.nf b/modules/dragonflye/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/dragonflye/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/dragonflye/main.nf b/modules/dragonflye/main.nf new file mode 100644 index 00000000..cd0195e9 --- /dev/null +++ b/modules/dragonflye/main.nf @@ -0,0 +1,45 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process DRAGONFLYE { + 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), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::dragonflye=1.0.4" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/dragonflye:1.0.4--hdfd78af_0" + } else { + container "quay.io/biocontainers/dragonflye:1.0.4--hdfd78af_0" + } + + input: + tuple val(meta), path(reads) + + output: + tuple val(meta), path("contigs.fa") , emit: contigs + tuple val(meta), path("dragonflye.log") , emit: log + tuple val(meta), path("{flye,miniasm,raven}.fasta") , emit: raw_contigs + tuple val(meta), path("{miniasm,raven}-unpolished.gfa"), optional:true , emit: gfa + tuple val(meta), path("flye-info.txt"), optional:true , emit: txt + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def memory = task.memory.toGiga() + """ + dragonflye \\ + --reads ${reads} \\ + $options.args \\ + --cpus $task.cpus \\ + --ram $memory \\ + --outdir ./ \\ + --force + echo \$(dragonflye --version 2>&1) | sed 's/^.*dragonflye //' > ${software}.version.txt + """ +} diff --git a/modules/dragonflye/meta.yml b/modules/dragonflye/meta.yml new file mode 100644 index 00000000..a2bf2703 --- /dev/null +++ b/modules/dragonflye/meta.yml @@ -0,0 +1,57 @@ +name: dragonflye +description: Assemble bacterial isolate genomes from Nanopore reads +keywords: + - bacterial + - assembly + - nanopore + +tools: + - dragonflye: + description: Microbial assembly pipeline for Nanopore reads + homepage: https://github.com/rpetit3/dragonflye + documentation: https://github.com/rpetit3/dragonflye/blob/main/README.md + licence: ['GPL v2'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: Input Nanopore FASTQ file + pattern: "*.fastq.gz" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + - contigs: + type: file + description: The final assembly produced by Dragonflye + pattern: "contigs.fa" + - log: + type: file + description: Full log file for bug reporting + pattern: "dragonflye.log" + - raw_contigs: + type: file + description: Raw assembly produced by the assembler (Flye, Miniasm, or Raven) + pattern: "{flye,miniasm,raven}.fasta" + - txt: + type: file + description: Assembly information output by Flye + pattern: "flye-info.txt" + - gfa: + type: file + description: Assembly graph produced by Miniasm, or Raven + pattern: "{miniasm,raven}-unpolished.gfa" + +authors: + - "@rpetit3" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index dc9933d9..a4a1a460 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -242,6 +242,10 @@ delly/call: - modules/delly/call/** - tests/modules/delly/call/** +dragonflye: + - modules/dragonflye/** + - tests/modules/dragonflye/** + dshbio/filterbed: - modules/dshbio/filterbed/** - tests/modules/dshbio/filterbed/** diff --git a/tests/modules/dragonflye/main.nf b/tests/modules/dragonflye/main.nf new file mode 100644 index 00000000..4d3ac6e5 --- /dev/null +++ b/tests/modules/dragonflye/main.nf @@ -0,0 +1,22 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { DRAGONFLYE } from '../../../modules/dragonflye/main.nf' addParams( options: [args: '--assembler miniasm --gsize 5000000'] ) +include { DRAGONFLYE as DRAGONFLYE_RAVEN } from '../../../modules/dragonflye/main.nf' addParams( options: [args: '--assembler raven --gsize 5000000'] ) + +workflow test_dragonflye { + input = [ [ id:'test', single_end:true ], // meta map + [ file("https://github.com/nf-core/test-datasets/raw/bacass/nanopore/subset15000.fq.gz", checkIfExists: true) ] + ] + + DRAGONFLYE ( input ) +} + +workflow test_dragonflye_raven { + input = [ [ id:'test', single_end:true ], // meta map + [ file("https://github.com/nf-core/test-datasets/raw/bacass/nanopore/subset15000.fq.gz", checkIfExists: true) ] + ] + + DRAGONFLYE_RAVEN ( input ) +} diff --git a/tests/modules/dragonflye/test.yml b/tests/modules/dragonflye/test.yml new file mode 100644 index 00000000..fe6283c0 --- /dev/null +++ b/tests/modules/dragonflye/test.yml @@ -0,0 +1,25 @@ +- name: dragonflye with miniasm + command: nextflow run ./tests/modules/dragonflye -entry test_dragonflye -c tests/config/nextflow.config + tags: + - dragonflye + files: + - path: output/dragonflye/miniasm.fasta + md5sum: 6b8903ba09592df99f43ed05fda488f6 + - path: output/dragonflye/miniasm-unpolished.gfa + md5sum: 40ab03a417eafab0cb4ac2c32bd006e1 + # MD5sum not reproducible (timestamp, contig order) + - path: output/dragonflye/contigs.fa + - path: output/dragonflye/dragonflye.log + +- name: dragonflye with raven + command: nextflow run ./tests/modules/dragonflye -entry test_dragonflye_raven -c tests/config/nextflow.config + tags: + - dragonflye + files: + - path: output/dragonflye/raven.fasta + md5sum: bd4ba5b0dda110a7ccbea9581c97a898 + - path: output/dragonflye/raven-unpolished.gfa + md5sum: 62c21791dbf9b2c7375dc52d7bab5be2 + # MD5sum not reproducible (timestamp, contig order) + - path: output/dragonflye/contigs.fa + - path: output/dragonflye/dragonflye.log From 6e68c1af9a514bb056c0513ebba6764efd6750fc Mon Sep 17 00:00:00 2001 From: JIANHONG OU Date: Mon, 16 Aug 2021 05:57:22 -0400 Subject: [PATCH 30/36] update typos. change quote from ' to ". (#652) --- modules/cooler/digest/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cooler/digest/main.nf b/modules/cooler/digest/main.nf index 399541d9..bb4081d9 100644 --- a/modules/cooler/digest/main.nf +++ b/modules/cooler/digest/main.nf @@ -5,7 +5,7 @@ params.options = [:] options = initOptions(params.options) process COOLER_DIGEST { - tag '$fasta' + tag "$fasta" label 'process_medium' publishDir "${params.outdir}", mode: params.publish_dir_mode, @@ -32,7 +32,7 @@ process COOLER_DIGEST { """ cooler digest \\ $options.args \\ - -o "${fasta.baseName}_${enzyme.replaceAll(/[^0-9a-zA-Z]+/, "_")}.bed" \\ + -o "${fasta.baseName}_${enzyme.replaceAll(/[^0-9a-zA-Z]+/, '_')}.bed" \\ $chromsizes \\ $fasta \\ $enzyme From 0954204f9e2aa22056c7d9c58f2993fe5c496db8 Mon Sep 17 00:00:00 2001 From: Abhinav Sharma Date: Mon, 16 Aug 2021 17:40:03 +0200 Subject: [PATCH 31/36] Add bcftools/norm module (#655) * Initial draft [ci skip] * trigger first test * update output file path * Tests passing * finishing touches for meta.yml and update checksum * tweak checksum * add threads to the module * skip version info for matching test md5sum [ci skip] * Add ref fasta and finalize the module Co-authored-by: Gregor Sturm --- modules/bcftools/norm/functions.nf | 68 ++++++++++++++++++++++++++++ modules/bcftools/norm/main.nf | 42 +++++++++++++++++ modules/bcftools/norm/meta.yml | 45 ++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/modules/bcftools/norm/main.nf | 15 ++++++ tests/modules/bcftools/norm/test.yml | 8 ++++ 6 files changed, 182 insertions(+) create mode 100644 modules/bcftools/norm/functions.nf create mode 100644 modules/bcftools/norm/main.nf create mode 100644 modules/bcftools/norm/meta.yml create mode 100644 tests/modules/bcftools/norm/main.nf create mode 100644 tests/modules/bcftools/norm/test.yml diff --git a/modules/bcftools/norm/functions.nf b/modules/bcftools/norm/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/bcftools/norm/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/bcftools/norm/main.nf b/modules/bcftools/norm/main.nf new file mode 100644 index 00000000..5d8a7c3c --- /dev/null +++ b/modules/bcftools/norm/main.nf @@ -0,0 +1,42 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process BCFTOOLS_NORM { + 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), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::bcftools=1.13" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/bcftools:1.13--h3a49de5_0" + } else { + container "quay.io/biocontainers/bcftools:1.13--h3a49de5_0" + } + + input: + tuple val(meta), path(vcf) + path(fasta) + + output: + tuple val(meta), path("*.gz") , emit: vcf + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + """ + bcftools norm \\ + --fasta-ref ${fasta} \\ + --output ${prefix}.vcf.gz \\ + $options.args \\ + --threads $task.cpus \\ + ${vcf} + + echo \$(bcftools --version 2>&1) | sed 's/^.*bcftools //; s/ .*\$//' > ${software}.version.txt + """ +} diff --git a/modules/bcftools/norm/meta.yml b/modules/bcftools/norm/meta.yml new file mode 100644 index 00000000..abeb8904 --- /dev/null +++ b/modules/bcftools/norm/meta.yml @@ -0,0 +1,45 @@ +name: bcftools_norm +description: Normalize VCF file +keywords: + - normalize + - norm + - variant calling + - VCF +tools: + - norm: + description: | + Normalize VCF files. + homepage: http://samtools.github.io/bcftools/bcftools.html + documentation: http://www.htslib.org/doc/bcftools.html + doi: 10.1093/bioinformatics/btp352 +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: | + The vcf file to be normalized + e.g. 'file1.vcf' + - fasta: + type: file + description: FASTA reference file + pattern: "*.{fasta,fa}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - vcf: + type: file + description: VCF normalized output file + pattern: "*.{vcf.gz}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" +authors: + - "@abhi18av" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index a4a1a460..0482c672 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -54,6 +54,10 @@ bcftools/mpileup: - modules/bcftools/mpileup/** - tests/modules/bcftools/mpileup/** +bcftools/norm: + - modules/bcftools/norm/** + - tests/modules/bcftools/norm/** + bcftools/reheader: - modules/bcftools/reheader/** - tests/modules/bcftools/reheader/** diff --git a/tests/modules/bcftools/norm/main.nf b/tests/modules/bcftools/norm/main.nf new file mode 100644 index 00000000..046c0b3c --- /dev/null +++ b/tests/modules/bcftools/norm/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BCFTOOLS_NORM } from '../../../../modules/bcftools/norm/main.nf' addParams( options: ['args': '-m -any --no-version'] ) + +workflow test_bcftools_norm { + + input = [ [ id:'test2', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true)] + + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + + BCFTOOLS_NORM ( input, fasta ) +} diff --git a/tests/modules/bcftools/norm/test.yml b/tests/modules/bcftools/norm/test.yml new file mode 100644 index 00000000..40d0cc7e --- /dev/null +++ b/tests/modules/bcftools/norm/test.yml @@ -0,0 +1,8 @@ +- name: bcftools norm + command: nextflow run ./tests/modules/bcftools/norm -entry test_bcftools_norm -c tests/config/nextflow.config + tags: + - bcftools + - bcftools/norm + files: + - path: output/bcftools/test2.vcf.gz + md5sum: 2b1cac07d1875b8adcd7a85346890f07 From b261c1f549db29574c880f65a15e70ada4864eb2 Mon Sep 17 00:00:00 2001 From: Anders Jemt Date: Mon, 16 Aug 2021 17:47:42 +0200 Subject: [PATCH 32/36] Expansionhunter (#666) Please enter the commit message for your changes. Lines starting * adds expansionhunter module Co-authored-by: Maxime U. Garcia --- modules/expansionhunter/functions.nf | 68 ++++++++++++++++++++++++++ modules/expansionhunter/main.nf | 45 +++++++++++++++++ modules/expansionhunter/meta.yml | 50 +++++++++++++++++++ tests/config/pytest_modules.yml | 4 ++ tests/config/test_data.config | 1 + tests/modules/expansionhunter/main.nf | 17 +++++++ tests/modules/expansionhunter/test.yml | 7 +++ 7 files changed, 192 insertions(+) create mode 100644 modules/expansionhunter/functions.nf create mode 100644 modules/expansionhunter/main.nf create mode 100644 modules/expansionhunter/meta.yml create mode 100644 tests/modules/expansionhunter/main.nf create mode 100644 tests/modules/expansionhunter/test.yml diff --git a/modules/expansionhunter/functions.nf b/modules/expansionhunter/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/expansionhunter/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/expansionhunter/main.nf b/modules/expansionhunter/main.nf new file mode 100644 index 00000000..41c6ed6c --- /dev/null +++ b/modules/expansionhunter/main.nf @@ -0,0 +1,45 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process EXPANSIONHUNTER { + tag "$meta.id" + label 'process_low' + publishDir "${params.outdir}", + mode: params.publish_dir_mode, + saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::expansionhunter=4.0.2" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/expansionhunter:4.0.2--he785bd8_0" + } else { + container "quay.io/biocontainers/expansionhunter:4.0.2--he785bd8_0" + } + + input: + tuple val(meta), path(bam), path(bai) + path fasta + path variant_catalog + + output: + tuple val(meta), path("*.vcf"), emit: vcf + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + def gender = (meta.gender == 'male' || meta.gender == 1 || meta.gender == 'XY') ? "male" : "female" + """ + ExpansionHunter \\ + $options.args \\ + --reads $bam \\ + --output-prefix $prefix \\ + --reference $fasta \\ + --variant-catalog $variant_catalog \\ + --sex $gender + + echo \$(ExpansionHunter --version 2>&1) | sed 's/^.*ExpansionHunter //' > ${software}.version.txt + """ +} diff --git a/modules/expansionhunter/meta.yml b/modules/expansionhunter/meta.yml new file mode 100644 index 00000000..cac3ed2b --- /dev/null +++ b/modules/expansionhunter/meta.yml @@ -0,0 +1,50 @@ +name: expansionhunter +description: write your description here +keywords: + - STR + - repeat_expansions +tools: + - expansionhunter: + description: A tool for estimating repeat sizes + homepage: https://github.com/Illumina/ExpansionHunter + documentation: https://github.com/Illumina/ExpansionHunter/blob/master/docs/01_Introduction.md + tool_dev_url: None + doi: "10.1093/bioinformatics/btz431" + licence: ['Apache v2.0'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM/CRAM file + pattern: "*.{bam,cram}" + - fasta: + type: file + description: Reference genome + pattern: "*.{fa,fasta}" + - variant_catalog: + type: file + description: json file with repeat expansion sites to genotype + pattern: "*.{json}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', gender:'female' ] + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + - vcf: + type: file + description: VCF with repeat expansions + pattern: "*.{vcf}" + +authors: + - "@jemten" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 0482c672..a65879cb 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -270,6 +270,10 @@ ensemblvep: - modules/ensemblvep/** - tests/modules/ensemblvep/** +expansionhunter: + - modules/expansionhunter/** + - tests/modules/expansionhunter/** + fastp: - modules/fastp/** - tests/modules/fastp/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index 5643c364..73232088 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -107,6 +107,7 @@ params { mills_and_1000g_indels_vcf_gz = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/mills_and_1000G.indels.vcf.gz" mills_and_1000g_indels_vcf_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/vcf/mills_and_1000G.indels.vcf.gz.tbi" index_salmon = "${test_data_dir}/genomics/homo_sapiens/genome/index/salmon" + repeat_expansions = "${test_data_dir}/genomics/homo_sapiens/genome/loci/repeat_expansions.json" } 'illumina' { test_paired_end_sorted_bam = "${test_data_dir}/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam" diff --git a/tests/modules/expansionhunter/main.nf b/tests/modules/expansionhunter/main.nf new file mode 100644 index 00000000..a7acbff4 --- /dev/null +++ b/tests/modules/expansionhunter/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { EXPANSIONHUNTER } from '../../../modules/expansionhunter/main.nf' addParams( options: [:] ) + +workflow test_expansionhunter { + + input = [ [ id:'test', gender:'male' ], // meta map + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam'], checkIfExists: true), + file(params.test_data['homo_sapiens']['illumina']['test_paired_end_recalibrated_sorted_bam_bai'], checkIfExists: true), + ] + fasta = file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) + variant_catalog = file(params.test_data['homo_sapiens']['genome']['repeat_expansions'], checkIfExists: true) + + EXPANSIONHUNTER ( input, fasta, variant_catalog ) +} diff --git a/tests/modules/expansionhunter/test.yml b/tests/modules/expansionhunter/test.yml new file mode 100644 index 00000000..78d5c002 --- /dev/null +++ b/tests/modules/expansionhunter/test.yml @@ -0,0 +1,7 @@ +- name: expansionhunter test_expansionhunter + command: nextflow run tests/modules/expansionhunter -entry test_expansionhunter -c tests/config/nextflow.config + tags: + - expansionhunter + files: + - path: output/expansionhunter/test.vcf + md5sum: ef6c2101d7bd67211bb5a5a132690e02 From 69b21f0dc0d8330b6c18fb1a89e8b7ebbac4882d Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Tue, 17 Aug 2021 15:08:21 +0200 Subject: [PATCH 33/36] Update test.yml (#668) --- tests/modules/malt/run/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/modules/malt/run/test.yml b/tests/modules/malt/run/test.yml index cc6f5fac..0c245f2f 100644 --- a/tests/modules/malt/run/test.yml +++ b/tests/modules/malt/run/test.yml @@ -1,5 +1,3 @@ -## TODO nf-core: Please run the following command to build this file: -# nf-core modules create-test-yml malt/run - name: malt run command: nextflow run ./tests/modules/malt/run -entry test_malt_run -c tests/config/nextflow.config tags: From 6c633ef305b1839be98bde6ad3956758431206e1 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Tue, 17 Aug 2021 15:43:25 +0200 Subject: [PATCH 34/36] Specify in guidelines one should split CPUs when module has n > 1 tool (#660) * Specify more guidelines on input channels * Linting * Updates based on code review * Update README.md * Fix broken sentence * Describe CPU splitting * Update README.md Co-authored-by: Gregor Sturm * More CPU examples Co-authored-by: Gregor Sturm --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 02638474..f82e45f8 100644 --- a/README.md +++ b/README.md @@ -457,6 +457,10 @@ using a combination of `bwa` and `samtools` to output a BAM file instead of a SA - If the tool supports multi-threading then you MUST provide the appropriate parameter using the Nextflow `task` variable e.g. `--threads $task.cpus`. +- If a module contains _multiple_ tools that supports multi-threading (e.g. [piping output into a samtools command](https://github.com/nf-core/modules/blob/28b023e6f4d0d2745406d9dc6e38006882804e67/modules/bowtie2/align/main.nf#L32-L46)), you MUST assign cpus per tool such that the total number of used CPUs does not exceed `task.cpus`. + - For example, combining two (or more) tools that both (all) have multi-threading, this can be assigned to the variable [`split_cpus`](https://github.com/nf-core/modules/blob/28b023e6f4d0d2745406d9dc6e38006882804e67/modules/bowtie2/align/main.nf#L32) + - If one tool is multi-threaded and another uses a single thread, you can specify directly in the command itself e.g. with [`${task.cpus - 1}`](https://github.com/nf-core/modules/blob/6e68c1af9a514bb056c0513ebba6764efd6750fc/modules/bwa/sampe/main.nf#L42-L43) + #### Software requirements [BioContainers](https://biocontainers.pro/#/) is a registry of Docker and Singularity containers automatically created from all of the software packages on [Bioconda](https://bioconda.github.io/). Where possible we will use BioContainers to fetch pre-built software containers and Bioconda to install software using Conda. From bc7b5b3a125c14f8299720531641b25d3afaa4d5 Mon Sep 17 00:00:00 2001 From: Michael L Heuer Date: Tue, 17 Aug 2021 08:53:41 -0500 Subject: [PATCH 35/36] Add dsh-bio export-segments module (#631) Co-authored-by: Gregor Sturm --- modules/dshbio/exportsegments/functions.nf | 68 ++++++++++++++++++++ modules/dshbio/exportsegments/main.nf | 40 ++++++++++++ modules/dshbio/exportsegments/meta.yml | 40 ++++++++++++ tests/config/pytest_modules.yml | 6 +- tests/modules/dshbio/exportsegments/main.nf | 13 ++++ tests/modules/dshbio/exportsegments/test.yml | 8 +++ 6 files changed, 174 insertions(+), 1 deletion(-) create mode 100644 modules/dshbio/exportsegments/functions.nf create mode 100644 modules/dshbio/exportsegments/main.nf create mode 100644 modules/dshbio/exportsegments/meta.yml create mode 100644 tests/modules/dshbio/exportsegments/main.nf create mode 100644 tests/modules/dshbio/exportsegments/test.yml diff --git a/modules/dshbio/exportsegments/functions.nf b/modules/dshbio/exportsegments/functions.nf new file mode 100644 index 00000000..da9da093 --- /dev/null +++ b/modules/dshbio/exportsegments/functions.nf @@ -0,0 +1,68 @@ +// +// 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.args3 = args.args3 ?: '' + options.publish_by_meta = args.publish_by_meta ?: [] + 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_meta) { + def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta + for (key in key_list) { + if (args.meta && key instanceof String) { + def path = key + if (args.meta.containsKey(key)) { + path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] + } + path = path instanceof String ? path : '' + path_list.add(path) + } + } + } + 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/modules/dshbio/exportsegments/main.nf b/modules/dshbio/exportsegments/main.nf new file mode 100644 index 00000000..bf4c9699 --- /dev/null +++ b/modules/dshbio/exportsegments/main.nf @@ -0,0 +1,40 @@ +// Import generic module functions +include { initOptions; saveFiles; getSoftwareName } from './functions' + +params.options = [:] +options = initOptions(params.options) + +process DSHBIO_EXPORTSEGMENTS { + 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), meta:meta, publish_by_meta:['id']) } + + conda (params.enable_conda ? "bioconda::dsh-bio=2.0.5" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/dsh-bio:2.0.5--hdfd78af_0" + } else { + container "quay.io/biocontainers/dsh-bio:2.0.5--hdfd78af_0" + } + + input: + tuple val(meta), path(gfa) + + output: + tuple val(meta), path("*.fa"), emit: fasta + path "*.version.txt" , emit: version + + script: + def software = getSoftwareName(task.process) + def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + """ + dsh-bio \\ + export-segments \\ + $options.args \\ + -i $gfa \\ + -o ${prefix}.fa + + echo \$(dsh-bio --version 2>&1) | grep -o 'dsh-bio-tools .*' | cut -f2 -d ' ' > ${software}.version.txt + """ +} diff --git a/modules/dshbio/exportsegments/meta.yml b/modules/dshbio/exportsegments/meta.yml new file mode 100644 index 00000000..c064527e --- /dev/null +++ b/modules/dshbio/exportsegments/meta.yml @@ -0,0 +1,40 @@ +name: dshbio_exportsegments +description: Export assembly segment sequences in GFA 1.0 format to FASTA format +keywords: + - gfa + - assembly + - segment +tools: + - dshbio: + description: | + Reads, features, variants, assemblies, alignments, genomic range trees, pangenome + graphs, and a bunch of random command line tools for bioinformatics. LGPL version 3 + or later. + homepage: https://github.com/heuermh/dishevelled-bio + documentation: https://github.com/heuermh/dishevelled-bio +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - gfa: + type: file + description: Assembly segments in GFA 1.0 format + pattern: "*.{gfa}" +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Assembly segment sequences in FASTA format + pattern: "*.{fa}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" +authors: + - "@heuermh" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index a65879cb..08a11a4c 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -245,11 +245,15 @@ deeptools/plotprofile: delly/call: - modules/delly/call/** - tests/modules/delly/call/** - + dragonflye: - modules/dragonflye/** - tests/modules/dragonflye/** +dshbio/exportsegments: + - modules/dshbio/exportsegments/** + - tests/modules/dshbio/exportsegments/** + dshbio/filterbed: - modules/dshbio/filterbed/** - tests/modules/dshbio/filterbed/** diff --git a/tests/modules/dshbio/exportsegments/main.nf b/tests/modules/dshbio/exportsegments/main.nf new file mode 100644 index 00000000..6eef1046 --- /dev/null +++ b/tests/modules/dshbio/exportsegments/main.nf @@ -0,0 +1,13 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { DSHBIO_EXPORTSEGMENTS } from '../../../../modules/dshbio/exportsegments/main.nf' addParams( options: [:] ) + +workflow test_dshbio_exportsegments { + input = [ [ id:'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['assembly_gfa'], checkIfExists: true) ] + ] + + DSHBIO_EXPORTSEGMENTS ( input ) +} diff --git a/tests/modules/dshbio/exportsegments/test.yml b/tests/modules/dshbio/exportsegments/test.yml new file mode 100644 index 00000000..453e1cba --- /dev/null +++ b/tests/modules/dshbio/exportsegments/test.yml @@ -0,0 +1,8 @@ +- name: dshbio exportsegments + command: nextflow run ./tests/modules/dshbio/exportsegments -entry test_dshbio_exportsegments -c tests/config/nextflow.config + tags: + - dshbio + - dshbio/exportsegments + files: + - path: ./output/dshbio/test.fa + md5sum: 19ed0b69970ed3fbb641c5c510ebef61 From ab93a1afa7941dcf4fff8dc35712290077f25413 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Tue, 17 Aug 2021 15:55:54 +0200 Subject: [PATCH 36/36] update: `BWA/ALN` (#653) * Specify more guidelines on input channels * Linting * Updates based on code review * Update README.md * Fix broken sentence * Remove reads from output channel following module guidelines. Should do a .join() based on $meta, to reassociate. Co-authored-by: Gregor Sturm --- modules/bwa/aln/main.nf | 2 +- modules/bwa/aln/meta.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/bwa/aln/main.nf b/modules/bwa/aln/main.nf index d9c2ba13..59f1396c 100644 --- a/modules/bwa/aln/main.nf +++ b/modules/bwa/aln/main.nf @@ -23,7 +23,7 @@ process BWA_ALN { path index output: - tuple val(meta), path(reads), path("*.sai"), emit: sai + tuple val(meta), path("*.sai"), emit: sai path "*.version.txt" , emit: version script: diff --git a/modules/bwa/aln/meta.yml b/modules/bwa/aln/meta.yml index eac1f509..4f81588d 100644 --- a/modules/bwa/aln/meta.yml +++ b/modules/bwa/aln/meta.yml @@ -47,7 +47,7 @@ output: pattern: "*.{version.txt}" - sai: type: file - description: SA coordinate file + description: Single or paired SA coordinate files pattern: "*.sai" authors: