Add additional annotations on top of existing annotations

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

Add additional annotations on top of existing annotations

LoriyZhu
Hi,

I tried to add additional annotations on top of some existing annotations by using Owlready2, like I want to add Axiom (shown as below) as additional information attached to those existing annotations, hasDbXref highlighted below, I can't find solutions from your documentation, please advise how to do it? Thanks a lot

<owl:Class rdf:about="#ABC:0000003">
  <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ABC</rdfs:label>
  <oboI:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DEF</oboI:hasDbXref>
  <oboI:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">EFG</oboI:hasDbXref>
</owl:Class>

<owl:Axiom>
    <owl:annotatedSource rdf:resource="#ABC:0000003"/>
    <owl:annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasDbXref"/>
    <owl:annotatedTarget rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DEF</oboInOwl:source>
    <oboInOwl:source rdf:datatype="http://www.w3.org/2001/XMLSchema#string">equivalentTo</oboInOwl:source>
</owl:Axiom>
<owl:Axiom>
    <owl:annotatedSource rdf:resource="#ABC:0000003"/>
    <owl:annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasDbXref"/>
    <owl:annotatedTarget rdf:datatype="http://www.w3.org/2001/XMLSchema#string">EFG</owl:annotatedTarget>
    <oboInOwl:source rdf:datatype="http://www.w3.org/2001/XMLSchema#string">equivalentTo</oboInOwl:source>
</owl:Axiom>


Reply | Threaded
Open this post in threaded view
|

Re: Add additional annotations on top of existing annotations

Jiba
Administrator
Hi,

You can use the following syntax to annotate relations:

comment[Drug, rdfs_subclassof, Thing] = "A comment on an is-a relation"

for example:

oboInOwl.source[ onto["ABC:0000003"], oboInOwl.hasDbXref, "DEF" ] = ["equivalentTo"]

(NB you need to define the ontology or namespace for oboInOwl and onto)

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Add additional annotations on top of existing annotations

LoriyZhu
Super! Thanks a lot!