qiime2 - kraken2 database

Hello!
I try to run this code.

qiime moshpit classify-kraken2
--i-seqs demux.qza
--i-kraken2-db /projects/microbiome/biological-reference-data/2023.06.05-k2-plus-pf-kraken-db.qza
--p-threads 40
--p-confidence 0.6
--p-minimum-base-quality 20
--output-dir kraken-k2pf-c60-mbq20-reads
--p-report-minimizer-data

How to download '2023.06.05-k2-plus-pf-kraken-db.qza' file?
On the kraken2 database site, there are '.tar.gz' file and '.txt' file. There are not '.qza' file.
How to download it?

Thank you!

You can find my full tutorial here, just pick whichever database is most appropriate to your research.

4 Likes

Hi @sooni hi @Micro_Biologist ,

You can also use the qiime moshpit build-kraken-db action to get a database of your choice. Currently the choices are a little more limited, though, than building a database in kraken2 directly, as right now there is a limited set of options.

Good luck!

2 Likes

Hi, @Nicholas_Bokulich .
Can you explain how to use the qiime moshpit build-kraken-db? Can you explain with an example?
Thank you!

Hey @sooni,

You can use the build-kraken-db in two different ways:

  1. to fetch a pre-built Kraken2/Bracken DB from here:

    qiime moshpit build-kraken-db \
       --p-collection pluspf \
       --output-dir kraken-db \
       --verbose
    

    where --p-collection indicates which of the different pre-built DBs you want to fetch (you can see all the supported options by running qiime moshpit build-kraken-db --help and cross-referencing them with the source I linked above).

  2. to build your custom DB by providing your own sequences in one or more FeatureData[Sequence] artifacts:

    qiime moshpit build-kraken-db \
       --i-seqs your-input-sequences.qza \
       --p-threads 4 \
       --p-read-len 150 \
       --output-dir kraken-db \
       --verbose
    

Please keep in mind that fetching pre-built 16S databases is not supported yet (coming soon!) but you could fetch them yourself from the linked resource and just import into an appropriate artifact using the qiime tools import command.

Hope that helps!

Cheers,
Michal

4 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.