Skip to content

Commit bacae7f

Browse files
jasmezzjfy133
andauthored
Update module: bakta/bakta (nf-core#4847)
* Add nf-test + remove pytest files * Apply changes from code review * Fix main.test.nf * Update process label to increase memory/fix diamond error * Stub tests only * Increase memory (for CI checks to succeed) * Fix config, activate test * Increase memory * Increase memory * Activate singularity profile * Exclude conda tests due to DIAMOND memory issue on conda * Skip conda * Skip conda CI check of dependency baktadbdownload --------- Co-authored-by: James A. Fellows Yates <[email protected]>
1 parent c884823 commit bacae7f

File tree

15 files changed

+283
-67
lines changed

15 files changed

+283
-67
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,10 @@ jobs:
476476
tags: happy/sompy
477477
- profile: conda
478478
tags: backsub
479+
- profile: conda
480+
tags: bakta/bakta
481+
- profile: conda
482+
tags: bakta/baktadbdownload
479483
- profile: conda
480484
tags: bases2fastq
481485
- profile: conda

modules/nf-core/bakta/bakta/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ channels:
44
- bioconda
55
- defaults
66
dependencies:
7-
- bioconda::bakta=1.8.2
7+
- bioconda::bakta=1.9.2

modules/nf-core/bakta/bakta/main.nf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ process BAKTA_BAKTA {
44

55
conda "${moduleDir}/environment.yml"
66
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7-
'https://depot.galaxyproject.org/singularity/bakta:1.8.2--pyhdfd78af_0' :
8-
'biocontainers/bakta:1.8.2--pyhdfd78af_0' }"
7+
'https://depot.galaxyproject.org/singularity/bakta:1.9.2--pyhdfd78af_0' :
8+
'biocontainers/bakta:1.9.2--pyhdfd78af_0' }"
99

1010
input:
1111
tuple val(meta), path(fasta)
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
nextflow_process {
2+
3+
name "Test Process BAKTA_BAKTA"
4+
script "../main.nf"
5+
config "./nextflow.config"
6+
process "BAKTA_BAKTA"
7+
8+
tag "modules"
9+
tag "modules_nfcore"
10+
tag "bakta"
11+
tag "bakta/bakta"
12+
tag "bakta/baktadbdownload"
13+
14+
test("Bakta - bacteroides_fragilis - genome.fasta") {
15+
16+
setup {
17+
run("BAKTA_BAKTADBDOWNLOAD") {
18+
script "../../baktadbdownload/main.nf"
19+
process {
20+
"""
21+
"""
22+
}
23+
}
24+
}
25+
26+
when {
27+
process {
28+
"""
29+
input[0] = [
30+
[ id:'test', single_end:false ], // meta map
31+
file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true)
32+
]
33+
input[1] = BAKTA_BAKTADBDOWNLOAD.out.db
34+
input[2] = []
35+
input[3] = []
36+
"""
37+
}
38+
}
39+
40+
then {
41+
assertAll(
42+
{ assert process.success },
43+
{ assert path(process.out.embl.get(0).get(1)).text.contains("/translation=\"MKNTLKIAILLIAIISMGHWMPVKQVCDLNSLSLQNVEALANGET") },
44+
{ assert path(process.out.faa.get(0).get(1)).text.contains("MKNTLKIAILLIAIISMGHWMPVKQVCDLNSLSLQNVEALANGETPNYTFCIGAGSVDCPIQHDKVKYVSQGFSLDY") },
45+
{ assert path(process.out.ffn.get(0).get(1)).text.contains("ATGAAAAACACTTTAAAAATAGCTATTCTTCTTATTGCTATTATTTCTATGGGGCATTGGATGCCTGTAAAACAAGT") },
46+
{ assert path(process.out.fna.get(0).get(1)).text.contains("TCTTTTTACTCATAATCTACTTTTATGATGTTAATTATTTTTTCCGTGTCTCTCTTTCGG") },
47+
{ assert path(process.out.gbff.get(0).get(1)).text.contains("/translation=\"MKNTLKIAILLIAIISMGHWMPVKQVCDLNSLSLQNVEALANGET") },
48+
{ assert path(process.out.gff.get(0).get(1)).text.contains("##sequence-region contig_1 1 2926") },
49+
{ assert path(process.out.hypotheticals_tsv.get(0).get(1)).text.contains("#Annotated with Bakta") },
50+
{ assert path(process.out.hypotheticals_faa.get(0).get(1)).text.contains("MKNLILVLGCFFFLISCQQTEKEKLEELVKNWNGKEVLL") },
51+
{ assert path(process.out.tsv.get(0).get(1)).text.contains("SO:0001217, UniRef:UniRef50_A0A0I9S7A3") },
52+
{ assert path(process.out.txt.get(0).get(1)).text.contains("Length: 1739120") },
53+
{ assert snapshot(process.out.versions).match("versions") }
54+
)
55+
}
56+
57+
}
58+
59+
test("Bakta - stub") {
60+
61+
options "-stub"
62+
63+
when {
64+
process {
65+
"""
66+
input[0] = [[id: 'stub'],file('stub')]
67+
input[1] = []
68+
input[2] = []
69+
input[3] = []
70+
"""
71+
}
72+
}
73+
74+
then {
75+
assertAll(
76+
{ assert process.success },
77+
{ assert snapshot(process.out).match() }
78+
)
79+
}
80+
81+
}
82+
83+
}

modules/nf-core/bakta/bakta/tests/main.nf.test.snap

Lines changed: 179 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
process {
2+
3+
withName: 'BAKTA_BAKTADBDOWNLOAD' {
4+
ext.args = "--type light"
5+
}
6+
7+
withName: 'BAKTA_BAKTA' {
8+
memory = 15.4.GB
9+
}
10+
11+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bakta/bakta:
2+
- "modules/nf-core/bakta/bakta/**"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
process {
22

3-
43
withName: 'BAKTA_BAKTADBDOWNLOAD' {
54
ext.args = "--type light"
65
}
6+
77
}

tests/config/pytest_modules.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ atlasgeneannotationmanipulation/gtf2featureannotation:
8585
authentict/deam2cont:
8686
- modules/nf-core/authentict/deam2cont/**
8787
- tests/modules/nf-core/authentict/deam2cont/**
88-
bakta/bakta:
89-
- modules/nf-core/bakta/bakta/**
90-
- tests/modules/nf-core/bakta/bakta/**
9188
bam2fastx/bam2fastq:
9289
- modules/nf-core/bam2fastx/bam2fastq/**
9390
- tests/modules/nf-core/bam2fastx/bam2fastq/**

tests/modules/nf-core/bakta/bakta/main.nf

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/modules/nf-core/bakta/bakta/nextflow.config

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/modules/nf-core/bakta/bakta/test.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

tests/modules/nf-core/bakta/baktadbdownload/main.nf

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/modules/nf-core/bakta/baktadbdownload/nextflow.config

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/modules/nf-core/bakta/baktadbdownload/test.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)