jenniferlu717 / Bracken

Bracken (Bayesian Reestimation of Abundance with KrakEN) is a highly accurate statistical method that computes the abundance of species in DNA sequences from a metagenomics sample.
http://ccb.jhu.edu/software/bracken/index.shtml
GNU General Public License v3.0
289 stars 50 forks source link

no library ERROR after I used minikraken2_v1_8GB #178

Closed DooYal closed 2 years ago

DooYal commented 2 years ago

case 1 Downloaded and uncompressed minikraken2_v1_8GB database, then: $ bracken-build -d minikraken2_v1_8GB -t 32 -k 35 -l 76

Selected Options: kmer length = 35 read length = 76 database = minikraken2_v1_8GB threads = 32 Checking for Valid Options... ERROR: Database library minikraken2_v1_8GB/library does not exist

case 2 After I moved the three .k2d files into a database file which contain complete Kraken2 taxonomy but empty library, I typed bracken-build command again, and then: $ bracken-build -d kkdb -t 32 -k 35 -l 76

Selected Options: kmer length = 35 read length = 76 database = kkdb threads = 32 Checking for Valid Options... Creating database.kraken [if not found] kraken2 --db kkdb --threads 32 <( find -L kkdb/library ( -name .fna -o -name .fa -o -name *.fasta ) -exec cat {} + ) > kkdb/database.kraken Loading database information... done. 0 sequences (0.00 Mbp) processed in 0.018s (0.0 Kseq/m, 0.00 Mbp/m). 0 sequences classified (-nan%) 0 sequences unclassified (-nan%) Finished creating database.kraken [in DB folder] Creating database76mers.kmer_distrib STEP 0: PARSING COMMAND LINE ARGUMENTS Taxonomy nodes file: kkdb/taxonomy/nodes.dmp Seqid file: kkdb/seqid2taxid.map Num Threads: 32 Kmer Length: 35 Read Length: 76 STEP 1: READING SEQID2TAXID MAP 37343 total sequences read STEP 2: READING NODES.DMP FILE 2388302 total nodes read STEP 3: CONVERTING KMER MAPPINGS INTO READ CLASSIFICATIONS: 76mers, with a database built using 35mers 32 sequences converted.. Time Elaped: 0 minutes, 4 seconds, 0.00000 microseconds

PROGRAM START TIME: 01-05-2022 06:01:48 ...0 total genomes read from kraken output file ...creating kmer counts file -- lists the number of kmers of each classification per genome ...creating kmer distribution file -- lists genomes and kmer counts contributing to each genome PROGRAM END TIME: 01-05-2022 06:01:48 Finished creating database76mers.kraken and database76mers.kmer_distrib [in DB folder] *NOTE: to create read distribution files for multiple read lengths, rerun this script specifying the same database but a different read length

Bracken build complete.

jenniferlu717 commented 2 years ago

You cannot build the bracken files from just the .k2d files. As such, we do provide the Bracken files for those minikraken databases here: http://ccb.jhu.edu/software/kraken2/index.shtml?t=downloads

DooYal commented 2 years ago

You cannot build the bracken files from just the .k2d files. As such, we do provide the Bracken files for those minikraken databases here: http://ccb.jhu.edu/software/kraken2/index.shtml?t=downloads

Thanks, I found that the kraken2 report outfiles based on the kraken2 database can be processed by bracken commandline, so it is not necessary to run bracken-build.