-
Notifications
You must be signed in to change notification settings - Fork 749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swap transdecoder predict to nf-test #7296
Open
SPPearce
wants to merge
6
commits into
master
Choose a base branch
from
transdecoder_predict
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8f70d42
Swap transdecoder predict to nf-test
SPPearce 73a4e1b
Test content rather than md5sum
SPPearce e0103f4
Merge branch 'master' into transdecoder_predict
SPPearce 36bcb12
Merge branch 'master' into transdecoder_predict
SPPearce 4794ec4
Merge branch 'master' into transdecoder_predict
SPPearce 0d8290e
Apply suggestions from code review
SPPearce File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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::transdecoder=5.5.0 | ||
- bioconda::transdecoder=5.7.1 |
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
140 changes: 140 additions & 0 deletions
140
modules/nf-core/transdecoder/predict/tests/main.nf.test
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,140 @@ | ||
nextflow_process { | ||
|
||
name "Test Process TRANSDECODER_PREDICT" | ||
script "../main.nf" | ||
process "TRANSDECODER_PREDICT" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "transdecoder" | ||
tag "transdecoder/longorf" | ||
tag "transdecoder/predict" | ||
|
||
test("sarscov2 - uncompressed") { | ||
|
||
setup { | ||
run("TRANSDECODER_LONGORF") { | ||
script "../../longorf/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[id: 'test'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
} | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
] | ||
input[1] = TRANSDECODER_LONGORF.out.folder | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
// orfs are output in a random order; can't be easily sorted either. | ||
path(process.out.bed[0][1] ).getText().contains("ID=GENE.MT192765.1~~MT192765.1.p7"), | ||
path(process.out.cds[0][1] ).getText().contains("ID=GENE.MT192765.1~~MT192765.1.p7"), | ||
path(process.out.gff3[0][1]).getText().contains("ID=GENE.MT192765.1~~MT192765.1.p7"), | ||
path(process.out.pep[0][1] ).getText().contains("ID=GENE.MT192765.1~~MT192765.1.p7"), | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - compressed") { | ||
|
||
setup { | ||
run("TRANSDECODER_LONGORF") { | ||
script "../../longorf/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[id: 'test'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
} | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.gz', checkIfExists: true) | ||
] | ||
input[1] = TRANSDECODER_LONGORF.out.folder | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
// orfs are output in a random order; can't be easily sorted either. | ||
path(process.out.bed[0][1] ).getText().contains("ID=GENE.MT192765.1~~MT192765.1.p7"), | ||
path(process.out.cds[0][1] ).getText().contains("ID=GENE.MT192765.1~~MT192765.1.p7"), | ||
path(process.out.gff3[0][1]).getText().contains("ID=GENE.MT192765.1~~MT192765.1.p7"), | ||
path(process.out.pep[0][1] ).getText().contains("ID=GENE.MT192765.1~~MT192765.1.p7"), | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - uncompressed - stub") { | ||
|
||
options "-stub" | ||
|
||
setup { | ||
run("TRANSDECODER_LONGORF") { | ||
script "../../longorf/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[id: 'test'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
} | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
] | ||
input[1] = TRANSDECODER_LONGORF.out.folder | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
123 changes: 123 additions & 0 deletions
123
modules/nf-core/transdecoder/predict/tests/main.nf.test.snap
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,123 @@ | ||
{ | ||
"sarscov2 - uncompressed - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"genome.fasta.transdecoder.pep:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"genome.fasta.transdecoder.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"2": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"genome.fasta.transdecoder.cds:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"3": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"genome.fasta.transdecoder.bed:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"4": [ | ||
"versions.yml:md5,d68aca63cf424e1cc9f544b5b3aa9c99" | ||
], | ||
"bed": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"genome.fasta.transdecoder.bed:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"cds": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"genome.fasta.transdecoder.cds:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"gff3": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"genome.fasta.transdecoder.gff3:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"pep": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"genome.fasta.transdecoder.pep:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,d68aca63cf424e1cc9f544b5b3aa9c99" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-01-13T19:14:55.271439958" | ||
}, | ||
"sarscov2 - uncompressed": { | ||
"content": [ | ||
false, | ||
false, | ||
true, | ||
false, | ||
[ | ||
"versions.yml:md5,d68aca63cf424e1cc9f544b5b3aa9c99" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-01-14T17:04:13.113096174" | ||
}, | ||
"sarscov2 - compressed": { | ||
"content": [ | ||
false, | ||
false, | ||
true, | ||
false, | ||
[ | ||
"versions.yml:md5,d68aca63cf424e1cc9f544b5b3aa9c99" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-01-14T17:00:33.707348893" | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your Singularity image is still at version 5.5.0, causing the tests to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aah, thanks!