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/
  inm7fd: https://concepts.inm7.de/s/flat-data/unreleased/
  inm7: https://inm7.de/ns/
  inm7datamgt: https://inm7.de/ns/datamgt/
  linkml: https://w3id.org/linkml/
  orcid: https://orcid.org/
  owl: http://www.w3.org/2002/07/owl#
  prov: http://www.w3.org/ns/prov#
  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#
  sio: http://semanticscience.org/resource/
  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: inm7fd

emit_prefixes:
  - dlidentifiers
  - dlthings
  - dltypes
  - inm7
  - inm7fb
  - inm7fd
  - rdf
  - rdfs
  - skos
  - xsd

imports:
  - inm7schemas:flat-base/unreleased

slots:
  byte_size:
    description: >-
      The size of the subject in bytes.
    range: NonNegativeInteger
    exact_mappings:
      - dcat:byteSize

  checksums:
    description: >-
      The checksum property provides a mechanism that can be used to verify
      that the contents of a file or package have not changed.
    range: Checksum
    multivalued: true
    inlined: true
    inlined_as_list: true
    exact_mappings:
      - spdx:checksum

  derived_from:
    title: Derived from
    description: >-
      A entity from which the subject was created through some kind of process.

  dimensions:
    title: Outcomes variables
    description: >-
      Associated outcome variables.
    range: Dimension
    multivalued: true

  distribution_of:
    description: >-
      The resource that the subject is a distribution of.
    range: DataItem
    broad_mappings:
      - sio:SIO_000426

  factors:
    title: Influencing factors
    description: >-
      Factors that influence the subject matter.
    range: Factor
    multivalued: true

  factor_level_of:
    title: Level of
    description: >-
      A factor the subject is a (sub)level of.
    range: Factor

  format:
    description: >-
      The file format of a distribution.
    range: FileFormat
    exact_mappings:
      - dcterms:format
    notes:
      - When type of the distribution is defined by IANA, `media_type` should be used.

  generated_by:
    title: Generated by
    description: >-
      Identification of the process that led to the production of the subject entity.
    range: StudyActivity
    exact_mappings:
      - prov:wasGeneratedBy

  implements:
    title: Implemented protocols
    description: >-
      Protocols or standards that are relevant for the subject.
      For example particular standard operating procedures,
      data acquisition techniques, or organization standards.
    range: Protocol
    multivalued: true
    broad_mappings:
      - dcterms:conformsTo

  instruments:
    title: Used instruments
    description: >-
      Instruments employed in a study activity. This could be physical
      devices, but also software tools.
    range: Instrument
    multivalued: true

  media_type:
    description: >-
      The media type of a distribution as defined by IANA
    range: string
    examples:
      - value: text/csv
    see_also:
      - https://www.iana.org/assignments/media-types
    exact_mappings:
      - dcat:mediaType

  part_of:
    description: >-
      The entity that the subject is a part of. A core relation that
      holds between a part and its whole.
    exact_mappings:
      - obo:BFO_0000050
      - dcterms:isPartOf
  
  primary_source:
    title: Primary source
    description: >-
      The entity that is the primary source for the current entity.
      A primary source for a topic refers to something produced by some
      agent with direct experience and knowledge about the topic, at the
      time of the topic's study, without benefit from hindsight.
    exact_mappings:
      - prov:hadPrimarySource

  subject_type:
    title: 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

  study:
    title: Study context
    description: >-
      The study in which the subject took place or existed.
    range: Study

  subjects:
    title: Studied subjects
    description: >-
      Studied subjects.
    range: Subject
    multivalued: true

  unit:
    title: Unit
    description: >-
      Unit of the quantitative value associated with the subject entity.
    range: Unit


