mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-11 04:33:10 +00:00
Update Salmon quant to use BAM input
This commit is contained in:
parent
37b8b82c98
commit
115efec15c
1 changed files with 13 additions and 5 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue