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

Provide memory mapping option? #43

Open
ChillarAnand opened this issue Jul 7, 2024 · 1 comment
Open

Provide memory mapping option? #43

ChillarAnand opened this issue Jul 7, 2024 · 1 comment
Labels

Comments

@ChillarAnand
Copy link

Several classification tools provide "memory-mapping" option.

When running a huge number of samples, instead of loading db into memory everytime, "memory-mapping" option will allow to preload the db into ram once and run classification across all the samples which improves run time by a huge margin.

@muellan
Copy link
Owner

muellan commented Jul 12, 2024

There's the "interactive query mode".
If you run metacache query <database_name> without any read input files the database will be loaded into memory and you can then run as many queries as you like.
This is easiest done by piping query strings into metacache in a script like in the example below:

#!/bin/bash
database="mydatabasename"
queries=""
# add query
queries="${queries} myreads.fq -out myoutfile.txt\n"
# add query
queries="${queries} reads1.fa reads2.fa -pairfiles -out myoutfile.txt\n"
# ... add more queries ....
# finally: load database and run all queries
echo -e ${queries} | ./metacache query ${database}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants