ITBE-Lab / MA

The Modular Aligner and The Modular SV Caller
MIT License
45 stars 3 forks source link

Does MA supports memory mapping? #11

Closed dawnmy closed 2 years ago

dawnmy commented 2 years ago

I have many samples to run, and the reference database is very large. So loading the database from disk to memory takes much more time than alignment. So I was wondering wether MA supports memory mapping to void loading database into memory every time?

MarkusRainerSchmidt commented 2 years ago

Hi,

MA allows you to specify many files as input at once: -i file1.fastq,file2.fastq,... So I would recommend processing all your samples with the same call. Of course, this means you will then have to "demultiplex" your resulting .sam file. This could e.g. be done by prepending some prefix to the names of all reads.

About the memory mapping: MA does not support memory mapping the index and we do not intend to implement this feature - sorry. First of all, we are using BWA-MEM's code for the index. This makes it technically harder for us to modify things since we are not really familiar with the code organization etc... Secondly, the way the index is used, many more or less random jumps between intervals of the index are necessary. This means that even with a memory-mapped file, the full index would have to be loaded anyways during the alignment process.

Hopefully, the demultiplexing trick can solve your problem!

Cheers, Markus

dawnmy commented 2 years ago

Thank you very much for the solution. Sounds practical. I will close this issue.