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

Create an index without create the database #18

Closed
davidmaimoun opened this issue Jul 14, 2022 · 4 comments
Closed

Create an index without create the database #18

davidmaimoun opened this issue Jul 14, 2022 · 4 comments

Comments

@davidmaimoun
Copy link

Hello Dr Shen,

Can I create an index without create the database ? Because the folder takes memory.

If my interest is to indexing sequences and run some query, is it possible to use the tool without the db creation step ?

Best,

@shenwei356
Copy link
Owner

I'm afraid you have to create the database with kmcp compute and kmcp index before searching.

And Most tools need an index step for search.

@davidmaimoun
Copy link
Author

So can I erase the database folder once the index created?

@shenwei356
Copy link
Owner

# compute k-mers
kmcp compute -k 21 --split-number 10 --split-overlap 100 \
    --in-dir genomes/ --out-dir genomes-k21-n10

# index k-mers
kmcp index --false-positive-rate 0.1 --num-hash 1 \
    --in-dir genomes-k21-n10/ --out-dir genomes.kmcp

# ------------------------------------------------------------------------------
# Here, the genomes-k21-n10/ folder created by 'kmcp compute' could be deleted.
# ------------------------------------------------------------------------------
# delete temporary files
# rm -rf genomes-k21-n10/

# search    
kmcp search --db-dir genomes.kmcp/ test.fa.gz --out-file search.kmcp@db1.kmcp.tsv.gz

@davidmaimoun
Copy link
Author

Thank you very much

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

No branches or pull requests

2 participants