2020-09-10 15:45:11 +00:00
|
|
|
process PRESEQ_LCEXTRAP {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_medium'
|
|
|
|
label 'error_ignore'
|
|
|
|
|
2021-04-16 07:56:47 +00:00
|
|
|
conda (params.enable_conda ? "bioconda::preseq=3.1.2" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
2022-02-17 22:25:55 +00:00
|
|
|
'https://depot.galaxyproject.org/singularity/preseq:3.1.2--h445547b_2':
|
|
|
|
'quay.io/biocontainers/preseq:3.1.2--h445547b_2' }"
|
2020-12-17 23:50:24 +00:00
|
|
|
|
2020-09-10 15:45:11 +00:00
|
|
|
input:
|
|
|
|
tuple val(meta), path(bam)
|
2020-12-17 23:50:24 +00:00
|
|
|
|
2020-09-10 15:45:11 +00:00
|
|
|
output:
|
2022-02-17 21:34:26 +00:00
|
|
|
tuple val(meta), path("*.lc_extrap.txt"), emit: lc_extrap
|
|
|
|
tuple val(meta), path("*.log") , emit: log
|
|
|
|
path "versions.yml" , emit: versions
|
2020-09-10 15:45:11 +00:00
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2020-09-10 15:45:11 +00:00
|
|
|
script:
|
2021-11-26 07:58:40 +00:00
|
|
|
def args = task.ext.args ?: ''
|
2021-12-02 12:39:55 +00:00
|
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
2020-09-10 15:45:11 +00:00
|
|
|
def paired_end = meta.single_end ? '' : '-pe'
|
|
|
|
"""
|
|
|
|
preseq \\
|
|
|
|
lc_extrap \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args \\
|
2020-09-10 15:45:11 +00:00
|
|
|
$paired_end \\
|
2022-02-17 21:34:26 +00:00
|
|
|
-output ${prefix}.lc_extrap.txt \\
|
2020-09-10 15:45:11 +00:00
|
|
|
$bam
|
|
|
|
cp .command.err ${prefix}.command.log
|
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
preseq: \$(echo \$(preseq 2>&1) | sed 's/^.*Version: //; s/Usage:.*\$//')
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2020-09-10 15:45:11 +00:00
|
|
|
"""
|
|
|
|
}
|