Apply suggestions from code review

Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
Kevin Menden 2020-12-09 15:45:05 +01:00 committed by GitHub
parent fee0707af1
commit 560a6a578b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,14 +26,17 @@ process BOWTIE_ALIGN {
script: script:
def software = getSoftwareName(task.process) def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
index_array = index.collect() def unaligned = params.save_unaligned ? "--un ${prefix}.unmapped" : ''
index = index_array[0].baseName - ~/.\d$/
""" """
bowtie $options.args \\ INDEX=`find -L ./ -name "*.1.ebwt" | sed 's/.1.ebwt//'`
bowtie \\
--threads $task.cpus \\ --threads $task.cpus \\
${index} \\ $options.args \\
$INDEX \\
-q ${reads} \\ -q ${reads} \\
--un ${prefix}.unAl > ${prefix}.sam 2> ${prefix}.out $unaligned \\
> ${prefix}.sam 2> ${prefix}.out
bowtie --version | head -n 1 | cut -d" " -f3 > ${software}.version.txt bowtie --version | head -n 1 | cut -d" " -f3 > ${software}.version.txt
""" """
} }