-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* start work on muse/call * correct command and add snap * prettier * exclude conda * change to bioconda * update snap * add conda test * update meta * change process label * add indices and update meta * update containers and version extraction
- Loading branch information
Showing
6 changed files
with
269 additions
and
0 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::muse=2.1.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
process MUSE_CALL { | ||
tag "$meta.id" | ||
label 'process_medium' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/9f/9f0ebb574ef5eed2a6e034f1b2feea6c252d1ab0c8bc5135a669059aa1f4d2ca/data': | ||
'community.wave.seqera.io/library/muse:6637291dcbb0bdb8' }" | ||
|
||
input: | ||
tuple val(meta), path(tumor_bam), path(tumor_bai), path(normal_bam), path(normal_bai) | ||
tuple val(meta2), path(reference) | ||
|
||
output: | ||
tuple val(meta), path("*.MuSE.txt"), emit: txt | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
MuSE \\ | ||
call \\ | ||
$args \\ | ||
-f $reference \\ | ||
-O ${prefix} \\ | ||
-n $task.cpus \\ | ||
$tumor_bam \\ | ||
$normal_bam | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
MuSE: \$( MuSE --version | sed -e "s/MuSE, version //g" ) | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
touch ${prefix}.MuSE.txt | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
MuSE: \$( MuSE --version | sed -e "s/MuSE, version //g" ) | ||
END_VERSIONS | ||
""" | ||
} |
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,72 @@ | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "muse_call" | ||
description: pre-filtering and calculating position-specific summary statistics using | ||
the Markov substitution model | ||
keywords: | ||
- variant calling | ||
- somatic | ||
- wgs | ||
- wxs | ||
- vcf | ||
tools: | ||
- "MuSE": | ||
description: "Somatic point mutation caller based on Markov substitution model | ||
for molecular evolution" | ||
homepage: "https://bioinformatics.mdanderson.org/public-software/muse/" | ||
documentation: "https://github.com/wwylab/MuSE" | ||
tool_dev_url: "https://github.com/wwylab/MuSE" | ||
doi: "10.1101/gr.278456.123" | ||
licence: ["https://github.com/danielfan/MuSE/blob/master/LICENSE"] | ||
identifier: "" | ||
|
||
input: | ||
- - meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1' ]` | ||
- tumor_bam: | ||
type: file | ||
description: Sorted tumor BAM file | ||
pattern: "*.bam" | ||
- tumor_bai: | ||
type: file | ||
description: Index file for the tumor BAM file | ||
pattern: "*.bai" | ||
- normal_bam: | ||
type: file | ||
description: Sorted matched normal BAM file | ||
pattern: "*.bam" | ||
- normal_bai: | ||
type: file | ||
description: Index file for the normal BAM file | ||
pattern: "*.bai" | ||
- - meta2: | ||
type: map | ||
description: | | ||
Groovy Map containing reference information. | ||
e.g. `[ id:'test' ]` | ||
- reference: | ||
type: file | ||
description: reference genome file | ||
pattern: ".fasta" | ||
output: | ||
- txt: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1' ]` | ||
- "*.MuSE.txt": | ||
type: file | ||
description: position-specific summary statistics | ||
pattern: "*.MuSE.txt" | ||
- versions: | ||
- versions.yml: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
authors: | ||
- "@famosab" | ||
maintainers: | ||
- "@famosab" |
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,72 @@ | ||
nextflow_process { | ||
|
||
name "Test Process MUSE_CALL" | ||
script "../main.nf" | ||
process "MUSE_CALL" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "muse" | ||
tag "muse/call" | ||
|
||
test("human - bam") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true) | ||
] | ||
input[1] = [ | ||
[ id:'reference' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("human - bam - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test2.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.recalibrated.sorted.bam.bai', checkIfExists: true) | ||
] | ||
input[1] = [ | ||
[ id:'reference' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
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,68 @@ | ||
{ | ||
"human - bam - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.MuSE.txt:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,de7c8f535f5b17473ed6aab68f1d70c1" | ||
], | ||
"txt": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.MuSE.txt:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,de7c8f535f5b17473ed6aab68f1d70c1" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.0" | ||
}, | ||
"timestamp": "2024-11-29T14:30:48.292828" | ||
}, | ||
"human - bam": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.MuSE.txt:md5,3a38ee9131a217cc56199bd4a6b18e1d" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,de7c8f535f5b17473ed6aab68f1d70c1" | ||
], | ||
"txt": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
"test.MuSE.txt:md5,3a38ee9131a217cc56199bd4a6b18e1d" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,de7c8f535f5b17473ed6aab68f1d70c1" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.0" | ||
}, | ||
"timestamp": "2024-11-29T14:30:32.522553" | ||
} | ||
} |
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 @@ | ||
muse/call: | ||
- "modules/nf-core/muse/call/**" |