mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
Update featurecounts module
This commit is contained in:
parent
473f1b192f
commit
46edf8ae4c
1 changed files with 13 additions and 5 deletions
|
@ -18,21 +18,29 @@ process SUBREAD_FEATURECOUNTS {
|
||||||
val options
|
val options
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*featureCounts.txt"), emit: txt
|
tuple val(meta), path("*featureCounts.txt") , emit: counts
|
||||||
tuple val(meta), path("*featureCounts.txt.summary"), emit: summary
|
tuple val(meta), path("*featureCounts.txt.summary"), emit: summary
|
||||||
path "*.version.txt", emit: version
|
path "*.version.txt" , emit: version
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def software = getSoftwareName(task.process)
|
def software = getSoftwareName(task.process)
|
||||||
def ioptions = initOptions(options)
|
def ioptions = initOptions(options)
|
||||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||||
def pe = meta.single_end ? '' : '-p'
|
|
||||||
|
def strandedness = 0
|
||||||
|
if (meta.strandedness == 'forward') {
|
||||||
|
strandedness = 1
|
||||||
|
} else if (meta.strandedness == 'reverse') {
|
||||||
|
strandedness = 2
|
||||||
|
}
|
||||||
|
def paired_end = meta.single_end ? '' : '-p'
|
||||||
"""
|
"""
|
||||||
featureCounts \\
|
featureCounts \\
|
||||||
$ioptions.args \\
|
$ioptions.args \\
|
||||||
$pe \\
|
$paired_end \\
|
||||||
-T $task.cpus \\
|
-T $task.cpus \\
|
||||||
-a $annotation \\
|
-a $annotation \\
|
||||||
|
-s $strandedness \\
|
||||||
-o ${prefix}.featureCounts.txt \\
|
-o ${prefix}.featureCounts.txt \\
|
||||||
${bams.join(' ')}
|
${bams.join(' ')}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue