This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Any method to extract k-mer seqs of a specific taxid from KrakenUniq/Kraken database?

I am a biologist, not a programmer. I am very interested in the correspondence between k-mers and taxids in the Kraken and KrakenUniq databases. Moreover, the logic of Kraken is more straightforward than that of Kraken2, which makes it easier for me to grasp. I hope to export all k-mer sequences corresponding to a specified strain, species, genus, or any taxid from the Kraken or KrakenUniq database into a FASTA file. Is there a script or other method to achieve this?

krakenuniq kraken
python extract_kraken_reads.py \
    -k sample.krakenuniq.classified.txt \
    -s reads.fasta \
    -t 12345 \
    -o output_taxid12345.fasta

extract_kraken_reads.py is for extracting READS assigned to specific taxid by kraken and its database. What I need is to extract k-mer seqs from kraken's database, not from querys to kraken's run.

0 answers

No answers yet.

Log in to answer this question.