From bf91f9dd9b62c98175d962bd51dbe2d0b7f91d4c Mon Sep 17 00:00:00 2001 From: Annick Renevey <47788523+rannick@users.noreply.github.com> Date: Mon, 9 May 2022 14:54:52 +0200 Subject: [PATCH] update arriba module --- modules/arriba/main.nf | 32 ++++++++++++++++++++++++++++---- modules/arriba/meta.yml | 22 +++++++++++++++++++++- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/modules/arriba/main.nf b/modules/arriba/main.nf index e0d30b45..b7883acd 100644 --- a/modules/arriba/main.nf +++ b/modules/arriba/main.nf @@ -2,15 +2,20 @@ process ARRIBA { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::arriba=2.1.0" : null) + conda (params.enable_conda ? "bioconda::arriba=2.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/arriba:2.1.0--h3198e80_1' : - 'quay.io/biocontainers/arriba:2.1.0--h3198e80_1' }" + 'https://depot.galaxyproject.org/singularity/arriba:2.2.1--hecb563c_2' : + 'quay.io/biocontainers/arriba:2.2.1--hecb563c_2' }" input: tuple val(meta), path(bam) path fasta path gtf + path blacklist + path known_fusions + path structural_variants + path tags + path protein_domains output: tuple val(meta), path("*.fusions.tsv") , emit: fusions @@ -23,7 +28,12 @@ process ARRIBA { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def blacklist = (args.contains('-b')) ? '' : '-f blacklist' + 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" : "" + """ arriba \\ -x $bam \\ @@ -32,6 +42,10 @@ process ARRIBA { -o ${prefix}.fusions.tsv \\ -O ${prefix}.fusions.discarded.tsv \\ $blacklist \\ + $known_fusions \\ + $structural_variants \\ + $tags \\ + $protein_domains \\ $args cat <<-END_VERSIONS > versions.yml @@ -39,4 +53,14 @@ process ARRIBA { arriba: \$(arriba -h | grep 'Version:' 2>&1 | sed 's/Version:\s//') END_VERSIONS """ + + 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 + """ } diff --git a/modules/arriba/meta.yml b/modules/arriba/meta.yml index 4bde2f08..119dd912 100644 --- a/modules/arriba/meta.yml +++ b/modules/arriba/meta.yml @@ -30,6 +30,26 @@ input: type: file description: Annotation GTF file pattern: "*.{gtf}" + - blacklist: + type: file + description: Blacklist file + pattern: "*.{tsv}" + - known_fusions: + type: file + description: Known fusions file + pattern: "*.{tsv}" + - structural_variants: + type: file + description: Structural variants file + pattern: "*.{tsv}" + - tags: + type: file + description: Tags file + pattern: "*.{tsv}" + - protein_domains: + type: file + description: Protein domains file + pattern: "*.{gff3}" output: - meta: @@ -51,4 +71,4 @@ output: pattern: "*.{fusions.discarded.tsv}" authors: - - "@praveenraj2018" + - "@praveenraj2018,@rannick"