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
286 stars 50 forks source link

IndexError: list index out of range #108

Open xushaoyi opened 4 years ago

xushaoyi commented 4 years ago

Dear author, thanks for your kindly help! here is a problem when using bracken. the input is as follows: "bracken -d /public/home/luhuijie/lib/kraken2 -i temp/kraken2/A1_report -t 24 -r 150 -o temp/bracken/A1.out" but it went wrong and the detail report is as follows: Traceback (most recent call last): File "/public/home/luhuijie/lib/miniconda2/envs/py27/bin/est_abundance.py", line 488, in main() File "/public/home/luhuijie/lib/miniconda2/envs/py27/bin/est_abundance.py", line 222, in main report_vals = process_kraken_report(line) File "/public/home/luhuijie/lib/miniconda2/envs/py27/bin/est_abundance.py", line 140, in process_kraken_report level_reads = int(split_str[2]) IndexError: list index out of range

jenniferlu717 commented 4 years ago

What does A1_report look like? Are you using the direct kraken output or are you using the output from the file generated by the --report flag?

xushaoyi commented 4 years ago

What does A1_report look like? Are you using the direct kraken output or are you using the output from the file generated by the --report flag?

yes, I use the kraken output but it only generated a two column file, so maybe this is why the error happened

jenniferlu717 commented 4 years ago

Yeah, Kraken's output shouldn't be only two columns. What was your kraken command line?

jenniferlu717 commented 4 years ago

Something to note, Bracken does not work with the report generated by --use-mpa-style