Skip to content

Commit

Permalink
added original ansrs schemas. copied exactly from lydia's original an…
Browse files Browse the repository at this point in the history
…srs repo
  • Loading branch information
puja-trivedi committed May 23, 2024
1 parent cb70a5e commit 92eefc9
Show file tree
Hide file tree
Showing 2 changed files with 376 additions and 0 deletions.
328 changes: 328 additions & 0 deletions linkml-schema/ansrs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,328 @@
id: https://w3id.org/my-org/ansrs-schema
name: ansrs-schema
title: ANSRS schema
description: |-
Schema for ANSRS
license: MIT
see_also:
- https://my-org.github.io/ansrs-schema

prefixes:
ANSRS: https://w3id.org/my-org/ansrs-schema/
linkml: https://w3id.org/linkml/
biolink: https://w3id.org/biolink/
schema: http://schema.org/
PATO: http://purl.obolibrary.org/obo/PATO_
example: https://example.org/
default_prefix: ANSRS
default_range: string

imports:
- linkml:types
- ansrs_core

settings:
PositiveFloat: ^[+]?\d*\.?\d+$
ColorHexTriplet: "#[0-9a-fA-F]{6}"

classes:
ImageDataset:
is_a: VersionedNamedThing
description: >-
An image dataset is versioned release of a multidimensional regular grid of measurements
and metadata required for a morphological representation of an entity such as an anatomical
structure (ref: OBI_0003327, RRID:SCR_006266)
attributes:
x_direction:
range: ANATOMICAL_DIRECTION
description: >-
A controlled vocabulary attribute defining the x axis direction in terms of anatomical
direction.
y_direction:
range: ANATOMICAL_DIRECTION
description: >-
A controlled vocabulary attribute defining the y axis direction in terms of anatomical
direction.
z_direction:
range: ANATOMICAL_DIRECTION
description: >-
A controlled vocabulary attribute defining the z axis direction in terms of anatomical
direction.
x_size:
range: integer
description: The number of pixels/voxels (size) along the x axis.
minimum_value: 1
y_size:
range: integer
description: The number of pixels/voxels (size) along the y axis.
minimum_value: 1
z_size:
range: integer
description: The number of pixels/voxels (size) along the y axis.
minimum_value: 1
x_resolution:
range: float
description: >-
The resolution (length / pixel) in along the x axis (numerical value part).
structured_pattern:
syntax: "{PositiveFloat}"
y_resolution:
range: float
description: >-
The resolution (length / pixel) in along the y axis (numerical value part).
structured_pattern:
syntax: "{PositiveFloat}"
z_resolution:
range: float
description: >-
The resolution (length / pixel) in along the z axis (numerical value part).
structured_pattern:
syntax: "{PositiveFloat}"
unit:
range: DISTANCE_UNIT
description: >-
A controlled vocabulary attribute defining the length unit of the x, y, and z
resolution values.
slot_usage:
revision_of:
range: ImageDataset

AnatomicalSpace:
is_a: VersionedNamedThing
description: >-
An anatomical space is versioned release of a mathematical space with a defined mapping
between the anatomical axes and the mathematical axes. An anatomical space may be defined by
a reference image chosen as the biological reference for an anatomical structure of interest
derived from a single or multiple specimens (ref: ILX:0777106, RRID:SCR_023499)
attributes:
measures:
range: ImageDataset
description: >-
Reference to the specific image dataset used to define the anatomical space.
required: true
slot_usage:
revision_of:
range: AnatomicalSpace

ParcellationTerminology:
is_a: VersionedNamedThing
description: >-
A parcellation terminology is a versioned release set of terms that can be used to label
annotations in an atlas, providing human readability and context and allowing communication
about brain locations and structural properties. Typically, a terminology is a set of
descriptive anatomical terms following a specific naming convention and/or approach to
organization scheme. The terminology may be a flat list of controlled vocabulary, a taxonomy
and partonomy, or an ontology (ref: ILX:0777107, RRID:SCR_023499)
slot_usage:
revision_of:
range: ParcellationTerminology

