Closed dustine32 closed 2 years ago
Had another instance of this occur during the 2022-02-20 snapshot
with this line in fb.gaf
:
FB FBgn0003334 Scm located_in GO:0005634 FB:FBrf0179383|PMID:15280237 IC GO:0016458 C Sex comb on midleg CG9495|SCM|Sex Comb on Midleg|Sex Comb on the Midleg|Sex combs on midleg|Sex combs on midlegs|Su(z)302|l(3)85Ef|scm|sex comb on midleg protein taxon:7227 20050203 UniProt
With/from value GO:0016458
is obsolete w/o a replaced_by
term (though it has two "consider" terms, I don't think ontobio treats these like replaced_by
).
Testing with the #603 code change gets around this error, just printing blank for the line's with/from
value along with a warning:
* WARNING - Obsolete class with no replacement: Violates GORULE:0000020 (GO:0016458)
@kltm @sierra-moxon I'm thinking we just go ahead and merge #603, then release and update go-site reqs.txt?
I believe this is now fixed.
@sierra-moxon I noticed this error in
_unroll_withfrom_and_replair_obsoletes
when processing a line containingGO:0004871
in the with/from column:The error:
Looks like
regrouped_fixed_elements
isNone
when passed intostr_to_conjunctions
: https://github.com/biolink/ontobio/blob/7ba4e23e55beecf420eb03bdd55e1f0819f5c847/ontobio/io/assocparser.py#L694 I traced this to obsolete termGO:0004871
, which has no replacement term assigned and so_validate_ontology_class_id
returnsNone
.Cmd to reproduce with above GPAD line (
tests/resources/obsolete_no_replacement.gpad
). Note that-r
must be set with an ontology file otherwise the check will always pass:My short-term fix for this, which may actually be THE fix, is to simply add a check for
None
:@sierra-moxon I can PR this fix in a bit and let you take a look, make any changes. Just wondering if you think this makes sense.