How can Semantic Annotations be used to describe openBIS Sample/Property Types?

I discovered the concept of semantic annotations for openBIS Object/Property Types while going through the pyBIS doc and found some more information in the V3 API chapter, but still struggle to figure out how they are meant to work exactly.

I understand that semantic annotations can be added to

  • an Object/Sample type (I use the term “Sample” in the following)
  • a Property type
  • a Sample Property assignment (as in a Property type as used by a specific Sample type? Since there is no differentiation between local and global Properties anymore since release 20.10.3)

I also don’t understand the pyBIS notation of semantic annotations yet. A practical example for this in the documentation would be very helpful.
Supposing I have an openBIS Property type “temperature” which I want to annotate with the class Temperature (http://www.ontologyrepository.com/CommonCoreOntologies/Temperature) from the Common Core Ontologies (curated in Quality Ontology, Version 1.3, http://www.ontologyrepository.com/CommonCoreOntologies/Mid/QualityOntology).

What would the “predicate” and what would be the “descriptor” in this case?

sa = o.new_semantic_annotation(
entityType = ‘UNKNOWN’,
predicateOntologyId = ‘po_id’,
predicateOntologyVersion = ‘po_version’,
predicateAccessionId = ‘pa_id’,
descriptorOntologyId = ‘do_id’,
descriptorOntologyVersion = ‘do_version’,
descriptorAccessionId = ‘da_id’)

I would also like to know whether there are any plans to integrate the concept of semantic annotations to the ELN and/or the Admin UI. It would, e.g., be great if a user could see both description of a Property as well as the semantic annotations when hovering with the mouse over the Property type, similar to how it’s already done for Sample info inside the Storage Manager.

1 Like

Dear Rukeia,

we have recently updated our documentation on semantic annotations in openBIS: Semantic Annotations - openBIS Documentation Rel. 20.10 - Confluence

In the next openBIS release, planned before end of year, we plan to provide support for using semantic annotations in the XLS masterdata import.
For a future release we plan to provide support for annotations on the admin UI and provide export in OWL/RDF format.
I hope this helps.

1 Like

It’s great that you plan to support semantic annotations in openBIS :+1:

I looked into the semantic representation of ISA-Tab experimental metadata as OWL (linkedISA).
Do you also consider to build a top-level ontology on openBIS classes or types, analogous to the ISA terms ontology?

I also don´t understand what I am supposed to write in which field. Where do I put the URL of my ontology?

I tried to create a semantic annotation for a property type by filling in some random values via pyBIS but nothing appeared in the corresponding fields in the Admin Client.
Is there maybe something wrong with the documentation?

Best,
Julia

Dear Julia,

ontologies are currently only supported on the API level, not the UI.
UI support will come with the next openBIS version.

Best,

Caterina

1 Like

Hi there!

I wanted to revive this topic by Rukeia, as I am trying to understand how semantically annotate our entities.

I found the pyBIS and Java API documentations to assign semantic annotations, e.g., Python (V3 API) - pyBIS! — Python documentation.

I saw it is not possible to add any semantic annotation in the Admin UI. But, is it possible to define them in the headers of the xlsx files? I saw some (I guess, older) documentation, but I am not sure how I would define it in these excel files, as the headers are not matching the triples structure (subject/predicate/object).

Thanks in advance for the help! :slight_smile:

Hi,

we have this documentation on semantics annotations: Semantic Annotations — Python documentation

It is correct that semantic annotations are not currently supported by the admin UI.
In the ELN, semantic annotations can be enabled in the Settings, in the Miscellaneous section.

I hope this helps.

Caterina

Hi @cbarillari,

Many thanks for the answer!

Just a couple of minor follow ups:

  1. I saw some docu on the excel import with these properties included (ontology id, ontology version, ontology annotation id). After your reply, I assume this still works, right? Sorry I am asking, without the GUI feature I cannot test if this is actually working as intended or not.
  2. Is this working in the same way as in PyBIS? I see different properties defined in these 3 different places (Java API, excel import, PyBIS) and I got a big confused.

Best,
Jose

Dear @JosePizarro3,

To clarify, there are three key things you can semantically annotate:

  1. Types → Subject
  2. Properties → Predicate
  3. Properties of Types → Subject with Predicate

In the Excel file, the annotations depend on the position of the columns; they correspond to one of these three elements.

As explained in the link shared by @cbarillari regarding the Java API, the Java API extension provides details on Semantic Annotations.

The Pybis API, on the other hand, is less clear in this area because it still uses older notation, which we have kept for backwards compatibility. Please follow the examples from the Java API when creating objects in Pybis. We will work on updating the Pybis API to include the auxiliary methods present in the Java API.

Best regards,
Juan

Hi @juanf

Thanks a lot, both of you, for the help and clarification :slight_smile: I’ll give the Java API a try!

All the best,