Update featurecounts module

This commit is contained in:
drpatelh 2020-09-10 16:07:21 +01:00
parent 473f1b192f
commit 46edf8ae4c

View file

@ -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(' ')}