Skip to content
Snippets Groups Projects
Commit 45521260 authored by Thamer Alsulaiman's avatar Thamer Alsulaiman
Browse files

Removed debugging code and fixed memory_per_thread assignment

parent 3db8ba62
Branches
Tags test_1.2.15
1 merge request!3Containerized version of chip-seq analysis
Pipeline #14839 failed with stages
......@@ -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())
# 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)
# DEBUGGING
mem_per_thread = mem_per_thread * 4
samtools_sort_command = \
"samtools sort -m %d -n -@%d -o %s %s" \
% (mem_per_thread, cpu_count(), nmsrt_bam_filename, bam)
......
......@@ -179,9 +179,8 @@ def align_pe(fastq, sai, reference, fastq_basename):
# Determine the available memory on the host system (kB).
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.
mem_per_thread = math.floor((avail_sys_mem // cpu_count()) * 0.85)
# DEBUGGING
mem_per_thread = mem_per_thread * 4
#mem_per_thread = math.floor((avail_sys_mem // cpu_count()) * 0.85)
mem_per_thread = math.floor( avail_sys_mem * 0.7)
steps = [
"cat %s" % (sam_filename),
"grep -v -F -f %s" % (badcigar_filename),
......
......@@ -15,7 +15,6 @@ import shutil
import subprocess
from multiprocessing import Pool
import pandas as pd
import utils2 as utils
EPILOG = '''
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment