mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
fix index process
This commit is contained in:
parent
ad3c14a964
commit
a69aebd01b
1 changed files with 3 additions and 4 deletions
|
@ -7,15 +7,14 @@ process samtools_index {
|
||||||
path(bam)
|
path(bam)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
path "*.sorted.bam"
|
path "*.bai"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
def suff_mem = ("${(task.memory.toBytes() - 6000000000) / task.cpus}" > 2000000000) ? 'true' : 'false'
|
def suff_mem = ("${(task.memory.toBytes() - 6000000000) / task.cpus}" > 2000000000) ? 'true' : 'false'
|
||||||
def avail_mem = (task.memory && suff_mem) ? "-m" + "${(task.memory.toBytes() - 6000000000) / task.cpus}" : ''
|
def avail_mem = (task.memory && suff_mem) ? "-m" + "${(task.memory.toBytes() - 6000000000) / task.cpus}" : ''
|
||||||
"""
|
"""
|
||||||
samtools sort $bam \\
|
samtools index $bam \\
|
||||||
-@ ${task.cpus} ${avail_mem} \\
|
-@ ${task.cpus} ${avail_mem}
|
||||||
-o ${bam.baseName}.sorted.bam
|
|
||||||
|
|
||||||
samtools --version &> v_samtools.txt
|
samtools --version &> v_samtools.txt
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue