Fix bug with SortMeRna not working on a single db file (#788)

* Fix bug with SortMeRna not working on a single db file

* Remove tag for instances when running just to create index
This commit is contained in:
Harshil Patel 2021-10-04 12:37:21 +01:00 committed by GitHub
parent 49da864287
commit 515793c73e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View file

@ -5,7 +5,6 @@ params.options = [:]
options = initOptions(params.options)
process BBMAP_BBSPLIT {
tag "$meta.id"
label 'process_high'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,

View file

@ -20,7 +20,7 @@ process SORTMERNA {
input:
tuple val(meta), path(reads)
path fasta
path fastas
output:
tuple val(meta), path("*.fastq.gz"), emit: reads
@ -28,14 +28,11 @@ process SORTMERNA {
path "versions.yml" , emit: versions
script:
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
def Refs = ""
for (i=0; i<fasta.size(); i++) { Refs+= " --ref ${fasta[i]}" }
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
if (meta.single_end) {
"""
sortmerna \\
$Refs \\
${'--ref '+fastas.join(' --ref ')} \\
--reads $reads \\
--threads $task.cpus \\
--workdir . \\
@ -54,7 +51,7 @@ process SORTMERNA {
} else {
"""
sortmerna \\
$Refs \\
${'--ref '+fastas.join(' --ref ')} \\
--reads ${reads[0]} \\
--reads ${reads[1]} \\
--threads $task.cpus \\