Dear all,
I have a problem with the memory management for a rule of a snakemake pipeline.
Actually I have a C++ based tool to correct ChIP-seq and ATAC-seq signal for CNV in samples. I run it by the shell with the following rule:
# CNV correction
rule M1_signal_correction_for_CNVs:
input:
dedup_BAM_shifted_sorted = ancient(...),
dedup_BAM_shifted_sorted_index = ancient(...),
tool_config_file = "path/to/the/configuration_file_of_the_tool.txt",
output:
regions = os.path.join(.../regions.bed),
peaks = os.path.join(.../peaks.narrowPeak),
CNV_profile = os.path.join(.../CNV_profile.txt),
bedGraph = os.path.join(.../bedGraph.bdg)
params:
tool_path = config["tool_path"],
basename = os.path.join(basename),
sample = "{SAMPLES}"
threads:
config["tool_threads"]
resources:
mem_mb = 50
shell:
" {params.tool_path} {input.dedup_BAM_shifted_sorted} - {input.tool_config_file} {params.basename} --threads {threads} "
Everything is fine, except the fact that despite the meme_mb=50 parameter the RAM memory consuming in the server goes up to 190GB and then the server kills the process.
Consider also that I use the --resources mem_mb=50000 when I run the snakemake pipeline.
I tried to use also ulimit -v, but i does not work neither.
Does anyone have an idea of what I could do to limit the memory usage for this process?
Thank you in advance for your help
snakemake
bash
shell