-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexError: string index out of range when using extract_kraken_reads #101
Comments
Hello FJ, I recently got the same kind of error and it would seem that it happens when there is missing data in the taxonomic level column (the one with R, K, D, P, etc.) in the Kraken report. As an example, the second line indicating ''cellular organisms'' was missing the ''R1'' value in the column. Krakentools is not able to manage an empty value in that position with the ''root'' as the only exception. It is still not clear to me if this missing data is intentionnal in the latest version of Kraken2 and that krakentools simply did not keep up with those updates. It is also not clear to me if the data may be missing from the database itself, I used a pre-made database since I could not build it on my system due to administrative restrictions (don't ask...). I'm still looking into a solution and I'll post something here if I find a good workaround. Regards, Vincent |
Hello Vincent, |
Hello FJ, So, I've checked my database (more specifically the ktaxonomy.tsv file) and the ranks look ok. So, I don't know why the ranks are not good in the kraken report file. I finally resorted to write a little perl script that corrects the ranks of specific taxids that produced the error. It is not pretty or exhautive, but it worked and in the future it is easy to add more taxids to the list of correction if I need to. The most obivous corrections to make were to Bacteria (rank D), Eukaryota (rank D) and Archaea (rank D). I've also had to do correction for Viruses (rank 1, I first tried with D but it did not work. Viruses like to be special) and around 10 virus sublevels until I finally got rid of the error. Regards, Vincent |
Hello Vincent, FJ |
Hi,
I'm getting this error when using extract_kraken_reads.py, could you help me solve this error?
Best regards,
FJ
The text was updated successfully, but these errors were encountered: