fix: update samtools_merge (#582)

* fix: update samtools_merge

* Update modules/samtools/merge/main.nf

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
Maxime U. Garcia 2021-07-16 14:32:17 +02:00 committed by GitHub
parent 65ab646870
commit adfb8a3d65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -22,14 +22,14 @@ process SAMTOOLS_MERGE {
tuple val(meta), path(bams)
output:
tuple val(meta), path("*merged.bam"), emit: merged_bam
path "*.version.txt" , emit: version
tuple val(meta), path("${prefix}.bam"), emit: bam
path "*.version.txt" , emit: version
script:
def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
samtools merge ${prefix}_merged.bam $bams
samtools merge ${prefix}.bam $bams
echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//' > ${software}.version.txt
"""
}

View file

@ -2,7 +2,7 @@
nextflow.enable.dsl = 2
include { SAMTOOLS_MERGE } from '../../../../modules/samtools/merge/main.nf' addParams( options: [:] )
include { SAMTOOLS_MERGE } from '../../../../modules/samtools/merge/main.nf' addParams( options: [suffix:'_merged'] )
workflow test_samtools_merge {
input = [ [ id: 'test' ], // meta map