neuroshapes icon indicating copy to clipboard operation
neuroshapes copied to clipboard

Define an approach for enforcing ontologies in the different shapes

Open MFSY opened this issue 7 years ago • 5 comments

The usage of controlled vocabularies (instead of plain text) as values of properties is a highly recommended best practice. The reasons are multiple but the most important ones are:

  • Consistent (way less ambiguous) annotation of dataset between organizations and within communities => they can speak the same language (use the same vocabulary) so to say.

  • The vocabulary used in a given domain of application to describe entities, agents, activities,... becomes an explicit and normalised artefact that can be shared and maintained.

Now how do we enforce the usage of ontologies/vocabularies in the data models defined in neuroshapes ?

Well let first recognise the fact that it is unlikely one can identified upfront ontologies/vocabularies that will cover all possible used cases users may have. Then a good approach would be to provide a set of defaults ontologies/vocabularies that can be enforced but allow users to enforce other ontologies/vocabularies (with better coverage for example) and/or to just provide text in first place when no ontology/vocabulary is available for a given property value.

Currently, some ontologies/vocabularies needed are referenced in the typedlabeledontologyterm schema. Clearly it needs to be extended to support the above approach.

How then ? Let assume a shape for enforcing the usage of a brain region ontology needs to be created:

  • let give it a (fragment) name: BrainRegionShape
  • The BrainRegionShape can be defined as follows:
 {
      "@id": "this:BrainRegionShape",
      "@type": "sh:NodeShape",
      "label": "A brain region shape.",
      "or": [
        {
          "label": "The expected brain region value is an ontology/vocabulary term: identified by an IRI.",
          "node": "{{base}}/schemas/neurosciencegraph/commons/labeledontologyentity/v0.1.0/shapes/LabeledOntologyEntityShape"
        },{
          "label": "The expected brain region value is from a specific brain region ontology: identified by an IRI.",
          "node": "{{base}}/schemas/neurosciencegraph/commons/typedlabeledontologyterm/v0.1.0/shapes/BrainRegionOntologyTermShape"
        },{
         "label": "The expected brain region value is a free plain text.",
          "datatype": "xsd:string"
        }
      ]
    }
  • and a property (nsg:brainRegion for example) value can be constrained in the following way:
{
          "path": "nsg:brainRegion",
          "name": "Brain region",
          "description": "A brain region shape.",
          "node": "{{base}}/schemas/neurosciencegraph/commons/typedlabeledontologyterm/v0.1.0/shapes/BrainRegionShape"
}

Related #42

MFSY avatar Mar 08 '18 12:03 MFSY

NIFSTD ontologies are clearly relevant here for:

  • taxonomies (species, strain)
  • brain regions/ brain parcels. See the issue here
  • cell types

I think most of the defaults we'll provide should come from their.

@tgbugs can help may be ?

MFSY avatar Mar 14 '18 15:03 MFSY

I will take a look.

tgbugs avatar Mar 26 '18 17:03 tgbugs

Great.

MFSY avatar Mar 26 '18 18:03 MFSY

@MFSY is there a way that I can set up a dev server that will serve proper json-ld instead of the templates that are in this repo, and/or are there endpoints that I can access to get see it? Thanks!

tgbugs avatar Apr 19 '18 22:04 tgbugs

Hi @tgbugs. I'm working on generating a documentation for these schemas as github pages. Also they will be deployed through the BBP staging Nexus instance (a REST API) for now. I'll let you know when it's done.

MFSY avatar Apr 22 '18 16:04 MFSY