Skip to content

Synonyms not in output #10

@joeflack4

Description

@joeflack4

Overview

I'm trying to convert Mondo from OWL to FHIR. However, synonyms are not appearing.

Example current output

{
    "code": "MONDO_0002776",
    "display": "external ear disorder",
    "property": [ {
      "code": "imported",
      "valueBoolean": false
    }, {
      "code": "parent",
      "valueCode": "MONDO_0021205"
    }, {
      "code": "parent",
      "valueCode": "MONDO_0002409"
    }, {
      "code": "root",
      "valueBoolean": false
    }, {
      "code": "deprecated",
      "valueBoolean": false
    } ]
}

Example expected output

I expect something like this. Leaving out irrelevant properties and only including 1 of the 11 synonyms here:

{
    "code": "MONDO_0002776",
    "display": "external ear disorder",
    "property": [ {
      "code": "http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym",
      "valueString": "preauricular sinus or fistula NOS (disorder)"
    }, {
    ...
    } ]
  }

Reproducing

  1. Download mondo: https://github.com/monarch-initiative/mondo/releases/download/v2022-07-01/mondo.owl
  2. Runfhir-owl with the synonym flag -s:
java -jar .../fhir-owl.jar -i .../mondo.owl -o .../mondo.json -s ,"http://www.geneontology.org/formats/oboInOwl#hasSynonym","http://www.geneontology.org/formats/oboInOwl#hasExactSynonym","http://www.geneontology.org/formats/oboInOwl#hasNarrowSynonym","http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym","http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym"

Additional info

