mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
luslab-umitools | Cleanup for submission
This commit is contained in:
parent
961d12275a
commit
58d345fe81
4 changed files with 18 additions and 29 deletions
|
@ -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
|
|
@ -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}
|
||||
"""
|
||||
}
|
|
@ -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 )
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue