Skip to content
Snippets Groups Projects

Containerized version with meme-chip 5.5.4

@@ -111,8 +111,6 @@ def convert_mapped_pe(bam, bam_basename):
@@ -111,8 +111,6 @@ def convert_mapped_pe(bam, bam_basename):
avail_sys_mem = int(subprocess.check_output("grep MemTotal /proc/meminfo | grep -o '[0-9]*'", shell=True).decode("utf-8").strip())
avail_sys_mem = int(subprocess.check_output("grep MemTotal /proc/meminfo | grep -o '[0-9]*'", shell=True).decode("utf-8").strip())
# Divide the total by the number of processors and apply a scaling factor (0.85) to not use all memory.
# Divide the total by the number of processors and apply a scaling factor (0.85) to not use all memory.
mem_per_thread = math.floor((avail_sys_mem ) * 0.7)
mem_per_thread = math.floor((avail_sys_mem ) * 0.7)
# DEBUGGING
mem_per_thread = mem_per_thread * 4
samtools_sort_command = \
samtools_sort_command = \
"samtools sort -m %d -n -@%d -o %s %s" \
"samtools sort -m %d -n -@%d -o %s %s" \
% (mem_per_thread, cpu_count(), nmsrt_bam_filename, bam)
% (mem_per_thread, cpu_count(), nmsrt_bam_filename, bam)