Skip to content

Commit

Permalink
Round up the buffer size estimate
Browse files Browse the repository at this point in the history
  • Loading branch information
Ksenia Krasheninnikova committed May 7, 2024
1 parent da7a1b3 commit 6aeae6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/local/bamtobed_sort.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ process BAMTOBED_SORT {
script:
def prefix = args.ext.prefix ?: "${meta.id}"
def st_cores = task.cpus > 4 ? 4 : "${task.cpus}"
def buffer_mem = task.memory.toGiga() / 2
def buffer_mem = (task.memory.toGiga() / 2).round()
"""
samtools view -@${st_cores} -u -F0x400 ${bam} | bamToBed | sort -k4 --parallel=${task.cpus} -S ${buffer_mem}G -T . > ${prefix}_merged_sorted.bed
Expand Down

0 comments on commit 6aeae6a

Please sign in to comment.