Skip to content
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

Bug in eggNOG-mapper processor #1

Open
KSabatova opened this issue Jul 13, 2023 · 1 comment
Open

Bug in eggNOG-mapper processor #1

KSabatova opened this issue Jul 13, 2023 · 1 comment

Comments

@KSabatova
Copy link

KSabatova commented Jul 13, 2023

I tried to run COGtools on my data and on my first try COGtools just printed 0 into command line and created an empty em_my_organism.gff file. So I dived into your code and I was able to locate the problem. The bug is in em_processor() function in program_processor module and particularly on line 87, where you write to the new file:

f.write('# created with COGtools 1.0.0\n# AC number: ' + em_data["seqname"][0] + "\n# Processed data from eggNOG-mapper\n")

The reason, why the tool failed in my case, was because of missing zeroth row in the dataframe. In my case the first CDS didn't have any COG categories assigned, so this row of the dataframe was dropped during processing with others with missing COG annotations (see picture below). And on line 87 your code uses some information from the zeroth row and that's the reason why this bug occurred.

obrazek

I recommend to reset the index of the final processed dataframe to fix this bug. You can do that by DataFrame.reset_index method (see also this post). I recommend to also check other functions that drop rows in dataframes and later your code accesses a particular row in those dataframes.

@xpolak37
Copy link
Owner

Thank you for reporting the bug. I am aware that there is a problem with several functions, and the tool only works properly with a specific form of input. At the moment, I am actively working on a new release that aims to resolve these problems encountered during data parsing. I will incorporate the bug fix into this upcoming release version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants