mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
53 lines
2.1 KiB
Text
53 lines
2.1 KiB
Text
|
// Import generic module functions
|
||
|
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
||
|
|
||
|
params.options = [:]
|
||
|
options = initOptions(params.options)
|
||
|
|
||
|
process GSTAMA_COLLAPSE {
|
||
|
tag "$meta.id"
|
||
|
label 'process_medium'
|
||
|
publishDir "${params.outdir}",
|
||
|
mode: params.publish_dir_mode,
|
||
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
||
|
|
||
|
conda (params.enable_conda ? "bioconda::gs-tama=1.0.2" : null)
|
||
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
||
|
container "https://depot.galaxyproject.org/singularity/gs-tama:1.0.2--hdfd78af_0"
|
||
|
} else {
|
||
|
container "quay.io/biocontainers/gs-tama:1.0.2--hdfd78af_0"
|
||
|
}
|
||
|
|
||
|
input:
|
||
|
tuple val(meta), path(bam)
|
||
|
path fasta
|
||
|
|
||
|
output:
|
||
|
tuple val(meta), path("*.bed") , emit: bed
|
||
|
tuple val(meta), path("*_trans_read.bed") , emit: bed_trans_reads
|
||
|
tuple val(meta), path("*_local_density_error.txt"), emit: local_density_error
|
||
|
tuple val(meta), path("*_polya.txt") , emit: polya
|
||
|
tuple val(meta), path("*_read.txt") , emit: read
|
||
|
tuple val(meta), path("*_strand_check.txt") , emit: strand_check
|
||
|
tuple val(meta), path("*_trans_report.txt") , emit: trans_report
|
||
|
path "versions.yml" , emit: versions
|
||
|
|
||
|
tuple val(meta), path("*_varcov.txt") , emit: varcov , optional: true
|
||
|
tuple val(meta), path("*_variants.txt") , emit: variants, optional: true
|
||
|
|
||
|
script:
|
||
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
||
|
"""
|
||
|
tama_collapse.py \\
|
||
|
-s $bam \\
|
||
|
-f $fasta \\
|
||
|
-p ${prefix} \\
|
||
|
$options.args
|
||
|
|
||
|
cat <<-END_VERSIONS > versions.yml
|
||
|
${getProcessName(task.process)}:
|
||
|
${getSoftwareName(task.process)}: \$( tama_collapse.py -version | grep 'tc_version_date_'|sed 's/tc_version_date_//g' )
|
||
|
END_VERSIONS
|
||
|
"""
|
||
|
}
|