From 2ade120249b92e382f964bd75701befa2c2dc75d Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Fri, 16 Jul 2021 14:21:08 +0100 Subject: [PATCH] Add --paired flag to umitools dedup and bump to 1.1.2 (#583) * Add --paired flag to umitools dedup and bump to 1.1.2 * paired not paired_end * Fix ECLint --- modules/umitools/dedup/main.nf | 14 +++++++------- modules/umitools/extract/main.nf | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/umitools/dedup/main.nf b/modules/umitools/dedup/main.nf index 93ea6d45..f30ab164 100644 --- a/modules/umitools/dedup/main.nf +++ b/modules/umitools/dedup/main.nf @@ -11,11 +11,11 @@ process UMITOOLS_DEDUP { 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::umi_tools=1.1.1" : null) + conda (params.enable_conda ? "bioconda::umi_tools=1.1.2" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/umi_tools:1.1.1--py38h0213d0e_1" + container "https://depot.galaxyproject.org/singularity/umi_tools:1.1.2--py38h4a8c8d9_0" } else { - container "quay.io/biocontainers/umi_tools:1.1.1--py38h0213d0e_1" + container "quay.io/biocontainers/umi_tools:1.1.2--py38h4a8c8d9_0" } input: @@ -23,19 +23,19 @@ process UMITOOLS_DEDUP { output: tuple val(meta), path("*.bam"), emit: bam - tuple val(meta), path("*.tsv"), emit: tsv path "*.version.txt" , emit: version script: def software = getSoftwareName(task.process) def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" + def paired = meta.single_end ? "" : "--paired" """ umi_tools dedup \\ -I $bam \\ -S ${prefix}.bam \\ - --output-stats=$prefix \\ - $options.args \\ + $paired \\ + $options.args - umi_tools --version | sed -e "s/UMI-tools version: //g" > ${software}.version.txt + echo \$(umi_tools --version 2>&1) | sed 's/^.*UMI-tools version://; s/ *\$//' > ${software}.version.txt """ } diff --git a/modules/umitools/extract/main.nf b/modules/umitools/extract/main.nf index 581f41c3..e5c4e21c 100644 --- a/modules/umitools/extract/main.nf +++ b/modules/umitools/extract/main.nf @@ -11,11 +11,11 @@ process UMITOOLS_EXTRACT { 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::umi_tools=1.1.1" : null) + conda (params.enable_conda ? "bioconda::umi_tools=1.1.2" : null) if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/umi_tools:1.1.1--py38h0213d0e_1" + container "https://depot.galaxyproject.org/singularity/umi_tools:1.1.2--py38h4a8c8d9_0" } else { - container "quay.io/biocontainers/umi_tools:1.1.1--py38h0213d0e_1" + container "quay.io/biocontainers/umi_tools:1.1.2--py38h4a8c8d9_0" } input: @@ -38,7 +38,7 @@ process UMITOOLS_EXTRACT { $options.args \\ > ${prefix}.umi_extract.log - umi_tools --version | sed -e "s/UMI-tools version: //g" > ${software}.version.txt + echo \$(umi_tools --version 2>&1) | sed 's/^.*UMI-tools version://; s/ *\$//' > ${software}.version.txt """ } else { """ @@ -51,7 +51,7 @@ process UMITOOLS_EXTRACT { $options.args \\ > ${prefix}.umi_extract.log - umi_tools --version | sed -e "s/UMI-tools version: //g" > ${software}.version.txt + echo \$(umi_tools --version 2>&1) | sed 's/^.*UMI-tools version://; s/ *\$//' > ${software}.version.txt """ } }