diff --git a/nmdc_schema/nmdc.py b/nmdc_schema/nmdc.py index cf0df9699b..a7f328d9b2 100644 --- a/nmdc_schema/nmdc.py +++ b/nmdc_schema/nmdc.py @@ -1,5 +1,6 @@ # Auto generated from nmdc.yaml by pythongen.py version: 0.0.1 -# Generation date: 2024-11-13T01:04:03 + +# Generation date: 2024-10-31T16:13:01 # Schema: NMDC # # id: https://w3id.org/nmdc/nmdc @@ -113,6 +114,7 @@ NEON_IDENTIFIER = CurieNamespace('neon_identifier', 'http://example.org/neon/identifier/') NEON_SCHEMA = CurieNamespace('neon_schema', 'http://example.org/neon/schema/') NMDC = CurieNamespace('nmdc', 'https://w3id.org/nmdc/') +OWL = CurieNamespace('owl', 'http://www.w3.org/2002/07/owl#') PROV = CurieNamespace('prov', 'http://www.w3.org/ns/prov#') QUD = CurieNamespace('qud', 'http://qudt.org/1.1/schema/qudt#') RDF = CurieNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#') @@ -1349,6 +1351,9 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): @dataclass(repr=False) class OntologyClass(NamedThing): + """ + This class is used to represent ontology terms. + """ _inherited_slots: ClassVar[List[str]] = [] class_class_uri: ClassVar[URIRef] = NMDC["OntologyClass"] @@ -1358,6 +1363,9 @@ class OntologyClass(NamedThing): id: Union[str, OntologyClassId] = None type: Union[str, URIorCURIE] = None + alternative_names: Optional[Union[str, List[str]]] = empty_list() + definition: Optional[str] = None + relations: Optional[Union[Union[dict, "OntologyRelation"], List[Union[dict, "OntologyRelation"]]]] = empty_list() def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self._is_empty(self.id): @@ -1365,6 +1373,17 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if not isinstance(self.id, OntologyClassId): self.id = OntologyClassId(self.id) + if not isinstance(self.alternative_names, list): + self.alternative_names = [self.alternative_names] if self.alternative_names is not None else [] + self.alternative_names = [v if isinstance(v, str) else str(v) for v in self.alternative_names] + + if self.definition is not None and not isinstance(self.definition, str): + self.definition = str(self.definition) + + if not isinstance(self.relations, list): + self.relations = [self.relations] if self.relations is not None else [] + self.relations = [v if isinstance(v, OntologyRelation) else OntologyRelation(**as_dict(v)) for v in self.relations] + super().__post_init__(**kwargs) if self._is_empty(self.type): self.MissingRequiredField("type") @@ -1488,7 +1507,6 @@ class ChemicalEntity(OntologyClass): id: Union[str, ChemicalEntityId] = None type: Union[str, URIorCURIE] = None - alternative_names: Optional[Union[str, List[str]]] = empty_list() chemical_formula: Optional[str] = None inchi: Optional[str] = None inchi_key: Optional[str] = None @@ -1500,10 +1518,6 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if not isinstance(self.id, ChemicalEntityId): self.id = ChemicalEntityId(self.id) - if not isinstance(self.alternative_names, list): - self.alternative_names = [self.alternative_names] if self.alternative_names is not None else [] - self.alternative_names = [v if isinstance(v, str) else str(v) for v in self.alternative_names] - if self.chemical_formula is not None and not isinstance(self.chemical_formula, str): self.chemical_formula = str(self.chemical_formula) @@ -1523,6 +1537,51 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): self.type = str(self.class_class_curie) +@dataclass(repr=False) +class OntologyRelation(YAMLRoot): + """ + A relationship between two ontology classes as specified either directly in the ontology in the form of axioms + (statements or assertions that defines rules or constraints in an ontology) or inferred via reasoning. The + association object is defined by two terms (the subject and the object) and the relationship between them (the + predicate). Because ontologies often have a plethora of relationships/axiom types and can have additional metadata + on the relationship itself, these kinds of relationships are structured as a class instead of a simple set of + slots on OntologyClass itself. + """ + _inherited_slots: ClassVar[List[str]] = [] + + class_class_uri: ClassVar[URIRef] = NMDC["OntologyRelation"] + class_class_curie: ClassVar[str] = "nmdc:OntologyRelation" + class_name: ClassVar[str] = "OntologyRelation" + class_model_uri: ClassVar[URIRef] = NMDC.OntologyRelation + + type: Union[str, URIorCURIE] = None + subject: Union[str, OntologyClassId] = None + predicate: Union[str, OntologyClassId] = None + object: Union[str, OntologyClassId] = None + + def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): + if self._is_empty(self.type): + self.MissingRequiredField("type") + self.type = str(self.class_class_curie) + + if self._is_empty(self.subject): + self.MissingRequiredField("subject") + if not isinstance(self.subject, OntologyClassId): + self.subject = OntologyClassId(self.subject) + + if self._is_empty(self.predicate): + self.MissingRequiredField("predicate") + if not isinstance(self.predicate, OntologyClassId): + self.predicate = OntologyClassId(self.predicate) + + if self._is_empty(self.object): + self.MissingRequiredField("object") + if not isinstance(self.object, OntologyClassId): + self.object = OntologyClassId(self.object) + + super().__post_init__(**kwargs) + + @dataclass(repr=False) class FailureCategorization(YAMLRoot): _inherited_slots: ClassVar[List[str]] = [] @@ -9881,6 +9940,9 @@ class slots: slots.chemical_entity_set = Slot(uri=NMDC.chemical_entity_set, name="chemical_entity_set", curie=NMDC.curie('chemical_entity_set'), model_uri=NMDC.chemical_entity_set, domain=None, range=Optional[Union[Dict[Union[str, ChemicalEntityId], Union[dict, ChemicalEntity]], List[Union[dict, ChemicalEntity]]]]) +slots.ontology_class_set = Slot(uri=NMDC.ontology_class_set, name="ontology_class_set", curie=NMDC.curie('ontology_class_set'), + model_uri=NMDC.ontology_class_set, domain=None, range=Optional[Union[Dict[Union[str, OntologyClassId], Union[dict, OntologyClass]], List[Union[dict, OntologyClass]]]]) + slots.biosample_set = Slot(uri=NMDC.biosample_set, name="biosample_set", curie=NMDC.curie('biosample_set'), model_uri=NMDC.biosample_set, domain=None, range=Optional[Union[Dict[Union[str, BiosampleId], Union[dict, Biosample]], List[Union[dict, Biosample]]]]) @@ -10815,7 +10877,7 @@ class slots: slots.alternative_identifiers = Slot(uri=NMDC.alternative_identifiers, name="alternative_identifiers", curie=NMDC.curie('alternative_identifiers'), model_uri=NMDC.alternative_identifiers, domain=None, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], - pattern=re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$')) + pattern=re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$')) slots.start_date = Slot(uri=NMDC.start_date, name="start_date", curie=NMDC.curie('start_date'), model_uri=NMDC.start_date, domain=None, range=Optional[str]) @@ -12437,6 +12499,21 @@ class slots: slots.sequencing_field = Slot(uri=MIXS.sequencing_field, name="sequencing field", curie=MIXS.curie('sequencing_field'), model_uri=NMDC.sequencing_field, domain=None, range=Optional[str]) +slots.ontologyClass__definition = Slot(uri=NMDC['basic_classes/definition'], name="ontologyClass__definition", curie=NMDC.curie('basic_classes/definition'), + model_uri=NMDC.ontologyClass__definition, domain=None, range=Optional[str]) + +slots.ontologyClass__relations = Slot(uri=NMDC['basic_classes/relations'], name="ontologyClass__relations", curie=NMDC.curie('basic_classes/relations'), + model_uri=NMDC.ontologyClass__relations, domain=None, range=Optional[Union[Union[dict, OntologyRelation], List[Union[dict, OntologyRelation]]]]) + +slots.ontologyRelation__subject = Slot(uri=NMDC['basic_classes/subject'], name="ontologyRelation__subject", curie=NMDC.curie('basic_classes/subject'), + model_uri=NMDC.ontologyRelation__subject, domain=None, range=Union[str, OntologyClassId]) + +slots.ontologyRelation__predicate = Slot(uri=NMDC['basic_classes/predicate'], name="ontologyRelation__predicate", curie=NMDC.curie('basic_classes/predicate'), + model_uri=NMDC.ontologyRelation__predicate, domain=None, range=Union[str, OntologyClassId]) + +slots.ontologyRelation__object = Slot(uri=NMDC['basic_classes/object'], name="ontologyRelation__object", curie=NMDC.curie('basic_classes/object'), + model_uri=NMDC.ontologyRelation__object, domain=None, range=Union[str, OntologyClassId]) + slots.NucleotideSequencing_id = Slot(uri=NMDC.id, name="NucleotideSequencing_id", curie=NMDC.curie('id'), model_uri=NMDC.NucleotideSequencing_id, domain=NucleotideSequencing, range=Union[str, NucleotideSequencingId], pattern=re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$')) @@ -12779,7 +12856,7 @@ class slots: slots.Biosample_alternative_identifiers = Slot(uri=NMDC.alternative_identifiers, name="Biosample_alternative_identifiers", curie=NMDC.curie('alternative_identifiers'), model_uri=NMDC.Biosample_alternative_identifiers, domain=Biosample, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], - pattern=re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$')) + pattern=re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$')) slots.Biosample_lat_lon = Slot(uri=MIXS['0000009'], name="Biosample_lat_lon", curie=MIXS.curie('0000009'), model_uri=NMDC.Biosample_lat_lon, domain=Biosample, range=Optional[Union[dict, GeolocationValue]]) @@ -12952,7 +13029,7 @@ class slots: slots.Study_alternative_identifiers = Slot(uri=NMDC.alternative_identifiers, name="Study_alternative_identifiers", curie=NMDC.curie('alternative_identifiers'), model_uri=NMDC.Study_alternative_identifiers, domain=Study, range=Optional[Union[Union[str, URIorCURIE], List[Union[str, URIorCURIE]]]], - pattern=re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$')) + pattern=re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$')) slots.Study_alternative_names = Slot(uri=NMDC.alternative_names, name="Study_alternative_names", curie=NMDC.curie('alternative_names'), model_uri=NMDC.Study_alternative_names, domain=Study, range=Optional[Union[str, List[str]]]) diff --git a/nmdc_schema/nmdc.schema.json b/nmdc_schema/nmdc.schema.json index f86179a14f..6a5ca3dccd 100644 --- a/nmdc_schema/nmdc.schema.json +++ b/nmdc_schema/nmdc.schema.json @@ -339,7 +339,7 @@ "alternative_identifiers": { "description": "Unique identifier for a biosample submitted to additional resources. Matches the entity that has been submitted to NMDC", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -5567,7 +5567,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -5733,7 +5733,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -5915,7 +5915,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -5940,6 +5940,13 @@ "null" ] }, + "definition": { + "description": "The definition of the ontology term as provided by the ontology.", + "type": [ + "string", + "null" + ] + }, "description": { "description": "a human-readable description of a thing", "type": [ @@ -5971,6 +5978,15 @@ "null" ] }, + "relations": { + "items": { + "$ref": "#/$defs/OntologyRelation" + }, + "type": [ + "array", + "null" + ] + }, "smiles": { "description": "A string encoding of a molecular graph, no chiral or isotopic information. There are usually a large number of valid SMILES which represent a given structure. For example, CCO, OCC and C(O)C all specify the structure of ethanol.", "items": { @@ -6013,7 +6029,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -6177,7 +6193,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -6251,7 +6267,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -6590,7 +6606,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -7001,7 +7017,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -7406,7 +7422,17 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "alternative_names": { + "description": "A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.", + "items": { "type": "string" }, "type": [ @@ -7414,6 +7440,13 @@ "null" ] }, + "definition": { + "description": "The definition of the ontology term as provided by the ontology.", + "type": [ + "string", + "null" + ] + }, "description": { "description": "a human-readable description of a thing", "type": [ @@ -7433,6 +7466,15 @@ "null" ] }, + "relations": { + "items": { + "$ref": "#/$defs/OntologyRelation" + }, + "type": [ + "array", + "null" + ] + }, "type": { "description": "the class_uri of the class that has been instantiated", "enum": [ @@ -7547,7 +7589,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -7826,7 +7868,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -8060,7 +8102,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -8463,7 +8505,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -8807,7 +8849,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -8958,7 +9000,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -9400,7 +9442,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -9741,7 +9783,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -9940,7 +9982,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -10053,7 +10095,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -10137,7 +10179,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -10335,7 +10377,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -10547,7 +10589,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -10932,7 +10974,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -11121,7 +11163,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -11310,7 +11352,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -11522,7 +11564,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -11907,7 +11949,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -12066,7 +12108,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -12304,7 +12346,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -12458,7 +12500,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -12688,12 +12730,22 @@ }, "OntologyClass": { "additionalProperties": false, - "description": "", + "description": "This class is used to represent ontology terms.", "properties": { "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "alternative_names": { + "description": "A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.", + "items": { "type": "string" }, "type": [ @@ -12701,6 +12753,13 @@ "null" ] }, + "definition": { + "description": "The definition of the ontology term as provided by the ontology.", + "type": [ + "string", + "null" + ] + }, "description": { "description": "a human-readable description of a thing", "type": [ @@ -12720,6 +12779,15 @@ "null" ] }, + "relations": { + "items": { + "$ref": "#/$defs/OntologyRelation" + }, + "type": [ + "array", + "null" + ] + }, "type": { "description": "the class_uri of the class that has been instantiated", "enum": [ @@ -12735,6 +12803,36 @@ "title": "OntologyClass", "type": "object" }, + "OntologyRelation": { + "additionalProperties": false, + "description": "A relationship between two ontology classes as specified either directly in the ontology in the form of axioms (statements or assertions that defines rules or constraints in an ontology) or inferred via reasoning. The association object is defined by two terms (the subject and the object) and the relationship between them (the predicate). Because ontologies often have a plethora of relationships/axiom types and can have additional metadata on the relationship itself, these kinds of relationships are structured as a class instead of a simple set of slots on OntologyClass itself.", + "properties": { + "object": { + "type": "string" + }, + "predicate": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "type": { + "description": "the class_uri of the class that has been instantiated", + "enum": [ + "nmdc:OntologyRelation" + ], + "type": "string" + } + }, + "required": [ + "type", + "subject", + "predicate", + "object" + ], + "title": "OntologyRelation", + "type": "object" + }, "OrganismCountEnum": { "description": "", "enum": [ @@ -12752,7 +12850,17 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "alternative_names": { + "description": "A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.", + "items": { "type": "string" }, "type": [ @@ -12760,6 +12868,13 @@ "null" ] }, + "definition": { + "description": "The definition of the ontology term as provided by the ontology.", + "type": [ + "string", + "null" + ] + }, "description": { "description": "a human-readable description of a thing", "type": [ @@ -12779,6 +12894,15 @@ "null" ] }, + "relations": { + "items": { + "$ref": "#/$defs/OntologyRelation" + }, + "type": [ + "array", + "null" + ] + }, "type": { "description": "the class_uri of the class that has been instantiated", "enum": [ @@ -12811,7 +12935,17 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "alternative_names": { + "description": "A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.", + "items": { "type": "string" }, "type": [ @@ -12819,6 +12953,13 @@ "null" ] }, + "definition": { + "description": "The definition of the ontology term as provided by the ontology.", + "type": [ + "string", + "null" + ] + }, "description": { "description": "a human-readable description of a thing", "type": [ @@ -12838,6 +12979,15 @@ "null" ] }, + "relations": { + "items": { + "$ref": "#/$defs/OntologyRelation" + }, + "type": [ + "array", + "null" + ] + }, "type": { "description": "the class_uri of the class that has been instantiated", "enum": [ @@ -13047,7 +13197,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -13257,7 +13407,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -13473,7 +13623,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -13727,7 +13877,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -13916,7 +14066,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -14528,7 +14678,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -14689,7 +14839,7 @@ "alternative_identifiers": { "description": "Unique identifier for a study submitted to additional resources. Matches that which has been submitted to NMDC", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -15003,7 +15153,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ diff --git a/nmdc_schema/nmdc_materialized_patterns.schema.json b/nmdc_schema/nmdc_materialized_patterns.schema.json index 13ac19cc4a..56b5e212c4 100644 --- a/nmdc_schema/nmdc_materialized_patterns.schema.json +++ b/nmdc_schema/nmdc_materialized_patterns.schema.json @@ -339,7 +339,7 @@ "alternative_identifiers": { "description": "Unique identifier for a biosample submitted to additional resources. Matches the entity that has been submitted to NMDC", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -5569,7 +5569,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -5735,7 +5735,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -5919,7 +5919,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -5944,6 +5944,13 @@ "null" ] }, + "definition": { + "description": "The definition of the ontology term as provided by the ontology.", + "type": [ + "string", + "null" + ] + }, "description": { "description": "a human-readable description of a thing", "type": [ @@ -5975,6 +5982,15 @@ "null" ] }, + "relations": { + "items": { + "$ref": "#/$defs/OntologyRelation" + }, + "type": [ + "array", + "null" + ] + }, "smiles": { "description": "A string encoding of a molecular graph, no chiral or isotopic information. There are usually a large number of valid SMILES which represent a given structure. For example, CCO, OCC and C(O)C all specify the structure of ethanol.", "items": { @@ -6017,7 +6033,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -6183,7 +6199,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -6257,7 +6273,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -6598,7 +6614,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -7010,7 +7026,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -7417,7 +7433,17 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "alternative_names": { + "description": "A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.", + "items": { "type": "string" }, "type": [ @@ -7425,6 +7451,13 @@ "null" ] }, + "definition": { + "description": "The definition of the ontology term as provided by the ontology.", + "type": [ + "string", + "null" + ] + }, "description": { "description": "a human-readable description of a thing", "type": [ @@ -7444,6 +7477,15 @@ "null" ] }, + "relations": { + "items": { + "$ref": "#/$defs/OntologyRelation" + }, + "type": [ + "array", + "null" + ] + }, "type": { "description": "the class_uri of the class that has been instantiated", "enum": [ @@ -7558,7 +7600,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -7839,7 +7881,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -8074,7 +8116,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -8481,7 +8523,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -8825,7 +8867,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -8976,7 +9018,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -9420,7 +9462,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -9764,7 +9806,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -9969,7 +10011,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -10082,7 +10124,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -10166,7 +10208,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -10367,7 +10409,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -10582,7 +10624,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -10970,7 +11012,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -11162,7 +11204,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -11354,7 +11396,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -11569,7 +11611,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -11957,7 +11999,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -12119,7 +12161,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -12359,7 +12401,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -12516,7 +12558,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -12749,12 +12791,22 @@ }, "OntologyClass": { "additionalProperties": false, - "description": "", + "description": "This class is used to represent ontology terms.", "properties": { "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "alternative_names": { + "description": "A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.", + "items": { "type": "string" }, "type": [ @@ -12762,6 +12814,13 @@ "null" ] }, + "definition": { + "description": "The definition of the ontology term as provided by the ontology.", + "type": [ + "string", + "null" + ] + }, "description": { "description": "a human-readable description of a thing", "type": [ @@ -12781,6 +12840,15 @@ "null" ] }, + "relations": { + "items": { + "$ref": "#/$defs/OntologyRelation" + }, + "type": [ + "array", + "null" + ] + }, "type": { "description": "the class_uri of the class that has been instantiated", "enum": [ @@ -12796,6 +12864,36 @@ "title": "OntologyClass", "type": "object" }, + "OntologyRelation": { + "additionalProperties": false, + "description": "A relationship between two ontology classes as specified either directly in the ontology in the form of axioms (statements or assertions that defines rules or constraints in an ontology) or inferred via reasoning. The association object is defined by two terms (the subject and the object) and the relationship between them (the predicate). Because ontologies often have a plethora of relationships/axiom types and can have additional metadata on the relationship itself, these kinds of relationships are structured as a class instead of a simple set of slots on OntologyClass itself.", + "properties": { + "object": { + "type": "string" + }, + "predicate": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "type": { + "description": "the class_uri of the class that has been instantiated", + "enum": [ + "nmdc:OntologyRelation" + ], + "type": "string" + } + }, + "required": [ + "type", + "subject", + "predicate", + "object" + ], + "title": "OntologyRelation", + "type": "object" + }, "OrganismCountEnum": { "description": "", "enum": [ @@ -12813,7 +12911,17 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "alternative_names": { + "description": "A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.", + "items": { "type": "string" }, "type": [ @@ -12821,6 +12929,13 @@ "null" ] }, + "definition": { + "description": "The definition of the ontology term as provided by the ontology.", + "type": [ + "string", + "null" + ] + }, "description": { "description": "a human-readable description of a thing", "type": [ @@ -12840,6 +12955,15 @@ "null" ] }, + "relations": { + "items": { + "$ref": "#/$defs/OntologyRelation" + }, + "type": [ + "array", + "null" + ] + }, "type": { "description": "the class_uri of the class that has been instantiated", "enum": [ @@ -12872,7 +12996,17 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", + "type": "string" + }, + "type": [ + "array", + "null" + ] + }, + "alternative_names": { + "description": "A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.", + "items": { "type": "string" }, "type": [ @@ -12880,6 +13014,13 @@ "null" ] }, + "definition": { + "description": "The definition of the ontology term as provided by the ontology.", + "type": [ + "string", + "null" + ] + }, "description": { "description": "a human-readable description of a thing", "type": [ @@ -12899,6 +13040,15 @@ "null" ] }, + "relations": { + "items": { + "$ref": "#/$defs/OntologyRelation" + }, + "type": [ + "array", + "null" + ] + }, "type": { "description": "the class_uri of the class that has been instantiated", "enum": [ @@ -13108,7 +13258,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -13320,7 +13470,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -13536,7 +13686,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -13793,7 +13943,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -13985,7 +14135,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -14600,7 +14750,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -14763,7 +14913,7 @@ "alternative_identifiers": { "description": "Unique identifier for a study submitted to additional resources. Matches that which has been submitted to NMDC", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ @@ -15078,7 +15228,7 @@ "alternative_identifiers": { "description": "A list of alternative identifiers for the entity.", "items": { - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,\\(\\)\\=\\#]*$", "type": "string" }, "type": [ diff --git a/nmdc_schema/nmdc_materialized_patterns.yaml b/nmdc_schema/nmdc_materialized_patterns.yaml index c1f85dd9db..eb4663e510 100644 --- a/nmdc_schema/nmdc_materialized_patterns.yaml +++ b/nmdc_schema/nmdc_materialized_patterns.yaml @@ -275,6 +275,12 @@ prefixes: MIXS_yaml: prefix_prefix: MIXS_yaml prefix_reference: https://raw.githubusercontent.com/microbiomedata/mixs/main/model/schema/ + BFO: + prefix_prefix: BFO + prefix_reference: http://purl.obolibrary.org/obo/BFO_ + owl: + prefix_prefix: owl + prefix_reference: http://www.w3.org/2002/07/owl# emit_prefixes: - KEGG.ORTHOLOGY - MASSIVE @@ -4711,6 +4717,14 @@ slots: mixins: - object_set range: ChemicalEntity + ontology_class_set: + name: ontology_class_set + description: This property links a database object to the set of ontology classes + within it. + from_schema: https://w3id.org/nmdc/nmdc + mixins: + - object_set + range: OntologyClass biosample_set: name: biosample_set description: This property links a database object to the set of samples within @@ -17932,7 +17946,7 @@ slots: from_schema: https://w3id.org/nmdc/nmdc range: uriorcurie multivalued: true - pattern: ^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$ + pattern: ^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$ start_date: name: start_date description: The date on which any process or activity was started @@ -21184,7 +21198,6 @@ classes: - biolink:ChemicalSubstance is_a: OntologyClass slots: - - alternative_names - chemical_formula - inchi - inchi_key @@ -21493,16 +21506,86 @@ classes: class_uri: nmdc:NamedThing OntologyClass: name: OntologyClass - notes: - - The identifiers for terms from external ontologies can't have their ids constrained - to the nmdc namespace + description: This class is used to represent ontology terms. from_schema: https://w3id.org/nmdc/nmdc + aliases: + - OntologyClass + exact_mappings: + - biolink:OntologyClass + - owl:Class + - schema:Class is_a: NamedThing + slots: + - alternative_names slot_usage: id: name: id + notes: + - The identifiers for terms from external ontologies can't have their ids + constrained to the nmdc namespace pattern: ^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$ + attributes: + definition: + name: definition + description: The definition of the ontology term as provided by the ontology. + from_schema: https://w3id.org/nmdc/basic_classes + range: string + relations: + name: relations + from_schema: https://w3id.org/nmdc/basic_classes + range: OntologyRelation + multivalued: true + inlined: true + inlined_as_list: true class_uri: nmdc:OntologyClass + OntologyRelation: + name: OntologyRelation + description: A relationship between two ontology classes as specified either directly + in the ontology in the form of axioms (statements or assertions that defines + rules or constraints in an ontology) or inferred via reasoning. The association + object is defined by two terms (the subject and the object) and the relationship + between them (the predicate). Because ontologies often have a plethora of relationships/axiom + types and can have additional metadata on the relationship itself, these kinds + of relationships are structured as a class instead of a simple set of slots + on OntologyClass itself. + comments: + - 'For example, the relationship between ''soil'' and ''enriched soil'' in the + Environmental Ontology (ENVO) is defined by the following axioms: ''enriched + soil'' subclass_of ''soil'', and ''enriched soil'' has_increased_levels_of + (some) ''material entity.'' Converting these stat∂ements to OntologyAssociations so + they can be used in the NMDC data stores, the subject of the first axiom or + statement, would be ''soil'', the predicate would be ''subclass_of'', and the + object would be ''enriched soil''. For the second axiom, the subject would + be ''enriched soil'', the predicate would be ''has_increased_levels_of'', and + the object would be ''material entity.'' (Note that text labels are used in + this example for ease of understanding and the literal values of subject, predicate, + and object in this class will be the id (curie) of the `OntologyClass` as defined + below). Not all ontology axioms (associations) between terms need to be ingested + into the NMDC data stores. In general, subclass_of and part_of relationships/axioms + are often good default relations/associations to support ontology browsing + in user interfaces.' + from_schema: https://w3id.org/nmdc/nmdc + aliases: + - OntologyAssociation + slots: + - type + attributes: + subject: + name: subject + from_schema: https://w3id.org/nmdc/basic_classes + range: OntologyClass + required: true + predicate: + name: predicate + from_schema: https://w3id.org/nmdc/basic_classes + range: OntologyClass + required: true + object: + name: object + from_schema: https://w3id.org/nmdc/basic_classes + range: OntologyClass + required: true + class_uri: nmdc:OntologyRelation FailureCategorization: name: FailureCategorization from_schema: https://w3id.org/nmdc/nmdc diff --git a/poetry.lock b/poetry.lock index e5aff3d814..6cf17c4809 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,5 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. + [[package]] name = "annotated-types" diff --git a/src/data/valid/OntologyClass-chebi.yaml b/src/data/valid/OntologyClass-chebi.yaml new file mode 100644 index 0000000000..8ac56de39e --- /dev/null +++ b/src/data/valid/OntologyClass-chebi.yaml @@ -0,0 +1,19 @@ +id: CHEBI:17234 +name: glucose +description: >- +type: nmdc:OntologyClass +relations: # http://purl.obolibrary.org/obo/CHEBI_24431 + - subject: CHEBI:17234 # glucose + predicate: BFO:0000050 # subclassOf + object: CHEBI:33917 # aldohexose + type: nmdc:OntologyRelation +alternative_identifiers: + - MetaCyc:Guloses + - PMID:24096672 + - PMID:24367410 + - CHEBI:33938 # term merge + - CHEBI:33931 # term merge + - INCHI:InChI=1S/C25H20N4O2/c1-31-19-13-11-18(12-14-19)25(30)29-24-21(15-26)23(20-9-5-6-10-22(20)28-24)27-16-17-7-3-2-4-8-17/h2-14H,16H2,1H3,(H2,27,28,29,30) + - INCHIKEY:FFHQNQNMELQOEF-UHFFFAOYSA-N + - SMILES:O=C(NC1=NC=2C(C(NCC3=CC=CC=C3)=C1C#N)=CC=CC2)C4=CC=C(OC)C=C4 +alternative_names: diff --git a/src/data/valid/OntologyClass-envo.yaml b/src/data/valid/OntologyClass-envo.yaml new file mode 100644 index 0000000000..876d717e15 --- /dev/null +++ b/src/data/valid/OntologyClass-envo.yaml @@ -0,0 +1,38 @@ +id: ENVO:00001998 +name: soil +description: >- + An environmental material which is primarily composed of minerals, varying proportions of sand, silt, and clay, + organic material such as humus, interstitial gases, liquids, and a broad range of resident micro- and macroorganisms. +type: nmdc:OntologyClass +relations: # http://purl.obolibrary.org/obo/ENVO_00001998 + - subject: ENVO:00001998 # soil + predicate: rdfs:subclassOf # subclassOf + object: ENVO:00010483 # environmental material + type: nmdc:OntologyRelation + - subject: ENVO:00001998 # soil + predicate: rdfs:subclassOf # subclassOf + object: ENVO:01000813 # astronomical body part + type: nmdc:OntologyRelation + - subject: ENVO:00001998 # soil + predicate: BFO:0000050 # partOf + object: ENVO:01000820 # pedosphere + type: nmdc:OntologyRelation + - subject: ENVO:00001998 # soil + predicate: BFO:0000050 # partOf + object: ENVO:01000804 # astronomical object + type: nmdc:OntologyRelation + - subject: ENVO:00001998 # soil + predicate: BFO:0000050 # partOf + object: ENVO:01000799 # astronomical body + type: nmdc:OntologyRelation + - subject: ENVO:00001998 # soil + predicate: BFO:0000050 # partOf + object: ENVO:01000813 # astronomical body part + type: nmdc:OntologyRelation +alternative_identifiers: + - LTER:535 + - SPIRE:Soil + - SWEETRealm:Soil + - wiki:Soil +alternative_names: + - regolith diff --git a/src/schema/basic_classes.yaml b/src/schema/basic_classes.yaml index 5ced943b26..bffade6aa4 100644 --- a/src/schema/basic_classes.yaml +++ b/src/schema/basic_classes.yaml @@ -8,11 +8,22 @@ license: https://creativecommons.org/publicdomain/zero/1.0/ prefixes: linkml: https://w3id.org/linkml/ EFO: http://www.ebi.ac.uk/efo/ + BFO: http://purl.obolibrary.org/obo/BFO_ + rdfs: http://www.w3.org/2000/01/rdf-schema# + biolink: https://w3id.org/biolink/vocab/ + owl: http://www.w3.org/2002/07/owl# + +default_curi_maps: + - obo_context + - idot_context + - monarch_context + - semweb_context imports: - external_identifiers # in cycle with attribute_values - mixs # in cycle with attribute_values + classes: NamedThing: @@ -25,14 +36,70 @@ classes: - description - alternative_identifiers - type + OntologyClass: + aliases: ["OntologyClass"] class_uri: nmdc:OntologyClass + description: >- + This class is used to represent ontology terms. is_a: NamedThing - notes: - - The identifiers for terms from external ontologies can't have their ids constrained to the nmdc namespace + slots: + - alternative_names + attributes: + definition: + range: string + description: >- + The definition of the ontology term as provided by the ontology. + relations: + range: OntologyRelation + multivalued: true + inlined_as_list: true + inlined: true slot_usage: id: pattern: '^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$' + notes: + - The identifiers for terms from external ontologies can't have their ids constrained to the nmdc namespace + exact_mappings: + - biolink:OntologyClass + - owl:Class + - schema:Class + + OntologyRelation: + aliases: ["OntologyAssociation"] + description: >- + A relationship between two ontology classes as specified either directly in the ontology in the form + of axioms (statements or assertions that defines rules or constraints in an ontology) or inferred via + reasoning. The association object is defined by two terms (the subject and the object) and the relationship + between them (the predicate). Because ontologies often have a plethora of relationships/axiom types and can have + additional metadata on the relationship itself, these kinds of relationships are structured as a class instead + of a simple set of slots on OntologyClass itself. + comments: >- + For example, the relationship between 'soil' and 'enriched soil' in the Environmental Ontology (ENVO) + is defined by the following axioms: 'enriched soil' subclass_of 'soil', and 'enriched soil' + has_increased_levels_of (some) 'material entity.' Converting these stat∂ements to OntologyAssociations + so they can be used in the NMDC data stores, the subject of the first axiom or statement, + would be 'soil', the predicate would be 'subclass_of', and the object would be 'enriched soil'. For the second + axiom, the subject would be 'enriched soil', the predicate would be 'has_increased_levels_of', and the object + would be 'material entity.' (Note that text labels are used in this example for ease of understanding and + the literal values of subject, predicate, and object in this class will be the id (curie) of the + `OntologyClass` as defined below). Not all ontology axioms (associations) between terms need to be + ingested into the NMDC data stores. In general, subclass_of and part_of relationships/axioms are often + good default relations/associations to support ontology browsing in user interfaces. + class_uri: nmdc:OntologyRelation + slots: + - type + attributes: + subject: + range: OntologyClass + required: true + predicate: + range: OntologyClass + required: true + object: + range: OntologyClass + required: true + FailureCategorization: class_uri: nmdc:FailureCategorization diff --git a/src/schema/basic_slots.yaml b/src/schema/basic_slots.yaml index 9a25fc02da..1f270e8764 100644 --- a/src/schema/basic_slots.yaml +++ b/src/schema/basic_slots.yaml @@ -550,7 +550,7 @@ slots: multivalued: true description: >- A list of alternative identifiers for the entity. - pattern: '^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$' + pattern: '^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$' start_date: range: string diff --git a/src/schema/core.yaml b/src/schema/core.yaml index ec635640df..4fdda3ac1d 100644 --- a/src/schema/core.yaml +++ b/src/schema/core.yaml @@ -1352,7 +1352,6 @@ classes: comments: - As with the parent OntologyClass, we will not assign an nmdc id pattern or typecode to this class. slots: - - alternative_names - chemical_formula - inchi - inchi_key diff --git a/src/schema/nmdc.yaml b/src/schema/nmdc.yaml index 06b18216fb..8cb69dfccc 100644 --- a/src/schema/nmdc.yaml +++ b/src/schema/nmdc.yaml @@ -1155,6 +1155,13 @@ slots: description: This property links a database object to the set of chemical entities within it. + ontology_class_set: + mixins: + - object_set + range: OntologyClass + description: + This property links a database object to the set of ontology classes + within it. biosample_set: mixins: object_set range: Biosample @@ -1265,6 +1272,7 @@ slots: completion_date: range: string + container_size: range: QuantityValue description: The volume of the container an analyte is stored in or an activity takes place in