Closed jkgoodrich closed 5 months ago
Yeah, my next PR completely changes this function, but it will take more time to review, so just getting this in with minimal changes to fix the bug. These changes were my first round of changes to fix the function before I got completely confused by this and other functions in vep.py and completely rewrote it
Thank you!
This adds the following fixes to the current
process_consequences
:modifier = _csq_score(tc)
since it's already handled by:.lof
and.lof_flags
is not handled correctly.lof
or.lof_flags
is missing,flag_condition
will be missing, and thereforecsq_score
will be missing.(tc.lof == "HC")
is False, thenflag_condition
evaluates to False, so theno_flag_score
will be subtracted from the modifier. This should only happen if(tc.lof == "HC")
is True.The updated function also has the following fixes to the original code (before the support for no polyphen was added):
csq_order
toadd_most_severe_consequence_to_consequence
(in the default case this wouldn't have caused an issue)Here are some tests showing the comparison of the original code, the current code, and the code in this PR
fixes_to_process_consequences_small.html.zip