luslab-umitools | Cleanup for submission

This commit is contained in:
Chris Cheshire 2020-06-19 15:55:45 +01:00
parent 961d12275a
commit 58d345fe81
4 changed files with 18 additions and 29 deletions

View file

@ -2,10 +2,6 @@
# conda env create -f environment.yml
name: nfcore-module-umitools
channels:
- conda-forge
- bioconda
- defaults
dependencies:
## bioconda packages, see above
- umi_tools=1.0.1

View file

@ -23,28 +23,25 @@ process umitools_dedup {
shell:
// Init
error_message = ""
args_exist = "false"
internal_prog = "umi_tools dedup "
internal_args = ""
internal_prog = "umi_tools dedup"
internal_args = "--log=${sample_id}.dedup.log"
// Check main args string exists and strip whitespace
if(params.umitools_dedup_args) {
internal_args = params.umitools_dedup_args
internal_args = internal_args.trim() + " --log=${sample_id}.dedup.log "
args_exist = "true"
ext_args = params.umitools_dedup_args
internal_args += " " + ext_args.trim()
}
else {
error_message = "params.umitools_dedup_args does not exist, please define to run this module."
// Contruct CL line
internal_cl = "${internal_prog} ${internal_args} -I $bam -S ${sample_id}.dedup.bam --output-stats=${sample_id}"
// Log
if (params.verbose){
println ("[MODULE] umi_tools/dedup exec: " + internal_cl)
}
//SHELL
"""
if ${args_exist}; then
${internal_prog}${internal_args}-I $bam -S ${sample_id}.dedup.bam --output-stats=${sample_id}
else
echo "${error_message}" 1>&2
exit 1
fi
${internal_cl}
"""
}

View file

@ -60,11 +60,6 @@ Channel
--------------------------------------------------------------------------------------*/
workflow {
// Logging
if (params.verbose){
println ("[MODULE] umi_tools/dedup ARGS: " + params.umitools_dedup_args)
}
// Run dedup
umitools_dedup ( ch_test_meta_bambai )

View file

@ -13,11 +13,12 @@ tools:
documentation: https://umi-tools.readthedocs.io/en/latest/
processes:
- dedup:
opperation: |
operation: |
Set command args to params.umitools_dedup_args
The program will execute with the following pattern: umi_tools dedeup ARGS -I $bam -S SAMPLE_ID.dedup.bam --output-stats=SAMPLE_ID
The program will execute with the following pattern:
umi_tools dedup --log={SAMPLE_ID}.dedup.log {params.umitools_dedup_args} -I {SAMPLE_ID}.bam -S {SAMPLE_ID}.dedup.bam --output-stats={SAMPLE_ID}
description: |
Groups PCR duplicates and deduplicates reads to yield one read per group.
Groups PCR duplicates and de-duplicates reads to yield one read per group.
Use this when you want to remove the PCR duplicates prior to any downstream analysis.
input:
- sample_id:
@ -33,10 +34,10 @@ processes:
- dedupBam:
type: tuple
description: A tuple of samples id and output bam file
pattern: *SAMPLE_ID.dedup.bam
pattern: [sample_id, *SAMPLE_ID.dedup.bam]
- report:
type: file
description: Log file for the umi_tools opperation
description: Log file for the umi_tools operation
pattern: *SAMPLE_ID.dedup.log
authors:
- @candiceh08