mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
luslab-umitools | Renamed umi-tools.nf to dedup.nf
This commit is contained in:
parent
ff243acf63
commit
ab2d819df3
2 changed files with 37 additions and 0 deletions
37
tools/umi_tools/dedup/dedup.nf
Normal file
37
tools/umi_tools/dedup/dedup.nf
Normal file
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
// Include NfUtils
|
||||
Class groovyClass = new GroovyClassLoader(getClass().getClassLoader()).parseClass(new File(params.classpath));
|
||||
GroovyObject nfUtils = (GroovyObject) groovyClass.newInstance();
|
||||
|
||||
// Define internal params
|
||||
module_name = 'umitools'
|
||||
|
||||
// Specify DSL2
|
||||
nextflow.preview.dsl = 2
|
||||
|
||||
// Local default params
|
||||
params.internal_outdir = params.outdir
|
||||
params.internal_process_name = 'umitools'
|
||||
|
||||
// Check for internal parameter overrides
|
||||
nfUtils.check_internal_overrides(module_name, params)
|
||||
|
||||
// dedup reusable component
|
||||
process umi_tools {
|
||||
publishDir "${params.internal_outdir}/${params.internal_process_name}",
|
||||
mode: "copy", overwrite: true
|
||||
|
||||
input:
|
||||
tuple val(sample_id), path(bai), path(bam)
|
||||
|
||||
output:
|
||||
tuple val(sample_id), path(bam), emit: dedupBam
|
||||
|
||||
script:
|
||||
"""
|
||||
fileName=`basename $bam`
|
||||
sampleName="\${fileName%.Aligned.sortedByCoord.out.bam}"
|
||||
umi_tools dedup --umi-separator=":" -I $bam -S \${sampleName}.dedup.bam --output-stats=\${sampleName}
|
||||
"""
|
||||
}
|
Loading…
Reference in a new issue