DerrickWood / kraken2

The second version of the Kraken taxonomic sequence classification system
MIT License
686 stars 267 forks source link

Updating custom bacterial kraken2 database #699

Open raeshrode opened 1 year ago

raeshrode commented 1 year ago

Hello,

I built a custom bacterial database following the instructions from the kraken2 manual on github (https://github.com/DerrickWood/kraken2/blob/master/docs/MANUAL.markdown). This went successfully and I have used it several times, however I built the database in 2020.

My question is - how do I update my custom bacterial database?

Would I first need to go back and redownload the NCBI taxonomy, then redownload the bacterial library, and finally rebuild the kraken database and braken database files? Or is there a simpler way?

Any guidance would be greatly appreciated! I have surfed through the other "issues" but let me know if I missed it.

Thanks! Rachel

williakd1 commented 1 year ago

You wouldn't need to redownload the NCBI taxonomy, nor the bacterial library. Just do this:

  1. kraken2-build --add-to-library <additional_fasta(s)> --db
    • If doing multiple additional genomes, you can concatenate the fastas and just do this once.
    • This will add the library/added subdirectory, which is used when you re-build below
  2. kraken2-build --build --db --threads