diff --git a/modules/umitools/dedup/main.nf b/modules/umitools/dedup/main.nf index 1e46a612..dfcbcf2f 100644 --- a/modules/umitools/dedup/main.nf +++ b/modules/umitools/dedup/main.nf @@ -11,8 +11,11 @@ process UMITOOLS_DEDUP { tuple val(meta), path(bam), path(bai) output: - tuple val(meta), path("*.bam"), emit: bam - path "versions.yml" , emit: versions + tuple val(meta), path("*.bam") , emit: bam + tuple val(meta), path("*edit_distance.tsv"), emit: tsv_edit_distance + tuple val(meta), path("*per_umi.tsv") , emit: tsv_per_umi + tuple val(meta), path("*per_position.tsv") , emit: tsv_umi_per_position + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -20,11 +23,13 @@ process UMITOOLS_DEDUP { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def paired = meta.single_end ? "" : "--paired" + def paired = meta.single_end ? "" : "--paired" """ - umi_tools dedup \\ + umi_tools \\ + dedup \\ -I $bam \\ -S ${prefix}.bam \\ + --output-stats $prefix \\ $paired \\ $args diff --git a/modules/umitools/dedup/meta.yml b/modules/umitools/dedup/meta.yml index 2038b40d..eee8952f 100644 --- a/modules/umitools/dedup/meta.yml +++ b/modules/umitools/dedup/meta.yml @@ -36,6 +36,18 @@ output: type: file description: BAM file with deduplicated UMIs. pattern: "*.{bam}" + - tsv_edit_distance: + type: file + description: Reports the (binned) average edit distance between the UMIs at each position. + pattern: "*edit_distance.tsv" + - tsv_per_umi: + type: file + description: UMI-level summary statistics. + pattern: "*per_umi.tsv" + - tsv_umi_per_position: + type: file + description: Tabulates the counts for unique combinations of UMI and position. + pattern: "*per_position.tsv" - versions: type: file description: File containing software versions