2021-02-24 14:59:10 +00:00
|
|
|
process TIDDIT_SV {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_medium'
|
|
|
|
|
|
|
|
conda (params.enable_conda ? "bioconda::tiddit=2.12.1" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
|
'https://depot.galaxyproject.org/singularity/tiddit:2.12.1--py38h1773678_0' :
|
|
|
|
'quay.io/biocontainers/tiddit:2.12.1--py38h1773678_0' }"
|
2021-02-24 14:59:10 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
tuple val(meta), path(bam)
|
2021-07-01 15:13:01 +00:00
|
|
|
path fasta
|
|
|
|
path fai
|
2021-02-24 14:59:10 +00:00
|
|
|
|
|
|
|
output:
|
2021-07-01 15:13:01 +00:00
|
|
|
tuple val(meta), path("*.vcf") , emit: vcf
|
|
|
|
tuple val(meta), path("*.ploidy.tab") , emit: ploidy
|
2021-02-24 14:59:10 +00:00
|
|
|
tuple val(meta), path("*.signals.tab"), emit: signals
|
2021-10-01 13:04:56 +00:00
|
|
|
path "versions.yml" , emit: versions
|
2021-02-24 14:59:10 +00:00
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-02-24 14:59:10 +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}"
|
2022-04-28 12:06:38 +00:00
|
|
|
def reference = fasta ? "--ref $fasta" : ""
|
2021-02-24 14:59:10 +00:00
|
|
|
"""
|
|
|
|
tiddit \\
|
2021-09-28 13:37:47 +00:00
|
|
|
--sv \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args \\
|
2021-02-24 14:59:10 +00:00
|
|
|
--bam $bam \\
|
|
|
|
$reference \\
|
2021-07-01 15:13:01 +00:00
|
|
|
-o $prefix
|
2021-02-24 14:59:10 +00:00
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//')
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-02-24 14:59:10 +00:00
|
|
|
"""
|
2022-03-28 15:48:39 +00:00
|
|
|
|
|
|
|
stub:
|
|
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
|
|
"""
|
2022-03-30 18:21:06 +00:00
|
|
|
touch ${prefix}.vcf
|
|
|
|
touch ${prefix}.ploidy.tab
|
|
|
|
touch ${prefix}.signals.tab
|
2022-03-28 15:48:39 +00:00
|
|
|
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
|
|
"${task.process}":
|
|
|
|
tiddit: \$(echo \$(tiddit 2>&1) | sed 's/^.*TIDDIT-//; s/ .*\$//')
|
|
|
|
END_VERSIONS
|
|
|
|
"""
|
2021-02-24 14:59:10 +00:00
|
|
|
}
|