Skip to content
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

Add module muse/call #5630

Merged
merged 14 commits into from
Nov 29, 2024
5 changes: 5 additions & 0 deletions modules/nf-core/muse/call/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::muse=2.1.2"
52 changes: 52 additions & 0 deletions modules/nf-core/muse/call/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
process MUSE_CALL {
tag "$meta.id"
label 'process_medium'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'oras://community.wave.seqera.io/library/muse:2.1.2--f6ec9e78771509ff':
'community.wave.seqera.io/library/muse:2.1.2--e8279641c6ef8c63' }"

input:
tuple val(meta), path(tumor_bam), path(normal_bam)
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}"
def VERSION = '2.1.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
MuSE \\
call \\
$args \\
-f $reference \\
-O ${prefix} \\
-n $task.cpus \\
$tumor_bam \\
$normal_bam

cat <<-END_VERSIONS > versions.yml
"${task.process}":
MuSE: ${VERSION}
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '2.1.2' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
touch ${prefix}.MuSE.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
MuSE: ${VERSION}
END_VERSIONS
"""
}
64 changes: 64 additions & 0 deletions modules/nf-core/muse/call/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# 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:
SPPearce marked this conversation as resolved.
Show resolved Hide resolved
type: file
description: Sorted tumor BAM file
pattern: "*.bam"
- normal_bam:
type: file
description: Sorted matched normal BAM file
pattern: "*.bam"
- - meta2:
type: map
description: |
Groovy Map containing reference information.
e.g. `[ id:'test' ]`
- reference:
type: file
description: faidx indexed reference genome file
famosab marked this conversation as resolved.
Show resolved Hide resolved
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"
68 changes: 68 additions & 0 deletions modules/nf-core/muse/call/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
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/test.paired_end.recalibrated.sorted.bam', 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/test.paired_end.recalibrated.sorted.bam', 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() }
)
}

}

}
68 changes: 68 additions & 0 deletions modules/nf-core/muse/call/tests/main.nf.test.snap
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,182c20f31394d1d406428dab96ec3b3e"
],
"txt": [
[
{
"id": "test"
},
"test.MuSE.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,182c20f31394d1d406428dab96ec3b3e"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.0"
},
"timestamp": "2024-11-15T10:51:43.352355237"
},
"human - bam": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.MuSE.txt:md5,639e250d6b7621286c1563b9244f2645"
]
],
"1": [
"versions.yml:md5,182c20f31394d1d406428dab96ec3b3e"
],
"txt": [
[
{
"id": "test"
},
"test.MuSE.txt:md5,639e250d6b7621286c1563b9244f2645"
]
],
"versions": [
"versions.yml:md5,182c20f31394d1d406428dab96ec3b3e"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.0"
},
"timestamp": "2024-11-15T10:51:35.004030902"
}
}
2 changes: 2 additions & 0 deletions modules/nf-core/muse/call/tests/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
muse/call:
- "modules/nf-core/muse/call/**"
Loading