ParcellationTermSet:
is_a: NamedThing
description: >-
A parcellation term set is the set of parcellation terms within a specific parcellation terminology.
A parcellation term set belongs to one and only one parcellation terminology and each parcellation
term in a parcellation terminology belongs to one and only one term set.
If the parcellation terminology is a taxonomy, parcellation term sets can be used to represent
taxonomic ranks. For consistency, if the terminology does not have the notion of taxonomic ranks,
all terms are grouped into a single parcellation term set.
attributes:
part_of_parcellation_terminology:
range: ParcellationTerminology
description: >-
Reference to the parcellation terminology for which the parcellation term set partitions.
required: true
ordinal:
range: integer
description: >-
Ordinal of the parcellation term set among other term sets within the context of the
associated parcellation terminology.
minimum_value: 0
has_parent_parcellation_term_set:
range: ParcellationTermSet
description: >-
Reference to the parent parcellation term set for which the parcellation term set is a child
(lower taxonomic rank) of.
ParcellationTerm:
is_a: NamedThing
description: >-
A parcellation term is an individual term within a specific parcellation terminology describing a
single anatomical entity by a persistent identifier, name, symbol and description. A parcellation
term is a unique and exclusive member of a versioned release parcellation terminology. Although term
identifiers must be unique within the context of one versioned release of a parcellation terminology,
they can be reused in different parcellation terminology versions enabling the representation of
terminology updates and modifications over time.
attributes:
symbol:
description: Symbol representing a parcellation term.
part_of_parcellation_term_set:
range: ParcellationTermSet
description: >-
Reference to the parcellation term set for which the parcellation term is part of.
required: true
ordinal:
range: integer
description: >-
Ordinal of the parcellation term among other terms within the context of the associated
parcellation terminology.
minimum_value: 0
has_parent_parcellation_term:
range: ParcellationTerm
description: >-
Reference to the parent parcellation term for which the parcellation term is a child (
spatially part) of
ParcellationColorScheme:
is_a: VersionedNamedThing
description: >-
A parcellation color scheme is a versioned release color palette that can be used to visualize a
parcellation terminology or its related parcellation annotation. A parcellation terminology may
have zero or more parcellation color schemes and each color scheme is in context of a specific
parcellation terminology, where each parcellation term is assigned a hex color value. A parcellation
color scheme is defined as a part of one and only one parcellation terminology.
attributes:
subject_parcellation_terminology:
range: ParcellationTerminology
description: >-
Reference to the parcellation terminology for which the parcellation color scheme is in
context of.
required: true
slot_usage:
revision_of:
range: ParcellationColorScheme

ParcellationColorAssignment:
description: >-
The parcellation color assignment associates hex color value to a parcellation term within a
versioned release of a color scheme. A parcellation term is uniquely denoted by a parcellation
term identifier and the parcellation terminology it belongs to.
attributes:
part_of_parcellation_color_scheme:
range: ParcellationColorScheme
description: >-
Reference to the parcellation color scheme for which the color assignment is part of.
required: true
subject_parcellation_term:
range: ParcellationTerm
description: >-
Reference to the parcellation term identifier for which the color assignment is about.
required: true
color:
range: string
description: A string representing to hex triplet code of a color
structured_pattern:
syntax: "{ColorHexTriplet}"

AnatomicalAnnotationSet:
is_a: VersionedNamedThing
description: >-
An anatomical annotation set is a versioned release of a set of anatomical annotations anchored
in the same anatomical space that divides the space into distinct segments following some annotation
criteria or parcellation scheme. For example, the anatomical annotation set of 3D image based
reference atlases (e.g. Allen Mouse CCF) can be expressed as a set of label indices of single
multi-valued image annotations or as a set of segmentation masks (ref: ILX:0777108, RRID:SCR_023499)
attributes:
parameterizes:
range: AnatomicalSpace
description: >-
Reference to the anatomical space for which the anatomical annotation set is anchored
required: true
slot_usage:
revision_of:
range: AnatomicalAnnotationSet

