ga4gh-beacon / beacon-v2

Unified repository for the GA4GH Beacon v2 API standard
Creative Commons Zero v1.0 Universal
22 stars 19 forks source link

Ontology Resource object weird properties names #75

Open redmitry opened 1 year ago

redmitry commented 1 year ago

Hello,

Although not an issue, but rather comment.

The beaconFilteringTermsResults.json Resource object has two bad-named properties:

"iriPrefix" - is essentially the "namespace" - the default ontology namespace. "nameSpacePrefix" - which is the namespace prefix which is used to shorthand the identifiers (IRIs).

from the ontology point of view should be just "namespace" and "prefix".

Best,

Dmitry

jrambla commented 4 months ago

@mbaudis wasn't that schema inherited from somewhere else?

mbaudis commented 4 months ago

@jrambla Yep; Phenopackets' Resource.

redmitry commented 4 months ago

This a conceptual discrepancy. Michael and me had a long conversation and see the spec. differently.

"filteringTerms": [
      {
        "id": "NCIT:C20197",
        "label": "Male",
"resources": [
      {
        "id": "NCIT",
        "iriPrefix": "http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#",
        "name": "NCI Thesaurus",
        "nameSpacePrefix": "NCIT",
        "url": "https://www.ebi.ac.uk/ols/ontologies/ncit/download",
        "version": ""
      }

I see "iriPrefix" as an otology "namespace" and "nameSpacePrefix" as the ontology "namespace" prefix. This is ontologies natural way to shorten identifiers. "NCIT:C20197" is a qualified name (QName) which is RESOLVED to the http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#C20197

Michael uses

    "response": {
        "filteringTerms": [
            {
                "id": "EDAM:operation_3227",
                "label": "Variant Calling",
                "type": "EDAM ontology"
"resources": [
            {
                "id": "EDAMoperation",
                "iriPrefix": "http://purl.obolibrary.org/obo/EDAM_",
                "name": "EDAM ontology",
                "url": "https://github.com/edamontology/edam-browser"
            },

Progenetx uses "type" for the resource matching and the "iriPrefix" is not the namespace, but lexical prefix.

mbaudis commented 4 months ago

@redmitry Well, resources and filteringTerms are independent lists in the response so I guess at least structurally we're good:

properties:
  resources:
    type: array
    description: Ontology resources defined externally to this beacon implementation
    items:
      $ref: '#/definitions/Resource'
  filteringTerms:
    type: array
    items:
      $ref: '#/definitions/FilteringTerm'