Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Sample grouping class in order to remove any_of range constraints #2244

Merged
merged 4 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/schema/basic_classes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,7 @@ classes:
slot_usage:
has_input:
required: true
any_of:
- range: Biosample
- range: ProcessedSample
range: Sample
structured_pattern:
syntax: "{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$"
interpolated: true
Expand Down
17 changes: 11 additions & 6 deletions src/schema/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ classes:
syntax: "{id_nmdc_prefix}:frsite-{id_shoulder}-{id_blade}$"
interpolated: true

Sample:
class_uri: 'nmdc:Sample'
description: A sample is a material entity that can be characterized by an experiment.
is_a: MaterialEntity
abstract: true


Biosample:
class_uri: 'nmdc:Biosample'
Expand Down Expand Up @@ -270,8 +276,9 @@ classes:
unique_keys:
samp_name_unique_key:
unique_key_slots:
- samp_name # id is already required to be unique because it is the identifier in Biosample's parent class, NamedThing
is_a: MaterialEntity
- samp_name # id is already required to be unique because it is the identifier
# in Biosample's ancestor class, NamedThing (parent is MaterialEntity)
is_a: Sample
in_subset:
- sample subset
aliases:
Expand Down Expand Up @@ -1219,9 +1226,7 @@ classes:
- This class is a replacement for BiosampleProcessing.
slot_usage:
has_input:
any_of:
- range: Biosample
- range: ProcessedSample
range: Sample
structured_pattern:
syntax: "{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$"
interpolated: true
Expand Down Expand Up @@ -1251,7 +1256,7 @@ classes:

ProcessedSample:
class_uri: nmdc:ProcessedSample
is_a: MaterialEntity
is_a: Sample
title: Processed Sample
slots:
- biomaterial_purity
Expand Down
20 changes: 5 additions & 15 deletions src/schema/nmdc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,7 @@ classes:
slot_usage:
has_input:
required: true
any_of:
- range: Biosample
- range: ProcessedSample
range: Sample
structured_pattern:
syntax: "{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$"
interpolated: true
Expand Down Expand Up @@ -546,9 +544,7 @@ classes:
mass:
description: The output mass of the SubSampling Process.
has_input:
any_of:
- range: Biosample
- range: ProcessedSample
range: Sample
structured_pattern: # MAM 2024-05-22 isn't that inherited from a parent class?
syntax: "{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$"
interpolated: true
Expand Down Expand Up @@ -581,9 +577,7 @@ classes:
structured_pattern:
syntax: "{id_nmdc_prefix}:mixpro-{id_shoulder}-{id_blade}$"
has_input:
any_of:
- range: Biosample
- range: ProcessedSample
range: Sample
structured_pattern: # MAM 2024-05-22 isn't that inherited from a parent class?
syntax: "{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$"
interpolated: true
Expand Down Expand Up @@ -624,9 +618,7 @@ classes:
volume:
description: The volume of sample filtered.
has_input:
any_of:
- range: Biosample
- range: ProcessedSample
range: Sample
structured_pattern:
syntax: "{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$"
interpolated: true
Expand Down Expand Up @@ -684,9 +676,7 @@ classes:
structured_pattern:
syntax: "{id_nmdc_prefix}:cspro-{id_shoulder}-{id_blade}$"
has_input:
any_of:
- range: Biosample
- range: ProcessedSample
range: Sample
structured_pattern:
syntax: "{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$"
interpolated: true
Expand Down