Update Salmon quant to use BAM input

This commit is contained in:
drpatelh 2020-12-09 21:20:52 +00:00
parent 37b8b82c98
commit 115efec15c

View file

@ -18,16 +18,24 @@ process SALMON_QUANT {
tuple val(meta), path(reads)
path index
path gtf
path transcript_fasta
val alignment_mode
output:
tuple val(meta), path("${prefix}"), emit: results
path "*.version.txt" , emit: version
script:
def software = getSoftwareName(task.process)
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def endedness = meta.single_end ? "-r $reads" : "-1 ${reads[0]} -2 ${reads[1]}"
def software = getSoftwareName(task.process)
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def reference = "--index $index"
def input_reads = meta.single_end ? "-r $reads" : "-1 ${reads[0]} -2 ${reads[1]}"
if (alignment_mode) {
reference = "-t $transcript_fasta"
input_reads = "-a $reads"
}
def strandedness = meta.single_end ? 'U' : 'IU'
if (meta.strandedness == 'forward') {
strandedness = meta.single_end ? 'SF' : 'ISF'
@ -39,8 +47,8 @@ process SALMON_QUANT {
--geneMap $gtf \\
--threads $task.cpus \\
--libType=$strandedness \\
--index $index \\
$endedness \\
$reference \\
$input_reads \\
$options.args \\
-o $prefix