voutcn / megahit

Ultra-fast and memory-efficient (meta-)genome assembler
http://www.ncbi.nlm.nih.gov/pubmed/25609793
GNU General Public License v3.0
596 stars 135 forks source link

about memory setting #236

Closed PuziJiang closed 5 years ago

PuziJiang commented 5 years ago

Dear sir, I am using MEGAHIT to co-assemble a large matgenomic data (nearly 144G per paired-end file). However, when I set the options as below, the tasks were always killed due to out of memory if I ran two tasks. And, I found that memory usage in one task (nearly 200G) was larger than what I set (0.3*256G):

megahit -1 ${file}_all.1.fq.gz -2 ${file}_all.2.fq.gz --kmin-1pass -m 0.3 --mem-flag 2 -t 40 -o ${dir}/assemble1 --out-prefix ${prefix}

What's wrong in the command? Thanks in advance.

voutcn commented 5 years ago

The -m only defines the maximum memory used by the graph-construction stage (the algorithm used can trade speed for memory usage). It won't limit the memory usage in other stages (assembly, local assembly, iterative k-mer extraction).