biolink / ontobio

python library for working with ontologies and ontology associations
https://ontobio.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
118 stars 30 forks source link

error in gocamgen #601

Closed balhoff closed 2 years ago

balhoff commented 2 years ago

In add_axiom, add_evidence is being called. It passes 3 arguments, and the second two are attributes of the evidence object:

https://github.com/biolink/ontobio/blob/ca9dfaf3f6933f106ed63b076649bf9fe1b88b0f/ontobio/rdfgen/gocamgen/gocamgen.py#L345

However, add_evidence expects the full evidence object as the second parameter. The third parameter is supposed to be a boolean.

https://github.com/biolink/ontobio/blob/ca9dfaf3f6933f106ed63b076649bf9fe1b88b0f/ontobio/rdfgen/gocamgen/gocamgen.py#L384

Not passing the whole evidence object in add_axiom will lead to this error downstream:

File "/Users/jim/Documents/Source/signor2gocam/venv/lib/python3.9/site-packages/ontobio/rdfgen/gocamgen/gocamgen.py", line 1000, in create_evidence
    evidence.id = ev_id
AttributeError: 'str' object has no attribute 'id'
balhoff commented 2 years ago

@dustine32 running signor2gocam hits this issue.