-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gridss environment files / port to nf-test (#5932)
* add env files * modify meta * update names and port to nf-test * remove pytest * update tests and meta, remove obsolete folders * prettier * just test filenames * update tests * Update nftest * Working gridss/somaticfilter * Update snapshot * Simplify nf-test code --------- Co-authored-by: Maxime U Garcia <[email protected]> Co-authored-by: Simon Pearce <[email protected]>
- Loading branch information
1 parent
e9b59c8
commit 1f2b32d
Showing
24 changed files
with
493 additions
and
210 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::gridss=2.13.2 |
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
107 changes: 107 additions & 0 deletions
107
modules/nf-core/gridss/generateponbedpe/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,107 @@ | ||
nextflow_process { | ||
|
||
name "Test Process GRIDSS_GENERATEPONBEDPE" | ||
script "../main.nf" | ||
process "GRIDSS_GENERATEPONBEDPE" | ||
config "./nextflow.config" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "gridss" | ||
tag "gridss/generateponbedpe" | ||
tag "gridss/gridss" | ||
tag "bwa/index" | ||
|
||
setup { | ||
|
||
run("BWA_INDEX") { | ||
script "../../../bwa/index/main.nf" | ||
process { | ||
""" | ||
input[0] = [ [id:'fasta'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
run("GRIDSS_GRIDSS") { | ||
script "../../../gridss/gridss/main.nf" | ||
process { | ||
""" | ||
input[0] = [ [ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), //inputs | ||
[] //assembly | ||
] | ||
input[1] = [ [id:'fasta'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [ [id:'fasta_fai'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) | ||
] | ||
input[3] = BWA_INDEX.out.index | ||
""" | ||
} | ||
} | ||
|
||
} | ||
|
||
test("human - vcf") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = GRIDSS_GRIDSS.out.vcf.map{ it -> tuple( it[0], it[1], [], [] ) } | ||
input[1] = [ [id:'fasta'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [ [id:'fasta_fai'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) | ||
] | ||
input[3] = BWA_INDEX.out.index | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.versions, | ||
file(process.out.bed.get(0).get(1)).name, | ||
file(process.out.bedpe.get(0).get(1)).name | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("human - vcf - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = GRIDSS_GRIDSS.out.vcf.map{ it -> tuple( it[0], it[1], [], [] ) } | ||
input[1] = [ [id:'fasta'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [ [id:'fasta_fai'], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) | ||
] | ||
input[3] = BWA_INDEX.out.index | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
65 changes: 65 additions & 0 deletions
65
modules/nf-core/gridss/generateponbedpe/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,65 @@ | ||
{ | ||
"human - vcf": { | ||
"content": [ | ||
[ | ||
"versions.yml:md5,645a222948827e5376957f8b60fc2a05" | ||
], | ||
"test.bed", | ||
"test.bedpe" | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-02T10:51:47.865144" | ||
}, | ||
"human - vcf - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.bedpe:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.bed:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"2": [ | ||
"versions.yml:md5,645a222948827e5376957f8b60fc2a05" | ||
], | ||
"bed": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.bed:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"bedpe": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.bedpe:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,645a222948827e5376957f8b60fc2a05" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-01-09T16:56:29.984471332" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
modules/nf-core/gridss/generateponbedpe/tests/nextflow.config
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,8 @@ | ||
process { | ||
withName: BWA_INDEX { | ||
ext.prefix = 'genome.fasta' | ||
} | ||
withName: GRIDSS_GENERATEPONBEDPE { | ||
ext.args = 'NORMAL_ORDINAL=1 MIN_BREAKPOINT_QUAL=10' | ||
} | ||
} |
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,2 @@ | ||
gridss/generateponbedpe: | ||
- "modules/nf-core/gridss/generateponbedpe/**" |
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
Oops, something went wrong.