You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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.
I tried to run COGtools on my data and on my first try COGtools just printed
0
into command line and created an emptyem_my_organism.gff
file. So I dived into your code and I was able to locate the problem. The bug is inem_processor()
function inprogram_processor
module and particularly on line 87, where you write to the new file: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.
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.
The text was updated successfully, but these errors were encountered: