luslab-umitools | Added index output from module

This commit is contained in:
Chris Cheshire 2020-06-26 09:04:15 +01:00
parent 3e26c218c2
commit afb1adebb6
3 changed files with 9 additions and 9 deletions

View file

@ -7,3 +7,4 @@ channels:
- defaults
dependencies:
- umi_tools=1.0.1
- samtools=1.1.0

View file

@ -17,7 +17,8 @@ process umitools_dedup {
tuple val(sample_id), path(bam)
output:
tuple val(sample_id), path("*.dedup.bam"), emit: dedupBam
tuple val(sample_id), path("${sample_id}.dedup.bam"), emit: dedupBam
tuple val(sample_id), path("${sample_id}.dedup.bam.bai"), emit: dedupBai
path "*.dedup.log", emit: report
script:
@ -32,15 +33,16 @@ process umitools_dedup {
}
// Contruct CL line
command = "umi_tools dedup ${args} -I ${bam[0]} -S ${sample_id}.dedup.bam --output-stats=${sample_id}"
dedup_command = "umi_tools dedup ${args} -I ${bam[0]} -S ${sample_id}.dedup.bam --output-stats=${sample_id}"
// Log
if (params.verbose){
println ("[MODULE] umi_tools/dedup exec: " + command)
println ("[MODULE] umi_tools/dedup command: " + dedup_command)
}
//SHELL
"""
${command}
${dedup_command}
samtools index ${sample_id}.dedup.bam
"""
}

View file

@ -24,12 +24,9 @@ processes:
- sample_id:
type: string
description: Sample identifier
- bai:
type: file
description: BAM file index
- bam:
type: file
description: BAM sequence file
type: file array
description: BAM sequence file and associated BAI index file
output:
- dedupBam:
type: tuple