-
Notifications
You must be signed in to change notification settings - Fork 1k
Migrate BAMTOOLS/CONVERT to nf-test
#7958
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c7dca3f
Migrate to nf-test
LouisLeNezet f70e649
Update modules/nf-core/bamtools/convert/main.nf
LouisLeNezet 0fb9587
Update modules/nf-core/bamtools/convert/tests/main.nf.test
LouisLeNezet cce7415
Update modules/nf-core/bamtools/convert/tests/main.nf.test
LouisLeNezet f2c04fa
Update modules/nf-core/bamtools/convert/tests/main.nf.test
LouisLeNezet 7bd9459
Update variable names
LouisLeNezet 019ea1e
Fix spacing
LouisLeNezet 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 hidden or 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 hidden or 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,233 @@ | ||
| nextflow_process { | ||
|
|
||
| name "Test Process BAMTOOLS_CONVERT" | ||
| config "./nextflow.config" | ||
| script "../main.nf" | ||
| process "BAMTOOLS_CONVERT" | ||
|
|
||
| tag "modules" | ||
| tag "modules_nfcore" | ||
| tag "bamtools" | ||
| tag "bamtools/convert" | ||
|
|
||
| test("test_bamtools_convert_ext_error") { | ||
| when { | ||
| params { | ||
| module_args = "-format vcf" | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [id:'test', single_end:false], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists:true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.failed }, | ||
| { assert process.errorReport.contains("-format option must be provided in args. Possible values: bed fasta fastq json pileup sam yaml") } | ||
| ) | ||
| } | ||
| } | ||
| test("test_bamtools_convert_noext_error") { | ||
| when { | ||
| params { | ||
| module_args = "" | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [id:'test', single_end:false], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists:true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.failed }, | ||
| { assert process.errorReport.contains("-format option must be provided in args. Possible values: bed fasta fastq json pileup sam yaml") } | ||
| ) | ||
| } | ||
| } | ||
| test("test_bamtools_convert_bed") { | ||
| when { | ||
| params { | ||
| module_args = "-format bed" | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [id:'test', single_end:false], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists:true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
| } | ||
| test("test_bamtools_convert_fasta") { | ||
| when { | ||
| params { | ||
| module_args = "-format fasta" | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [id:'test', single_end:false], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists:true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
| } | ||
| test("test_bamtools_convert_fastq") { | ||
| when { | ||
| params { | ||
| module_args = "-format fastq" | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [id:'test', single_end:false], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists:true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
| } | ||
| test("test_bamtools_convert_json") { | ||
|
|
||
|
|
||
| when { | ||
| params { | ||
| module_args = "-format json" | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [id:'test', single_end:false], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists:true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
| } | ||
| test("test_bamtools_convert_pileup") { | ||
|
|
||
|
|
||
| when { | ||
| params { | ||
| module_args = "-format pileup" | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [id:'test', single_end:false], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists:true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
| } | ||
| test("test_bamtools_convert_sam") { | ||
|
|
||
|
|
||
| when { | ||
| params { | ||
| module_args = "-format sam" | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [id:'test', single_end:false], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists:true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
| } | ||
| test("test_bamtools_convert_yaml") { | ||
| when { | ||
| params { | ||
| module_args = "-format yaml" | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [id:'test', single_end:false], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists:true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| test("test_bamtools_convert_yaml - stub") { | ||
| when { | ||
| params { | ||
| module_args = "-format yaml" | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ | ||
| [id:'test', single_end:false], | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists:true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot( | ||
| process.out, | ||
| process.out.versions.collect{path(it).yaml} | ||
| ).match() } | ||
| ) | ||
| } | ||
| } | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.