-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify DAS_Tool input structure, bump version, switch to nf-test (#7163)
* Update DAS_Tool and add nf-test tests * Remove old tests * Fix tags and remove dastool from pytest modules YAML * Fix meta.yml * Update snapshot * Update test * Add stubs to dastool/dastool, dastool/fastatocontig2bin, and metabat2/metabat2. Add tests for dastool stub runs. Add test for log file output from dastool/dastool * Fix linting + change test ext args config to match documentation * Move config inside tests as it's not needed for the stub * Deprecate dastool/fastatoscaffolds2bin * Fix test
- Loading branch information
1 parent
356e5e6
commit 6d73658
Showing
23 changed files
with
916 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ channels: | |
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::das_tool=1.1.6 | ||
- bioconda::das_tool=1.1.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
nextflow_process { | ||
|
||
name "Test Process DASTOOL_DASTOOL" | ||
script "../main.nf" | ||
process "DASTOOL_DASTOOL" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "dastool" | ||
tag "dastool/dastool" | ||
tag "dastool/fastatocontig2bin" | ||
tag "metabat2/metabat2" | ||
tag "metabat2/jgisummarizebamcontigdepths" | ||
tag "prodigal" | ||
|
||
setup { | ||
run("METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS") { | ||
script "../../../metabat2/jgisummarizebamcontigdepths/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + "genomics/prokaryotes/bacteroides_fragilis/illumina/bam/test1.sorted.bam", checkIfExists: true), | ||
file(params.modules_testdata_base_path + "genomics/prokaryotes/bacteroides_fragilis/illumina/bam/test1.sorted.bam.bai", checkIfExists: true), | ||
] | ||
""" | ||
} | ||
} | ||
run("METABAT2_METABAT2") { | ||
script "../../../metabat2/metabat2/main.nf" | ||
process { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id:'test', single_end:false ], | ||
file(params.modules_testdata_base_path + "genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz", checkIfExists: true) | ||
]).join(METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS.out.depth) | ||
""" | ||
} | ||
} | ||
run("DASTOOL_FASTATOCONTIG2BIN") { | ||
script "../../fastatocontig2bin/main.nf" | ||
process { | ||
""" | ||
input[0] = METABAT2_METABAT2.out.fasta.collect() | ||
input[1] = "fa" | ||
""" | ||
} | ||
} | ||
run("PRODIGAL") { | ||
script "../../../prodigal/main.nf" | ||
process { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id:'test', single_end:false ], | ||
file(params.modules_testdata_base_path + "genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz", checkIfExists: true) | ||
]) | ||
input[1] = "gff" | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("dastool dastool - bacteroides fragilis - noproteins") { | ||
|
||
config "./nextflow.config" | ||
|
||
when { | ||
params { | ||
module_args = '--write_bins --write_bin_evals' | ||
} | ||
process { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id:'test', single_end:false ], | ||
file(params.modules_testdata_base_path + "genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz", checkIfExists: true) | ||
]).join(DASTOOL_FASTATOCONTIG2BIN.out.fastatocontig2bin) | ||
.map { meta, contigs, c2b -> [ meta, contigs, c2b, [] ]} | ||
input[1] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert path(process.out.log.get(0).get(1)).text.contains("Dereplicating, aggregating, and scoring bins") }, | ||
{ assert path(process.out.fasta_proteins.get(0).get(1)).text.contains("MKIGIITICKVNNYGAELQAFATQKKLEQMGHNAEIINYLYYKDWHFKDTPLSQPFVPLD") }, | ||
{ assert snapshot( | ||
process.out.summary, | ||
process.out.contig2bin, | ||
process.out.eval, | ||
process.out.bins, | ||
process.out.pdfs, | ||
process.out.candidates_faa, | ||
process.out.fasta_archaea_scg, | ||
process.out.fasta_bacteria_scg, | ||
process.out.b6, | ||
process.out.seqlength, | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("dastool dastool - bacteroides fragilis - proteins") { | ||
|
||
config "./nextflow.config" | ||
|
||
when { | ||
params { | ||
module_args = '--write_bins --write_bin_evals' | ||
} | ||
process { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id:'test', single_end:false ], | ||
file(params.modules_testdata_base_path + "genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz", checkIfExists: true) | ||
]) | ||
.join(DASTOOL_FASTATOCONTIG2BIN.out.fastatocontig2bin) | ||
.join(PRODIGAL.out.amino_acid_fasta) | ||
input[1] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert path(process.out.log.get(0).get(1)).text.contains("Dereplicating, aggregating, and scoring bins") }, | ||
{ assert snapshot( | ||
process.out.summary, | ||
process.out.contig2bin, | ||
process.out.eval, | ||
process.out.bins, | ||
process.out.pdfs, | ||
process.out.fasta_proteins, | ||
process.out.candidates_faa, | ||
process.out.fasta_archaea_scg, | ||
process.out.fasta_bacteria_scg, | ||
process.out.b6, | ||
process.out.seqlength, | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("dastool dastool - bacteroides fragilis - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id:'test', single_end:false ], | ||
file(params.modules_testdata_base_path + "genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz", checkIfExists: true) | ||
]) | ||
.join(DASTOOL_FASTATOCONTIG2BIN.out.fastatocontig2bin) | ||
.join(PRODIGAL.out.amino_acid_fasta) | ||
input[1] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
} | ||
|
Oops, something went wrong.