8000 Added module for msisensorpro/pro by Tuur-ds · Pull Request #8529 · nf-core/modules · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added module for msisensorpro/pro #8529

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 10 commits into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/nf-core/msisensorpro/pro/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::msisensor-pro=1.3.0
55 changes: 55 additions & 0 deletions modules/nf-core/msisensorpro/pro/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
process MSISENSORPRO_PRO {
tag "$meta.id"
label 'process_low'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/msisensor-pro%3A1.3.0--hfef96ef_0':
'biocontainers/msisensor-pro:1.3.0--hfef96ef_0' }"

input:
tuple val(meta), path(input), path(index)
tuple val(meta2), path(list)
tuple val(meta3), path(fasta)
tuple val(meta4), path(fai)

output:
tuple val(meta), path("${prefix}") , emit: summary_msi
tuple val(meta), path("${prefix}_all") , emit: all_msi
tuple val(meta), path("${prefix}_dis") , emit: dis_msi
tuple val(meta), path("${prefix}_unstable") , emit: unstable_msi
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
"""
msisensor-pro \\
pro \\
-d $list \\
-t $input \\
-g $fasta \\
-o ${prefix} \\
-b $task.cpus \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
msisensor-pro: \$(msisensor-pro 2>&1 | sed -nE 's/Version:\\s*//p')
END_VERSIONS
"""

stub:
prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix} ${prefix}_all ${prefix}_dis ${prefix}_unstable

cat <<-END_VERSIONS > versions.yml
"${task.process}":
10000 msisensor-pro: \$(msisensor-pro 2>&1 | sed -nE 's/Version:\\s*//p')
END_VERSIONS
"""
}
106 changes: 106 additions & 0 deletions modules/nf-core/msisensorpro/pro/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
name: "msisensorpro_pro"
description: MSIsensor-pro/pro is a tool used to evaluate MSI using single (tumor) sample
sequencing data
keywords:
- msisensor-pro
- pro
- micro-satellite
tools:
- msisensorpro:
description: Microsatellite Instability (MSI) detection using high-throughput
sequencing data.
homepage: https://github.com/xjtu-omics/msisensor-pro
documentation: https://github.com/xjtu-omics/msisensor-pro/wiki
tool_dev_url: https://github.com/xjtu-omics/msisensor-pro
doi: "10.1016/j.gpb.2020.02.001"
licence: ["Custom Licence"]
identifier: ""

input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- input:
type: file
description: sorted BAM/CRAM file
pattern: "*.{bam,cram}"
- index:
type: file
description: index file for input
pattern: "*.{bai,crai}"
- - meta2:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- list:
type: file
description: micro-satellite list
Comment on lines +39 to +41
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add "*.list" as pattern here?

pattern: "*.{list}"
- - meta3:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- fasta:
type: file
description: reference genome used to create micro-satellite list
pattern: "*.{fasta}"
- - meta4:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- fai:
type: file
description: index file for reference fasta
pattern: "*.{fai}"
output:
- summary_msi:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- ${prefix}:
type: file
description: txt file containing summary of results
- all_msi:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- ${prefix}_all:
type: file
description: txt file containing all results
- dis_msi:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- ${prefix}_dis:
type: file
description: txt file containing the allele length distribution
- unstable_msi:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', single_end:false ]`
- ${prefix}_unstable:
type: file
description: txt file containing unstable micro-satellite sites
- versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@Tuur-ds"
maintainers:
- "@Tuur-ds"
91 changes: 91 additions & 0 deletions modules/nf-core/msisensorpro/pro/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
// TODO nf-core: Once you have added the required tests, please run the following command to build this file:
// nf-core modules test msisensorpro/pro
nextflow_process {

name "Test Process MSISENSORPRO_PRO"
script "../main.nf"
process "MSISENSORPRO_PRO"

tag "modules"
tag "modules_nfcore"
tag "msisensorpro"
tag "msisensorpro/pro"
tag "msisensorpro/scan"

test("testdata - [test, input, index], list, fasta") {
setup {
run("MSISENSORPRO_SCAN") {
script "../../scan/main.nf"
process {
"""
input[0] = [ [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) ]
"""
}
}
}
when {
process {
"""
input[0] = [
[ id:'test_bam' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam.bai', checkIfExists: true)
]
input[1] = MSISENSORPRO_SCAN.out.list
input[2] = [ [ id:'test_fasta' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) ]
input[3] = [ [ id:'test_fai' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) ]

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}

}

test("testdata - [test, input], list, fasta - stub") {

options "-stub"

setup {
run("MSISENSORPRO_SCAN") {
script "../../scan/main.nf"
process {
"""
input[0] = [ [ id:'test' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) ]
"""
}
}
}

when {
process {
"""
input[0] = [
[ id:'test_bam' ], // meta map
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam.bai', checkIfExists: true)
]
input[1] = MSISENSORPRO_SCAN.out.list
input[2] = [ [ id:'test_fasta' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta', checkIfExists: true) ]
input[3] = [ [ id:'test_fai' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/chr21/sequence/genome.fasta.fai', checkIfExists: true) ]

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}

}

}
Loading
Loading
0