diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 356e01e425b3..db5fc5117dcb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -476,6 +476,10 @@ jobs: tags: happy/sompy - profile: conda tags: backsub + - profile: conda + tags: bakta/bakta + - profile: conda + tags: bakta/baktadbdownload - profile: conda tags: bases2fastq - profile: conda diff --git a/modules/nf-core/bakta/bakta/environment.yml b/modules/nf-core/bakta/bakta/environment.yml index 07a11d860e2d..a244a7f92d49 100644 --- a/modules/nf-core/bakta/bakta/environment.yml +++ b/modules/nf-core/bakta/bakta/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::bakta=1.8.2 + - bioconda::bakta=1.9.2 diff --git a/modules/nf-core/bakta/bakta/main.nf b/modules/nf-core/bakta/bakta/main.nf index acac05579c59..622bbfac29e5 100644 --- a/modules/nf-core/bakta/bakta/main.nf +++ b/modules/nf-core/bakta/bakta/main.nf @@ -4,8 +4,8 @@ process BAKTA_BAKTA { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/bakta:1.8.2--pyhdfd78af_0' : - 'biocontainers/bakta:1.8.2--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/bakta:1.9.2--pyhdfd78af_0' : + 'biocontainers/bakta:1.9.2--pyhdfd78af_0' }" input: tuple val(meta), path(fasta) diff --git a/modules/nf-core/bakta/bakta/tests/main.nf.test b/modules/nf-core/bakta/bakta/tests/main.nf.test new file mode 100644 index 000000000000..bdceb16ef827 --- /dev/null +++ b/modules/nf-core/bakta/bakta/tests/main.nf.test @@ -0,0 +1,83 @@ +nextflow_process { + + name "Test Process BAKTA_BAKTA" + script "../main.nf" + config "./nextflow.config" + process "BAKTA_BAKTA" + + tag "modules" + tag "modules_nfcore" + tag "bakta" + tag "bakta/bakta" + tag "bakta/baktadbdownload" + + test("Bakta - bacteroides_fragilis - genome.fasta") { + + setup { + run("BAKTA_BAKTADBDOWNLOAD") { + script "../../baktadbdownload/main.nf" + process { + """ + """ + } + } + } + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true) + ] + input[1] = BAKTA_BAKTADBDOWNLOAD.out.db + input[2] = [] + input[3] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert path(process.out.embl.get(0).get(1)).text.contains("/translation=\"MKNTLKIAILLIAIISMGHWMPVKQVCDLNSLSLQNVEALANGET") }, + { assert path(process.out.faa.get(0).get(1)).text.contains("MKNTLKIAILLIAIISMGHWMPVKQVCDLNSLSLQNVEALANGETPNYTFCIGAGSVDCPIQHDKVKYVSQGFSLDY") }, + { assert path(process.out.ffn.get(0).get(1)).text.contains("ATGAAAAACACTTTAAAAATAGCTATTCTTCTTATTGCTATTATTTCTATGGGGCATTGGATGCCTGTAAAACAAGT") }, + { assert path(process.out.fna.get(0).get(1)).text.contains("TCTTTTTACTCATAATCTACTTTTATGATGTTAATTATTTTTTCCGTGTCTCTCTTTCGG") }, + { assert path(process.out.gbff.get(0).get(1)).text.contains("/translation=\"MKNTLKIAILLIAIISMGHWMPVKQVCDLNSLSLQNVEALANGET") }, + { assert path(process.out.gff.get(0).get(1)).text.contains("##sequence-region contig_1 1 2926") }, + { assert path(process.out.hypotheticals_tsv.get(0).get(1)).text.contains("#Annotated with Bakta") }, + { assert path(process.out.hypotheticals_faa.get(0).get(1)).text.contains("MKNLILVLGCFFFLISCQQTEKEKLEELVKNWNGKEVLL") }, + { assert path(process.out.tsv.get(0).get(1)).text.contains("SO:0001217, UniRef:UniRef50_A0A0I9S7A3") }, + { assert path(process.out.txt.get(0).get(1)).text.contains("Length: 1739120") }, + { assert snapshot(process.out.versions).match("versions") } + ) + } + + } + + test("Bakta - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [[id: 'stub'],file('stub')] + input[1] = [] + input[2] = [] + input[3] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} diff --git a/modules/nf-core/bakta/bakta/tests/main.nf.test.snap b/modules/nf-core/bakta/bakta/tests/main.nf.test.snap new file mode 100644 index 000000000000..209803543c9a --- /dev/null +++ b/modules/nf-core/bakta/bakta/tests/main.nf.test.snap @@ -0,0 +1,179 @@ +{ + "Bakta - stub": { + "content": [ + { + "0": [ + [ + { + "id": "stub" + }, + "stub.embl:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "stub" + }, + "stub.faa:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "10": [ + "versions.yml:md5,4b299fc4976606c2b553dab8f670cd42" + ], + "2": [ + [ + { + "id": "stub" + }, + "stub.ffn:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "3": [ + [ + { + "id": "stub" + }, + "stub.fna:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "4": [ + [ + { + "id": "stub" + }, + "stub.gbff:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "5": [ + [ + { + "id": "stub" + }, + "stub.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "6": [ + [ + { + "id": "stub" + }, + "stub.hypotheticals.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + [ + { + "id": "stub" + }, + "stub.hypotheticals.faa:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "8": [ + [ + { + "id": "stub" + }, + "stub.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "9": [ + [ + { + "id": "stub" + }, + "stub.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "embl": [ + [ + { + "id": "stub" + }, + "stub.embl:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "faa": [ + [ + { + "id": "stub" + }, + "stub.faa:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "ffn": [ + [ + { + "id": "stub" + }, + "stub.ffn:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "fna": [ + [ + { + "id": "stub" + }, + "stub.fna:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "gbff": [ + [ + { + "id": "stub" + }, + "stub.gbff:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "gff": [ + [ + { + "id": "stub" + }, + "stub.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "hypotheticals_faa": [ + [ + { + "id": "stub" + }, + "stub.hypotheticals.faa:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "hypotheticals_tsv": [ + [ + { + "id": "stub" + }, + "stub.hypotheticals.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tsv": [ + [ + { + "id": "stub" + }, + "stub.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "txt": [ + [ + { + "id": "stub" + }, + "stub.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,4b299fc4976606c2b553dab8f670cd42" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-02-05T13:16:46.663231397" + } +} \ No newline at end of file diff --git a/modules/nf-core/bakta/bakta/tests/nextflow.config b/modules/nf-core/bakta/bakta/tests/nextflow.config new file mode 100644 index 000000000000..4748346a30f2 --- /dev/null +++ b/modules/nf-core/bakta/bakta/tests/nextflow.config @@ -0,0 +1,11 @@ +process { + + withName: 'BAKTA_BAKTADBDOWNLOAD' { + ext.args = "--type light" + } + + withName: 'BAKTA_BAKTA' { + memory = 15.4.GB + } + +} diff --git a/modules/nf-core/bakta/bakta/tests/tags.yml b/modules/nf-core/bakta/bakta/tests/tags.yml new file mode 100644 index 000000000000..ecb08c459e5b --- /dev/null +++ b/modules/nf-core/bakta/bakta/tests/tags.yml @@ -0,0 +1,2 @@ +bakta/bakta: + - "modules/nf-core/bakta/bakta/**" diff --git a/modules/nf-core/bakta/baktadbdownload/tests/nextflow.config b/modules/nf-core/bakta/baktadbdownload/tests/nextflow.config index 089e6d64de83..8b99646a7a04 100644 --- a/modules/nf-core/bakta/baktadbdownload/tests/nextflow.config +++ b/modules/nf-core/bakta/baktadbdownload/tests/nextflow.config @@ -1,7 +1,7 @@ process { - withName: 'BAKTA_BAKTADBDOWNLOAD' { ext.args = "--type light" } + } diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index fb8019198740..f43ae7d95598 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -85,9 +85,6 @@ atlasgeneannotationmanipulation/gtf2featureannotation: authentict/deam2cont: - modules/nf-core/authentict/deam2cont/** - tests/modules/nf-core/authentict/deam2cont/** -bakta/bakta: - - modules/nf-core/bakta/bakta/** - - tests/modules/nf-core/bakta/bakta/** bam2fastx/bam2fastq: - modules/nf-core/bam2fastx/bam2fastq/** - tests/modules/nf-core/bam2fastx/bam2fastq/** diff --git a/tests/modules/nf-core/bakta/bakta/main.nf b/tests/modules/nf-core/bakta/bakta/main.nf deleted file mode 100644 index 364b140be7b2..000000000000 --- a/tests/modules/nf-core/bakta/bakta/main.nf +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { BAKTA_BAKTA } from '../../../../../modules/nf-core/bakta/bakta/main.nf' - -workflow test_bakta_bakta { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] - - BAKTA_BAKTA ( input, [], [], [] ) -} diff --git a/tests/modules/nf-core/bakta/bakta/nextflow.config b/tests/modules/nf-core/bakta/bakta/nextflow.config deleted file mode 100644 index 8730f1c4b930..000000000000 --- a/tests/modules/nf-core/bakta/bakta/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} diff --git a/tests/modules/nf-core/bakta/bakta/test.yml b/tests/modules/nf-core/bakta/bakta/test.yml deleted file mode 100644 index 666c52089d40..000000000000 --- a/tests/modules/nf-core/bakta/bakta/test.yml +++ /dev/null @@ -1,15 +0,0 @@ -- name: bakta_bakta - command: nextflow run ./tests/modules/nf-core/bakta/bakta -entry test_bakta_bakta -c ./tests/config/nextflow.config -stub-run - tags: - - bakta - - bakta/bakta - files: - - path: output/bakta/test.embl - - path: output/bakta/test.faa - - path: output/bakta/test.ffn - - path: output/bakta/test.fna - - path: output/bakta/test.gbff - - path: output/bakta/test.gff3 - - path: output/bakta/test.hypotheticals.tsv - - path: output/bakta/test.hypotheticals.faa - - path: output/bakta/test.tsv diff --git a/tests/modules/nf-core/bakta/baktadbdownload/main.nf b/tests/modules/nf-core/bakta/baktadbdownload/main.nf deleted file mode 100644 index fb8fe1b180d5..000000000000 --- a/tests/modules/nf-core/bakta/baktadbdownload/main.nf +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { BAKTA_BAKTADBDOWNLOAD } from '../../../../../modules/nf-core/bakta/baktadbdownload/main.nf' - -workflow test_bakta_baktadbdownload { - BAKTA_BAKTADBDOWNLOAD ( ) -} diff --git a/tests/modules/nf-core/bakta/baktadbdownload/nextflow.config b/tests/modules/nf-core/bakta/baktadbdownload/nextflow.config deleted file mode 100644 index 3c299d5ff2bb..000000000000 --- a/tests/modules/nf-core/bakta/baktadbdownload/nextflow.config +++ /dev/null @@ -1,8 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: 'BAKTA_BAKTADBDOWNLOAD' { - ext.args = "--type light" - } -} diff --git a/tests/modules/nf-core/bakta/baktadbdownload/test.yml b/tests/modules/nf-core/bakta/baktadbdownload/test.yml deleted file mode 100644 index 8c8b01bde1af..000000000000 --- a/tests/modules/nf-core/bakta/baktadbdownload/test.yml +++ /dev/null @@ -1,8 +0,0 @@ -- name: bakta baktadbdownload test_bakta_baktadbdownload - command: nextflow run ./tests/modules/nf-core/bakta/baktadbdownload -entry test_bakta_baktadbdownload -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bakta/baktadbdownload/nextflow.config - tags: - - bakta/baktadbdownload - - bakta - files: - - path: output/bakta/db-light/ - - path: output/bakta/versions.yml