classes:
  Dataset:
    class_uri: inm7fd: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:
      - dimensions
      - name
      - part_of
      - primary_source
      - short_name
    slot_usage:
      name:
        recommended: true
        annotations:
          sh:order: 1
      short_name:
        annotations:
          sh:order: 2
      part_of:
        range: Dataset
        annotations:
          sh:order: 3
      primary_source:
        range: Study
        annotations:
          sh:order: 4
      dimensions:
        annotations:
          sh:order: 5
      description:
        annotations:
          sh:order: 6
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 7

  DataItem:
    class_uri: inm7fd: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:
      - derived_from
      - dimensions
      - generated_by
      - part_of
      - unit
      - value
    slot_usage:
      part_of:
        required: true
        range: Dataset
        annotations:
          sh:order: 1
      generated_by:
        required: true
        annotations:
          sh:order: 2
      derived_from:
        range: Subject
        annotations:
          sh:order: 3
      value:
        annotations:
          sh:order: 4
      unit:
        annotations:
          sh:order: 5
      dimensions:
        recommended: true
        annotations:
          sh:order: 6
      description:
        annotations:
          sh:order: 7
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 8

  Distribution:
    class_uri: inm7fd:Distribution
    is_a: Thing
    mixins:
      - CurationAid
    description: >-
      A specific representation of a data item, which may come in the form of
      an electronic file, or an archive or directory of many files, may be
      standalone or part of a larger collection.
    slots:
      - byte_size
      - checksums
      - distribution_of
      - format
      - media_type
      - name
      - part_of
    slot_usage:
      distribution_of:
        required: true
        any_of:
          - range: Dataset
          - range: DataItem
        annotations:
          sh:order: 1
      name:
        recommended: true
        description: >-
          (File) name of the distribution. If the distribution is part of
          another distribution, the name is interpreted as a relative path
          within the parent distribution. This relative path may contain
          intermediate directories, and must be encoded using POSIX
          conventions.
        annotations:
          sh:order: 2
      part_of:
        range: Distribution
        annotations:
          sh:order: 3
      byte_size:
        recommended: true
        annotations:
          sh:order: 4
      format:
        annotations:
          sh:order: 5
      media_type:
        annotations:
          sh:order: 6
      checksums:
        annotations:
          sh:order: 7
      description:
        annotations:
          sh:order: 8
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 9

  Dimension:
    class_uri: inm7fd:Dimension
    is_a: Thing
    mixins:
      - CurationAid
    description: >-
      A dependent or outcome variable.
    slots:
      - name
      - short_name
    slot_usage:
      name:
        recommended: true
        annotations:
          sh:order: 1
      short_name:
        annotations:
          sh:order: 2
      description:
        annotations:
          sh:order: 3
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 4

  Factor:
    class_uri: inm7fd: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`.
    slot_usage:
      name:
        recommended: true
        annotations:
          sh:order: 1
      short_name:
        annotations:
          sh:order: 2
      factor_level_of:
        annotations:
          sh:order: 3
      description:
        annotations:
          sh:order: 4
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 5

  FileFormat:
    class_uri: inm7fd:FileFormat
    is_a: Thing
    mixins:
      - CurationAid
    description: >-
      The file format of a distribution.
    slots:
      - name
      - short_name
    slot_usage:
      name:
        recommended: true
        annotations:
          sh:order: 1
      short_name:
        annotations:
          sh:order: 2
      description:
        annotations:
          sh:order: 3
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 4

  Instrument:
    class_uri: inm7fd: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
    slot_usage:
      name:
        recommended: true
        annotations:
          sh:order: 1
      short_name:
        annotations:
          sh:order: 2
      description:
        annotations:
          sh:order: 3
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 4

  Protocol:
    class_uri: inm7fd: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
    slot_usage:
      name:
        recommended: true
        annotations:
          sh:order: 1
      short_name:
        annotations:
          sh:order: 2
      description:
        annotations:
          sh:order: 3
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 4

  Study:
    class_uri: inm7fd:Study
    is_a: Thing
    mixins:
      - CurationAid
    description: >-
      A planned process that consists of parts: planning, study design
      execution, documentation and which produce conclusion(s).
    exact_mappings:
      - obo:OBI_0000066
      - sio:SIO_001066
    narrow_mappings:
      - sio:SIO_000994
      - obo:NCIT_C15206
    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
      - implements
      - name
      - short_name
    slot_usage:
      name:
        recommended: true
        annotations:
          sh:order: 1
      short_name:
        annotations:
          sh:order: 2
      implements:
        recommended: true
        annotations:
          sh:order: 3
      factors:
        recommended: true
        annotations:
          sh:order: 4
      instruments:
        annotations:
          sh:order: 5
      dimensions:
        recommended: true
        annotations:
          sh:order: 6
      description:
        annotations:
          sh:order: 7
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 8

  StudyActivity:
    class_uri: inm7fd: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
      - implements
      - part_of
      - study
      - subjects
    slot_usage:
      study:
        required: true
        annotations:
          sh:order: 1
      subjects:
        recommended: true
        annotations:
          sh:order: 2
      implements:
        recommended: true
        annotations:
          sh:order: 3
      factors:
        recommended: true
        annotations:
          sh:order: 4
      instruments:
        annotations:
          sh:order: 5
      part_of:
        range: StudyActivity
        annotations:
          sh:order: 6
      description:
        annotations:
          sh:order: 7
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 8

  Subject:
    class_uri: inm7fd: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:
      - derived_from
      - name
      - study
      - subject_type
    slot_usage:
      study:
        required: true
        annotations:
          sh:order: 1
      name:
        recommended: true
        annotations:
          sh:order: 2
      subject_type:
        recommended: true
        annotations:
          sh:order: 3
      derived_from:
        range: Subject
        title: Specimen of
        description: >-
          Source subject.
        annotations:
          sh:order: 4
      description:
        annotations:
          sh:order: 5
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 6

  SubjectType:
    class_uri: inm7fd:SubjectType
    is_a: Thing
    mixins:
      - CurationAid
    description: >-
      Classifier for the nature of a subject.
    slots:
      - name
    slot_usage:
      name:
        recommended: true
        annotations:
          sh:order: 1
      description:
        annotations:
          sh:order: 2
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 3

  Unit:
    class_uri: inm7fd:Unit
    is_a: Thing
    mixins:
      - CurationAid
    description: >-
      Standardized quantity of a physical quality.
    slots:
      - name
      - short_name
    exact_mappings:
      - obo:UO_0000000
    slot_usage:
      name:
        recommended: true
        annotations:
          sh:order: 1
      short_name:
        annotations:
          sh:order: 2
      description:
        annotations:
          sh:order: 3
          dash:singleLine: false
      display_label:
        recommended: true
        annotations:
          sh:order: 4
