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,6 +18,8 @@ process SALMON_QUANT {
tuple val(meta), path(reads) tuple val(meta), path(reads)
path index path index
path gtf path gtf
path transcript_fasta
val alignment_mode
output: output:
tuple val(meta), path("${prefix}"), emit: results tuple val(meta), path("${prefix}"), emit: results
@ -26,7 +28,13 @@ process SALMON_QUANT {
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def endedness = meta.single_end ? "-r $reads" : "-1 ${reads[0]} -2 ${reads[1]}"
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' def strandedness = meta.single_end ? 'U' : 'IU'
if (meta.strandedness == 'forward') { if (meta.strandedness == 'forward') {
@ -39,8 +47,8 @@ process SALMON_QUANT {
--geneMap $gtf \\ --geneMap $gtf \\
--threads $task.cpus \\ --threads $task.cpus \\
--libType=$strandedness \\ --libType=$strandedness \\
--index $index \\ $reference \\
$endedness \\ $input_reads \\
$options.args \\ $options.args \\
-o $prefix -o $prefix