forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
4451 add vcf2maf nf test (nf-core#4463)
* add nf-test case for vcf2maf without VEP * add VEP test case for vcf2maf nf-test * update linting for vcf2maf * fix prettier for vcf2maf * remove pytest files for vcf2maf * remove vcf2maf from pytest modules yml * add modules/nf-core/vcf2maf/tests/tags.yml * add line count to vcf2maf test * add line number and versions contents yaml to vcf2maf test * remove alternate container from vcf2maf testing and use the same container for testing with or without VEP * update modules/nf-core/vcf2maf/tests/main.nf.test * update modules/nf-core/vcf2maf/tests/main.nf.test * Update and fix tests * Apply suggestions from code review Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> * Add conda declaration to nf-test * Remove output in snapshot * Add versions to snapshot --------- Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com> Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com>
- Loading branch information
1 parent
a004c86
commit aa8c39b
Showing
11 changed files
with
247 additions
and
63 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
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,76 @@ | ||
nextflow_process { | ||
name "Test vcf2maf" | ||
process "VCF2MAF" | ||
script "../main.nf" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "vcf2maf" | ||
tag "untar" | ||
|
||
test("Run without VEP") { | ||
config "./nextflow.config" | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test'], // meta map | ||
file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/gvcf/test.genome.vcf", checkIfExists: true) | ||
] | ||
input[1] = [ file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/genome.fasta", checkIfExists: true) ] | ||
input[2] = [] | ||
""" | ||
} | ||
} | ||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
path(process.out.maf[0][1]).readLines()[5..131], | ||
process.out.versions | ||
).match() }, | ||
{ assert path(process.out.versions[0]).readLines() == ['"VCF2MAF":', ' vcf2maf: 1.6.21', ' ensemblvep: 106.1'] } | ||
) | ||
} | ||
} | ||
|
||
test("Run with VEP"){ | ||
tag "vcf2maf-withVEP" | ||
config "./nextflow.withVEP.config" | ||
|
||
setup { | ||
run("UNTAR") { | ||
script "../../../../modules/nf-core/untar/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test_genome_vep' ], | ||
file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/vep.tar.gz", checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
} | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test'], // meta map | ||
file(params.modules_testdata_base_path + "genomics/homo_sapiens/illumina/gvcf/test.genome.vcf", checkIfExists: true) | ||
] | ||
input[1] = [ file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/genome.fasta", checkIfExists: true) ] | ||
input[2] = UNTAR.out.untar.map { it[1] } | ||
""" | ||
} | ||
} | ||
|
||
then{ | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert path(process.out.maf[0][1]).readLines().size() == 2 }, // no variants, only header lines | ||
{ assert path(process.out.versions[0]).readLines() == ['"VCF2MAF":', ' vcf2maf: 1.6.21', ' ensemblvep: 106.1'] } | ||
) | ||
} | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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,11 @@ | ||
// config for running without VEP | ||
params.species = "homo_sapiens" | ||
params.build = "GRCh38" | ||
|
||
process { | ||
container = "biocontainers/vcf2maf:1.6.21--hdfd78af_0" | ||
conda = "bioconda::vcf2maf=1.6.21" | ||
withName: 'VCF2MAF' { | ||
ext.args = "--ncbi-build ${params.build} --species ${params.species} --inhibit-vep" | ||
} | ||
} |
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,9 @@ | ||
// config for running with VEP | ||
params.species = "homo_sapiens" | ||
params.build = "GRCh38" | ||
|
||
process { | ||
withName: 'VCF2MAF' { | ||
ext.args = "--ncbi-build ${params.build} --species ${params.species}" | ||
} | ||
} |
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 @@ | ||
vcf2maf: | ||
- modules/nf-core/vcf2maf/** |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.