Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does MA supports memory mapping? #11

Closed
dawnmy opened this issue Feb 20, 2022 · 2 comments
Closed

Does MA supports memory mapping? #11

dawnmy opened this issue Feb 20, 2022 · 2 comments
Labels
feature request New feature or request question Further information is requested

Comments

@dawnmy
Copy link

dawnmy commented Feb 20, 2022

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 MarkusRainerSchmidt added feature request New feature or request question Further information is requested labels Feb 21, 2022
@MarkusRainerSchmidt
Copy link
Member

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
Copy link
Author

dawnmy commented Feb 21, 2022

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

@dawnmy dawnmy closed this as completed Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants