How to get the

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get the

S04dEGR4gE
http://data.bioontology.org/ontologies/EFO/submissions/181/download?apikey=8b5b7825-538d-40e0-9e9e-5ab9274a9aeb

I would like to extract the following alternative_term properties of efo.EFO_0004340 (to get "BMI" and "Quetelet's Index").

        <efo:alternative_term rdf:datatype="http://www.w3.org/2001/XMLSchema#string">BMI</efo:alternative_term>
        <efo:alternative_term rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Quetelet's Index</efo:alternative_term>
 
But I don't find how to do so. Could anybody show me?

>>> import owlready2
>>> onto=owlready2.get_ontology('file://efo_inferred.owl')
>>> onto.load()
>>> onto.search(iri = "*EFO_0004340")[0]
Reply | Threaded
Open this post in threaded view
|

Re: How to get the

Jiba
Administrator
Hi,

You can simply use the object returned by search() as a Python object :

>>> e = onto.search(iri = "*EFO_0004340")[0]
>>> e.alternative_term
['BMI', "Quetelet's Index"]

Best regards,
Jiba