Skeleton of a data description schema #66

Merged
mih merged 1 commit from flatentry into main 2025-05-22 06:16:36 +00:00
8 changed files with 430 additions and 3 deletions

View file

@ -17,6 +17,7 @@ build/linkml-docs: \
build/linkml-docs/s/base/unreleased \ build/linkml-docs/s/base/unreleased \
build/linkml-docs/s/flat-base/unreleased \ build/linkml-docs/s/flat-base/unreleased \
build/linkml-docs/s/flat-users/unreleased \ build/linkml-docs/s/flat-users/unreleased \
build/linkml-docs/s/flat-data/unreleased \
build/linkml-docs/s/simpleinput/unreleased build/linkml-docs/s/simpleinput/unreleased
build/linkml-docs/s/%: src/%.yaml src/%/extra-docs build/linkml-docs/s/%: src/%.yaml src/%/extra-docs
$(MAKE) imports-remote $(MAKE) imports-remote
@ -63,6 +64,7 @@ check-models: \
checkmodel/base/unreleased \ checkmodel/base/unreleased \
checkmodel/flat-base/unreleased \ checkmodel/flat-base/unreleased \
checkmodel/flat-users/unreleased \ checkmodel/flat-users/unreleased \
checkmodel/flat-data/unreleased \
checkmodel/simpleinput/unreleased checkmodel/simpleinput/unreleased
checkmodel/%: src/%.yaml checkmodel/%: src/%.yaml
@echo [Check $<] @echo [Check $<]
@ -97,6 +99,8 @@ check-validation: \
checkvalidation/flat-base/unreleased \ checkvalidation/flat-base/unreleased \
convertexamples/flat-users/unreleased \ convertexamples/flat-users/unreleased \
checkvalidation/flat-users/unreleased \ checkvalidation/flat-users/unreleased \
convertexamples/flat-data/unreleased \
checkvalidation/flat-data/unreleased \
convertexamples/simpleinput/unreleased \ convertexamples/simpleinput/unreleased \
checkvalidation/simpleinput/unreleased checkvalidation/simpleinput/unreleased
checkvalidation/%: checkvalidation/%:
@ -116,6 +120,7 @@ convert-examples: \
convertexamples/base/unreleased \ convertexamples/base/unreleased \
convertexamples/flat-base/unreleased \ convertexamples/flat-base/unreleased \
convertexamples/flat-users/unreleased \ convertexamples/flat-users/unreleased \
convertexamples/flat-data/unreleased \
convertexamples/simpleinput/unreleased convertexamples/simpleinput/unreleased
convertexamples/%: src/%.yaml src/%/examples convertexamples/%: src/%.yaml src/%/examples
# loop over all examples, skip the schema file itself # loop over all examples, skip the schema file itself

View file

