2021-07-22 14:19:42 +00:00
|
|
|
process ARRIBA {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_medium'
|
|
|
|
|
2022-06-29 12:39:13 +00:00
|
|
|
conda (params.enable_conda ? "bioconda::arriba=2.3.0" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
2022-06-29 12:39:13 +00:00
|
|
|
'https://depot.galaxyproject.org/singularity/arriba:2.3.0--haa8aa89_0' :
|
|
|
|
'quay.io/biocontainers/arriba:2.3.0--haa8aa89_0' }"
|
2021-07-22 14:19:42 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
tuple val(meta), path(bam)
|
|
|
|
path fasta
|
|
|
|
path gtf
|
2022-05-09 12:54:52 +00:00
|
|
|
path blacklist
|
|
|
|
path known_fusions
|
|
|
|
path structural_variants
|
|
|
|
path tags
|
|
|
|
path protein_domains
|
2021-07-22 14:19:42 +00:00
|
|
|
|
|
|
|
output:
|
|
|
|
tuple val(meta), path("*.fusions.tsv") , emit: fusions
|
|
|
|
tuple val(meta), path("*.fusions.discarded.tsv"), emit: fusions_fail
|
2021-10-01 13:04:56 +00:00
|
|
|
path "versions.yml" , emit: versions
|
2021-07-22 14:19:42 +00:00
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-07-22 14:19:42 +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-05-09 12:54:52 +00:00
|
|
|
def blacklist = blacklist ? "-b $blacklist" : "-f blacklist"
|
|
|
|
def known_fusions = known_fusions ? "-k $known_fusions" : ""
|
|
|
|
def structural_variants = structural_variants ? "-d $structual_variants" : ""
|
|
|
|
def tags = tags ? "-t $tags" : ""
|
|
|
|
def protein_domains = protein_domains ? "-p $protein_domains" : ""
|
|
|
|
|
2021-07-22 14:19:42 +00:00
|
|
|
"""
|
|
|
|
arriba \\
|
|
|
|
-x $bam \\
|
|
|
|
-a $fasta \\
|
|
|
|
-g $gtf \\
|
|
|
|
-o ${prefix}.fusions.tsv \\
|
|
|
|
-O ${prefix}.fusions.discarded.tsv \\
|
|
|
|
$blacklist \\
|
2022-05-09 12:54:52 +00:00
|
|
|
$known_fusions \\
|
|
|
|
$structural_variants \\
|
|
|
|
$tags \\
|
|
|
|
$protein_domains \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args
|
2021-07-22 14:19:42 +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}":
|
|
|
|
arriba: \$(arriba -h | grep 'Version:' 2>&1 | sed 's/Version:\s//')
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-07-22 14:19:42 +00:00
|
|
|
"""
|
2022-05-09 12:54:52 +00:00
|
|
|
|
|
|
|
stub:
|
|
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
|
|
"""
|
|
|
|
echo stub > ${prefix}.fusions.tsv
|
|
|
|
echo stub > ${prefix}.fusions.discarded.tsv
|
|
|
|
|
|
|
|
echo "${task.process}:" > versions.yml
|
|
|
|
echo ' arriba: 2.2.1' >> versions.yml
|
|
|
|
"""
|
2021-07-22 14:19:42 +00:00
|
|
|
}
|