Open chrishmorris opened 4 months ago
Hi @chrishmorris,
Property values get written to the annotations
of each entity, as a set of PropertyValue
objects:
>>> taxslim = pronto.Ontology.from_obo_library("ncbitaxon/subsets/taxslim.obo")
>>> taxslim["NCBITaxon:10"].annotations
{ResourcePropertyValue('has_rank', 'NCBITaxon:genus')}
taxslim.obo has e.g.
If I read it and export it again with pronto.Ontology("download/taxslim.obo").dumps(format="obo") then property_value lines correctly appear in the output, so they are clearly parsed and incorporated into the Ontology instance.
But I can't figure out how to access them. Both
ontology.relationships()
andontology["NCBITaxon:10"].relationships
are empty.What am I missing, please?