@ -7,13 +7,14 @@ ALL CONTENT HERE IS UNRELEASED AND MAY CHANGE ANY TIME
## Schemas ## Schemas
The schemas below are used in different components of the metadata system. The schemas below represent aspect models that are used in different components
They jointly build on the [DataLad concepts](https://concepts.datalad.org) of the metadata system. They jointly build on the [DataLad
schema toolbox. concepts](https://concepts.datalad.org) schema toolbox.
- [Base schema](s/base/unreleased/index.md) - [Base schema](s/base/unreleased/index.md)
- [Flat base schema](s/flat-base/unreleased/index.md) - [Flat base schema](s/flat-base/unreleased/index.md)
- [Flat users schema](s/flat-users/unreleased/index.md) - [Flat users schema](s/flat-users/unreleased/index.md)
- [Flat data schema](s/flat-data/unreleased/index.md)
- [Simple input (deprecated)](s/simpleinput/unreleased/index.md) - [Simple input (deprecated)](s/simpleinput/unreleased/index.md)

View file

@ -7,6 +7,7 @@ nav:
- Base (unreleased): s/base/unreleased/index.md - Base (unreleased): s/base/unreleased/index.md
- Flat base (unreleased): s/flat-base/unreleased/index.md - Flat base (unreleased): s/flat-base/unreleased/index.md
- Flat users (unreleased): s/flat-users/unreleased/index.md - Flat users (unreleased): s/flat-users/unreleased/index.md
- Flat study (unreleased): s/flat-data/unreleased/index.md
- Simple input (deprecated): s/simpleinput/unreleased/index.md - Simple input (deprecated): s/simpleinput/unreleased/index.md
plugins: plugins:
- mermaid2 - mermaid2
@ -18,6 +19,7 @@ plugins:
's/base/index.md': 's/base/unreleased/index.md' 's/base/index.md': 's/base/unreleased/index.md'
's/flat-base/index.md': 's/flat-base/unreleased/index.md' 's/flat-base/index.md': 's/flat-base/unreleased/index.md'
's/flat-users/index.md': 's/flat-users/unreleased/index.md' 's/flat-users/index.md': 's/flat-users/unreleased/index.md'
's/flat-data/index.md': 's/flat-data/unreleased/index.md'
's/simpleinput/index.md': 's/simpleinput/unreleased/index.md' 's/simpleinput/index.md': 's/simpleinput/unreleased/index.md'
- search - search
site_author: PsyInf group at INM-7 site_author: PsyInf group at INM-7

View file

@ -0,0 +1,286 @@
id: https://concepts.inm7.de/s/flat-data/unreleased
name: inm7-flat-data-schema
version: UNRELEASED
status: eunal:concept-status/DRAFT
title: Data models for INM7 study-related concepts for data discovery
description: |
The classes and slots in this schema support modeling ...
More information may be available on the schema's [about page](about).
The schema definition is available as
- [JSON-LD context](../unreleased.jsonld)
- [LinkML YAML](../unreleased.yaml)
- [OWL TTL](../unreleased.owl.ttl)
- [SHACL TTL](../unreleased.shacl.ttl)
comments:
- ALL CONTENT HERE IS UNRELEASED AND MAY CHANGE ANY TIME
license: CC-BY-4.0
prefixes:
ADMS: http://www.w3.org/ns/adms#
dash: http://datashapes.org/dash#
dcterms: http://purl.org/dc/terms/
dlidentifiers: https://concepts.datalad.org/s/identifiers/unreleased/
dlschemas: https://concepts.datalad.org/s/
dlthings: https://concepts.datalad.org/s/things/v1/
dltypes: https://concepts.datalad.org/s/types/unreleased/
eunal: http://publications.europa.eu/resource/authority/
inm7schemas: https://concepts.inm7.de/s/
inm7fb: https://concepts.inm7.de/s/flat-base/unreleased/
inm7fs: https://concepts.inm7.de/s/flat-data/unreleased/
inm7: https://inm7.de/ns/
inm7usrmgt: https://inm7.de/ns/usrmgt/
linkml: https://w3id.org/linkml/
orcid: https://orcid.org/
owl: http://www.w3.org/2002/07/owl#
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfs: http://www.w3.org/2000/01/rdf-schema#
sh: http://www.w3.org/ns/shacl#
skos: http://www.w3.org/2004/02/skos/core#
spdx: http://spdx.org/rdf/terms#
w3ctr: https://www.w3.org/TR/
xsd: http://www.w3.org/2001/XMLSchema#
default_prefix: inm7fs
emit_prefixes:
- dlidentifiers
- dlthings
- dltypes
- inm7
- inm7fb
- inm7fs
- rdf
- rdfs
- skos
- xsd
imports:
- inm7schemas:flat-base/unreleased
slots:
conforms_to:
description: >-
An established standard to which the subject conforms.
range: Thing
comments:
- This property SHOULD be used to indicate a model, schema, ontology, view or profile that the subject conforms to.
exact_mappings:
- dcterms:conformsTo
dimensions:
description: >-
Associated outcome variables.
range: Dimension
multivalued: true
distributions:
description: >-
Available distributions of the dataset or data item.
multivalued: true
range: Distribution
exact_mappings:
- dcat:distribution
broad_mappings:
- sio:SIO_000341
factors:
description: >-
Influencing factors.
range: Factor
multivalued: true
factor_level_of:
description: >-
A factor the subject is a (sub)level of.
range: Factor
instruments:
description: >-
Employed instruments.
range: Instrument
multivalued: true
subject_type:
description: >-
A classifier that identifies the nature/type of a subject.
For specimen (a subject derived/taken from another subject),
this classifier should be more precise than the classifier
of the source subject.
range: SubjectType
protocols:
description: >-
Implemented protocols.
range: Protocol
multivalued: true
specimen_of:
description: >-
Source subject.
range: Subject
study:
description: >-
Study context.
range: Study
subjects:
description: >-
Studied subjects.
range: Subject
multivalued: true
classes:
Dataset:
is_a: Thing
mixins:
- CurationAid
description: >-
A collection of data, published or curated by a single agent. This is a
conceptual entity. A single dataset might be available in more than
one representation, with differing schematic layouts, formats, and
serializations.
slots:
- conforms_to
- name
- short_name
DataItem:
is_a: Thing
mixins:
- CurationAid
description: >-
A single data item, the building block of Datasets. This is a
conceptual entity. A DataItem might be available in more than
one representation, with differing formats, and serializations.
slots:
- distributions
- dimensions
Distribution:
is_a: Thing
description: >-
A specific representation of a resource, which may come in the form of
a physical object, or an electronic file, or an archive or directory
of many files, may be standalone or part of a larger collection.
Dimension:
is_a: Thing
mixins:
- CurationAid
description: >-
A dependent or outcome variable.
slots:
- name
- short_name
Factor:
is_a: Thing
mixins:
- CurationAid
description: >-
A tag associated with a categorical, independent variable in a study
design. Factors can have an investigative role (e.g., treatments), or
have an organizational nature (e.g., site labels).
slots:
- name
- factor_level_of
- short_name
comments:
- The relationship of a factor "level" with the broader factor can be
described via `broader_mappings`.
Instrument:
is_a: Thing
mixins:
- CurationAid
description: >-
A material entity that is designed to perform a function in a scientific
investigation, but is not a reagent.
slots:
- name
- short_name
exact_mappings:
- obo:OBI_0000968
Protocol:
is_a: Thing
mixins:
- CurationAid
description: >-
A plan specification which has sufficient level of detail and
quantitative information to communicate it between investigation
agents, so that different investigation agents will reliably be
able to independently reproduce the process.
slots:
- name
- short_name
exact_mappings:
- obo:OBI_0000272
Study:
is_a: Thing
mixins:
- CurationAid
description: >-
TODO
slots:
# focus on "design" aspects.
# leave out incremental items, such as a growing list of
# subjects or procedures. These are move efficiently
# reported by submitting new records that reference
# a study, vs updating a study record multiple times.
- dimensions
- factors
- instruments
- protocols
- name
- short_name
StudyActivity:
is_a: Thing
mixins:
- CurationAid
description: >-
An activity in the context of a study, where one or more subjects
are studied under the influence of certain factors, with one or
more instruments, following a set of protocols
slots:
- factors
- instruments
- protocols
- study
- subjects
Subject:
is_a: Thing
mixins:
- CurationAid
description: >-
A subject is an entity being investigated in a study. This is a
contextual entity. One and the same entity can be different
subjects in two different studies.
slots:
- name
- specimen_of
- study
- subject_type
slot_usage:
specimen_of:
range: Subject
SubjectType:
is_a: Thing
mixins:
- CurationAid
description: >-
Classifier for the nature of a subject.
slots:
- name

View file

@ -0,0 +1,75 @@
{
"pid": "inm7:study/demo",
"relations": {
"inm7:dim/age": {
"pid": "inm7:dim/age",
"description": "How long something has existed; elapsed time since birth.",
"exact_mappings": [
"obo:NCIT_C25150"
],
"schema_type": "inm7fs:Dimension",
"name": "Age"
},
"inm7:fac/site": {
"pid": "inm7:fac/site",
"schema_type": "inm7fs:Factor",
"name": "Site"
},
"inm7:fac/site/fzj": {
"pid": "inm7:fac/site/fzj",
"schema_type": "inm7fs:Factor",
"name": "FZJ Campus",
"factor_level_of": "inm7:fac/site"
},
"inm7:inst/q1": {
"pid": "inm7:inst/q1",
"schema_type": "inm7fs:Instrument",
"name": "Custom questionnaire for subject demographics"
},
"inm7:prot/demographics-v1": {
"pid": "inm7:prot/demographics-v1",
"schema_type": "inm7fs:Protocol",
"name": "INM7 SOP for gathering demographic information"
},
"inm7:sub/hgd54732": {
"pid": "inm7:sub/hgd54732",
"schema_type": "inm7fs:Subject",
"name": "HGD54732"
},
"inm7:studyact/demo/sub1-sess1-demographics": {
"pid": "inm7:studyact/demo/sub1-sess1-demographics",
"schema_type": "inm7fs:StudyActivity",
"factors": [
"inm7:fac/site/fzj"
],
"instruments": [
"inm7:inst/q1"
],
"protocols": [
"inm7:prot/demographics-v1"
],
"study": "inm7:study/demo",
"subjects": [
"inm7:sub/hgd54732"
]
}
},
"description": "",
"schema_type": "inm7fs:Study",
"dimensions": [
"inm7:dim/age"
],
"factors": [
"inm7:fac/site",
"inm7:fac/site/fzj"
],
"instruments": [
"inm7:inst/q1"
],
"protocols": [
"inm7:prot/demographics-v1"
],
"name": "Demo study",
"short_name": "demo",
"@type": "Study"
}

View file

@ -0,0 +1,49 @@
pid: inm7:study/demo
name: Demo study
short_name: demo
description: >-
relations:
inm7:dim/age:
schema_type: inm7fs:Dimension
name: Age
description: >-
How long something has existed; elapsed time since birth.
exact_mappings:
- obo:NCIT_C25150
inm7:fac/site:
schema_type: inm7fs:Factor
name: Site
inm7:fac/site/fzj:
schema_type: inm7fs:Factor
name: FZJ Campus
factor_level_of: inm7:fac/site
inm7:inst/q1:
schema_type: inm7fs:Instrument
name: Custom questionnaire for subject demographics
inm7:prot/demographics-v1:
schema_type: inm7fs:Protocol
name: INM7 SOP for gathering demographic information
inm7:sub/hgd54732:
schema_type: inm7fs:Subject
name: HGD54732
inm7:studyact/demo/sub1-sess1-demographics:
schema_type: inm7fs:StudyActivity
study: inm7:study/demo
factors:
- inm7:fac/site/fzj
instruments:
- inm7:inst/q1
protocols:
- inm7:prot/demographics-v1
subjects:
- inm7:sub/hgd54732
dimensions:
- inm7:dim/age
factors:
- inm7:fac/site
- inm7:fac/site/fzj
instruments:
- inm7:inst/q1
protocols:
- inm7:prot/demographics-v1

View file

@ -0,0 +1,9 @@
schema: src/flat-data/unreleased.yaml
target_class: Study
data_sources:
- src/flat-data/unreleased/examples/Study-1.yaml
plugins:
JsonschemaValidationPlugin:
closed: true
include_range_class_descendants: false
RecommendedSlotsPlugin: