mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
Apply suggestions from code review
Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
This commit is contained in:
parent
fee0707af1
commit
560a6a578b
1 changed files with 15 additions and 12 deletions
|
@ -19,21 +19,24 @@ process BOWTIE_ALIGN {
|
||||||
path index
|
path index
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.sam") , emit: sam
|
tuple val(meta), path("*.sam"), emit: sam
|
||||||
tuple val(meta), path("*.out") , emit: log
|
tuple val(meta), path("*.out"), emit: log
|
||||||
path "bowtie.version.txt" , emit: version
|
path "bowtie.version.txt" , emit: version
|
||||||
|
|
||||||
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//'`
|
||||||
--threads $task.cpus \\
|
bowtie \\
|
||||||
${index} \\
|
--threads $task.cpus \\
|
||||||
-q ${reads} \\
|
$options.args \\
|
||||||
--un ${prefix}.unAl > ${prefix}.sam 2> ${prefix}.out
|
$INDEX \\
|
||||||
|
-q ${reads} \\
|
||||||
|
$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
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue