Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Clarification of slots and slot_usage #290

Open
johanneswerner opened this issue Feb 26, 2021 · 3 comments
Open

Clarification of slots and slot_usage #290

johanneswerner opened this issue Feb 26, 2021 · 3 comments

Comments

@johanneswerner
Copy link

Hello,

we are trying to figure out what the fields slots and slot_usage in the yaml files represent.

Elisha forwarded us this information

slot_usage allows for an override. For example, mixs.yaml - slot diss_oxygen is defined to have a range of quality value

range: quantity value ## syntax: {float} {unit}

However, we have some examples at the moment using strings, so slot_usage becomes:

slot_usage:
....
   diss_oxygen:
     range: string

We are still struggling a bit to understand the concept.

We assume that slots are fields that are part of classes, where certain slots can be overridden by class definition in different source files (for instance collection_date is present in mixs.yaml and nmdc.yaml).

Is this correct or is something different intended?

What is also unclear to us is how certain items can appear in slot_usage, but not in slots (within the same class).

Can you help us with our questions and in understanding the schema better?

Thank you very much!

@wdduncan
Copy link
Contributor

wdduncan commented Mar 2, 2021

@johanneswerner I understand your confusion ... this is not clear from documentation.

LinkML allows you to define slots "on the fly" (so to speak) by using slot_usage. Unlike slots that are defined independently, slots defined using slot_usage cannot be shared between classes; i.e., the slots are bound to the classes.

Does that make sense?

cd @cmungall

@cmungall
Copy link
Contributor

cmungall commented Mar 2, 2021

Hi @johanneswerner

You can find out more about the schema language here: https://github.com/biolink/biolinkml

Each of the constructs has its own URI with documentation, for example:

https://w3id.org/biolink/biolinkml/meta/slot_usage
the redefinition of a slot in the context of the containing class definition.

This is quite minimal so let me try more of an elucidation!

But first, I think your intuitions are on the right track, indeed the idea is to be able to reuse a generic field/property/slot and to refine and even over-ride it in a particular context.

What you are getting tripped up by is a bit of a short term fix we made to temporarily simplify our schema: aec1e2b

Thank you for your interest, I would love to discuss this more with you, I will post more info in this ticket later...

@wdduncan
Copy link
Contributor

Hi @johanneswerner. I've modified the schema to make it simpler (doesn't have a lot slot_usages). Does it make better sense to you now?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants