diff --git a/modules/bamtools/convert/main.nf b/modules/bamtools/convert/main.nf new file mode 100644 index 00000000..141e762d --- /dev/null +++ b/modules/bamtools/convert/main.nf @@ -0,0 +1,38 @@ +process BAMTOOLS_CONVERT { + tag "$meta.id" + label 'process_low' + + conda (params.enable_conda ? "bioconda::bamtools=2.5.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/bamtools:2.5.1--h9a82719_9' : + 'quay.io/biocontainers/bamtools:2.5.1--h9a82719_9' }" + + input: + tuple val(meta), path(bam) + + output: + tuple val(meta), path("*.{bed,fasta,fastq,json,pileup,sam,yaml}"), emit: data + path "versions.yml" , emit: versions + + script: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def test = args ==~ /-format (bed|fasta|fastq|json|pileup|sam|yaml)/ + if ( test == false ) error "-format option must be provided in args. Possible values: bed fasta fastq json pileup sam yaml" + m = args =~ /-format ([a-z]+)/ + ext = m[0][1] + + + """ + bamtools \\ + convert \\ + $args \\ + -in $bam \\ + -out ${prefix}.${ext} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + bamtools: \$( bamtools --version | grep -e 'bamtools' | sed 's/^.*bamtools //' ) + END_VERSIONS + """ +} diff --git a/modules/bamtools/convert/meta.yml b/modules/bamtools/convert/meta.yml new file mode 100644 index 00000000..acc7e4df --- /dev/null +++ b/modules/bamtools/convert/meta.yml @@ -0,0 +1,52 @@ +name: bamtools_convert +description: BamTools provides both a programmer's API and an end-user's toolkit for handling BAM files. +keywords: + - bamtools + - bamtools/convert + - bam + - convert + - bed + - fasta + - fastq + - json + - pileup + - sam + - yaml +tools: + - bamtools: + description: C++ API & command-line toolkit for working with BAM data + homepage: http://github.com/pezmaster31/bamtools + documentation: https://github.com/pezmaster31/bamtools/wiki + tool_dev_url: http://github.com/pezmaster31/bamtools + doi: "" + licence: ['MIT'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - bam: + type: file + description: BAM file + pattern: "*.bam" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software versions + pattern: "versions.yml" + ## TODO nf-core: Delete / customise this example output + - out: + type: file + description: The data in the asked format (bed, fasta, fastq, json, pileup, sam, yaml) + pattern: "*.{bed,fasta,fastq,json,pileup,sam,yaml}" + +authors: + - "@sguizard" diff --git a/modules/freebayes/main.nf b/modules/freebayes/main.nf index 1dd91fef..d462088a 100644 --- a/modules/freebayes/main.nf +++ b/modules/freebayes/main.nf @@ -41,7 +41,7 @@ process FREEBAYES { $args \\ $input > ${prefix}.vcf - gzip --no-name ${prefix}.vcf + bgzip ${prefix}.vcf cat <<-END_VERSIONS > versions.yml "${task.process}": @@ -60,7 +60,7 @@ process FREEBAYES { $args \\ $input > ${prefix}.vcf - gzip --no-name ${prefix}.vcf + bgzip ${prefix}.vcf cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/gatk4/mergebamalignment/main.nf b/modules/gatk4/mergebamalignment/main.nf index b0b9daa1..0e294454 100644 --- a/modules/gatk4/mergebamalignment/main.nf +++ b/modules/gatk4/mergebamalignment/main.nf @@ -8,8 +8,7 @@ process GATK4_MERGEBAMALIGNMENT { 'quay.io/biocontainers/gatk4:4.2.4.1--hdfd78af_0' }" input: - tuple val(meta), path(aligned) - path unmapped + tuple val(meta), path(aligned), path(unmapped) path fasta path dict @@ -28,10 +27,10 @@ process GATK4_MERGEBAMALIGNMENT { } """ gatk --java-options "-Xmx${avail_mem}g" MergeBamAlignment \\ - ALIGNED=$aligned \\ - UNMAPPED=$unmapped \\ - R=$fasta \\ - O=${prefix}.bam \\ + -ALIGNED $aligned \\ + -UNMAPPED $unmapped \\ + -R $fasta \\ + -O ${prefix}.bam \\ $args cat <<-END_VERSIONS > versions.yml diff --git a/modules/nextclade/datasetget/main.nf b/modules/nextclade/datasetget/main.nf index 55371168..00dc8ff9 100644 --- a/modules/nextclade/datasetget/main.nf +++ b/modules/nextclade/datasetget/main.nf @@ -2,10 +2,10 @@ process NEXTCLADE_DATASETGET { tag "$dataset" label 'process_low' - conda (params.enable_conda ? "bioconda::nextclade=1.9.0" : null) + conda (params.enable_conda ? "bioconda::nextclade=1.10.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/nextclade:1.9.0--h9ee0642_0' : - 'quay.io/biocontainers/nextclade:1.9.0--h9ee0642_0' }" + 'https://depot.galaxyproject.org/singularity/nextclade:1.10.1--h9ee0642_0' : + 'quay.io/biocontainers/nextclade:1.10.1--h9ee0642_0' }" input: val dataset diff --git a/modules/nextclade/run/main.nf b/modules/nextclade/run/main.nf index e29dd8ce..36e19aab 100644 --- a/modules/nextclade/run/main.nf +++ b/modules/nextclade/run/main.nf @@ -2,10 +2,10 @@ process NEXTCLADE_RUN { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::nextclade=1.9.0" : null) + conda (params.enable_conda ? "bioconda::nextclade=1.10.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/nextclade:1.9.0--h9ee0642_0' : - 'quay.io/biocontainers/nextclade:1.9.0--h9ee0642_0' }" + 'https://depot.galaxyproject.org/singularity/nextclade:1.10.1--h9ee0642_0' : + 'quay.io/biocontainers/nextclade:1.10.1--h9ee0642_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/prodigal/main.nf b/modules/prodigal/main.nf index 184b17bb..63248931 100644 --- a/modules/prodigal/main.nf +++ b/modules/prodigal/main.nf @@ -2,27 +2,27 @@ process PRODIGAL { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? "bioconda::prodigal=2.6.3" : null) + conda (params.enable_conda ? "prodigal=2.6.3 pigz=2.6" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/prodigal:2.6.3--h516909a_2' : - 'quay.io/biocontainers/prodigal:2.6.3--h516909a_2' }" + 'https://depot.galaxyproject.org/singularity/mulled-v2-2e442ba7b07bfa102b9cf8fac6221263cd746ab8:57f05cfa73f769d6ed6d54144cb3aa2a6a6b17e0-0' : + 'quay.io/biocontainers/mulled-v2-2e442ba7b07bfa102b9cf8fac6221263cd746ab8:57f05cfa73f769d6ed6d54144cb3aa2a6a6b17e0-0' }" input: tuple val(meta), path(genome) val(output_format) output: - tuple val(meta), path("${prefix}.${output_format}"), emit: gene_annotations - tuple val(meta), path("${prefix}.fna"), emit: nucleotide_fasta - tuple val(meta), path("${prefix}.faa"), emit: amino_acid_fasta - tuple val(meta), path("${prefix}_all.txt"), emit: all_gene_annotations - path "versions.yml" , emit: versions + tuple val(meta), path("${prefix}.${output_format}"), emit: gene_annotations + tuple val(meta), path("${prefix}.fna"), emit: nucleotide_fasta + tuple val(meta), path("${prefix}.faa"), emit: amino_acid_fasta + tuple val(meta), path("${prefix}_all.txt"), emit: all_gene_annotations + path "versions.yml", emit: versions script: def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" """ - prodigal -i "${genome}" \\ + pigz -cdf ${genome} | prodigal \\ $args \\ -f $output_format \\ -d "${prefix}.fna" \\ @@ -33,6 +33,7 @@ process PRODIGAL { cat <<-END_VERSIONS > versions.yml "${task.process}": prodigal: \$(prodigal -v 2>&1 | sed -n 's/Prodigal V\\(.*\\):.*/\\1/p') + pigz: \$(pigz -V 2>&1 | sed 's/pigz //g') END_VERSIONS """ } diff --git a/modules/prodigal/meta.yml b/modules/prodigal/meta.yml index 5bcc4e77..3062ccce 100644 --- a/modules/prodigal/meta.yml +++ b/modules/prodigal/meta.yml @@ -5,10 +5,10 @@ keywords: tools: - prodigal: description: Prodigal (Prokaryotic Dynamic Programming Genefinding Algorithm) is a microbial (bacterial and archaeal) gene finding program - homepage: {} - documentation: {} + homepage: {https://github.com/hyattpd/Prodigal} + documentation: {https://github.com/hyattpd/prodigal/wiki} tool_dev_url: {} - doi: "" + doi: "10.1186/1471-2105-11-119" licence: ["GPL v3"] input: @@ -17,10 +17,12 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - bam: + - genome: type: file - description: BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: fasta/fasta.gz file + - output_format: + type: string + description: Output format ("gbk"/"gff"/"sqn"/"sco") output: - meta: @@ -32,10 +34,22 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - bam: + - nucleotide_fasta: type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: nucleotide sequences file + pattern: "*.{fna}" + - amino_acid_fasta: + type: file + description: protein translations file + pattern: "*.{faa}" + - all_gene_annotations: + type: file + description: complete starts file + pattern: "*.{_all.txt}" + - gene_annotations: + type: file + description: gene annotations in output_format given as input + pattern: "*.{output_format}" authors: - "@grst" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 2321c918..7ed2cf53 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -46,6 +46,10 @@ bamaligncleaner: - modules/bamaligncleaner/** - tests/modules/bamaligncleaner/** +bamtools/convert: + - modules/bamtools/convert/** + - tests/modules/bamtools/convert/** + bamtools/split: - modules/bamtools/split/** - tests/modules/bamtools/split/** diff --git a/tests/modules/bamtools/convert/main.nf b/tests/modules/bamtools/convert/main.nf new file mode 100644 index 00000000..bf57f248 --- /dev/null +++ b/tests/modules/bamtools/convert/main.nf @@ -0,0 +1,104 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_EXT_ERROR } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_NOEXT_ERROR } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_BED } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_FASTA } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_FASTQ } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_JSON } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_PILEUP } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_SAM } from '../../../../modules/bamtools/convert/main.nf' +include { BAMTOOLS_CONVERT as BAMTOOLS_CONVERT_YAML } from '../../../../modules/bamtools/convert/main.nf' + +workflow test_bamtools_convert_ext_error { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_EXT_ERROR ( input ) +} + +workflow test_bamtools_convert_noext_error { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_NOEXT_ERROR ( input ) +} + +workflow test_bamtools_convert_bed { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_BED ( input ) +} + +workflow test_bamtools_convert_fasta { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_FASTA ( input ) +} + +workflow test_bamtools_convert_fastq { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_FASTQ ( input ) +} + +workflow test_bamtools_convert_json { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_JSON ( input ) +} + +workflow test_bamtools_convert_pileup { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_PILEUP ( input ) +} + +workflow test_bamtools_convert_sam { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_SAM ( input ) +} + +workflow test_bamtools_convert_yaml { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] + + BAMTOOLS_CONVERT_YAML ( input ) +} + diff --git a/tests/modules/bamtools/convert/nextflow.config b/tests/modules/bamtools/convert/nextflow.config new file mode 100644 index 00000000..ae8fe345 --- /dev/null +++ b/tests/modules/bamtools/convert/nextflow.config @@ -0,0 +1,41 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + + withName: BAMTOOLS_CONVERT_EXT_ERROR { + ext.args = "-format vcf" + } + + withName: BAMTOOLS_CONVERT_NOEXT_ERROR { + ext.args = "" + } + + withName: BAMTOOLS_CONVERT_BED { + ext.args = "-format bed" + } + + withName: BAMTOOLS_CONVERT_FASTA { + ext.args = "-format fasta" + } + + withName: BAMTOOLS_CONVERT_FASTQ { + ext.args = "-format fastq" + } + + withName: BAMTOOLS_CONVERT_JSON { + ext.args = "-format json" + } + + withName: BAMTOOLS_CONVERT_PILEUP { + ext.args = "-format pileup" + } + + withName: BAMTOOLS_CONVERT_SAM { + ext.args = "-format sam" + } + + withName: BAMTOOLS_CONVERT_YAML { + ext.args = "-format yaml" + } + +} diff --git a/tests/modules/bamtools/convert/test.yml b/tests/modules/bamtools/convert/test.yml new file mode 100644 index 00000000..3922ece2 --- /dev/null +++ b/tests/modules/bamtools/convert/test.yml @@ -0,0 +1,90 @@ +- name: bamtools convert test_bamtools_convert_ext_error + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_ext_error -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + exit_code: 1 + +- name: bamtools convert test_bamtools_convert_noext_error + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_noext_error -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + exit_code: 1 + +- name: bamtools convert test_bamtools_convert_bed + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_bed -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.bed + md5sum: 4e34cc15bf31e700f5f3a9f8fffb6c81 + - path: output/bamtools/versions.yml + md5sum: eb7a144b8a97965d3482f6f96b8a8243 + +- name: bamtools convert test_bamtools_convert_fasta + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_fasta -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.fasta + md5sum: 52aeacf78571862b7e97c7d44ac8f827 + - path: output/bamtools/versions.yml + md5sum: 42d19a2b2b07f05edb82b34369dfd754 + +- name: bamtools convert test_bamtools_convert_fastq + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_fastq -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.fastq + md5sum: e591c48daad2c56638e5d6f21f1f71c5 + - path: output/bamtools/versions.yml + md5sum: 13f0bf8a3e1f8f527f96dabaa5c8051e + +- name: bamtools convert test_bamtools_convert_json + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_json -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.json + md5sum: 04afed696f9f14da85a460353645d1f5 + - path: output/bamtools/versions.yml + md5sum: 33d633dbd6209cb93c9b071f8c0ed3b3 + +- name: bamtools convert test_bamtools_convert_pileup + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_pileup -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.pileup + md5sum: e5a3cb4a3e1bf980a575fafce6a2826f + - path: output/bamtools/versions.yml + md5sum: fd3ad0edd1e085b1a002e0593d1d5814 + +- name: bamtools convert test_bamtools_convert_sam + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_sam -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.sam + md5sum: 61ab3d0de16a9da8b651f9c692e19d5e + - path: output/bamtools/versions.yml + md5sum: 4be470ce3cc0143ae5ae415b612a4965 + +- name: bamtools convert test_bamtools_convert_yaml + command: nextflow run tests/modules/bamtools/convert -entry test_bamtools_convert_yaml -c tests/config/nextflow.config + tags: + - bamtools + - bamtools/convert + files: + - path: output/bamtools/test.yaml + md5sum: 68b56f198da036fef33e150eb773dc3b + - path: output/bamtools/versions.yml + md5sum: 1116abc088c5edf11bee393961c18b3e diff --git a/tests/modules/freebayes/test.yml b/tests/modules/freebayes/test.yml index c9aa78da..6cca692e 100644 --- a/tests/modules/freebayes/test.yml +++ b/tests/modules/freebayes/test.yml @@ -1,34 +1,49 @@ - name: freebayes test_freebayes - command: nextflow run ./tests/modules/freebayes -entry test_freebayes -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: 81d3e6ce7b6343d088b779567c3803eb + - path: output/freebayes/versions.yml + md5sum: 53651eb835af65df829241257584a7d2 - name: freebayes test_freebayes_bed - command: nextflow run ./tests/modules/freebayes -entry test_freebayes_bed -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes_bed -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: 02645d014a63485162a7789007373b2a + - path: output/freebayes/versions.yml + md5sum: becc93c8a0be580c09d55b955d60a5e1 - name: freebayes test_freebayes_cram - command: nextflow run ./tests/modules/freebayes -entry test_freebayes_cram -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes_cram -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: 3d0bfcd2129c62f8863952fa4c1054db + - path: output/freebayes/versions.yml + md5sum: 2e5b266edfc6cab81353cfc72c00f67c - name: freebayes test_freebayes_somatic - command: nextflow run ./tests/modules/freebayes -entry test_freebayes_somatic -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes_somatic -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: 22fec868210ba3baf685b214bfd8e74b + - path: output/freebayes/versions.yml + md5sum: 8fbdb4c052fb3e42b5508a966125fa05 - name: freebayes test_freebayes_somatic_cram_intervals - command: nextflow run ./tests/modules/freebayes -entry test_freebayes_somatic_cram_intervals -c ./tests/config/nextflow.config -c ./tests/modules/freebayes/nextflow.config + command: nextflow run tests/modules/freebayes -entry test_freebayes_somatic_cram_intervals -c tests/config/nextflow.config tags: - freebayes files: - path: output/freebayes/test.vcf.gz + md5sum: 527cf2937067bbd4117d95fd472bb928 + - path: output/freebayes/versions.yml + md5sum: af97e3dfdc086188739907c3460e49e0 diff --git a/tests/modules/gatk4/mergebamalignment/main.nf b/tests/modules/gatk4/mergebamalignment/main.nf index 59bd833b..8a38c129 100644 --- a/tests/modules/gatk4/mergebamalignment/main.nf +++ b/tests/modules/gatk4/mergebamalignment/main.nf @@ -6,11 +6,11 @@ include { GATK4_MERGEBAMALIGNMENT } from '../../../../modules/gatk4/mergebamalig workflow test_gatk4_mergebamalignment { input = [ [ id:'test' ], // meta map - file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_unaligned_bam'], checkIfExists: true) ] - unmapped = file(params.test_data['sarscov2']['illumina']['test_unaligned_bam'], checkIfExists: true) fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) dict = file(params.test_data['sarscov2']['genome']['genome_dict'], checkIfExists: true) - GATK4_MERGEBAMALIGNMENT ( input, unmapped, fasta, dict ) + GATK4_MERGEBAMALIGNMENT ( input, fasta, dict ) } diff --git a/tests/modules/nextclade/datasetget/main.nf b/tests/modules/nextclade/datasetget/main.nf index 0fc38a5b..8f4fa87b 100644 --- a/tests/modules/nextclade/datasetget/main.nf +++ b/tests/modules/nextclade/datasetget/main.nf @@ -8,7 +8,8 @@ workflow test_nextclade_datasetget { dataset = 'sars-cov-2' reference = 'MN908947' - tag = '2022-01-05T19:54:31Z' + tag = '2022-01-18T12:00:00Z' NEXTCLADE_DATASETGET ( dataset, reference, tag ) + } diff --git a/tests/modules/nextclade/datasetget/test.yml b/tests/modules/nextclade/datasetget/test.yml index 7e798a11..d610b428 100644 --- a/tests/modules/nextclade/datasetget/test.yml +++ b/tests/modules/nextclade/datasetget/test.yml @@ -9,12 +9,14 @@ - path: output/nextclade/sars-cov-2/primers.csv md5sum: 5990c3483bf66ce607aeb90a44e7ef2e - path: output/nextclade/sars-cov-2/qc.json - md5sum: 018fa0c0b0d2e824954e37e01495d549 + md5sum: c512f51fda0212b21ffff05779180963 - path: output/nextclade/sars-cov-2/reference.fasta md5sum: c7ce05f28e4ec0322c96f24e064ef55c - path: output/nextclade/sars-cov-2/sequences.fasta md5sum: 41129d255b99e0e92bdf20e866b99a1b - path: output/nextclade/sars-cov-2/tag.json - md5sum: 2f6d8e806d9064571ee4188ef1304c9c + md5sum: 402ac2b87e2a6a64a3fbf5ad16497af3 - path: output/nextclade/sars-cov-2/tree.json - md5sum: f8fb33ed62b59142ac20998eb599df6c \ No newline at end of file + md5sum: b8f32f547ff9e2131d6fc66b68fc54b1 + - path: output/nextclade/sars-cov-2/virus_properties.json + md5sum: 5f2de3949e07cb633f3d9e4a7654dc81 diff --git a/tests/modules/nextclade/run/main.nf b/tests/modules/nextclade/run/main.nf index 35b52317..ed674a0d 100644 --- a/tests/modules/nextclade/run/main.nf +++ b/tests/modules/nextclade/run/main.nf @@ -9,7 +9,7 @@ workflow test_nextclade_run { dataset = 'sars-cov-2' reference = 'MN908947' - tag = '2022-01-05T19:54:31Z' + tag = '2022-01-18T12:00:00Z' NEXTCLADE_DATASETGET ( dataset, reference, tag ) @@ -20,3 +20,4 @@ workflow test_nextclade_run { NEXTCLADE_RUN ( input, NEXTCLADE_DATASETGET.out.dataset ) } + diff --git a/tests/modules/nextclade/run/test.yml b/tests/modules/nextclade/run/test.yml index 37f7d8ae..ea846378 100644 --- a/tests/modules/nextclade/run/test.yml +++ b/tests/modules/nextclade/run/test.yml @@ -6,8 +6,8 @@ files: - path: output/nextclade/test.json - path: output/nextclade/test.csv - md5sum: 3b87a4da190ba2e1fdc8418dc3a7ffdb + md5sum: 570c1aa2d5fd25c23d0042c1b06108e1 - path: output/nextclade/test.tsv - md5sum: 449393288e8734a02def139c550a8d9b + md5sum: dd76e1a4c760785489be4e4a860b4d00 - path: output/nextclade/test.tree.json - md5sum: 9c6e33cb7ff860bee6194847bd2c855c + md5sum: 3591b4dc1542995a7ffcffcb1f52b524 diff --git a/tests/test_versions_yml.py b/tests/test_versions_yml.py index 2f78ab2e..5d0bb39e 100644 --- a/tests/test_versions_yml.py +++ b/tests/test_versions_yml.py @@ -16,7 +16,10 @@ def _get_workflow_names(): # test_config = yaml.safe_load(f.read_text()) test_config = yaml.load(f.read_text(), Loader=yaml.BaseLoader) for workflow in test_config: - yield workflow["name"] + # https://github.com/nf-core/modules/pull/1242 - added to cover tests + # that expect an error and therefore will not generate a versions.yml + if 'exit_code' not in workflow: + yield workflow["name"] @pytest.mark.workflow(*_get_workflow_names())