nf-core_modules/modules/msisensor2/scan/main.nf
Adam Talbot e7845e2472
1976 msisensor2 (#1977)
* msisensor2: Add msisensor2 module

* msisensor2/scan module added

* msisensor2 tests added

Changes:
 - tests added for msisensor2 from the msisensor2 github repo. No
 available tests from NF-Core test repo.

Relates to #1976

* msisensor2 slight bump in stuff

* msisensor2: Replaced spelling of 'tumour' with 'tumor'

* msisensor2: fix linting, testing and containers

Relates to #1976

Co-authored-by: Maxime U. Garcia <max.u.garcia@gmail.com>
2022-09-05 13:00:18 +02:00

36 lines
999 B
Text

process MSISENSOR2_SCAN {
tag '$fasta'
label 'process_medium'
conda (params.enable_conda ? "bioconda::msisensor2=0.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/msisensor2:0.1--hd03093a_0':
'quay.io/biocontainers/msisensor2:0.1--hd03093a_0' }"
input:
path fasta
val output
output:
path output_path , emit: scan
path "versions.yml", emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def inputs = fasta.collect{ "-d $it"}.join(" ")
output_path = output ?: "output.scan"
"""
msisensor2 scan \\
$args \\
$inputs \\
-o $output_path
cat <<-END_VERSIONS > versions.yml
"${task.process}":
msisensor2: \$(echo \$(msisensor2 2> >(grep Version) | sed 's/Version: v//g'))
END_VERSIONS
"""
}