linkml / schemasheets

Structure your data in a FAIR way using google sheets or TSVs. These are then converted to LinkML, and from there other formats
https://linkml.io/schemasheets/
41 stars 5 forks source link

attribute and slot usage in one schema #138

Open djarecka opened 4 months ago

djarecka commented 4 months ago

I would like to use both slots and attributes in one schema. I was having issue with creating attributes column (see linkml/schemasheets#128 ), but I found a cli option --use-attributes, but if I use this option it looks like everything is treated as attributes and I would like to have an option to do both.

For example, for a table:

| Proposed BICAN Field | SubGroup/LinkML Class Name | Range   |
|----------------------|----------------------------|---------|
|> slot                | class                      | range   |
|----------------------|----------------------------|---------|
| attr1                | class1                     | integer |
| attr2                | class2                     | float   |
| slot1                |                            | float   |
| slot1                | class1                     |         |

I would think that attr1 and attr2 could be treated as attributes but slot1 that has two rows (one with class the other without) could be treated as a slot

cmungall commented 4 weeks ago

I think we should allow for explicit control on a per-slot basis as you suggest, as well as global. I think the most straightforward way would be to allow attribute in place of slot