mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-23 03:28:17 +00:00
f112e4d701
* New module added bamcmp Co-authored-by: Mahesh Binzer-Panchal <mahesh.binzer-panchal@nbis.se> Co-authored-by: Simon Pearce <simon.pearce@cruk.manchester.ac.uk>
35 lines
1,022 B
Text
35 lines
1,022 B
Text
def VERSION = '2.2'
|
|
process BAMCMP {
|
|
label 'process_low'
|
|
|
|
conda (params.enable_conda ? "bioconda::bamcmp=2.2" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/bamcmp:2.2--h05f6578_0' :
|
|
'quay.io/biocontainers/bamcmp:2.2--h05f6578_0' }"
|
|
|
|
input:
|
|
tuple val(meta), path(sample), path(contaminant)
|
|
|
|
output:
|
|
tuple val(meta), path("*primary.bam") , emit: bam
|
|
tuple val(meta), path("*contamination.bam"), emit: contamination_bam
|
|
path "versions.yml" , emit: versions
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
"""
|
|
bamcmp \\
|
|
-1 $sample \\
|
|
-2 $contaminant \\
|
|
-A ${prefix}_primary.bam \\
|
|
-B ${prefix}_contamination.bam \\
|
|
$args
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
bamcmp: $VERSION
|
|
END_VERSIONS
|
|
"""
|
|
|
|
}
|