Examples of synonym usage in `mondo.owl

    <!-- The whole class with all the synonyms -->

    <owl:Class rdf:about="http://purl.obolibrary.org/obo/MONDO_0002776">
        <owl:equivalentClass>
            <owl:Class>
                <owl:intersectionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="http://purl.obolibrary.org/obo/MONDO_0000001"/>
                    <owl:Restriction>
                        <owl:onProperty rdf:resource="http://purl.obolibrary.org/obo/RO_0004026"/>
                        <owl:someValuesFrom rdf:resource="http://purl.obolibrary.org/obo/UBERON_0001691"/>
                    </owl:Restriction>
                </owl:intersectionOf>
            </owl:Class>
        </owl:equivalentClass>
        <rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/MONDO_0002409"/>
        <rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/MONDO_0021205"/>
        <rdfs:subClassOf>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://purl.obolibrary.org/obo/RO_0004026"/>
                <owl:someValuesFrom rdf:resource="http://purl.obolibrary.org/obo/UBERON_0001691"/>
            </owl:Restriction>
        </rdfs:subClassOf>
        <obo:IAO_0000115 rdf:datatype="http://www.w3.org/2001/XMLSchema#string">A disease involving the external ear.</obo:IAO_0000115>
        <terms:conformsTo rdf:resource="http://purl.obolibrary.org/obo/mondo/patterns/location.yaml"/>
        <terms:conformsTo rdf:resource="http://purl.obolibrary.org/obo/mondo/patterns/location_top.yaml"/>
        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DOID:379</oboInOwl:hasDbXref>
        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ICD10CM:H60-H62</oboInOwl:hasDbXref>
        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ICD9:380</oboInOwl:hasDbXref>
        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ICD9:380.9</oboInOwl:hasDbXref>
        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">ICD9:744.47</oboInOwl:hasDbXref>
        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">NCIT:C26972</oboInOwl:hasDbXref>
        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">SCTID:49130001</oboInOwl:hasDbXref>
        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">UMLS:C0155388</oboInOwl:hasDbXref>
        <oboInOwl:hasExactSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">disease of external ear</oboInOwl:hasExactSynonym>
        <oboInOwl:hasExactSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">disease or disorder of external ear</oboInOwl:hasExactSynonym>
        <oboInOwl:hasExactSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">disorder of external ear</oboInOwl:hasExactSynonym>
        <oboInOwl:hasExactSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">external ear disease</oboInOwl:hasExactSynonym>
        <oboInOwl:hasExactSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">external ear disease or disorder</oboInOwl:hasExactSynonym>
        <oboInOwl:hasExactSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">external ear disorder</oboInOwl:hasExactSynonym>
        <oboInOwl:hasExactSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">preauricular sinus and fistula</oboInOwl:hasExactSynonym>
        <oboInOwl:hasRelatedSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">preauricular cyst</oboInOwl:hasRelatedSynonym>
        <oboInOwl:hasRelatedSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">preauricular cyst (disorder)</oboInOwl:hasRelatedSynonym>
        <oboInOwl:hasRelatedSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">preauricular sinus and fistula (disorder)</oboInOwl:hasRelatedSynonym>
        <oboInOwl:hasRelatedSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">preauricular sinus or fistula</oboInOwl:hasRelatedSynonym>
        <oboInOwl:hasRelatedSynonym rdf:datatype="http://www.w3.org/2001/XMLSchema#string">preauricular sinus or fistula NOS (disorder)</oboInOwl:hasRelatedSynonym>
        <oboInOwl:id rdf:datatype="http://www.w3.org/2001/XMLSchema#string">MONDO:0002776</oboInOwl:id>
        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">external ear disorder</rdfs:label>
        <skos:exactMatch rdf:resource="http://identifiers.org/snomedct/49130001"/>
        <skos:exactMatch rdf:resource="http://linkedlifedata.com/resource/umls/id/C0155388"/>
        <skos:exactMatch rdf:resource="http://purl.obolibrary.org/obo/DOID_379"/>
        <skos:exactMatch rdf:resource="http://purl.obolibrary.org/obo/NCIT_C26972"/>
        <skos:exactMatch rdf:resource="https://icd.codes/icd10cm/H60-H62"/>
    </owl:Class>

    <!-- Not primary problem of this issue; just illustrative: One of a dozen or more axioms on the class. Shows additional annotation props for a particular synonym. -->

    <owl:Axiom>
        <owl:annotatedSource rdf:resource="http://purl.obolibrary.org/obo/MONDO_0002776"/>
        <owl:annotatedProperty rdf:resource="http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym"/>
        <owl:annotatedTarget rdf:datatype="http://www.w3.org/2001/XMLSchema#string">preauricular sinus or fistula NOS (disorder)</owl:annotatedTarget>
        <oboInOwl:hasDbXref rdf:datatype="http://www.w3.org/2001/XMLSchema#string">DOID:379</oboInOwl:hasDbXref>
        <oboInOwl:hasSynonymType rdf:resource="http://purl.obolibrary.org/obo/mondo#DUBIOUS"/>
    </owl:Axiom>

    <!-- Not primary problem of this issue; just illustrative: The annotation prop definition used int he above axiom example. --> 

    <owl:AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/mondo#DUBIOUS">
        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">dubious synonym</rdfs:label>
        <rdfs:subPropertyOf rdf:resource="http://www.geneontology.org/formats/oboInOwl#SynonymTypeProperty"/>
    </owl:AnnotationProperty>

Terminal output

It appears to say that it is loading the synonyms (near the bottom). I see messages about some mappings found, but none of them appear to be related to the synonyms namespace I am using, http://www.geneontology.org/formats/oboInOwl#.

/Users/joeflack4/virtualenvs/mondo-on-fhir/bin/python3.10 /Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py --multiprocess --qt-support=auto --client 127.0.0.1 --port 55557 --file /Users/joeflack4/projects/mondo-on-fhir/mondo_on_fhir/mondo_on_fhir.py 
2022-10-13 17:17:38.281  INFO 52511 --- [           main] au.csiro.fhir.owl.Application            : Starting Application v1.1.0 using Java 18.0.1.1 on Elizabeths-MacBook-Pro.local with PID 52511 (/Users/joeflack4/projects/mondo-on-fhir/data/fhir-owl.jar started by joeflack4 in /Users/joeflack4/projects/mondo-on-fhir/mondo_on_fhir)
2022-10-13 17:17:38.291  INFO 52511 --- [           main] au.csiro.fhir.owl.Application            : No active profile set, falling back to default profiles: default
2022-10-13 17:17:40.332  INFO 52511 --- [           main] ca.uhn.fhir.util.VersionUtil             : HAPI FHIR version 5.3.0 - Rev 919c1dbddc
2022-10-13 17:17:40.343  INFO 52511 --- [           main] ca.uhn.fhir.context.FhirContext          : Creating new FHIR context for FHIR version [R4]
2022-10-13 17:17:40.411  INFO 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Checking for IRI mappings in home directory /Users/joeflack4
2022-10-13 17:17:40.428  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_upheno_imports_pr_import_owl.owl does not exist.
2022-10-13 17:17:40.428  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_wbbt_owl.owl does not exist.
2022-10-13 17:17:40.429  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_doid_imports_omim_susc_import_owl.owl does not exist.
2022-10-13 17:17:40.430  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_upheno_imports_uberon_import_owl.owl does not exist.
2022-10-13 17:17:40.430  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_upheno_imports_ro_import_owl.owl does not exist.
2022-10-13 17:17:40.430  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_doid_imports_cl_import_owl.owl does not exist.
2022-10-13 17:17:40.430  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_uberon_owl.owl does not exist.
2022-10-13 17:17:40.430  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_doid_obo_ext_owl.owl does not exist.
2022-10-13 17:17:40.430  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_doid_imports_uberon_import_owl.owl does not exist.
2022-10-13 17:17:40.430  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_symp_owl.owl does not exist.
2022-10-13 17:17:40.431  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_upheno_imports_doid_import_owl.owl does not exist.
2022-10-13 17:17:40.431  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_upheno_imports_mpath_import_owl.owl does not exist.
2022-10-13 17:17:40.431  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_upheno_imports_go_import_owl.owl does not exist.
2022-10-13 17:17:40.432  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_pr_owl.owl does not exist.
2022-10-13 17:17:40.432  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_doid_imports_hp_import_owl.owl does not exist.
2022-10-13 17:17:40.432  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_doid_owl.owl does not exist.
2022-10-13 17:17:40.432  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_upheno_imports_extra_owl.owl does not exist.
2022-10-13 17:17:40.432  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_upheno_imports_ro_extra_owl.owl does not exist.
2022-10-13 17:17:40.432  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_upheno_imports_chebi_import_owl.owl does not exist.
2022-10-13 17:17:40.433  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_trans_owl.owl does not exist.
2022-10-13 17:17:40.433  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_upheno_imports_hsapdv_import_owl.owl does not exist.
2022-10-13 17:17:40.433  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_doid_imports_ncbitaxon_import_owl.owl does not exist.
2022-10-13 17:17:40.433  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_upheno_imports_pato_import_owl.owl does not exist.
2022-10-13 17:17:40.433  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_chebi_owl.owl does not exist.
2022-10-13 17:17:40.433  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_upheno_imports_nbo_import_owl.owl does not exist.
2022-10-13 17:17:40.433  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_go_owl.owl does not exist.
2022-10-13 17:17:40.433  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_pato_owl.owl does not exist.
2022-10-13 17:17:40.433  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_doid_imports_relations_owl.owl does not exist.
2022-10-13 17:17:40.434  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_nbo_owl.owl does not exist.
2022-10-13 17:17:40.434  WARN 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Mapping was not added because file /Users/joeflack4/CSIRO/resources/ontologies/iri_maps/http___purl_obolibrary_org_obo_ncbitaxon_owl.owl does not exist.
2022-10-13 17:17:40.875  INFO 52511 --- [           main] au.csiro.fhir.owl.Application            : Started Application in 8.423 seconds (JVM running for 9.8)
2022-10-13 17:17:40.893  INFO 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Creating code systems
2022-10-13 17:17:40.893  INFO 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Loading ontology from file /Users/joeflack4/projects/mondo-on-fhir/mondo_on_fhir/../data/mondo.owl
2022-10-13 17:18:14.394  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading value from OWL annotation property http://www.w3.org/2000/01/rdf-schema#label
...
2022-10-13 17:18:14.782  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading value from OWL annotation property http://www.w3.org/2000/01/rdf-schema#label
2022-10-13 17:18:14.789  INFO 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Classifying ontology http://purl.obolibrary.org/obo/mondo.owl with elk
log4j:WARN No appenders could be found for logger (org.semanticweb.elk.config.ConfigurationFactory).
log4j:WARN Please initialize the log4j system properly.
2022-10-13 17:18:15.247  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading value from OWL annotation property http://www.w3.org/2000/01/rdf-schema#label
2022-10-13 17:18:15.249  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading synonyms from OWL annotation property http://purl.org/dc/elements/1.1/publisher
2022-10-13 17:18:15.249  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading synonyms from OWL annotation property http://purl.org/dc/elements/1.1/subject
2022-10-13 17:18:15.249  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading synonyms from OWL annotation property http://www.w3.org/2000/01/rdf-schema#comment
2022-10-13 17:18:15.256  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading value from OWL annotation property http://www.w3.org/2000/01/rdf-schema#label
2022-10-13 17:18:15.256  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading synonyms from OWL annotation property 
2022-10-13 17:18:15.256  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading synonyms from OWL annotation property "http://www.geneontology.org/formats/oboInOwl#hasSynonym"
2022-10-13 17:18:15.256  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading synonyms from OWL annotation property "http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"
2022-10-13 17:18:15.257  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading synonyms from OWL annotation property "http://www.geneontology.org/formats/oboInOwl#hasNarrowSynonym"
2022-10-13 17:18:15.257  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading synonyms from OWL annotation property "http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym"
2022-10-13 17:18:15.257  INFO 52511 --- [           main] au.csiro.fhir.owl.OwlProperties          : Loading synonyms from OWL annotation property "http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym"
2022-10-13 17:18:52.681  INFO 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Writing code system to file: /Users/joeflack4/projects/mondo-on-fhir/mondo_on_fhir/../mondo.json
2022-10-13 17:18:58.947  INFO 52511 --- [           main] au.csiro.fhir.owl.FhirOwlService         : Done!

Process finished with exit code 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions