Closed dustine32 closed 3 years ago
@dustine32 Just to clarify, previously, as it was a raise
, an error would cause it to fail and return non-zero, whereas this would mean that it adds to a complaint queue that gets output? Does it return a non-zero status?
Sorry @kltm, one correction to what I said above. The "before" code used to skip translating the entire model (so, all annotations for a gene) if a single extension relation was not in the relations lookup.
To (hopefully) answer your question, the raise errors.GocamgenException
in the "before" code would be caught at a higher level here:
https://github.com/biolink/ontobio/blob/f00b3d76a3c909ab720d6c13849771bc9a764f6b/ontobio/rdfgen/gocamgen/gocam_builder.py#L89-L90
Essentially this raise
is a "bail out of translating model" that should then cause the gpad2gocams
process to simply move on to translating the next model in a GPAD. This raise
by itself shouldn't stop the process with a non-zero status and, ideally, the gpad2gocams
cmd will always return 0
status. The new error handling in this PR shouldn't return a non-zero status either. Hope this helps!
Okay, makes sense to me--thank you for the explanation.
@kltm Whoa, awesome!
For #572.
I also changed how missing extension relation errors are handled. This change now skips translating only the offending extension (e.g.
RO:0002491(GO:0098768)
) whereas the old code would skip translating the entireannotationmodel for the gene. The error is still being reported out.