Open fluhus opened 1 month ago
Thank you, @SMUZhanLi!
I got the DB you linked to and I am still getting empty levels for Bacteria, Archaea and Viruses. I tried with both kraken2 v2.1.3 and with the current master branch.
Here is my kraken command:
kraken2 --threads 4 --db standard --output - --report $fout --paired $fin1 $fin2
If the problem is in Kraken, I guess the relevant issue for Bracken would be to check input validity and stop with an informative error if invalid.
I edited the report file manually and added a 'D' level to Bacteria, Archaea, Viruses and Eukaryotes.
Now I am getting this:
>> Checking for Valid Options...
>> Running Bracken
>> python src/est_abundance.py -i example.txt -o a -k /dfs7/whitesonlab/faracig/databases/kraken_db_standard/database100mers.kmer_distrib -l S -t 0
PROGRAM START TIME: 10-21-2024 22:43:39
>> Checking report file: example.txt
Traceback (most recent call last):
File "/dfs7/whitesonlab/alavon/Tools/bracken/./src/est_abundance.py", line 563, in <module>
main()
File "/dfs7/whitesonlab/alavon/Tools/bracken/./src/est_abundance.py", line 299, in main
while level_num != (prev_node.level_num + 1):
^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'level_num'
Hi,
Thank you for making this tool! :)
I am running Bracken 2.9 on Kraken2's report (small subsample attached below), and I am getting an out of range error. It seems to come from an empty level value for Bacteria.
Command:
Output:
I am not sure if this is a bug in Kraken2 or with Bracken. I noticed that Bacteria, Archaea and Viruses all have empty levels.
Regardless, perhaps level_id can be checked for validity before subscripting, allowing for a more informative error message.
Thanks!
example.txt