ParcellationAnnotation:
description: >-
A parcellation annotation defines a specific segment of an anatomical space denoted by an internal
identifier and is a unique and exclusive member of a versioned release anatomical annotation set.
For example, in the case where the anatomical annotation set is a single multi-value image mask (e.g. Allen Mouse CCF),
a specific annotation corresponds to a specific label index (internal identifier) in the mask.
attributes:
part_of_anatomical_annotation_set:
range: AnatomicalAnnotationSet
description:
required: true
internal_identifier:
description: >-
An identifier that uniquely denotes a specific parcellation annotation within the context of an anatomical annotation set
required: true
voxel_count:
range: integer
description: >-
The number of voxels (3D pixels) spanned by the parcellation annotation (optional).
minimum_value: 0

ParcellationAnnotationTermMap:
description: >-
The parcellation annotation term map table defines the relationship between parcellation annotations and parcellation terms.
A parcellation term is uniquely denoted by a parcellation term identifier and the parcellation terminology it belongs to.
A parcellation term can be spatially parameterized by the union of one or more parcellation annotations within a versioned
release of an anatomical annotation set. For example, annotations defining individual cortical layers in cortical region
R (R1, R2/3, R4, etc) can be combined to define the parent region R.
attributes:
subject_parcellation_annotation:
range: ParcellationAnnotation
description: >-
Reference to the parcellation annotation that is the subject of the association.
required: true
subject_parcellation_term:
range: ParcellationTerm
description: >-
Reference to the parcellation term that is the subject of the association.
required: true

ParcellationAtlas:
is_a: VersionedNamedThing
description: >-
A parcellation atlas is a versioned release reference used to guide experiments or deal with the spatial relationship between
objects or the location of objects within the context of some anatomical structure. An atlas is minimally defined by a notion
of space (either implicit or explicit) and an annotation set. Reference atlases usually have additional parts that make them
more useful in certain situations, such as a well defined coordinate system, delineations indicating the boundaries of various
regions or cell populations, landmarks, and labels and names to make it easier to communicate about well known and useful
locations (ref: ILX:0777109, RRID:SCR_023499).
attributes:
has_anatomical_space:
range: AnatomicalSpace
description: >-
Reference to the anatomical space component of the parcellation atlas
required: true
has_anatomical_annotation_set:
range: AnatomicalAnnotationSet
description: >-
Reference to the anatomical annotation set component of the parcellation atlas
required: true
has_parcellation_terminology:
range: ParcellationTerminology
description: >-
Reference to the parcellation terminology component of the parcellation atlas
required: true
specialization_of:
range: ParcellationAtlas
description: >-
Reference to the general (non versioned) parcellation atlas for which the parcellation atlas is a specific
version release of.
slot_usage:
revision_of:
range: ParcellationAtlas

enums:
ANATOMICAL_DIRECTION:
description: >-
A controlled vocabulary term defining axis direction in terms of anatomical direction.
permissible_values:
left_to_right:
title: left-to-right
posterior_to_anterior:
title: posterior-to-anterior
inferior_to_superior:
title: inferior-to-superior

DISTANCE_UNIT:
permissible_values:
mm:
title: millimeter
um:
title: micrometer
m:
title: meter
48 changes: 48 additions & 0 deletions linkml-schema/ansrs_core.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
id: https://w3id.org/my-org/ansrs_core
name: ANSRS-Core
title: ANSRS schema Core Types
description: |-
Core types for ANSRS schema
prefixes:
ansrs_schema: https://w3id.org/my-org/ansrs-schema/
linkml: https://w3id.org/linkml/
biolink: https://w3id.org/biolink/
schema: http://schema.org/
PATO: http://purl.obolibrary.org/obo/PATO_
example: https://example.org/
default_prefix: ansrs
default_range: string

classes:
NamedThing:
description: >-
Core base entity for ANSRS schema representing an entity with an identifier
name and description.
abstract: true
slots:
- id
- name
- description

VersionedNamedThing:
is_a: NamedThing
description: >-
Core base entity for ANSRS schema representing an versioned named thing.
abstract: true
slots:
- version
- revision_of
slots:
id:
range: uriorcurie
identifier: true
required: true
name:
required: true
description:
required: true
version:
required: true
revision_of:
range: VersionedNamedThing

0 comments on commit 92eefc9

Please sign in to comment.