mapping-commons / sssom-api

Apache License 2.0
7 stars 0 forks source link

Generate URI instead of a blank node for mappings #12

Closed anitacaron closed 1 year ago

anitacaron commented 1 year ago

We currently use a ttl file with blank nodes to represent the mappings in a mapping set. This ttl file is generated from sssom-py.

An extract from the file:

[] a ns1:MappingSet ;
    dcterms:creator <https://orcid.org/0000-0002-2232-0967> ;
    dcterms:description "The IMPC Mouse Morphology Mappings: Eye Morphology Test" ;
    dcterms:license "https://creativecommons.org/publicdomain/zero/1.0/"^^xsd:anyURI ;
    ns1:mapping_provider "https://www.mousephenotype.org"^^xsd:anyURI ;
    ns1:mapping_set_id "mp_hp_eye_impc"^^xsd:anyURI ;
    ns1:mappings [ a owl:Axiom ;
            owl:annotatedProperty skos:exactMatch ;
            owl:annotatedSource <http://purl.obolibrary.org/obo/MP_0012121> ;
            owl:annotatedTarget <http://purl.obolibrary.org/obo/HP_0000647> ;
            ns1:mapping_justification <https://w3id.org/semapv/LexicalMatching> ;
            ns1:object_label "Sclerocornea" ;
            ns1:subject_label "sclerocornea" ],
        [ a owl:Axiom ;
            owl:annotatedProperty skos:closeMatch ;
            owl:annotatedSource <http://purl.obolibrary.org/obo/MP_0011959> ;
            owl:annotatedTarget <http://purl.obolibrary.org/obo/HP_0004329> ;
            ns1:mapping_justification <https://w3id.org/semapv/LogicalReasoning> ;
            ns1:object_label "Abnormal posterior eye segment morphology" ;
            ns1:subject_label "abnormal eye posterior chamber depth" ],
        [ a owl:Axiom ;
            owl:annotatedProperty skos:closeMatch ;
            owl:annotatedSource <http://purl.obolibrary.org/obo/MP_0003733> ;
            owl:annotatedTarget <http://purl.obolibrary.org/obo/HP_0000479> ;
            ns1:mapping_justification <https://w3id.org/semapv/LogicalReasoning> ;
            ns1:object_label "Abnormal retinal morphology" ;
            ns1:subject_label "abnormal retinal inner nuclear layer morphology" ] .

Using blank nodes, it's not possible to retrieve a specific mapping from a mapping set. In general, not possible to retrieve any specific data model without relying on its attributes.

cc @matentzn

matentzn commented 1 year ago

HATEOS style apis with links included or not, check out

bring example to API design call with the rest of the team

anitacaron commented 1 year ago

Temporarily we are generating UUID for Mapping and MappingSet. To better inject the ids, we changed to JSON-LD format. Done in the PR https://github.com/anitacaron/sssom-api/pull/16