from __future__ import annotations

import re
import sys
from datetime import (
    date,
    datetime,
    time
)
from decimal import Decimal
from enum import Enum
from typing import (
    Any,
    ClassVar,
    Literal,
    Optional,
    Union
)

from pydantic import (
    BaseModel,
    ConfigDict,
    Field,
    RootModel,
    SerializationInfo,
    SerializerFunctionWrapHandler,
    field_validator,
    model_serializer
)


metamodel_version = "1.7.0"
version = "11.17.1"


class ConfiguredBaseModel(BaseModel):
    model_config = ConfigDict(
        serialize_by_alias = True,
        validate_by_name = True,
        validate_assignment = True,
        validate_default = True,
        extra = "forbid",
        arbitrary_types_allowed = True,
        use_enum_values = True,
        strict = False,
    )





class LinkMLMeta(RootModel):
    root: dict[str, Any] = {}
    model_config = ConfigDict(frozen=True)

    def __getattr__(self, key:str):
        return getattr(self.root, key)

    def __getitem__(self, key:str):
        return self.root[key]

    def __setitem__(self, key:str, value):
        self.root[key] = value

    def __contains__(self, key:str) -> bool:
        return key in self.root


linkml_meta = LinkMLMeta({'default_prefix': 'nmdc',
     'default_range': 'string',
     'description': 'The NMDC Schema is a foundational framework designed to '
                    'standardize metadata for the National Microbiome Data  '
                    'Collaborative (NMDC) and collaborating data providors. By '
                    'establishing a structured approach to metadata, the NMDC '
                    'Schema enables researchers to organize,  share, and interpret '
                    'complex datasets with consistency and clarity. The NMDC '
                    'Schema is critical substrate used to facilitate  '
                    'interoperability and collaboration, as it provide a common '
                    'language for data exchange across systems and disciplines.  '
                    'In the context of the NMDC, this schema supports the '
                    'integration of microbiome data from medicine, agriculture,  '
                    'bioenergy, and environmental science into a cohesive '
                    'platform.',
     'emit_prefixes': ['KEGG.ORTHOLOGY',
                       'MASSIVE',
                       'biosample',
                       'cas',
                       'doi',
                       'gnps.task',
                       'gold',
                       'img.taxon',
                       'jgi.proposal',
                       'kegg',
                       'rdf',
                       'rdfs',
                       'skos',
                       'xsd'],
     'id': 'https://w3id.org/nmdc/nmdc',
     'license': 'https://creativecommons.org/publicdomain/zero/1.0/',
     'name': 'NMDC',
     'notes': ['not importing any MIxS terms where the relationship between the '
               "name (SCN) and the id isn't 1:1"],
     'prefixes': {'BFO': {'prefix_prefix': 'BFO',
                          'prefix_reference': 'http://purl.obolibrary.org/obo/BFO_'},
                  'CATH': {'prefix_prefix': 'CATH',
                           'prefix_reference': 'https://bioregistry.io/cath:'},
                  'CHEBI': {'prefix_prefix': 'CHEBI',
                            'prefix_reference': 'http://purl.obolibrary.org/obo/CHEBI_'},
                  'CHEMBL.COMPOUND': {'prefix_prefix': 'CHEMBL.COMPOUND',
                                      'prefix_reference': 'https://bioregistry.io/chembl.compound:'},
                  'CHMO': {'prefix_prefix': 'CHMO',
                           'prefix_reference': 'http://purl.obolibrary.org/obo/CHMO_'},
                  'COG': {'prefix_prefix': 'COG',
                          'prefix_reference': 'https://bioregistry.io/cog:'},
                  'Contaminant': {'prefix_prefix': 'Contaminant',
                                  'prefix_reference': 'http://example.org/contaminant/'},
                  'DRUGBANK': {'prefix_prefix': 'DRUGBANK',
                               'prefix_reference': 'https://bioregistry.io/drugbank:'},
                  'EC': {'prefix_prefix': 'EC',
                         'prefix_reference': 'https://bioregistry.io/eccode:'},
                  'EFO': {'prefix_prefix': 'EFO',
                          'prefix_reference': 'http://www.ebi.ac.uk/efo/'},
                  'EGGNOG': {'prefix_prefix': 'EGGNOG',
                             'prefix_reference': 'https://bioregistry.io/eggnog:'},
                  'ENVO': {'prefix_prefix': 'ENVO',
                           'prefix_reference': 'http://purl.obolibrary.org/obo/ENVO_'},
                  'FBcv': {'prefix_prefix': 'FBcv',
                           'prefix_reference': 'http://purl.obolibrary.org/obo/FBcv_'},
                  'FMA': {'prefix_prefix': 'FMA',
                          'prefix_reference': 'http://purl.obolibrary.org/obo/FMA_'},
                  'GENEPIO': {'prefix_prefix': 'GENEPIO',
                              'prefix_reference': 'http://purl.obolibrary.org/obo/GENEPIO_'},
                  'GO': {'prefix_prefix': 'GO',
                         'prefix_reference': 'http://purl.obolibrary.org/obo/GO_'},
                  'HMDB': {'prefix_prefix': 'HMDB',
                           'prefix_reference': 'https://bioregistry.io/hmdb:'},
                  'ISA': {'prefix_prefix': 'ISA',
                          'prefix_reference': 'http://example.org/isa/'},
                  'KEGG.COMPOUND': {'prefix_prefix': 'KEGG.COMPOUND',
                                    'prefix_reference': 'https://bioregistry.io/kegg.compound:'},
                  'KEGG.MODULE': {'prefix_prefix': 'KEGG.MODULE',
                                  'prefix_reference': 'https://bioregistry.io/kegg.module:'},
                  'KEGG.ORTHOLOGY': {'prefix_prefix': 'KEGG.ORTHOLOGY',
                                     'prefix_reference': 'https://bioregistry.io/kegg.orthology:'},
                  'KEGG.REACTION': {'prefix_prefix': 'KEGG.REACTION',
                                    'prefix_reference': 'https://bioregistry.io/kegg.reaction:'},
                  'KEGG_PATHWAY': {'prefix_prefix': 'KEGG_PATHWAY',
                                   'prefix_reference': 'https://bioregistry.io/kegg.pathway:'},
                  'MASSIVE': {'prefix_prefix': 'MASSIVE',
                              'prefix_reference': 'https://bioregistry.io/reference/massive:'},
                  'MCO': {'prefix_prefix': 'MCO',
                          'prefix_reference': 'http://purl.obolibrary.org/obo/MICRO_'},
                  'MESH': {'prefix_prefix': 'MESH',
                           'prefix_reference': 'https://bioregistry.io/mesh:'},
                  'MISO': {'prefix_prefix': 'MISO',
                           'prefix_reference': 'http://purl.obolibrary.org/obo/MISO_'},
                  'MIXS': {'prefix_prefix': 'MIXS',
                           'prefix_reference': 'https://w3id.org/mixs/'},
                  'MS': {'prefix_prefix': 'MS',
                         'prefix_reference': 'http://purl.obolibrary.org/obo/MS_'},
                  'MetaCyc': {'prefix_prefix': 'MetaCyc',
                              'prefix_reference': 'https://bioregistry.io/metacyc.compound:'},
                  'MetaNetX': {'prefix_prefix': 'MetaNetX',
                               'prefix_reference': 'http://example.org/metanetx/'},
                  'NCBI': {'prefix_prefix': 'NCBI',
                           'prefix_reference': 'http://example.org/ncbitaxon/'},
                  'NCBITaxon': {'prefix_prefix': 'NCBITaxon',
                                'prefix_reference': 'http://purl.obolibrary.org/obo/NCBITaxon_'},
                  'NCIT': {'prefix_prefix': 'NCIT',
                           'prefix_reference': 'http://purl.obolibrary.org/obo/NCIT_'},
                  'OBI': {'prefix_prefix': 'OBI',
                          'prefix_reference': 'http://purl.obolibrary.org/obo/OBI_'},
                  'OMIT': {'prefix_prefix': 'OMIT',
                           'prefix_reference': 'http://purl.obolibrary.org/obo/OMIT_'},
                  'ORCID': {'prefix_prefix': 'ORCID',
                            'prefix_reference': 'https://orcid.org/'},
                  'PANTHER.FAMILY': {'prefix_prefix': 'PANTHER.FAMILY',
                                     'prefix_reference': 'https://bioregistry.io/panther.family:'},
                  'PATO': {'prefix_prefix': 'PATO',
                           'prefix_reference': 'http://purl.obolibrary.org/obo/PATO_'},
                  'PFAM': {'prefix_prefix': 'PFAM',
                           'prefix_reference': 'https://bioregistry.io/pfam:'},
                  'PFAM.CLAN': {'prefix_prefix': 'PFAM.CLAN',
                                'prefix_reference': 'https://bioregistry.io/pfam.clan:'},
                  'PO': {'prefix_prefix': 'PO',
                         'prefix_reference': 'http://purl.obolibrary.org/obo/PO_'},
                  'PR': {'prefix_prefix': 'PR',
                         'prefix_reference': 'http://purl.obolibrary.org/obo/PR_'},
                  'PUBCHEM.COMPOUND': {'prefix_prefix': 'PUBCHEM.COMPOUND',
                                       'prefix_reference': 'https://bioregistry.io/pubchem.compound:'},
                  'RHEA': {'prefix_prefix': 'RHEA',
                           'prefix_reference': 'https://bioregistry.io/rhea:'},
                  'RO': {'prefix_prefix': 'RO',
                         'prefix_reference': 'http://purl.obolibrary.org/obo/RO_'},
                  'RetroRules': {'prefix_prefix': 'RetroRules',
                                 'prefix_reference': 'http://example.org/retrorules/'},
                  'SEED': {'prefix_prefix': 'SEED',
                           'prefix_reference': 'https://bioregistry.io/seed:'},
                  'SIO': {'prefix_prefix': 'SIO',
                          'prefix_reference': 'http://semanticscience.org/resource/SIO_'},
                  'SO': {'prefix_prefix': 'SO',
                         'prefix_reference': 'http://purl.obolibrary.org/obo/SO_'},
                  'SUPFAM': {'prefix_prefix': 'SUPFAM',
                             'prefix_reference': 'https://bioregistry.io/supfam:'},
                  'TAXRANK': {'prefix_prefix': 'TAXRANK',
                              'prefix_reference': 'http://purl.obolibrary.org/obo/TAXRANK_'},
                  'TIGRFAM': {'prefix_prefix': 'TIGRFAM',
                              'prefix_reference': 'https://bioregistry.io/tigrfam:'},
                  'UBERON': {'prefix_prefix': 'UBERON',
                             'prefix_reference': 'http://purl.obolibrary.org/obo/UBERON_'},
                  'UO': {'prefix_prefix': 'UO',
                         'prefix_reference': 'http://purl.obolibrary.org/obo/UO_'},
                  'UniProtKB': {'prefix_prefix': 'UniProtKB',
                                'prefix_reference': 'https://bioregistry.io/uniprot:'},
                  'biolink': {'prefix_prefix': 'biolink',
                              'prefix_reference': 'https://w3id.org/biolink/vocab/'},
                  'bioproject': {'prefix_prefix': 'bioproject',
                                 'prefix_reference': 'https://bioregistry.io/bioproject:'},
                  'biosample': {'prefix_prefix': 'biosample',
                                'prefix_reference': 'https://bioregistry.io/biosample:'},
                  'cas': {'prefix_prefix': 'cas',
                          'prefix_reference': 'https://bioregistry.io/cas:'},
                  'dcterms': {'prefix_prefix': 'dcterms',
                              'prefix_reference': 'http://purl.org/dc/terms/'},
                  'doi': {'prefix_prefix': 'doi',
                          'prefix_reference': 'https://bioregistry.io/doi:'},
                  'edam.data': {'prefix_prefix': 'edam.data',
                                'prefix_reference': 'http://edamontology.org/data_'},
                  'edam.format': {'prefix_prefix': 'edam.format',
                                  'prefix_reference': 'http://edamontology.org/format_'},
                  'emsl': {'prefix_prefix': 'emsl',
                           'prefix_reference': 'http://example.org/emsl_in_mongodb/'},
                  'emsl.project': {'prefix_prefix': 'emsl.project',
                                   'prefix_reference': 'https://bioregistry.io/emsl.project:'},
                  'emsl_uuid_like': {'prefix_prefix': 'emsl_uuid_like',
                                     'prefix_reference': 'http://example.org/emsl_uuid_like/'},
                  'generic': {'prefix_prefix': 'generic',
                              'prefix_reference': 'http://example.org/generic/'},
                  'gnps.task': {'prefix_prefix': 'gnps.task',
                                'prefix_reference': 'https://bioregistry.io/gnps.task:'},
                  'gold': {'prefix_prefix': 'gold',
                           'prefix_reference': 'https://bioregistry.io/gold:'},
                  'gtpo': {'prefix_prefix': 'gtpo',
                           'prefix_reference': 'http://example.org/gtpo/'},
                  'igsn': {'prefix_prefix': 'igsn',
                           'prefix_reference': 'https://app.geosamples.org/sample/igsn/'},
                  'img.taxon': {'prefix_prefix': 'img.taxon',
                                'prefix_reference': 'https://bioregistry.io/img.taxon:'},
                  'insdc.sra': {'prefix_prefix': 'insdc.sra',
                                'prefix_reference': 'https://bioregistry.io/insdc.sra:'},
                  'jgi': {'prefix_prefix': 'jgi',
                          'prefix_reference': 'http://example.org/jgi/'},
                  'jgi.analysis': {'prefix_prefix': 'jgi.analysis',
                                   'prefix_reference': 'https://data.jgi.doe.gov/search?q='},
                  'jgi.proposal': {'prefix_prefix': 'jgi.proposal',
                                   'prefix_reference': 'https://bioregistry.io/jgi.proposal:'},
                  'kegg': {'prefix_prefix': 'kegg',
                           'prefix_reference': 'https://bioregistry.io/kegg:'},
                  'linkml': {'prefix_prefix': 'linkml',
                             'prefix_reference': 'https://w3id.org/linkml/'},
                  'mgnify.analysis': {'prefix_prefix': 'mgnify.analysis',
                                      'prefix_reference': 'https://bioregistry.io/mgnify.analysis:'},
                  'mgnify.proj': {'prefix_prefix': 'mgnify.proj',
                                  'prefix_reference': 'https://bioregistry.io/mgnify.proj:'},
                  'my_emsl': {'prefix_prefix': 'my_emsl',
                              'prefix_reference': 'https://release.my.emsl.pnnl.gov/released_data/'},
                  'neon.identifier': {'prefix_prefix': 'neon.identifier',
                                      'prefix_reference': 'http://example.org/neon/identifier/'},
                  'neon.schema': {'prefix_prefix': 'neon.schema',
                                  'prefix_reference': 'http://example.org/neon/schema/'},
                  'nmdc': {'prefix_prefix': 'nmdc',
                           'prefix_reference': 'https://w3id.org/nmdc/'},
                  'owl': {'prefix_prefix': 'owl',
                          'prefix_reference': 'http://www.w3.org/2002/07/owl#'},
                  'prov': {'prefix_prefix': 'prov',
                           'prefix_reference': 'http://www.w3.org/ns/prov#'},
                  'qud': {'prefix_prefix': 'qud',
                          'prefix_reference': 'http://qudt.org/1.1/schema/qudt#'},
                  'rdf': {'prefix_prefix': 'rdf',
                          'prefix_reference': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'},
                  'rdfs': {'prefix_prefix': 'rdfs',
                           'prefix_reference': 'http://www.w3.org/2000/01/rdf-schema#'},
                  'ror': {'prefix_prefix': 'ror',
                          'prefix_reference': 'https://bioregistry.io/ror:'},
                  'schema': {'prefix_prefix': 'schema',
                             'prefix_reference': 'http://schema.org/'},
                  'shex': {'prefix_prefix': 'shex',
                           'prefix_reference': 'http://www.w3.org/ns/shex#'},
                  'skos': {'prefix_prefix': 'skos',
                           'prefix_reference': 'http://www.w3.org/2004/02/skos/core#'},
                  'wgs84': {'prefix_prefix': 'wgs84',
                            'prefix_reference': 'http://www.w3.org/2003/01/geo/wgs84_pos#'},
                  'wikidata': {'prefix_prefix': 'wikidata',
                               'prefix_reference': 'http://www.wikidata.org/entity/'},
                  'xsd': {'prefix_prefix': 'xsd',
                          'prefix_reference': 'http://www.w3.org/2001/XMLSchema#'}},
     'settings': {'DOI': {'setting_key': 'DOI',
                          'setting_value': 'doi:10.\\d{2,9}/.*'},
                  'NCBItaxon_id': {'setting_key': 'NCBItaxon_id',
                                   'setting_value': 'NCBITaxon:\\d+'},
                  'PMID': {'setting_key': 'PMID', 'setting_value': 'PMID:\\d+'},
                  'URL': {'setting_key': 'URL',
                          'setting_value': 'https?:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_\\+.~#?&\\/=]*)'},
                  'add_recov_methods': {'setting_key': 'add_recov_methods',
                                        'setting_value': 'Water Injection|Dump '
                                                         'Flood|Gas Injection|Wag '
                                                         'Immiscible '
                                                         'Injection|Polymer '
                                                         'Addition|Surfactant '
                                                         'Addition|Not '
                                                         'Applicable|other'},
                  'agrochemical_name': {'setting_key': 'agrochemical_name',
                                        'setting_value': '.*'},
                  'amount': {'setting_key': 'amount',
                             'setting_value': '[-+]?[0-9]*\\.?[0-9]+'},
                  'boolean': {'setting_key': 'boolean',
                              'setting_value': '(?:yes|no)'},
                  'country': {'setting_key': 'country',
                              'setting_value': '([^\\s-]{1,2}|[^\\s-]+.+[^\\s-]+)'},
                  'date_time_stamp': {'setting_key': 'date_time_stamp',
                                      'setting_value': '(\\d{4})(-(0[1-9]|1[0-2])(-(0[1-9]|[12]\\d|3[01])(T([01]\\d|2[0-3]):([0-5]\\d)(:([0-5]\\d))?(\\.\\d+)?(Z|([+-][01]\\d:[0-5]\\d))?)?)?)?'},
                  'dna_bases': {'setting_key': 'dna_bases',
                                'setting_value': '[ACGT]'},
                  'duration': {'setting_key': 'duration',
                               'setting_value': 'P(?:(?:\\d+D|\\d+M(?:\\d+D)?|\\d+Y(?:\\d+M(?:\\d+D)?)?)(?:T(?:\\d+H(?:\\d+M(?:\\d+S)?)?|\\d+M(?:\\d+S)?|\\d+S))?|T(?:\\d+H(?:\\d+M(?:\\d+S)?)?|\\d+M(?:\\d+S)?|\\d+S)|\\d+W)'},
                  'float': {'setting_key': 'float',
                            'setting_value': '[-+]?[0-9]*\\.?[0-9]+'},
                  'id_blade': {'setting_key': 'id_blade',
                               'setting_value': '([A-Za-z0-9]{1,})'},
                  'id_locus': {'setting_key': 'id_locus',
                               'setting_value': '(_[A-Za-z0-9_\\.-]+)?$'},
                  'id_nmdc_prefix': {'setting_key': 'id_nmdc_prefix',
                                     'setting_value': '^(nmdc)'},
                  'id_shoulder': {'setting_key': 'id_shoulder',
                                  'setting_value': '([0-9][a-z]{0,6}[0-9])'},
                  'id_version': {'setting_key': 'id_version',
                                 'setting_value': '(\\.[0-9]{1,})'},
                  'integer': {'setting_key': 'integer',
                              'setting_value': '[1-9][0-9]*'},
                  'lat': {'setting_key': 'lat',
                          'setting_value': '(-?((?:[0-8]?[0-9](?:\\.\\d{0,8})?)|90))'},
                  'lon': {'setting_key': 'lon',
                          'setting_value': '-?[0-9]+(?:\\.[0-9]{0,8})?$|^-?(1[0-7]{1,2})'},
                  'name': {'setting_key': 'name', 'setting_value': '.*'},
                  'parameters': {'setting_key': 'parameters',
                                 'setting_value': '([^\\s-]{1,2}|[^\\s-]+.+[^\\s-]+)'},
                  'particulate_matter_name': {'setting_key': 'particulate_matter_name',
                                              'setting_value': '.*'},
                  'primer_adapter_codes': {'setting_key': 'primer_adapter_codes',
                                           'setting_value': '[ACGTRYSWKMBDHVNI]'},
                  'region': {'setting_key': 'region',
                             'setting_value': '([^\\s-]{1,2}|[^\\s-]+.+[^\\s-]+)'},
                  'room_name': {'setting_key': 'room_name',
                                'setting_value': '([^\\s-]{1,2}|[^\\s-]+.+[^\\s-]+)'},
                  'room_number': {'setting_key': 'room_number',
                                  'setting_value': '[1-9][0-9]*'},
                  'scientific_float': {'setting_key': 'scientific_float',
                                       'setting_value': '[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?'},
                  'software': {'setting_key': 'software',
                               'setting_value': '([^\\s-]{1,2}|[^\\s-]+.+[^\\s-]+)'},
                  'specific_location': {'setting_key': 'specific_location',
                                        'setting_value': '([^\\s-]{1,2}|[^\\s-]+.+[^\\s-]+)'},
                  'storage_condition_type': {'setting_key': 'storage_condition_type',
                                             'setting_value': '([^\\s-]{1,2}|[^\\s-]+.+[^\\s-]+)'},
                  'termID': {'setting_key': 'termID',
                             'setting_value': '[a-zA-Z]{2,}:[a-zA-Z0-9]\\d+'},
                  'termLabel': {'setting_key': 'termLabel',
                                'setting_value': '([^\\s-]{1,2}|[^\\s-]+.+[^\\s-]+)'},
                  'text': {'setting_key': 'text', 'setting_value': '.*'},
                  'timestamp': {'setting_key': 'timestamp',
                                'setting_value': '(\\d{4})(-(0[1-9]|1[0-2])(-(0[1-9]|[12]\\d|3[01])(T([01]\\d|2[0-3]):([0-5]\\d)(:([0-5]\\d))?(\\.\\d+)?(Z|([+-][01]\\d:[0-5]\\d))?)?)?)?'},
                  'unit': {'setting_key': 'unit',
                           'setting_value': '([^\\s-]{1,2}|[^\\s-]+.+[^\\s-]+)'},
                  'version': {'setting_key': 'version',
                              'setting_value': '([^\\s-]{1,2}|[^\\s-]+.+[^\\s-]+)'}},
     'source_file': 'nmdc_schema/nmdc_materialized_patterns.yaml',
     'title': 'NMDC Schema',
     'types': {'boolean': {'base': 'Bool',
                           'description': 'A binary (true or false) value',
                           'exact_mappings': ['schema:Boolean'],
                           'from_schema': 'https://w3id.org/nmdc/nmdc',
                           'name': 'boolean',
                           'notes': ['If you are authoring schemas in LinkML YAML, '
                                     'the type is referenced with the lower case '
                                     '"boolean".'],
                           'repr': 'bool',
                           'uri': 'xsd:boolean'},
               'bytes': {'base': 'int',
                         'description': 'An integer value that corresponds to a '
                                        'size in bytes',
                         'from_schema': 'https://w3id.org/nmdc/nmdc',
                         'name': 'bytes',
                         'see_also': ['UO:0000233'],
                         'uri': 'xsd:long'},
               'curie': {'base': 'Curie',
                         'comments': ['in RDF serializations this MUST be expanded '
                                      'to a URI',
                                      'in non-RDF serializations MAY be serialized '
                                      'as the compact representation'],
                         'conforms_to': 'https://www.w3.org/TR/curie/',
                         'description': 'a compact URI',
                         'from_schema': 'https://w3id.org/nmdc/nmdc',
                         'name': 'curie',
                         'notes': ['If you are authoring schemas in LinkML YAML, '
                                   'the type is referenced with the lower case '
                                   '"curie".'],
                         'repr': 'str',
                         'uri': 'xsd:string'},
               'date': {'base': 'XSDDate',
                        'description': 'a date (year, month and day) in an '
                                       'idealized calendar',
                        'exact_mappings': ['schema:Date'],
                        'from_schema': 'https://w3id.org/nmdc/nmdc',
                        'name': 'date',
                        'notes': ["URI is dateTime because OWL reasoners don't "
                                  'work with straight date or time',
                                  'If you are authoring schemas in LinkML YAML, '
                                  'the type is referenced with the lower case '
                                  '"date".'],
                        'repr': 'str',
                        'uri': 'xsd:date'},
               'date_or_datetime': {'base': 'str',
                                    'description': 'Either a date or a datetime',
                                    'from_schema': 'https://w3id.org/nmdc/nmdc',
                                    'name': 'date_or_datetime',
                                    'notes': ['If you are authoring schemas in '
                                              'LinkML YAML, the type is referenced '
                                              'with the lower case '
                                              '"date_or_datetime".'],
                                    'repr': 'str',
                                    'uri': 'linkml:DateOrDatetime'},
               'datetime': {'base': 'XSDDateTime',
                            'description': 'The combination of a date and time',
                            'exact_mappings': ['schema:DateTime'],
                            'from_schema': 'https://w3id.org/nmdc/nmdc',
                            'name': 'datetime',
                            'notes': ['If you are authoring schemas in LinkML '
                                      'YAML, the type is referenced with the lower '
                                      'case "datetime".'],
                            'repr': 'str',
                            'uri': 'xsd:dateTime'},
               'decimal': {'base': 'Decimal',
                           'broad_mappings': ['schema:Number'],
                           'description': 'A real number with arbitrary precision '
                                          'that conforms to the xsd:decimal '
                                          'specification',
                           'from_schema': 'https://w3id.org/nmdc/nmdc',
                           'name': 'decimal',
                           'notes': ['If you are authoring schemas in LinkML YAML, '
                                     'the type is referenced with the lower case '
                                     '"decimal".'],
                           'uri': 'xsd:decimal'},
               'decimal_degree': {'base': 'float',
                                  'description': 'A decimal degree expresses '
                                                 'latitude or longitude as decimal '
                                                 'fractions.',
                                  'from_schema': 'https://w3id.org/nmdc/nmdc',
                                  'name': 'decimal_degree',
                                  'see_also': ['https://en.wikipedia.org/wiki/Decimal_degrees'],
                                  'uri': 'xsd:decimal'},
               'double': {'base': 'float',
                          'close_mappings': ['schema:Float'],
                          'description': 'A real number that conforms to the '
                                         'xsd:double specification',
                          'from_schema': 'https://w3id.org/nmdc/nmdc',
                          'name': 'double',
                          'notes': ['If you are authoring schemas in LinkML YAML, '
                                    'the type is referenced with the lower case '
                                    '"double".'],
                          'uri': 'xsd:double'},
               'external_identifier': {'description': 'A CURIE representing an '
                                                      'external identifier',
                                       'from_schema': 'https://w3id.org/nmdc/nmdc',
                                       'name': 'external_identifier',
                                       'pattern': '^[a-zA-Z0-9][a-zA-Z0-9_\\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\\-\\/\\.,]*$',
                                       'see_also': ['https://microbiomedata.github.io/nmdc-schema/identifiers/'],
                                       'typeof': 'uriorcurie',
                                       'uri': 'xsd:anyURI'},
               'float': {'base': 'float',
                         'description': 'A real number that conforms to the '
                                        'xsd:float specification',
                         'exact_mappings': ['schema:Float'],
                         'from_schema': 'https://w3id.org/nmdc/nmdc',
                         'name': 'float',
                         'notes': ['If you are authoring schemas in LinkML YAML, '
                                   'the type is referenced with the lower case '
                                   '"float".'],
                         'uri': 'xsd:float'},
               'integer': {'base': 'int',
                           'description': 'An integer',
                           'exact_mappings': ['schema:Integer'],
                           'from_schema': 'https://w3id.org/nmdc/nmdc',
                           'name': 'integer',
                           'notes': ['If you are authoring schemas in LinkML YAML, '
                                     'the type is referenced with the lower case '
                                     '"integer".'],
                           'uri': 'xsd:integer'},
               'jsonpath': {'base': 'str',
                            'conforms_to': 'https://www.ietf.org/archive/id/draft-goessner-dispatch-jsonpath-00.html',
                            'description': 'A string encoding a JSON Path. The '
                                           'value of the string MUST conform to '
                                           'JSON Point syntax and SHOULD '
                                           'dereference to zero or more valid '
                                           'objects within the current instance '
                                           'document when encoded in tree form.',
                            'from_schema': 'https://w3id.org/nmdc/nmdc',
                            'name': 'jsonpath',
                            'notes': ['If you are authoring schemas in LinkML '
                                      'YAML, the type is referenced with the lower '
                                      'case "jsonpath".'],
                            'repr': 'str',
                            'uri': 'xsd:string'},
               'jsonpointer': {'base': 'str',
                               'conforms_to': 'https://datatracker.ietf.org/doc/html/rfc6901',
                               'description': 'A string encoding a JSON Pointer. '
                                              'The value of the string MUST '
                                              'conform to JSON Point syntax and '
                                              'SHOULD dereference to a valid '
                                              'object within the current instance '
                                              'document when encoded in tree form.',
                               'from_schema': 'https://w3id.org/nmdc/nmdc',
                               'name': 'jsonpointer',
                               'notes': ['If you are authoring schemas in LinkML '
                                         'YAML, the type is referenced with the '
                                         'lower case "jsonpointer".'],
                               'repr': 'str',
                               'uri': 'xsd:string'},
               'language_code': {'base': 'str',
                                 'description': 'A language code conforming to '
                                                'ISO_639-1',
                                 'from_schema': 'https://w3id.org/nmdc/nmdc',
                                 'name': 'language_code',
                                 'see_also': ['https://en.wikipedia.org/wiki/ISO_639-1'],
                                 'uri': 'xsd:language'},
               'ncname': {'base': 'NCName',
                          'description': 'Prefix part of CURIE',
                          'from_schema': 'https://w3id.org/nmdc/nmdc',
                          'name': 'ncname',
                          'notes': ['If you are authoring schemas in LinkML YAML, '
                                    'the type is referenced with the lower case '
                                    '"ncname".'],
                          'repr': 'str',
                          'uri': 'xsd:string'},
               'nodeidentifier': {'base': 'NodeIdentifier',
                                  'description': 'A URI, CURIE or BNODE that '
                                                 'represents a node in a model.',
                                  'from_schema': 'https://w3id.org/nmdc/nmdc',
                                  'name': 'nodeidentifier',
                                  'notes': ['If you are authoring schemas in '
                                            'LinkML YAML, the type is referenced '
                                            'with the lower case '
                                            '"nodeidentifier".'],
                                  'repr': 'str',
                                  'uri': 'shex:nonLiteral'},
               'objectidentifier': {'base': 'ElementIdentifier',
                                    'comments': ['Used for inheritance and type '
                                                 'checking'],
                                    'description': 'A URI or CURIE that represents '
                                                   'an object in the model.',
                                    'from_schema': 'https://w3id.org/nmdc/nmdc',
                                    'name': 'objectidentifier',
                                    'notes': ['If you are authoring schemas in '
                                              'LinkML YAML, the type is referenced '
                                              'with the lower case '
                                              '"objectidentifier".'],
                                    'repr': 'str',
                                    'uri': 'shex:iri'},
               'sparqlpath': {'base': 'str',
                              'conforms_to': 'https://www.w3.org/TR/sparql11-query/#propertypaths',
                              'description': 'A string encoding a SPARQL Property '
                                             'Path. The value of the string MUST '
                                             'conform to SPARQL syntax and SHOULD '
                                             'dereference to zero or more valid '
                                             'objects within the current instance '
                                             'document when encoded as RDF.',
                              'from_schema': 'https://w3id.org/nmdc/nmdc',
                              'name': 'sparqlpath',
                              'notes': ['If you are authoring schemas in LinkML '
                                        'YAML, the type is referenced with the '
                                        'lower case "sparqlpath".'],
                              'repr': 'str',
                              'uri': 'xsd:string'},
               'string': {'base': 'str',
                          'description': 'A character string',
                          'exact_mappings': ['schema:Text'],
                          'from_schema': 'https://w3id.org/nmdc/nmdc',
                          'name': 'string',
                          'notes': ['In RDF serializations, a slot with range of '
                                    'string is treated as a literal or type '
                                    'xsd:string.   If you are authoring schemas in '
                                    'LinkML YAML, the type is referenced with the '
                                    'lower case "string".'],
                          'uri': 'xsd:string'},
               'time': {'base': 'XSDTime',
                        'description': 'A time object represents a (local) time of '
                                       'day, independent of any particular day',
                        'exact_mappings': ['schema:Time'],
                        'from_schema': 'https://w3id.org/nmdc/nmdc',
                        'name': 'time',
                        'notes': ['URI is dateTime because OWL reasoners do not '
                                  'work with straight date or time',
                                  'If you are authoring schemas in LinkML YAML, '
                                  'the type is referenced with the lower case '
                                  '"time".'],
                        'repr': 'str',
                        'uri': 'xsd:time'},
               'uri': {'base': 'URI',
                       'close_mappings': ['schema:URL'],
                       'comments': ['in RDF serializations a slot with range of '
                                    'uri is treated as a literal or type '
                                    'xsd:anyURI unless it is an identifier or a '
                                    'reference to an identifier, in which case it '
                                    'is translated directly to a node'],
                       'conforms_to': 'https://www.ietf.org/rfc/rfc3987.txt',
                       'description': 'a complete URI',
                       'from_schema': 'https://w3id.org/nmdc/nmdc',
                       'name': 'uri',
                       'notes': ['If you are authoring schemas in LinkML YAML, the '
                                 'type is referenced with the lower case "uri".'],
                       'repr': 'str',
                       'uri': 'xsd:anyURI'},
               'uriorcurie': {'base': 'URIorCURIE',
                              'description': 'a URI or a CURIE',
                              'from_schema': 'https://w3id.org/nmdc/nmdc',
                              'name': 'uriorcurie',
                              'notes': ['If you are authoring schemas in LinkML '
                                        'YAML, the type is referenced with the '
                                        'lower case "uriorcurie".'],
                              'repr': 'str',
                              'uri': 'xsd:anyURI'}}} )

class CalibrationTargetEnum(str, Enum):
    mSOLIDUSz = "mass_charge_ratio"
    retention_time = "retention_time"
    retention_index = "retention_index"


class CalibrationStandardEnum(str, Enum):
    fames = "fames"
    alkanes = "alkanes"
    srfa = "srfa"


class StrandedOrientationEnum(str, Enum):
    """
    This enumeration specifies information about stranded RNA library preparations.
    """
    antisense_orientation = "antisense orientation"
    """
    Orientation that is complementary (non-coding) to a sequence of messenger RNA.
    """
    sense_orientation = "sense orientation"
    """
    Orientation that corresponds to the coding sequence of messenger RNA.
    """


class MassSpectrometryAcquisitionStrategyEnum(str, Enum):
    data_independent_acquisition = "data_independent_acquisition"
    """
    Data independent mass spectrometer acquisition method wherein the full mass range is fragmented. Examples of such an approach include MS^E, AIF, and bbCID.
    """
    data_dependent_acquisition = "data_dependent_acquisition"
    """
    Mass spectrometer data acquisition method wherein MSn spectra are triggered based on the m/z of precursor ions detected in the same run.
    """
    full_scan_only = "full_scan_only"
    """
    Mass spectrometer data acquisition method wherein only MS1 data are acquired.
    """


class ResolutionCategoryEnum(str, Enum):
    high = "high"
    """
    higher than unit resolution
    """
    low = "low"
    """
    at unit resolution
    """


class MassAnalyzerEnum(str, Enum):
    time_of_flight = "time_of_flight"
    """
    Instrument that separates ions by m/z in a field-free region after acceleration to a fixed acceleration energy.
    """
    quadrupole = "quadrupole"
    """
    A mass spectrometer that consists of four parallel rods whose centers form the corners of a square and whose opposing poles are connected. The voltage applied to the rods is a superposition of a static potential and a sinusoidal radio frequency potential. The motion of an ion in the x and y dimensions is described by the Matthieu equation whose solutions show that ions in a particular m/z range can be transmitted along the z axis.
    """
    Orbitrap = "Orbitrap"
    """
    An ion trapping device that consists of an outer barrel-like electrode and a coaxial inner spindle-like electrode that form an electrostatic field with quadro-logarithmic potential distribution. The frequency of harmonic oscillations of the orbitally trapped ions along the axis of the electrostatic field is independent of the ion velocity and is inversely proportional to the square root of m/z so that the trap can be used as a mass analyzer.
    """
    ion_cyclotron_resonance = "ion_cyclotron_resonance"
    """
    A mass spectrometer based on the principle of ion cyclotron resonance in which an ion in a magnetic field moves in a circular orbit at a frequency characteristic of its m/z value. Ions are coherently excited to a larger radius orbit using a pulse of radio frequency energy and their image charge is detected on receiver plates as a time domain signal. Fourier transformation of the time domain signal results in a frequency domain signal which is converted to a mass spectrum based in the inverse relationship between frequency and m/z.
    """
    ion_trap = "ion_trap"
    """
    A device for spatially confining ions using electric and magnetic fields alone or in combination.
    """


class IonizationSourceEnum(str, Enum):
    electrospray_ionization = "electrospray_ionization"
    matrix_assisted_laser_desorption_ionization = "matrix_assisted_laser_desorption_ionization"
    atmospheric_pressure_photo_ionization = "atmospheric_pressure_photo_ionization"
    atmospheric_pressure_chemical_ionization = "atmospheric_pressure_chemical_ionization"
    electron_ionization = "electron_ionization"


class MassSpectrumCollectionModeEnum(str, Enum):
    full_profile = "full_profile"
    reduced_profile = "reduced_profile"
    centroid = "centroid"


class PolarityModeEnum(str, Enum):
    positive = "positive"
    negative = "negative"


class EluentIntroductionCategoryEnum(str, Enum):
    liquid_chromatography = "liquid_chromatography"
    """
    The processed sample is introduced into the mass spectrometer through a liquid chromatography process.
    """
    gas_chromatography = "gas_chromatography"
    """
    The processed sample is introduced into the mass spectrometer through a gas chromatography process.
    """
    direct_infusion_syringe = "direct_infusion_syringe"
    """
    The processed sample is introduced into the mass spectrometer through a direct infusion process using a syringe.
    """
    direct_infusion_autosampler = "direct_infusion_autosampler"
    """
    The processed sample is introduced into the mass spectrometer through a direct infusion process using an autosampler.
    """


class LibraryTypeEnum(str, Enum):
    DNA = "DNA"
    RNA = "RNA"


class ContainerCategoryEnum(str, Enum):
    """
    The permitted types of containers used in processing metabolomic samples.
    """
    v_bottom_conical_tube = "v-bottom_conical_tube"
    falcon_tube = "falcon_tube"


class SeparationMethodEnum(str, Enum):
    """
    The tool/substance used to separate or filter a solution or mixture.
    """
    ptfe_96_well_filter_plate = "ptfe_96_well_filter_plate"
    syringe = "syringe"


class StationaryPhaseEnum(str, Enum):
    """
    The type of stationary phase used in a chromatography process.
    """
    BEH_HILIC = "BEH-HILIC"
    """
    Hydrophilic Interaction Chromatography (HILIC) employing BEH (Bridged Ethylene Hybrid) particles as the stationary phase.
    """
    C18 = "C18"
    """
    A stationary phase consisting of octadecyl chains (C18) bonded to silica particles.
    """
    C8 = "C8"
    """
    A stationary phase consisting of octyl chains (C8) bonded to silica particles.
    """
    C4 = "C4"
    """
    A stationary phase consisting of butyl chains (C4) bonded to silica particles.
    """
    C2 = "C2"
    """
    A stationary phase consisting of ethyl chains (C2) bonded to silica particles.
    """
    C1 = "C1"
    """
    A stationary phase consisting of methyl chains (C1) bonded to silica particles.
    """
    C30 = "C30"
    """
    A stationary phase consisting of triacontyl chains (C30) bonded to silica particles.
    """
    C60 = "C60"
    """
    A stationary phase consisting of hexatriacontyl chains (C60) bonded to silica particles.
    """
    CNT = "CNT"
    """
    Carbon Nanotube stationary phase.
    """
    CN = "CN"
    """
    Cyano (CN) bonded stationary phase.
    """
    Diol = "Diol"
    """
    A stationary phase with diol (1,2-diol) functional groups.
    """
    HILIC = "HILIC"
    """
    Hydrophilic Interaction Chromatography (HILIC) stationary phase.
    """
    HLB = "HLB"
    """
    Hydrophilic-Lipophilic-Balance (HLB) stationary phase.
    """
    NH2 = "NH2"
    """
    Amino (NH2) bonded stationary phase.
    """
    Phenyl = "Phenyl"
    """
    Phenyl bonded stationary phase.
    """
    Polysiloxane = "Polysiloxane"
    """
    A stationary phase made of polysiloxane, usually used in gas chromatography.
    """
    PS_DVB = "PS-DVB"
    """
    Polystyrene-divinylbenzene stationary phase, often used in solid-phase extraction, including proprietary Priority PolLutant (PPL).
    """
    SAX = "SAX"
    """
    Strong Anion Exchange (SAX) stationary phase.
    """
    SCX = "SCX"
    """
    Strong Cation Exchange (SCX) stationary phase.
    """
    Silica = "Silica"
    """
    A stationary phase made of silica, commonly used in chromatography.
    """
    WCX = "WCX"
    """
    Weak Cation Exchange (WCX) stationary phase.
    """
    WAX = "WAX"
    """
    Weak Anion Exchange (WAX) stationary phase.
    """
    ZIC_HILIC = "ZIC-HILIC"
    """
    Zwitterionic Hydrophilic Interaction Chromatography (ZIC-HILIC) stationary phase.
    """
    ZIC_pHILIC = "ZIC-pHILIC"
    """
    Zwitterionic pH-Responsive Hydrophilic Interaction Chromatography (ZIC-pHILIC) stationary phase.
    """
    ZIC_cHILIC = "ZIC-cHILIC"
    """
    Zwitterionic Charged Hydrophilic Interaction Chromatography (ZIC-cHILIC) stationary phase.
    """


class ProtocolCategoryEnum(str, Enum):
    """
    The possible protocols that may be followed for an assay.
    """
    mplex = "mplex"
    derivatization = "derivatization"
    filter_clean_up = "filter_clean_up"
    organic_matter_extraction = "organic_matter_extraction"
    solid_phase_extraction = "solid_phase_extraction"
    phosphorus_extraction = "phosphorus_extraction"
    ph_measurement = "ph_measurement"
    respiration_measurement = "respiration_measurement"
    texture_measurement = "texture_measurement"
    dna_extraction = "dna_extraction"
    phenol_chloroform_extraction = "phenol_chloroform_extraction"


class ChromatographicCategoryEnum(str, Enum):
    liquid_chromatography = "liquid_chromatography"
    gas_chromatography = "gas_chromatography"
    solid_phase_extraction = "solid_phase_extraction"


class SamplePortionEnum(str, Enum):
    supernatant = "supernatant"
    pellet = "pellet"
    Organic_layer = "organic_layer"
    """
    The portion of a mixture containing dissolved organic material
    """
    Aqueous_layer = "aqueous_layer"
    """
    The portion of a mixture containing molecules dissolved in water
    """
    Interlayer = "interlayer"
    """
    The layer of material between liquid layers of a separated mixture
    """
    Chloroform_layer = "chloroform_layer"
    """
    The portion of a mixture containing molecules dissolved in chloroform
    """
    Methanol_layer = "methanol_layer"
    """
    The portion of a mixture containing molecules dissolved in methanol
    """


class UnitEnum(str, Enum):
    PERCENT_SIGN = "%"
    """
    The Unified Code for Units of Measure (UCUM) representation of percent.
    """
    JSOLIDUSdegree_Celsius = "J/K"
    """
    The Unified Code for Units of Measure (UCUM) representation of joule per kelvin.
    """
    degrees_Celsius = "Cel"
    """
    The Unified Code for Units of Measure (UCUM) representation of degrees Celsius; a SI unit of temperature  equal to one unit Kelvin.
    """
    cm = "cm"
    """
    The Unified Code for Units of Measure (UCUM) representation of centimeter.
    """
    cP = "cP"
    """
    The Unified Code for Units of Measure (UCUM) representation of centipoise.
    """
    d = "d"
    """
    The Unified Code for Units of Measure (UCUM) representation of day.
    """
    g = "g"
    """
    The Unified Code for Units of Measure (UCUM) representation of gram.
    """
    h = "h"
    """
    The Unified Code for Units of Measure (UCUM) representation of hour.
    """
    kPa = "kPa"
    """
    The Unified Code for Units of Measure (UCUM) representation of kilopascal.
    """
    m = "m"
    """
    The Unified Code for Units of Measure (UCUM) representation of meter.
    """
    mSOLIDUSs = "m/s"
    """
    The Unified Code for Units of Measure (UCUM) representation of meters per second.
    """
    mgSOLIDUSkg = "mg/kg"
    """
    The Unified Code for Units of Measure (UCUM) representation of milligrams per kilogram.
    """
    mgSOLIDUSL = "mg/L"
    """
    The Unified Code for Units of Measure (UCUM) representation of milligrams per liter.
    """
    min = "min"
    """
    The Unified Code for Units of Measure (UCUM) representation of minute.
    """
    mL = "mL"
    """
    The Unified Code for Units of Measure (UCUM) representation of milliliter.
    """
    mm = "mm"
    """
    The Unified Code for Units of Measure (UCUM) representation of millimeter.
    """
    mLSOLIDUSL = "mL/L"
    """
    The Unified Code for Units of Measure (UCUM) representation of milliliters per liter.
    """
    mmolSOLIDUSL = "mmol/L"
    """
    The Unified Code for Units of Measure (UCUM) representation of millimolar.
    """
    mSSOLIDUScm = "mS/cm"
    """
    The Unified Code for Units of Measure (UCUM) representation of millisiemens per centimeter.
    """
    LEFT_SQUARE_BRACKETppmRIGHT_SQUARE_BRACKET = "[ppm]"
    """
    The Unified Code for Units of Measure (UCUM) representation of parts per million.
    """
    uSSOLIDUScm = "uS/cm"
    """
    The Unified Code for Units of Measure (UCUM) representation of microsiemens per centimeter.
    """
    WSOLIDUSm2 = "W/m2"
    """
    The Unified Code for Units of Measure (UCUM) representation of watts per square meter.
    """
    years = "a"
    """
    The Unified Code for Units of Measure (UCUM) representation of year.
    """
    ugSOLIDUSL = "ug/L"
    """
    The Unified Code for Units of Measure (UCUM) representation of micrograms per liter.
    """
    ugSOLIDUSuL = "ug/uL"
    """
    The Unified Code for Units of Measure (UCUM) representation of micrograms per microliter.
    """
    uL = "uL"
    """
    The Unified Code for Units of Measure (UCUM) representation of microliter.
    """
    molSOLIDUSL = "mol/L"
    """
    The Unified Code for Units of Measure (UCUM) representation of moles per liter.
    """
    molSOLIDUSLSOLIDUSh = "mol/L/h"
    """
    The Unified Code for Units of Measure (UCUM) representation of moles per liter per hour.
    """
    ugSOLIDUSLSOLIDUSh = "ug/L/h"
    """
    The Unified Code for Units of Measure (UCUM) representation of micrograms per liter per hour.
    """
    umolSOLIDUSL = "umol/L"
    """
    The Unified Code for Units of Measure (UCUM) representation of micromoles per liter.
    """
    umolSOLIDUSkg = "umol/kg"
    """
    The Unified Code for Units of Measure (UCUM) representation of micromoles per kilogram.
    """
    micromoles_per_square_meter_per_second = "umol/m2/s"
    """
    The Unified Code for Units of Measure (UCUM) representation of micromoles per square meter per second.
    """
    mgSOLIDUSm3 = "mg/m3"
    """
    The Unified Code for Units of Measure (UCUM) representation of milligrams per cubic meter.
    """
    m2SOLIDUSs = "m2/s"
    """
    The Unified Code for Units of Measure (UCUM) representation of square meters per second.
    """
    kgSOLIDUSm3 = "kg/m3"
    """
    The Unified Code for Units of Measure (UCUM) representation of kilograms per cubic meter.
    """
    gSOLIDUSm3 = "g/m3"
    """
    The Unified Code for Units of Measure (UCUM) representation of grams per cubic meter.
    """
    m2 = "m2"
    """
    The Unified Code for Units of Measure (UCUM) representation of square meters.
    """
    atm = "atm"
    """
    The Unified Code for Units of Measure (UCUM) representation of atmosphere.
    """
    V = "V"
    """
    The Unified Code for Units of Measure (UCUM) representation of volt.
    """
    mV = "mV"
    """
    The Unified Code for Units of Measure (UCUM) representation of millivolt.
    """
    L = "L"
    """
    The Unified Code for Units of Measure (UCUM) representation of liter.
    """
    um = "um"
    """
    The Unified Code for Units of Measure (UCUM) representation of micrometer.
    """
    ratioSOLIDUSunitless = "1"
    """
    The Unified Code for Units of Measure (UCUM) representation of dimensionless quantity.
    """
    uLSOLIDUSkg = "uL/kg"
    """
    The Unified Code for Units of Measure (UCUM) representation of microliters per kilogram.
    """
    kg = "kg"
    """
    The Unified Code for Units of Measure (UCUM) representation of kilogram.
    """
    LEFT_SQUARE_BRACKETppthRIGHT_SQUARE_BRACKET = "[ppth]"
    """
    The Unified Code for Units of Measure (UCUM) representation of parts per thousand.
    """
    gSOLIDUSg = "g/g"
    """
    The Unified Code for Units of Measure (UCUM) representation of gram per gram.
    """
    lux = "lx"
    """
    The Unified Code for Units of Measure (UCUM) representation of lux.
    """
    mgSOLIDUSm3SOLIDUSd = "mg/m3/d"
    """
    The Unified Code for Units of Measure (UCUM) representation of milligrams per cubic meter per day.
    """
    ngSOLIDUSh = "ng/h"
    """
    The Unified Code for Units of Measure (UCUM) representation of nanograms per hour.
    """
    mmLEFT_SQUARE_BRACKETHgRIGHT_SQUARE_BRACKET = "mm[Hg]"
    """
    The Unified Code for Units of Measure (UCUM) representation of millimeters of mercury.
    """
    LEFT_SQUARE_BRACKETppbRIGHT_SQUARE_BRACKET = "[ppb]"
    """
    The Unified Code for Units of Measure (UCUM) representation of parts per billion.
    """
    gSOLIDUSkg = "g/kg"
    """
    The Unified Code for Units of Measure (UCUM) representation of grams per kilogram.
    """
    deg = "deg"
    """
    The Unified Code for Units of Measure (UCUM) representation of degree (angle).
    """
    mgSOLIDUSg = "mg/g"
    """
    The Unified Code for Units of Measure (UCUM) representation of milligrams per gram.
    """
    ugSOLIDUSg = "ug/g"
    """
    The Unified Code for Units of Measure (UCUM) representation of micrograms per gram.
    """
    ngSOLIDUSg = "ng/g"
    """
    The Unified Code for Units of Measure (UCUM) representation of nanograms per gram.
    """
    pgSOLIDUSg = "pg/g"
    """
    The Unified Code for Units of Measure (UCUM) representation of picograms per gram.
    """
    ngSOLIDUSL = "ng/L"
    """
    The Unified Code for Units of Measure (UCUM) representation of nanograms per liter.
    """
    pgSOLIDUSL = "pg/L"
    """
    The Unified Code for Units of Measure (UCUM) representation of picograms per liter.
    """
    ugSOLIDUSmL = "ug/mL"
    """
    The Unified Code for Units of Measure (UCUM) representation of micrograms per milliliter.
    """
    ngSOLIDUSmL = "ng/mL"
    """
    The Unified Code for Units of Measure (UCUM) representation of nanograms per milliliter.
    """
    pgSOLIDUSmL = "pg/mL"
    """
    The Unified Code for Units of Measure (UCUM) representation of picograms per milliliter.
    """
    mol = "mol"
    """
    The Unified Code for Units of Measure (UCUM) representation of mole.
    """
    mmol = "mmol"
    """
    The Unified Code for Units of Measure (UCUM) representation of millimole.
    """
    umol = "umol"
    """
    The Unified Code for Units of Measure (UCUM) representation of micromole.
    """
    nmol = "nmol"
    """
    The Unified Code for Units of Measure (UCUM) representation of nanomole.
    """
    pmol = "pmol"
    """
    The Unified Code for Units of Measure (UCUM) representation of picomole.
    """
    U = "U"
    """
    The Unified Code for Units of Measure (UCUM) representation of enzyme unit.
    """
    mU = "mU"
    """
    The Unified Code for Units of Measure (UCUM) representation of millienzyme unit.
    """
    uU = "uU"
    """
    The Unified Code for Units of Measure (UCUM) representation of microenzyme unit.
    """
    nU = "nU"
    """
    The Unified Code for Units of Measure (UCUM) representation of nanoenzyme unit.
    """
    Bq = "Bq"
    """
    The Unified Code for Units of Measure (UCUM) representation of becquerel.
    """
    kBq = "kBq"
    """
    The Unified Code for Units of Measure (UCUM) representation of kilobecquerel.
    """
    MBq = "MBq"
    """
    The Unified Code for Units of Measure (UCUM) representation of megabecquerel.
    """
    GBq = "GBq"
    """
    The Unified Code for Units of Measure (UCUM) representation of gigabecquerel.
    """
    Ci = "Ci"
    """
    The Unified Code for Units of Measure (UCUM) representation of curie.
    """
    mCi = "mCi"
    """
    The Unified Code for Units of Measure (UCUM) representation of millicurie.
    """
    uCi = "uCi"
    """
    The Unified Code for Units of Measure (UCUM) representation of microcurie.
    """
    nCi = "nCi"
    """
    The Unified Code for Units of Measure (UCUM) representation of nanocurie.
    """
    pCi = "pCi"
    """
    The Unified Code for Units of Measure (UCUM) representation of picocurie.
    """
    rad = "rad"
    """
    The Unified Code for Units of Measure (UCUM) representation of radian.
    """
    sr = "sr"
    """
    The Unified Code for Units of Measure (UCUM) representation of steradian.
    """
    Hz = "Hz"
    """
    The Unified Code for Units of Measure (UCUM) representation of hertz.
    """
    number_1SOLIDUSd = "1/d"
    """
    The Unified Code for Units of Measure (UCUM) representation of per day (frequency).
    """
    per_square_foot = "1/[sft_i]"
    """
    The Unified Code for Units of Measure (UCUM) representation of per square foot.
    """
    kHz = "kHz"
    """
    The Unified Code for Units of Measure (UCUM) representation of kilohertz.
    """
    MHz = "MHz"
    """
    The Unified Code for Units of Measure (UCUM) representation of megahertz.
    """
    GHz = "GHz"
    """
    The Unified Code for Units of Measure (UCUM) representation of gigahertz.
    """
    N = "N"
    """
    The Unified Code for Units of Measure (UCUM) representation of newton.
    """
    kN = "kN"
    """
    The Unified Code for Units of Measure (UCUM) representation of kilonewton.
    """
    J = "J"
    """
    The Unified Code for Units of Measure (UCUM) representation of joule.
    """
    kJ = "kJ"
    """
    The Unified Code for Units of Measure (UCUM) representation of kilojoule.
    """
    MJ = "MJ"
    """
    The Unified Code for Units of Measure (UCUM) representation of megajoule.
    """
    W = "W"
    """
    The Unified Code for Units of Measure (UCUM) representation of watt.
    """
    kW = "kW"
    """
    The Unified Code for Units of Measure (UCUM) representation of kilowatt.
    """
    mbar = "mbar"
    """
    The Unified Code for Units of Measure (UCUM) representation of millibar.
    """
    kWSOLIDUSm2 = "kW/m2"
    """
    The Unified Code for Units of Measure (UCUM) representation of kilowatts per square meter.
    """
    umolSOLIDUSsSOLIDUSm2 = "umol/s/m2"
    """
    The Unified Code for Units of Measure (UCUM) representation of micromoles per second per square meter.
    """
    m3SOLIDUSd = "m3/d"
    """
    The Unified Code for Units of Measure (UCUM) representation of cubic meters per day.
    """
    LSOLIDUSh = "L/h"
    """
    The Unified Code for Units of Measure (UCUM) representation of liters per hour.
    """
    LEFT_SQUARE_BRACKETpHRIGHT_SQUARE_BRACKET = "[pH]"
    """
    The Unified Code for Units of Measure (UCUM) representation of pH units.
    """
    kWSOLIDUSm2SOLIDUSd = "kW/m2/d"
    """
    The Unified Code for Units of Measure (UCUM) representation of kilowatts per square meter per day.
    """
    Nephelometric_Turbidity_Units = "[NTU]"
    """
    The Unified Code for Units of Measure (UCUM) representation of Nephelometric Turbidity Units.
    """
    Formazin_Nephelometric_Units = "[FNU]"
    """
    The Unified Code for Units of Measure (UCUM) representation of Formazin Nephelometric Units.
    """
    m3SOLIDUSmin = "m3/min"
    """
    The Unified Code for Units of Measure (UCUM) representation of cubic meters per minute.
    """
    kmSOLIDUSh = "km/h"
    """
    The Unified Code for Units of Measure (UCUM) representation of kilometers per hour.
    """
    pounds_LEFT_PARENTHESISavoirdupoisRIGHT_PARENTHESIS = "[lb_av]"
    """
    The Unified Code for Units of Measure (UCUM) representation of pound (avoirdupois).
    """
    kgSOLIDUSkg = "kg/kg"
    """
    The Unified Code for Units of Measure (UCUM) representation of kilogram per kilogram.
    """
    ugSOLIDUSm3 = "ug/m3"
    """
    The Unified Code for Units of Measure (UCUM) representation of micrograms per cubic meter.
    """
    meqSOLIDUSL = "meq/L"
    """
    The Unified Code for Units of Measure (UCUM) representation of milliequivalents per liter.
    """
    lmSOLIDUSm2 = "lm/m2"
    """
    The Unified Code for Units of Measure (UCUM) representation of lumens per square meter.
    """
    mg = "mg"
    """
    The Unified Code for Units of Measure (UCUM) representation of milligram.
    """
    umolSOLIDUSLSOLIDUSh = "umol/L/h"
    """
    The Unified Code for Units of Measure (UCUM) representation of micromoles per liter per hour.
    """
    gSOLIDUScm3 = "g/cm3"
    """
    The Unified Code for Units of Measure (UCUM) representation of grams per cubic centimeter.
    """
    gSOLIDUSL = "g/L"
    """
    The Unified Code for Units of Measure (UCUM) representation of grams per liter.
    """
    wk = "wk"
    """
    The Unified Code for Units of Measure (UCUM) representation of week.
    """
    standard_gravity = "[g]"
    """
    The Unified Code for Units of Measure (UCUM) representation of standard gravity.
    """
    mSOLIDUSs2 = "m/s2"
    """
    The Unified Code for Units of Measure (UCUM) representation of meters per second squared.
    """
    molSOLIDUSg = "mol/g"
    """
    The Unified Code for Units of Measure (UCUM) representation of moles per gram.
    """
    gSOLIDUSm2SOLIDUSd = "g/m2/d"
    """
    The Unified Code for Units of Measure (UCUM) representation of grams per square meter per day.
    """
    Gy = "Gy"
    """
    The Unified Code for Units of Measure (UCUM) representation of gray (absorbed dose).
    """
    rad_LEFT_PARENTHESISradiation_absorbed_doseRIGHT_PARENTHESIS = "RAD"
    """
    The Unified Code for Units of Measure (UCUM) representation of rad (radiation absorbed dose).
    """
    square_feet = "[sft_i]"
    """
    The Unified Code for Units of Measure (UCUM) representation of square feet.
    """
    cubic_feet = "[cft_i]"
    """
    The Unified Code for Units of Measure (UCUM) representation of cubic feet.
    """
    m3 = "m3"
    """
    The Unified Code for Units of Measure (UCUM) representation of cubic meter.
    """
    ug = "ug"
    """
    The Unified Code for Units of Measure (UCUM) representation of microgram.
    """
    millimeters_per_year = "mm/a"
    """
    The Unified Code for Units of Measure (UCUM) representation of millimeters per year.
    """
    cm2 = "cm2"
    """
    The Unified Code for Units of Measure (UCUM) representation of square centimeter.
    """
    ergSOLIDUScm2SOLIDUSs = "erg/cm2/s"
    """
    The Unified Code for Units of Measure (UCUM) representation of ergs per square centimeter per second.
    """
    gSOLIDUSm2 = "g/m2"
    """
    The Unified Code for Units of Measure (UCUM) representation of grams per square meter.
    """
    LSOLIDUSs = "L/s"
    """
    The Unified Code for Units of Measure (UCUM) representation of liters per second.
    """
    cm3SOLIDUScm3 = "cm3/cm3"
    """
    The Unified Code for Units of Measure (UCUM) representation of cubic centimeters per cubic centimeter.
    """
    knots = "[kn_i]"
    """
    The Unified Code for Units of Measure (UCUM) representation of knot (nautical miles per hour).
    """
    m3SOLIDUSs = "m3/s"
    """
    The Unified Code for Units of Measure (UCUM) representation of cubic meters per second.
    """
    inches = "[in_i]"
    """
    The Unified Code for Units of Measure (UCUM) representation of inch.
    """


class ExecutionResourceEnum(str, Enum):
    NERSC_Cori = "NERSC-Cori"
    """
    NERSC Cori supercomputer
    """
    NERSC_Perlmutter = "NERSC-Perlmutter"
    """
    NERSC Perlmutter supercomputer
    """
    EMSL_RZR = "EMSL-RZR"
    """
    Environmental Molecular Sciences Laboratory RZR cluster
    """
    EMSL_Tahoma = "EMSL-Tahoma"
    """
    Environmental Molecular Sciences Laboratory RZR Tahoma cluster
    """


class FileTypeEnum(str, Enum):
    Virus_Summary = "Virus Summary"
    """
    Tab separated file listing the viruses found by geNomad.
    """
    Plasmid_Summary = "Plasmid Summary"
    """
    Tab separated file listing the plasmids found by geNomad.
    """
    GeNomad_Aggregated_Classification = "GeNomad Aggregated Classification"
    """
    Tab separated file which combines the results from neural network-based classification and marker-based classification for virus and plasmid detection with geNomad.
    """
    Reference_Calibration_File = "Reference Calibration File"
    """
    A file that contains data used to calibrate a natural organic matter or metabolomics analysis.
    """
    Metagenome_Raw_Reads = "Metagenome Raw Reads"
    """
    Interleaved paired-end raw metagenome sequencing data
    """
    Metagenome_Raw_Read_1 = "Metagenome Raw Read 1"
    """
    Read 1 raw metagenome sequencing data, aka forward reads
    """
    Metagenome_Raw_Read_2 = "Metagenome Raw Read 2"
    """
    Read 2 raw metagenome sequencing data, aka reverse reads
    """
    Metatranscriptome_Raw_Reads = "Metatranscriptome Raw Reads"
    """
    Interleaved paired-end raw metatranscriptome sequencing data
    """
    Metatranscriptome_Raw_Read_1 = "Metatranscriptome Raw Read 1"
    """
    Read 1 raw metatranscriptome sequencing data, aka forward reads
    """
    Metatranscriptome_Raw_Read_2 = "Metatranscriptome Raw Read 2"
    """
    Read 2 raw metatranscriptome sequencing data, aka reverse reads
    """
    Direct_Infusion_FT_ICR_MS_Analysis_Results = "Direct Infusion FT-ICR MS Analysis Results"
    """
    FT-ICR MS based molecular formula assignment results table
    """
    Direct_Infusion_FT_ICR_MS_QC_Plots = "Direct Infusion FT-ICR MS QC Plots"
    """
    Quality control plots for FT-ICR MS raw data acquired by direct infusion
    """
    LC_FT_ICR_MS_Analysis_Results = "LC FT-ICR MS Analysis Results"
    """
    LC FT-ICR MS-based molecular formula assignment results tables
    """
    LC_FT_ICR_MS_QC_Plots = "LC FT-ICR MS QC Plots"
    """
    Quality control plots for FT-ICR MS raw data acquired with liquid chromatography
    """
    GC_MS_Metabolomics_Results = "GC-MS Metabolomics Results"
    """
    GC-MS-based metabolite assignment results table
    """
    LC_MS_Metabolomics_Results = "LC-MS Metabolomics Results"
    """
    LC-MS-based metabolite assignment results table
    """
    Mass_Spectrometry_Reference_Spectral_Library = "Mass Spectrometry Reference Spectral Library"
    """
    Spectral library used for mass spectrometry based metabolite identification
    """
    Metaproteomics_Workflow_Statistics = "Metaproteomics Workflow Statistics"
    """
    Aggregate workflow statistics file
    """
    Protein_Report = "Protein Report"
    """
    Filtered protein report file
    """
    Peptide_Report = "Peptide Report"
    """
    Filtered peptide report file
    """
    Unfiltered_Metaproteomics_Results = "Unfiltered Metaproteomics Results"
    """
    MSGFjobs and MASIC output file
    """
    Read_Count_and_RPKM = "Read Count and RPKM"
    """
    Annotation read count and RPKM per feature JSON
    """
    QC_non_rRNA_R2 = "QC non-rRNA R2"
    """
    QC removed rRNA reads (R2) fastq
    """
    QC_non_rRNA_R1 = "QC non-rRNA R1"
    """
    QC removed rRNA reads (R1) fastq
    """
    Metagenome_HQMQ_Bins_Compression_File = "Metagenome HQMQ Bins Compression File"
    """
    Compressed file containing high quality and medium quality metagenome bins and associated files
    """
    Metagenome_LQ_Bins_Compression_File = "Metagenome LQ Bins Compression File"
    """
    Compressed file containing low quality metagenome bins and associated files
    """
    Metagenome_Bins_Info_File = "Metagenome Bins Info File"
    """
    File containing version information on the binning workflow
    """
    CheckM_Statistics = "CheckM Statistics"
    """
    CheckM statistics report
    """
    Metagenome_Bins_Heatmap = "Metagenome Bins Heatmap"
    """
    The Heatmap presents the pdf file containing the KO analysis results for metagenome bins
    """
    Metagenome_Bins_Barplot = "Metagenome Bins Barplot"
    """
    The Bar chart presents the pdf file containing the KO analysis results for metagenome bins
    """
    Metagenome_Bins_Krona_Plot = "Metagenome Bins Krona Plot"
    """
    The Krona plot presents the HTML file containing the KO analysis results for metagenome bins
    """
    Read_Based_Analysis_Info_File = "Read Based Analysis Info File"
    """
    File containing reads based analysis information
    """
    GTDBTK_Bacterial_Summary = "GTDBTK Bacterial Summary"
    """
    GTDBTK bacterial summary
    """
    GTDBTK_Archaeal_Summary = "GTDBTK Archaeal Summary"
    """
    GTDBTK archaeal summary
    """
    GOTTCHA2_Krona_Plot = "GOTTCHA2 Krona Plot"
    """
    GOTTCHA2 krona plot HTML file
    """
    GOTTCHA2_Classification_Report = "GOTTCHA2 Classification Report"
    """
    GOTTCHA2 classification report file
    """
    GOTTCHA2_Report_Full = "GOTTCHA2 Report Full"
    """
    GOTTCHA2 report file
    """
    Kraken2_Krona_Plot = "Kraken2 Krona Plot"
    """
    Kraken2 krona plot HTML file
    """
    Centrifuge_Krona_Plot = "Centrifuge Krona Plot"
    """
    Centrifuge krona plot HTML file
    """
    Centrifuge_output_report_file = "Centrifuge output report file"
    """
    Centrifuge output report file
    """
    Kraken2_Classification_Report = "Kraken2 Classification Report"
    """
    Kraken2 output report file
    """
    Kraken2_Taxonomic_Classification = "Kraken2 Taxonomic Classification"
    """
    Kraken2 output read classification file
    """
    Centrifuge_Taxonomic_Classification = "Centrifuge Taxonomic Classification"
    """
    Centrifuge output read classification file
    """
    SingleM_Taxonomic_Classification = "SingleM Taxonomic Classification"
    """
    SingleM taxonomic classification file
    """
    SingleM_Krona_Plot = "SingleM Krona Plot"
    """
    SingleM krona plot HTML file
    """
    SingleM_Clustered_Report = "SingleM Clustered Report"
    """
    SingleM taxonomic classification results, clustered by OTU
    """
    Structural_Annotation_GFF = "Structural Annotation GFF"
    """
    GFF3 format file with structural annotations
    """
    Structural_Annotation_Stats_Json = "Structural Annotation Stats Json"
    """
    Structural annotations stats json
    """
    Functional_Annotation_GFF = "Functional Annotation GFF"
    """
    GFF3 format file with functional annotations
    """
    Annotation_Info_File = "Annotation Info File"
    """
    File containing annotation info
    """
    Annotation_Amino_Acid_FASTA = "Annotation Amino Acid FASTA"
    """
    FASTA amino acid file for annotated proteins
    """
    Annotation_Enzyme_Commission = "Annotation Enzyme Commission"
    """
    Tab delimited file for EC annotation
    """
    Annotation_KEGG_Orthology = "Annotation KEGG Orthology"
    """
    Tab delimited file for KO annotation
    """
    Assembly_Info_File = "Assembly Info File"
    """
    File containing assembly info
    """
    Assembly_Coverage_BAM = "Assembly Coverage BAM"
    """
    Sorted bam file of reads mapping back to the final assembly
    """
    Assembly_AGP = "Assembly AGP"
    """
    An AGP format file that describes the assembly
    """
    Assembly_Scaffolds = "Assembly Scaffolds"
    """
    Final assembly scaffolds fasta
    """
    Assembly_Contigs = "Assembly Contigs"
    """
    Final assembly contigs fasta
    """
    Assembly_Coverage_Stats = "Assembly Coverage Stats"
    """
    Assembled contigs coverage information
    """
    Contig_Mapping_File = "Contig Mapping File"
    """
    Contig mappings between contigs and scaffolds
    """
    Error_Corrected_Reads = "Error Corrected Reads"
    """
    Error corrected reads fastq
    """
    Filtered_Sequencing_Reads = "Filtered Sequencing Reads"
    """
    Reads QC result fastq (clean data)
    """
    Read_Filtering_Info_File = "Read Filtering Info File"
    """
    File containing read filtering information
    """
    QC_Statistics_Extended = "QC Statistics Extended"
    """
    Extended report including methods and results for read filtering
    """
    QC_Statistics = "QC Statistics"
    """
    Reads QC summary statistics
    """
    TIGRFam_Annotation_GFF = "TIGRFam Annotation GFF"
    """
    GFF3 format file with TIGRfam
    """
    CRT_Annotation_GFF = "CRT Annotation GFF"
    """
    GFF3 format file with CRT
    """
    Genemark_Annotation_GFF = "Genemark Annotation GFF"
    """
    GFF3 format file with Genemark
    """
    Prodigal_Annotation_GFF = "Prodigal Annotation GFF"
    """
    GFF3 format file with Prodigal
    """
    TRNA_Annotation_GFF = "TRNA Annotation GFF"
    """
    GFF3 format file with TRNA
    """
    Misc_Annotation_GFF = "Misc Annotation GFF"
    """
    GFF3 format file with Misc
    """
    RFAM_Annotation_GFF = "RFAM Annotation GFF"
    """
    GFF3 format file with RFAM
    """
    TMRNA_Annotation_GFF = "TMRNA Annotation GFF"
    """
    GFF3 format file with TMRNA
    """
    Crispr_Terms = "Crispr Terms"
    """
    Crispr Terms
    """
    Product_Names = "Product Names"
    """
    Product names file
    """
    Gene_Phylogeny_tsv = "Gene Phylogeny tsv"
    """
    Gene Phylogeny tsv
    """
    Scaffold_Lineage_tsv = "Scaffold Lineage tsv"
    """
    phylogeny at the scaffold level
    """
    Clusters_of_Orthologous_Groups_LEFT_PARENTHESISCOGRIGHT_PARENTHESIS_Annotation_GFF = "Clusters of Orthologous Groups (COG) Annotation GFF"
    """
    GFF3 format file with COGs
    """
    KO_EC_Annotation_GFF = "KO_EC Annotation GFF"
    """
    GFF3 format file with KO_EC
    """
    CATH_FunFams_LEFT_PARENTHESISFunctional_FamiliesRIGHT_PARENTHESIS_Annotation_GFF = "CATH FunFams (Functional Families) Annotation GFF"
    """
    GFF3 format file with CATH FunFams
    """
    SUPERFam_Annotation_GFF = "SUPERFam Annotation GFF"
    """
    GFF3 format file with SUPERFam
    """
    SMART_Annotation_GFF = "SMART Annotation GFF"
    """
    GFF3 format file with SMART
    """
    Pfam_Annotation_GFF = "Pfam Annotation GFF"
    """
    GFF3 format file with Pfam
    """
    Annotation_Statistics = "Annotation Statistics"
    """
    Annotation statistics report
    """
    Direct_Infusion_FT_ICR_MS_Raw_Data = "Direct Infusion FT ICR-MS Raw Data"
    """
    Direct infusion Fourier transform ion cyclotron resonance mass spectrometry raw data
    """
    LC_FT_ICR_MS_Raw_Data = "LC FT-ICR MS Raw Data"
    """
    Fourier transform ion cyclotron resonance mass spectrometry raw data acquired with liquid chromatography
    """
    LC_DDA_MSSOLIDUSMS_Raw_Data = "LC-DDA-MS/MS Raw Data"
    """
    Liquid chromatographically separated MS1 and Data-Dependent MS2 binary instrument file
    """
    GC_MS_Raw_Data = "GC-MS Raw Data"
    """
    Gas chromatography-mass spectrometry raw data, full scan mode.
    """
    Configuration_toml = "Configuration toml"
    """
    A configuration toml file used by various programs to store settings that are specific to their respective software.
    """
    LC_MS_Lipidomics_Results = "LC-MS Lipidomics Results"
    """
    LC-MS-based lipidomics analysis results table
    """
    LC_MS_Lipidomics_Processed_Data = "LC-MS Lipidomics Processed Data"
    """
    Processed data for the LC-MS-based lipidomics analysis in hdf5 format
    """
    LC_MS_Metabolomics_Processed_Data = "LC-MS Metabolomics Processed Data"
    """
    Processed data for the LC-MS-based metabolomics analysis in hdf5 format
    """
    Contaminants_Amino_Acid_FASTA = "Contaminants Amino Acid FASTA"
    """
    FASTA amino acid file for contaminant proteins commonly observed in proteomics data.
    """
    Analysis_Tool_Parameter_File = "Analysis Tool Parameter File"
    """
    A configuration file used by a single computational software tool that stores settings that are specific to that tool.
    """
    Workflow_Operation_Summary = "Workflow Operation Summary"
    """
    A human readable record of analysis steps applied during an instance of a workflow operation.
    """
    Metatranscriptome_Expression = "Metatranscriptome Expression"
    """
    Metatranscriptome expression values and read counts for gene features predicted on contigs
    """
    Metatranscriptome_Expression_Intergenic = "Metatranscriptome Expression Intergenic"
    """
    Metatranscriptome expression values and read counts for intergenic regions.
    """
    Metatranscriptome_Expression_Info_File = "Metatranscriptome Expression Info File"
    """
    File containing version information on the expression workflow
    """
    rRNA_Filtered_Sequencing_Reads = "rRNA Filtered Sequencing Reads"
    """
    File containing ribosomal reads from the read qc filtering step.
    """
    BAI_File = "BAI File"
    """
    An index file found in the same directory as the binary alignment map (BAM) file, a compressed binary version of a sequence alignment/map (SAM) file.
    """


class DoiProviderEnum(str, Enum):
    EMSL = "emsl"
    JGI = "jgi"
    KBase = "kbase"
    OSTI = "osti"
    ESS_DIVE = "ess_dive"
    MassIVE = "massive"
    GSC = "gsc"
    Zenodo = "zenodo"
    EDI = "edi"
    Figshare = "figshare"


class DoiCategoryEnum(str, Enum):
    award_doi = "award_doi"
    """
    A type of DOI that resolves to a funding authority.
    """
    dataset_doi = "dataset_doi"
    """
    A type of DOI that resolves to generated data.
    """
    publication_doi = "publication_doi"
    """
    A type of DOI that resolves to a publication.
    """
    data_management_plan_doi = "data_management_plan_doi"
    """
    A type of DOI that resolves to a data management plan.
    """


class StatusEnum(str, Enum):
    pass_ = "pass"
    fail = "fail"


class NucleotideSequencingEnum(str, Enum):
    Metagenome = "metagenome"
    Metatranscriptome = "metatranscriptome"
    Amplicon = "amplicon_sequencing_assay"


class MassSpectrometryEnum(str, Enum):
    Metaproteome = "metaproteome"
    Metabolome = "metabolome"
    Lipidome = "lipidome"
    Natural_Organic_Matter = "nom"


class ExtractionTargetEnum(str, Enum):
    DNA = "DNA"
    RNA = "RNA"
    metabolite = "metabolite"
    protein = "protein"
    lipid = "lipid"
    natural_organic_matter = "natural organic matter"


class ProcessingInstitutionEnum(str, Enum):
    National_Microbiome_Data_Collaborative = "NMDC"
    University_of_California_San_Diego = "UCSD"
    Joint_Genome_Institute = "JGI"
    Environmental_Molecular_Sciences_Laboratory = "EMSL"
    Battelle_Memorial_Institute = "Battelle"
    Argonne_National_Laboratory = "ANL"
    University_of_California_Davis_Genome_Center = "UCD_Genome_Center"
    Azenta_Life_Sciences = "Azenta"


class DataCategoryEnum(str, Enum):
    instrument_data = "instrument_data"
    """
    Data generated by a DataGeneration PlannedProcess
    """
    processed_data = "processed_data"
    """
    Data generated by a WorkflowExecution PlannedProcess
    """
    workflow_parameter_data = "workflow_parameter_data"
    """
    Data used as input into a workflow providing workflow specification.
    """


class SourceSystemEnum(str, Enum):
    NMDC_Submission_Portal = "NMDC_Submission_Portal"
    """
    The National Microbiome Data Collaborative's Submission Portal
    """
    GOLD = "GOLD"
    """
    JGI's GOLD system
    """
    NEON_Data_Portal = "NEON_Data_Portal"
    """
    National Science Foundation National Ecologial Observatory Network's Data Portal
    """
    NCBI = "NCBI"
    """
    National Center for Biotechnology Information database
    """
    custom = "custom"
    """
    Metadata was generated by custom methods such as an offline spreadsheet provided by a user or staff member.
    """


class CreditEnum(str, Enum):
    Conceptualization = "Conceptualization"
    """
    Conceptualization
    """
    Data_curation = "Data curation"
    """
    Data curation
    """
    Formal_Analysis = "Formal Analysis"
    """
    Formal Analysis
    """
    Funding_acquisition = "Funding acquisition"
    """
    Funding acquisition
    """
    Investigation = "Investigation"
    """
    Investigation
    """
    Methodology = "Methodology"
    """
    Methodology
    """
    Project_administration = "Project administration"
    """
    Project administration
    """
    Resources = "Resources"
    """
    Resources
    """
    Software = "Software"
    """
    Software
    """
    Supervision = "Supervision"
    """
    Supervision
    """
    Validation = "Validation"
    """
    Validation
    """
    Visualization = "Visualization"
    """
    Visualization
    """
    Writing_original_draft = "Writing original draft"
    """
    Writing – original draft
    """
    Writing_review_and_editing = "Writing review and editing"
    """
    Writing – review & editing
    """
    Principal_Investigator = "Principal Investigator"
    """
    principal investigator role
    """
    Submitter = "Submitter"
    """
    the person(s) who enter study and biosample metadata into the NMDC submission portal
    """


class StudyCategoryEnum(str, Enum):
    research_study = "research_study"
    """
    A detailed examination, analysis, or critical inspection of a hypothesis-driven experiment.
    """
    consortium = "consortium"
    """
    A group formed to undertake a venture that is beyond the capabilities of the individual members. Each member of the consortium brings a high level of expertise in a specific area to ensure the successful completion of the project.
    """


class ManifestCategoryEnum(str, Enum):
    """
    A list of contexts in which some DataObjects can be analyzed together.
    """
    instrument_run = "instrument_run"
    """
    A collection of data objects from a single run of an instrument.
    """
    poolable_replicates = "poolable_replicates"
    """
    A collection of data objects that can be pooled for downstream analyses.
    """
    fractions = "fractions"
    """
    A collection of data objects that represent fractions of a single sample.
    """


class InstrumentModelEnum(str, Enum):
    exploris_21T = "exploris_21T"
    exploris_240 = "exploris_240"
    exploris_480 = "exploris_480"
    ltq_orbitrap_velos = "ltq_orbitrap_velos"
    orbitrap_fusion_lumos = "orbitrap_fusion_lumos"
    orbitrap_eclipse_tribid = "orbitrap_eclipse_tribid"
    orbitrap_q_exactive = "orbitrap_q_exactive"
    orbitrap_iqx_tribrid = "orbitrap_iqx_tribrid"
    orbitrap_idx_tribrid = "orbitrap_idx_tribrid"
    orbitrap_exploris_120 = "orbitrap_exploris_120"
    solarix_7T = "solarix_7T"
    solarix_12T = "solarix_12T"
    solarix_15T = "solarix_15T"
    agilent_8890A = "agilent_8890A"
    agilent_7980A = "agilent_7980A"
    vortex_genie_2 = "vortex_genie_2"
    novaseq = "novaseq"
    novaseq_6000 = "novaseq_6000"
    novaseq_x = "novaseq_x"
    hiseq = "hiseq"
    hiseq_1000 = "hiseq_1000"
    hiseq_1500 = "hiseq_1500"
    hiseq_2000 = "hiseq_2000"
    hiseq_2500 = "hiseq_2500"
    hiseq_3000 = "hiseq_3000"
    hiseq_4000 = "hiseq_4000"
    hiseq_x_ten = "hiseq_x_ten"
    miniseq = "miniseq"
    miseq = "miseq"
    nextseq_1000 = "nextseq_1000"
    nextseq = "nextseq"
    nextseq_500 = "nextseq_500"
    nextseq_550 = "nextseq_550"
    gridion = "gridion"
    minion = "minion"
    promethion = "promethion"
    rs_II = "rs_II"
    sequel = "sequel"
    sequel_II = "sequel_II"
    revio = "revio"


class InstrumentVendorEnum(str, Enum):
    waters = "waters"
    agilent = "agilent"
    bruker = "bruker"
    thermo_fisher = "thermo_fisher"
    vwr = "vwr"
    perkin_elmer = "perkin_elmer"
    gilson = "gilson"
    scientific_industries = "scientific_industries"
    illumina = "illumina"
    pacbio = "pacbio"
    oxford_nanopore = "oxford_nanopore"
    pnnl = "pnnl"


class FailureWhatEnum(str, Enum):
    """
    The permitted values for describing where a failure occurred during processing in the lab during analysis workflows.
    """
    low_read_count = "low_read_count"
    """
    Number of output reads is not sufficient to continue to the next analysis step.
    """
    malformed_data = "malformed_data"
    """
    Workflow failure reading input or writing the output file(s).
    """
    assembly_size_too_small = "assembly_size_too_small"
    """
    The size of the metagenome or metatranscriptome assembly is too small to proceed to the next analysis workflow.
    """
    no_valid_data_generated = "no_valid_data_generated"
    """
    A process ran but did not produce any output. Ie binning ran but did not produce any medium or high quality bins.
    """
    other = "other"
    """
    A lab process or analysis workflow has failed in a way that has not been captured by the available values yet. Please use slot 'qc_comment' to specify details.
    """
    low_molecular_formula_assignment = "low_molecular_formula_assignment"
    """
    Number of peaks with assigned molecular formulas during the workflow is not sufficient.
    """
    low_metabolite_assignment = "low_metabolite_assignment"
    """
    Number of metabolites identified during the Metabolomics or Lipidomics workflow is not sufficient.
    """
    low_c13_isotopologue_assignment = "low_c13_isotopologue_assignment"
    """
    Number of 13C isotopologues identified during the Metabolomics or Lipidomics workflow is not sufficient.
    """
    low_peptide_to_spectrum_match_rate = "low_peptide_to_spectrum_match_rate"
    """
    Rate of peptide assignment during the analysis is not sufficient.
    """


class FailureWhereEnum(str, Enum):
    """
    The permitted values for describing where in the process, either a lab or analysis workflow step, the failure occurred.
    """
    NucleotideSequencing = "NucleotideSequencing"
    """
    A failure has occurred during nucleotide sequencing, a data generation process.
    """
    MassSpectrometry = "MassSpectrometry"
    """
    A failure has occurred during mass spectrometry, a data generation process.
    """
    Pooling = "Pooling"
    """
    A failure has occurred in pooling, a lab process.
    """
    Extraction = "Extraction"
    """
    A failure has occurred in extraction, a lab process.
    """
    LibraryPreparation = "LibraryPreparation"
    """
    A failure has occurred in library preparation, a lab process.
    """
    MetagenomeAssembly = "MetagenomeAssembly"
    """
    A failure has occurred in metagenome assembly, a workflow process.
    """
    MetatranscriptomeExpressionAnalysis = "MetatranscriptomeExpressionAnalysis"
    """
    A failure has occurred in metatranscriptome expression analysis, a workflow process.
    """
    MagsAnalysis = "MagsAnalysis"
    """
    A failure has occurred in binning, a workflow process to generate metagenome-assembled genomes (MAGS).
    """
    ReadQcAnalysis = "ReadQcAnalysis"
    """
    A failure has occurred in read qc, a workflow process.
    """
    ReadBasedTaxonomyAnalysis = "ReadBasedTaxonomyAnalysis"
    """
    A failure has occurred in reads based taxonomy, a workflow process.
    """
    MetagenomeAnnotation = "MetagenomeAnnotation"
    """
    A failure has occurred in annotation, a workflow process.
    """
    MetatranscriptomeAssembly = "MetatranscriptomeAssembly"
    """
    A failure has occurred in assembly, a workflow process.
    """
    MetatranscriptomeAnnotation = "MetatranscriptomeAnnotation"
    """
    A failure has occurred in annotation, a workflow process.
    """
    MetabolomicsAnalysis = "MetabolomicsAnalysis"
    """
    A failure has occurred in analyzing metabolomics data.
    """
    MetaproteomicsAnalysis = "MetaproteomicsAnalysis"
    """
    A failure has occurred in analyzing metaproteomics data.
    """
    NomAnalysis = "NomAnalysis"
    """
    A failure has occurred in analyzing NOM data.
    """


class ProtocolForEnum(str, Enum):
    """
    The permitted values for describing the type of planned process that a protocol describes.
    """
    AnnotatingWorkflow = "AnnotatingWorkflow"
    ChemicalConversionProcess = "ChemicalConversionProcess"
    ChromatographicSeparationProcess = "ChromatographicSeparationProcess"
    CollectingBiosamplesFromSite = "CollectingBiosamplesFromSite"
    DataEmitterProcess = "DataEmitterProcess"
    DataGeneration = "DataGeneration"
    DissolvingProcess = "DissolvingProcess"
    Extraction = "Extraction"
    FiltrationProcess = "FiltrationProcess"
    LibraryPreparation = "LibraryPreparation"
    MagsAnalysis = "MagsAnalysis"
    MassSpectrometry = "MassSpectrometry"
    MaterialProcessing = "MaterialProcessing"
    MetabolomicsAnalysis = "MetabolomicsAnalysis"
    MetagenomeAnnotation = "MetagenomeAnnotation"
    MetagenomeAssembly = "MetagenomeAssembly"
    MetaproteomicsAnalysis = "MetaproteomicsAnalysis"
    MetatranscriptomeAnnotation = "MetatranscriptomeAnnotation"
    MetatranscriptomeAssembly = "MetatranscriptomeAssembly"
    MetatranscriptomeExpressionAnalysis = "MetatranscriptomeExpressionAnalysis"
    MixingProcess = "MixingProcess"
    NomAnalysis = "NomAnalysis"
    NucleotideSequencing = "NucleotideSequencing"
    PlannedProcess = "PlannedProcess"
    Pooling = "Pooling"
    ReadBasedTaxonomyAnalysis = "ReadBasedTaxonomyAnalysis"
    ReadQcAnalysis = "ReadQcAnalysis"
    StorageProcess = "StorageProcess"
    SubSamplingProcess = "SubSamplingProcess"
    WorkflowExecution = "WorkflowExecution"


class AeroStrucEnum(str, Enum):
    glider = "glider"
    plane = "plane"


class ArchStrucEnum(str, Enum):
    building = "building"
    home = "home"
    shed = "shed"


class BiolStatEnum(str, Enum):
    breederAPOSTROPHEs_line = "breeder's line"
    clonal_selection = "clonal selection"
    hybrid = "hybrid"
    inbred_line = "inbred line"
    mutant = "mutant"
    natural = "natural"
    semi_natural = "semi-natural"
    wild = "wild"


class BioticRelationshipEnum(str, Enum):
    commensalism = "commensalism"
    free_living = "free living"
    mutualism = "mutualism"
    parasitism = "parasitism"
    symbiotic = "symbiotic"


class BuildDocsEnum(str, Enum):
    building_information_model = "building information model"
    commissioning_report = "commissioning report"
    complaint_logs = "complaint logs"
    contract_administration = "contract administration"
    cost_estimate = "cost estimate"
    janitorial_schedules_or_logs = "janitorial schedules or logs"
    maintenance_plans = "maintenance plans"
    schedule = "schedule"
    sections = "sections"
    shop_drawings = "shop drawings"
    submittals = "submittals"
    ventilation_system = "ventilation system"
    windows = "windows"


class BuildOccupTypeEnum(str, Enum):
    airport = "airport"
    commercial = "commercial"
    health_care = "health care"
    high_rise = "high rise"
    low_rise = "low rise"
    market = "market"
    office = "office"
    residence = "residence"
    residential = "residential"
    restaurant = "restaurant"
    school = "school"
    sports_complex = "sports complex"
    wood_framed = "wood framed"


class BuildingSettingEnum(str, Enum):
    exurban = "exurban"
    rural = "rural"
    suburban = "suburban"
    urban = "urban"


class BuiltStrucSetEnum(str, Enum):
    rural = "rural"
    urban = "urban"


class CeilFinishMatEnum(str, Enum):
    PVC = "PVC"
    drywall = "drywall"
    fiberglass = "fiberglass"
    metal = "metal"
    mineral_fibre = "mineral fibre"
    mineral_woolSOLIDUScalcium_silicate = "mineral wool/calcium silicate"
    plasterboard = "plasterboard"
    stucco = "stucco"
    tiles = "tiles"
    wood = "wood"


class CeilStrucEnum(str, Enum):
    concrete = "concrete"
    wood_frame = "wood frame"


class CeilTypeEnum(str, Enum):
    barrel_shaped = "barrel-shaped"
    cathedral = "cathedral"
    coffered = "coffered"
    concave = "concave"
    cove = "cove"
    dropped = "dropped"
    stretched = "stretched"


class CeilingWallTextureEnum(str, Enum):
    Santa_Fe_texture = "Santa-Fe texture"
    crows_feet = "crows feet"
    crows_foot_stomp = "crows-foot stomp"
    double_skip = "double skip"
    hawk_and_trowel = "hawk and trowel"
    knockdown = "knockdown"
    orange_peel = "orange peel"
    popcorn = "popcorn"
    rosebud_stomp = "rosebud stomp"
    skip_trowel = "skip trowel"
    smooth = "smooth"
    stomp_knockdown = "stomp knockdown"
    swirl = "swirl"


class CompassDirections8Enum(str, Enum):
    east = "east"
    north = "north"
    northeast = "northeast"
    northwest = "northwest"
    south = "south"
    southeast = "southeast"
    southwest = "southwest"
    west = "west"


class DamagedEnum(str, Enum):
    damaged = "damaged"
    needs_repair = "needs repair"
    new = "new"
    rupture = "rupture"
    visible_wear = "visible wear"


class DamagedRupturedEnum(str, Enum):
    damaged = "damaged"
    needs_repair = "needs repair"
    new = "new"
    rupture = "rupture"
    visible_wear = "visible wear"


class DeposEnvEnum(str, Enum):
    Continental___Aeolian = "Continental - Aeolian"
    Continental___Alluvial = "Continental - Alluvial"
    Continental___Fluvial = "Continental - Fluvial"
    Continental___Lacustrine = "Continental - Lacustrine"
    Marine___Deep = "Marine - Deep"
    Marine___Reef = "Marine - Reef"
    Marine___Shallow = "Marine - Shallow"
    Other___Evaporite = "Other - Evaporite"
    Other___Glacial = "Other - Glacial"
    Other___Volcanic = "Other - Volcanic"
    Transitional___Beach = "Transitional - Beach"
    Transitional___Deltaic = "Transitional - Deltaic"
    Transitional___Lagoonal = "Transitional - Lagoonal"
    Transitional___Lake = "Transitional - Lake"
    Transitional___Tidal = "Transitional - Tidal"
    other = "other"


class DoorCompTypeEnum(str, Enum):
    metal_covered = "metal covered"
    revolving = "revolving"
    sliding = "sliding"
    telescopic = "telescopic"


class DoorDirectEnum(str, Enum):
    inward = "inward"
    outward = "outward"
    sideways = "sideways"


class DoorMatEnum(str, Enum):
    aluminum = "aluminum"
    cellular_PVC = "cellular PVC"
    engineered_plastic = "engineered plastic"
    fiberboard = "fiberboard"
    fiberglass = "fiberglass"
    metal = "metal"
    thermoplastic_alloy = "thermoplastic alloy"
    vinyl = "vinyl"
    wood = "wood"
    woodSOLIDUSplastic_composite = "wood/plastic composite"


class DoorMoveEnum(str, Enum):
    collapsible = "collapsible"
    folding = "folding"
    revolving = "revolving"
    rolling_shutter = "rolling shutter"
    sliding = "sliding"
    swinging = "swinging"


class DoorTypeEnum(str, Enum):
    composite = "composite"
    metal = "metal"
    wooden = "wooden"


class DoorTypeMetalEnum(str, Enum):
    collapsible = "collapsible"
    corrugated_steel = "corrugated steel"
    hollow = "hollow"
    rolling_shutters = "rolling shutters"
    steel_plate = "steel plate"


class DrainageClassEnum(str, Enum):
    excessively_drained = "excessively drained"
    moderately_well = "moderately well"
    poorly = "poorly"
    somewhat_poorly = "somewhat poorly"
    very_poorly = "very poorly"
    well = "well"


class DrawingsEnum(str, Enum):
    as_built = "as built"
    bid = "bid"
    building_navigation_map = "building navigation map"
    construction = "construction"
    design = "design"
    diagram = "diagram"
    operation = "operation"
    sketch = "sketch"


class FaoClassEnum(str, Enum):
    Acrisols = "Acrisols"
    Alisols = "Alisols"
    Andosols = "Andosols"
    Anthrosols = "Anthrosols"
    Arenosols = "Arenosols"
    Calcisols = "Calcisols"
    Cambisols = "Cambisols"
    Chernozems = "Chernozems"
    Cryosols = "Cryosols"
    Durisols = "Durisols"
    Ferralsols = "Ferralsols"
    Fluvisols = "Fluvisols"
    Gleysols = "Gleysols"
    Greyzems = "Greyzems"
    Gypsisols = "Gypsisols"
    Histosols = "Histosols"
    Kastanozems = "Kastanozems"
    Lithosols = "Lithosols"
    Leptosols = "Leptosols"
    Lixisols = "Lixisols"
    Luvisols = "Luvisols"
    Nitosols = "Nitosols"
    Phaeozems = "Phaeozems"
    Planosols = "Planosols"
    Plinthosols = "Plinthosols"
    Podzols = "Podzols"
    Podzoluvisols = "Podzoluvisols"
    Rankers = "Rankers"
    Regosols = "Regosols"
    Rendzinas = "Rendzinas"
    Solonchaks = "Solonchaks"
    Solonetz = "Solonetz"
    Stagnosols = "Stagnosols"
    Technosols = "Technosols"
    Umbrisols = "Umbrisols"
    Vertisols = "Vertisols"
    Yermosols = "Yermosols"


class FilterTypeEnum(str, Enum):
    HEPA = "HEPA"
    chemical_air_filter = "chemical air filter"
    electrostatic = "electrostatic"
    gas_phase_or_ultraviolet_air_treatments = "gas-phase or ultraviolet air treatments"
    low_MERV_pleated_media = "low-MERV pleated media"
    particulate_air_filter = "particulate air filter"


class FireplaceTypeEnum(str, Enum):
    gas_burning = "gas burning"
    wood_burning = "wood burning"


class FloorStrucEnum(str, Enum):
    balcony = "balcony"
    concrete = "concrete"
    floating_floor = "floating floor"
    glass_floor = "glass floor"
    raised_floor = "raised floor"
    sprung_floor = "sprung floor"
    wood_framed = "wood-framed"


class FloorWaterMoldEnum(str, Enum):
    bulging_walls = "bulging walls"
    ceiling_discoloration = "ceiling discoloration"
    condensation = "condensation"
    floor_discoloration = "floor discoloration"
    mold_odor = "mold odor"
    peeling_paint_or_wallpaper = "peeling paint or wallpaper"
    wall_discoloration = "wall discoloration"
    water_stains = "water stains"
    wet_floor = "wet floor"


class FreqCleanEnum(str, Enum):
    Annually = "Annually"
    Daily = "Daily"
    Monthly = "Monthly"
    Quarterly = "Quarterly"
    Weekly = "Weekly"
    other = "other"


class FurnitureEnum(str, Enum):
    cabinet = "cabinet"
    chair = "chair"
    desks = "desks"


class GenderRestroomEnum(str, Enum):
    all_gender = "all gender"
    female = "female"
    gender_neutral = "gender neutral"
    male = "male"
    male_and_female = "male and female"
    unisex = "unisex"


class GeolAgeEnum(str, Enum):
    Archean = "Archean"
    Cambrian = "Cambrian"
    Carboniferous = "Carboniferous"
    Cenozoic = "Cenozoic"
    Cretaceous = "Cretaceous"
    Devonian = "Devonian"
    Jurassic = "Jurassic"
    Mesozoic = "Mesozoic"
    Neogene = "Neogene"
    Ordovician = "Ordovician"
    Paleogene = "Paleogene"
    Paleozoic = "Paleozoic"
    Permian = "Permian"
    Precambrian = "Precambrian"
    Proterozoic = "Proterozoic"
    Silurian = "Silurian"
    Triassic = "Triassic"
    other = "other"


class GrowthHabitEnum(str, Enum):
    erect = "erect"
    prostrate = "prostrate"
    semi_erect = "semi-erect"
    spreading = "spreading"


class HandidnessEnum(str, Enum):
    ambidexterity = "ambidexterity"
    left_handedness = "left handedness"
    mixed_handedness = "mixed-handedness"
    right_handedness = "right handedness"


class HcProducedEnum(str, Enum):
    Bitumen = "Bitumen"
    Coalbed_Methane = "Coalbed Methane"
    Gas = "Gas"
    Gas_Condensate = "Gas-Condensate"
    Oil = "Oil"
    other = "other"


class HcrEnum(str, Enum):
    Coalbed = "Coalbed"
    Gas_Reservoir = "Gas Reservoir"
    Oil_Reservoir = "Oil Reservoir"
    Oil_Sand = "Oil Sand"
    Shale = "Shale"
    Tight_Gas_Reservoir = "Tight Gas Reservoir"
    Tight_Oil_Reservoir = "Tight Oil Reservoir"
    other = "other"


class HeatCoolTypeEnum(str, Enum):
    forced_air_system = "forced air system"
    heat_pump = "heat pump"
    radiant_system = "radiant system"
    steam_forced_heat = "steam forced heat"
    wood_stove = "wood stove"


class HeatSysDelivMethEnum(str, Enum):
    conductive = "conductive"
    radiant = "radiant"


class IndoorSpaceEnum(str, Enum):
    bathroom = "bathroom"
    bedroom = "bedroom"
    elevator = "elevator"
    foyer = "foyer"
    hallway = "hallway"
    kitchen = "kitchen"
    locker_room = "locker room"
    office = "office"


class IndoorSurfEnum(str, Enum):
    cabinet = "cabinet"
    ceiling = "ceiling"
    counter_top = "counter top"
    door = "door"
    shelving = "shelving"
    vent_cover = "vent cover"
    wall = "wall"
    window = "window"


class LightTypeEnum(str, Enum):
    desk_lamp = "desk lamp"
    electric_light = "electric light"
    fluorescent_lights = "fluorescent lights"
    natural_light = "natural light"
    none = "none"


class LithologyEnum(str, Enum):
    Basement = "Basement"
    Chalk = "Chalk"
    Chert = "Chert"
    Coal = "Coal"
    Conglomerate = "Conglomerate"
    Diatomite = "Diatomite"
    Dolomite = "Dolomite"
    Limestone = "Limestone"
    Sandstone = "Sandstone"
    Shale = "Shale"
    Siltstone = "Siltstone"
    Volcanic = "Volcanic"
    other = "other"


class MechStrucEnum(str, Enum):
    boat = "boat"
    bus = "bus"
    car = "car"
    carriage = "carriage"
    coach = "coach"
    elevator = "elevator"
    escalator = "escalator"
    subway = "subway"
    train = "train"


class MoldVisibilityEnum(str, Enum):
    no_presence_of_mold_visible = "no presence of mold visible"
    presence_of_mold_visible = "presence of mold visible"


class OccupDocumentEnum(str, Enum):
    automated_count = "automated count"
    estimate = "estimate"
    manual_count = "manual count"
    videos = "videos"


class OxyStatSampEnum(str, Enum):
    aerobic = "aerobic"
    anaerobic = "anaerobic"
    other = "other"


class PlantSexEnum(str, Enum):
    Androdioecious = "Androdioecious"
    Androecious = "Androecious"
    Androgynomonoecious = "Androgynomonoecious"
    Androgynous = "Androgynous"
    Andromonoecious = "Andromonoecious"
    Bisexual = "Bisexual"
    Dichogamous = "Dichogamous"
    Diclinous = "Diclinous"
    Dioecious = "Dioecious"
    Gynodioecious = "Gynodioecious"
    Gynoecious = "Gynoecious"
    Gynomonoecious = "Gynomonoecious"
    Hermaphroditic = "Hermaphroditic"
    Imperfect = "Imperfect"
    Monoclinous = "Monoclinous"
    Monoecious = "Monoecious"
    Perfect = "Perfect"
    Polygamodioecious = "Polygamodioecious"
    Polygamomonoecious = "Polygamomonoecious"
    Polygamous = "Polygamous"
    Protandrous = "Protandrous"
    Protogynous = "Protogynous"
    Subandroecious = "Subandroecious"
    Subdioecious = "Subdioecious"
    Subgynoecious = "Subgynoecious"
    Synoecious = "Synoecious"
    Trimonoecious = "Trimonoecious"
    Trioecious = "Trioecious"
    Unisexual = "Unisexual"


class ProfilePositionEnum(str, Enum):
    backslope = "backslope"
    footslope = "footslope"
    shoulder = "shoulder"
    summit = "summit"
    toeslope = "toeslope"


class QuadPosEnum(str, Enum):
    East_side = "East side"
    North_side = "North side"
    South_side = "South side"
    West_side = "West side"


class RelSampLocEnum(str, Enum):
    center_of_car = "center of car"
    edge_of_car = "edge of car"
    under_a_seat = "under a seat"


class RoomCondtEnum(str, Enum):
    damaged = "damaged"
    needs_repair = "needs repair"
    new = "new"
    rupture = "rupture"
    visible_signs_of_moldSOLIDUSmildew = "visible signs of mold/mildew"
    visible_wear = "visible wear"


class RoomConnectedEnum(str, Enum):
    attic = "attic"
    bathroom = "bathroom"
    closet = "closet"
    conference_room = "conference room"
    elevator = "elevator"
    examining_room = "examining room"
    hallway = "hallway"
    kitchen = "kitchen"
    mail_room = "mail room"
    office = "office"
    stairwell = "stairwell"


class RoomLocEnum(str, Enum):
    corner_room = "corner room"
    exterior_wall = "exterior wall"
    interior_room = "interior room"


class RoomSampPosEnum(str, Enum):
    center = "center"
    east_corner = "east corner"
    north_corner = "north corner"
    northeast_corner = "northeast corner"
    northwest_corner = "northwest corner"
    south_corner = "south corner"
    southeast_corner = "southeast corner"
    southwest_corner = "southwest corner"
    west_corner = "west corner"


class SampCaptStatusEnum(str, Enum):
    active_surveillance_in_response_to_an_outbreak = "active surveillance in response to an outbreak"
    active_surveillance_not_initiated_by_an_outbreak = "active surveillance not initiated by an outbreak"
    farm_sample = "farm sample"
    market_sample = "market sample"
    other = "other"


class SampCollectPointEnum(str, Enum):
    drilling_rig = "drilling rig"
    other = "other"
    separator = "separator"
    storage_tank = "storage tank"
    test_well = "test well"
    well = "well"
    wellhead = "wellhead"


class SampDisStageEnum(str, Enum):
    dissemination = "dissemination"
    growth_and_reproduction = "growth and reproduction"
    infection = "infection"
    inoculation = "inoculation"
    other = "other"
    penetration = "penetration"


class SampSubtypeEnum(str, Enum):
    biofilm = "biofilm"
    not_applicable = "not applicable"
    oil_phase = "oil phase"
    other = "other"
    water_phase = "water phase"


class SampWeatherEnum(str, Enum):
    clear_sky = "clear sky"
    cloudy = "cloudy"
    foggy = "foggy"
    hail = "hail"
    rain = "rain"
    sleet = "sleet"
    snow = "snow"
    sunny = "sunny"
    windy = "windy"


class SeasonEnum(str, Enum):
    autumn_LEFT_SQUARE_BRACKETNCITCOLONC94733RIGHT_SQUARE_BRACKET = "autumn [NCIT:C94733]"
    spring_LEFT_SQUARE_BRACKETNCITCOLONC94731RIGHT_SQUARE_BRACKET = "spring [NCIT:C94731]"
    summer_LEFT_SQUARE_BRACKETNCITCOLONC94732RIGHT_SQUARE_BRACKET = "summer [NCIT:C94732]"
    winter_LEFT_SQUARE_BRACKETNCITCOLONC94730RIGHT_SQUARE_BRACKET = "winter [NCIT:C94730]"


class SeasonUseEnum(str, Enum):
    Fall = "Fall"
    Spring = "Spring"
    Summer = "Summer"
    Winter = "Winter"


class SedimentTypeEnum(str, Enum):
    biogenous = "biogenous"
    cosmogenous = "cosmogenous"
    hydrogenous = "hydrogenous"
    lithogenous = "lithogenous"


class SeqQualityCheckEnum(str, Enum):
    manually_edited = "manually edited"
    none = "none"


class ShadingDeviceLocEnum(str, Enum):
    exterior = "exterior"
    interior = "interior"


class ShadingDeviceTypeEnum(str, Enum):
    bahama_shutters = "bahama shutters"
    exterior_roll_blind = "exterior roll blind"
    gambrel_awning = "gambrel awning"
    hood_awning = "hood awning"
    porchroller_awning = "porchroller awning"
    sarasota_shutters = "sarasota shutters"
    slatted_aluminum = "slatted aluminum"
    solid_aluminum_awning = "solid aluminum awning"
    sun_screen = "sun screen"
    tree = "tree"
    trellis = "trellis"
    venetian_awning = "venetian awning"


class SoilHorizonEnum(str, Enum):
    A_horizon = "A horizon"
    """
    The surface horizon, also called topsoil. It has a defined soil structure, and is mostly made up of humus (decayed organic matter).
    """
    B_horizon = "B horizon"
    """
    Also known as the subsoil. It is greatly composed of material illuviated (washed in from) layers above it. It is typically denser than the A horizon and has a clayey texture.
    """
    C_horizon = "C horizon"
    """
    Also known as the substratum is unconsolidated material deepest in the pit and closest to the bedrock.
    """
    E_horizon = "E horizon"
    """
    Used to refer to subsurface horizons that have undergone a significant loss of minerals, also known as Eluviation (or leaching).
    """
    O_horizon = "O horizon"
    """
    The organic horizon. Typically at the top of the soil structure and is made up of mostly organic matter.
    """
    Permafrost = "Permafrost"
    """
    Soil that continuously remains below 0 °C (32 °F) for two years or more.
    """
    R_layer = "R layer"
    """
    Hard bedrock, which is usually the lowest layer. It is characterized by tightly bound and unbreakable materials.
    """
    M_horizon = "M horizon"


class SpaceTypStateEnum(str, Enum):
    typically_occupied = "typically occupied"
    typically_unoccupied = "typically unoccupied"


class SpecificEnum(str, Enum):
    as_built = "as built"
    bid = "bid"
    construction = "construction"
    design = "design"
    operation = "operation"
    photos = "photos"


class SrDepEnvEnum(str, Enum):
    Fluvioldeltaic = "Fluvioldeltaic"
    Fluviomarine = "Fluviomarine"
    Lacustine = "Lacustine"
    Marine = "Marine"
    other = "other"


class SrKerogTypeEnum(str, Enum):
    Type_I = "Type I"
    Type_II = "Type II"
    Type_III = "Type III"
    Type_IV = "Type IV"
    other = "other"


class SrLithologyEnum(str, Enum):
    Biosilicieous = "Biosilicieous"
    Carbonate = "Carbonate"
    Clastic = "Clastic"
    Coal = "Coal"
    other = "other"


class SubstructureTypeEnum(str, Enum):
    basement = "basement"
    crawlspace = "crawlspace"
    slab_on_grade = "slab on grade"


class SurfAirContEnum(str, Enum):
    biocides = "biocides"
    biological_contaminants = "biological contaminants"
    dust = "dust"
    nutrients = "nutrients"
    organic_matter = "organic matter"
    particulate_matter = "particulate matter"
    radon = "radon"
    volatile_organic_compounds = "volatile organic compounds"


class SurfMaterialEnum(str, Enum):
    adobe = "adobe"
    carpet = "carpet"
    cinder_blocks = "cinder blocks"
    concrete = "concrete"
    glass = "glass"
    hay_bales = "hay bales"
    metal = "metal"
    paint = "paint"
    plastic = "plastic"
    stainless_steel = "stainless steel"
    stone = "stone"
    stucco = "stucco"
    tile = "tile"
    vinyl = "vinyl"
    wood = "wood"


class TidalStageEnum(str, Enum):
    ebb_tide = "ebb tide"
    flood_tide = "flood tide"
    high_tide = "high tide"
    low_tide = "low tide"


class TillageEnum(str, Enum):
    chisel = "chisel"
    cutting_disc = "cutting disc"
    disc_plough = "disc plough"
    drill = "drill"
    mouldboard = "mouldboard"
    ridge_till = "ridge till"
    strip_tillage = "strip tillage"
    tined = "tined"
    zonal_tillage = "zonal tillage"


class TrainLineEnum(str, Enum):
    green = "green"
    orange = "orange"
    red = "red"


class TrainStatLocEnum(str, Enum):
    forest_hills = "forest hills"
    riverside = "riverside"
    south_station_above_ground = "south station above ground"
    south_station_amtrak = "south station amtrak"
    south_station_underground = "south station underground"


class TrainStopLocEnum(str, Enum):
    downtown = "downtown"
    end = "end"
    mid = "mid"


class WallConstTypeEnum(str, Enum):
    fire_resistive = "fire resistive"
    frame_construction = "frame construction"
    joisted_masonry = "joisted masonry"
    light_noncombustible = "light noncombustible"
    masonry_noncombustible = "masonry noncombustible"
    modified_fire_resistive = "modified fire resistive"


class WallFinishMatEnum(str, Enum):
    acoustical_treatment = "acoustical treatment"
    gypsum_board = "gypsum board"
    gypsum_plaster = "gypsum plaster"
    masonry = "masonry"
    metal = "metal"
    plaster = "plaster"
    stone_facing = "stone facing"
    terrazzo = "terrazzo"
    tile = "tile"
    veneer_plaster = "veneer plaster"
    wood = "wood"


class WallSurfTreatmentEnum(str, Enum):
    fabric = "fabric"
    no_treatment = "no treatment"
    painted = "painted"
    paneling = "paneling"
    stucco = "stucco"
    wall_paper = "wall paper"


class WaterFeatTypeEnum(str, Enum):
    fountain = "fountain"
    pool = "pool"
    standing_feature = "standing feature"
    stream = "stream"
    waterfall = "waterfall"


class WeekdayEnum(str, Enum):
    Friday = "Friday"
    Monday = "Monday"
    Saturday = "Saturday"
    Sunday = "Sunday"
    Thursday = "Thursday"
    Tuesday = "Tuesday"
    Wednesday = "Wednesday"


class WindowCoverEnum(str, Enum):
    blinds = "blinds"
    curtains = "curtains"
    none = "none"


class WindowHorizPosEnum(str, Enum):
    left = "left"
    middle = "middle"
    right = "right"


class WindowMatEnum(str, Enum):
    clad = "clad"
    fiberglass = "fiberglass"
    metal = "metal"
    vinyl = "vinyl"
    wood = "wood"


class WindowStatusEnum(str, Enum):
    closed = "closed"
    open = "open"


class WindowTypeEnum(str, Enum):
    fixed_window = "fixed window"
    horizontal_sash_window = "horizontal sash window"
    single_hung_sash_window = "single-hung sash window"


class WindowVertPosEnum(str, Enum):
    bottom = "bottom"
    high = "high"
    low = "low"
    middle = "middle"
    top = "top"


class HostSexEnum(str, Enum):
    female = "female"
    hermaphrodite = "hermaphrodite"
    non_binary = "non-binary"
    male = "male"
    transgender = "transgender"
    transgender_LEFT_PARENTHESISfemale_to_maleRIGHT_PARENTHESIS = "transgender (female to male)"
    transgender_LEFT_PARENTHESISmale_to_femaleRIGHT_PARENTHESIS = "transgender (male to female)"
    undeclared = "undeclared"


class CurLandUseEnum(str, Enum):
    badlands = "badlands"
    cities = "cities"
    conifers = "conifers"
    crop_trees = "crop trees"
    farmstead = "farmstead"
    gravel = "gravel"
    hardwoods = "hardwoods"
    hayland = "hayland"
    horticultural_plants = "horticultural plants"
    industrial_areas = "industrial areas"
    intermixed_hardwood_and_conifers = "intermixed hardwood and conifers"
    marshlands = "marshlands"
    meadows = "meadows"
    minesSOLIDUSquarries = "mines/quarries"
    mudflats = "mudflats"
    oil_waste_areas = "oil waste areas"
    pastureland = "pastureland"
    permanent_snow_or_ice = "permanent snow or ice"
    rainforest = "rainforest"
    rangeland = "rangeland"
    roadsSOLIDUSrailroads = "roads/railroads"
    rock = "rock"
    row_crops = "row crops"
    saline_seeps = "saline seeps"
    salt_flats = "salt flats"
    sand = "sand"
    shrub_crops = "shrub crops"
    shrub_land = "shrub land"
    small_grains = "small grains"
    successional_shrub_land = "successional shrub land"
    swamp = "swamp"
    tropical = "tropical"
    tundra = "tundra"
    vegetable_crops = "vegetable crops"
    vine_crops = "vine crops"


class TargetGeneEnum(str, Enum):
    number_16S_rRNA = "16S_rRNA"
    """
    the small subunit of the bacterial/archean ribosome
    """
    number_23S_rRNA = "23S_rRNA"
    """
    the large subunit  of the bacterial/archean ribosome
    """
    number_18S_rRNA = "18S_rRNA"
    """
    the small subunit of the eukaryotic ribosome
    """
    number_28S_rRNA = "28S_rRNA"
    """
    the large subunit of the eukaryotic ribosome
    """


class BinQualityEnum(str, Enum):
    HQ = "HQ"
    """
    Metagenome-assembled genome is high quality based on MIMAG standards (https://doi.org/10.1038/nbt.3893)
    """
    MQ = "MQ"
    """
    Metagenome-assembled genome is medium quality based on MIMAG standards (https://doi.org/10.1038/nbt.3893)
    """
    LQ = "LQ"
    """
    Metagenome-assembled genome is low quality based on MIMAG standards (https://doi.org/10.1038/nbt.3893)
    """


class ChemicalConversionCategoryEnum(str, Enum):
    addition = "addition"
    substitution = "substitution"
    acid_base = "acid_base"
    reduction_oxidation = "reduction_oxidation"
    combustion = "combustion"
    decomposition = "decomposition"
    protease_cleavage = "protease_cleavage"
    """
    an enzymatic cleavage which relies on an enzyme with protease activity to act on proteins and to produce polypeptides (protein fragments).
    """


class BiosampleCategoryEnum(str, Enum):
    """
    Funding-based, sample location-based, or experimental method-based defined categories
    """
    National_Science_FoundationAPOSTROPHEs_Long_Term_Ecological_Research_Network = "LTER"
    SIP = "SIP"
    Department_of_Energy_Office_of_Science_Biological_and_Environmental_Research_Program_Laboratory_Science_Focus_Areas = "SFA"
    """
    Science Focus Area projects funded through the Department of Energy Office of Science Biological and Environmental Research Program
    """
    Facilities_Integrating_Collaborations_for_User_Science = "FICUS"
    National_Science_FoundationAPOSTROPHEs_National_Ecological_Observatory_Network = "NEON"
    Bioenergy_Research_Centers = "BRC"
    """
    Bioenergy Research Centers funded by the Biological Systems Science Division of the U.S. Department of Energy's Biological and Environmental Research Program.
    """


class SubstanceRoleEnum(str, Enum):
    buffer = "buffer"
    """
    Maintains the pH of the solution within a specific range to stabilize analytes or reactions.
    """
    acid = "acid"
    """
    Donates a proton or accepts an electron pair in a chemical reaction.
    """
    base = "base"
    """
    Accepts a proton or donates an electron pair in a chemical reaction.
    """
    ms_proteolytic_enzyme = "ms_proteolytic_enzyme"
    """
    Enzyme that catalyzes the hydrolysis of proteins and is used in mass spectrometry based proteomics
    """
    solvent = "solvent"
    """
    Dissolves the sample or reagents to facilitate reactions or extraction.
    """
    surfactant = "surfactant"
    """
    Reduces surface tension and aids in the solubilization of substances.
    """
    derivatizing_agent = "derivatizing_agent"
    """
    Chemically modifies analytes to improve detection or separation.
    """
    solubilizing_agent = "solubilizing_agent"


class SampleStateEnum(str, Enum):
    solid = "solid"
    liquid = "liquid"
    gas = "gas"


class ChemicalEntityEnum(str, Enum):
    acetonitrile = "acetonitrile"
    acetic_acid = "acetic_acid"
    alphaLP = "alphaLP"
    ammonium_acetate = "ammonium_acetate"
    ammonium_bicarbonate = "ammonium_bicarbonate"
    amitriptyline = "amitriptyline"
    Arg_C = "Arg-C"
    Asp_N = "Asp-N"
    chloroform = "chloroform"
    chymotrypsin = "chymotrypsin"
    ethanol = "ethanol"
    formic_acid = "formic_acid"
    glucose = "glucose"
    Glu_C = "Glu-C"
    hydrochloric_acid = "hydrochloric_acid"
    isopropyl_alcohol = "isopropyl_alcohol"
    Lys_C = "Lys-C"
    Lys_N = "Lys-N"
    N_methyl_N_trimethylsilyltrifluoroacetamide = "N-methyl-N-trimethylsilyltrifluoroacetamide"
    methanol = "methanol"
    methoxyamine = "methoxyamine"
    medronic_acid = "medronic_acid"
    phosphoric_acid = "phosphoric_acid"
    trimethylchlorosilane = "trimethylchlorosilane"
    trypsin = "trypsin"
    water = "water"


class MetaproteomicsAnalysisCategoryEnum(str, Enum):
    """
    The category of metaproteomics analysis being performed.
    """
    matched_metagenome = "matched_metagenome"
    """
    A metaproteomics analysis that is matched to a metagenome derived from the same biosample.
    """
    in_silico_metagenome = "in_silico_metagenome"
    """
    A metaproteomics analysis that is matched to an in silico generated metagenome.
    """


class MetabolomicsAnalysisCategoryEnum(str, Enum):
    """
    The category of metabolomics analysis being performed.
    """
    gc_ms_metabolomics = "gc_ms_metabolomics"
    """
    A metabolomics analysis that is performed on gas chromatography mass spectrometry data.
    """
    lc_ms_lipidomics = "lc_ms_lipidomics"
    """
    A metabolomics analysis that is performed on liquid chromatography mass spectrometry data for lipidomics annotation.
    """
    lc_ms_metabolomics = "lc_ms_metabolomics"
    """
    A metabolomics analysis that is performed on liquid chromatography mass spectrometry data.
    """


class SampleTypeEnum(str, Enum):
    soil = "soil"
    soil___water_extract = "soil - water extract"
    plant_associated = "plant associated"
    sediment = "sediment"
    water = "water"


class YesNoEnum(str, Enum):
    """
    replaces DnaDnaseEnum and DnaseRnaEnum
    """
    no = "no"
    yes = "yes"


class AnalysisTypeEnum(str, Enum):
    metabolomics = "metabolomics"
    lipidomics = "lipidomics"
    Metagenomics = "metagenomics"
    """
    Standard short-read metagenomic sequencing
    """
    Metagenomics_LEFT_PARENTHESISlong_readRIGHT_PARENTHESIS = "metagenomics_long_read"
    """
    Long-read metagenomic sequencing
    """
    metaproteomics = "metaproteomics"
    metatranscriptomics = "metatranscriptomics"
    natural_organic_matter = "natural organic matter"
    bulk_chemistry = "bulk chemistry"
    Amplicon_sequencing_assay = "amplicon sequencing assay"


class SubmissionStatusEnum(str, Enum):
    In_Progress = "InProgress"
    """
    The submitter is currently working on the submission.
    """
    Submitted___Pending_Review = "SubmittedPendingReview"
    """
    Submission is ready for NMDC review, the submitter cannot edit.
    """
    Approved___Held = "ApprovedHeld"
    """
    Submission has been reviewed and approved. Information is complete, but not yet shared on the data portal. The submitter cannot edit.
    """
    Approved___Sent_to_User_Facility = "ApprovedPendingUserFacility"
    """
    Submission has been reviewed and approved by NMDC. Sample information has been shared with designated user facility and is ready for their review. The submitter cannot edit.
    """
    Updates_Required = "UpdatesRequired"
    """
    Submission has been reviewed and submitter edits are required for approval. The submitter can edit the submission.
    """
    Denied = "Denied"
    """
    Submission has been reviewed and denied. The submitter cannot edit.
    """
    Released = "Released"
    """
    Submission has been reviewed and approved and data is released on the data portal. The submitter cannot edit.
    """



class EukEval(ConfiguredBaseModel):
    """
    This class contains information pertaining to evaluating if a Metagenome-Assembled Genome (MAG) is eukaryotic.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:EukEval',
         'comments': ['A tool like eukCC (https://doi.org/10.1186/s13059-020-02155-4) '
                      'would generate information for this class.'],
         'from_schema': 'https://w3id.org/nmdc/nmdc'})

    type: Literal["https://w3id.org/nmdc/EukEval","nmdc:EukEval"] = Field(default="nmdc:EukEval", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    completeness: Optional[float] = Field(default=None, description="""Estimate of the completeness of the metagenome-assembled genome, estimated by a tool like CheckM.""", ge=0, json_schema_extra = { "linkml_meta": {'domain_of': ['EukEval', 'MagBin']} })
    contamination: Optional[float] = Field(default=None, description="""Estimate of the completeness of the metagenome-assembled genome, estimated by a tool like CheckM.""", ge=0, json_schema_extra = { "linkml_meta": {'domain_of': ['EukEval', 'MagBin']} })
    ncbi_lineage_tax_ids: Optional[str] = Field(default=None, description="""Dash-delimited ordered list of NCBI taxonomy identifiers (TaxId)""", json_schema_extra = { "linkml_meta": {'domain_of': ['EukEval'],
         'examples': [{'value': '1-131567-2759-2611352-33682-191814-2603949'}]} })
    ncbi_lineage: Optional[str] = Field(default=None, description="""Comma delimited ordered list of NCBI taxonomy names.""", json_schema_extra = { "linkml_meta": {'domain_of': ['EukEval'],
         'examples': [{'value': 'root,cellular '
                                'organisms,Eukaryota,Discoba,Euglenozoa,Diplonemea,Diplonemidae'}]} })

    @field_validator('ncbi_lineage_tax_ids')
    def pattern_ncbi_lineage_tax_ids(cls, v):
        pattern=re.compile(r"^\d+(-\d+)*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ncbi_lineage_tax_ids format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ncbi_lineage_tax_ids format: {v}"
            raise ValueError(err_msg)
        return v


class FunctionalAnnotationAggMember(ConfiguredBaseModel):
    """
    This class is used to store aggregated results from workflows which produce functional annotations such as metaproteomics and metagenomics.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:FunctionalAnnotationAggMember',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'count': {'description': 'The number of sequences (for a '
                                                 'metagenome or metatranscriptome) or '
                                                 'spectra (for metaproteomics) '
                                                 'associated with the specified '
                                                 'function.',
                                  'name': 'count'},
                        'gene_function_id': {'name': 'gene_function_id',
                                             'pattern': '(COG:COG\\d+|PFAM:PF\\d{5}|KEGG.ORTHOLOGY:K\\d+)'},
                        'was_generated_by': {'name': 'was_generated_by',
                                             'pattern': '^(nmdc):(wfmgan|wfmp|wfmtan)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                                             'range': 'AnnotatingWorkflow',
                                             'required': True,
                                             'structured_pattern': {'interpolated': True,
                                                                    'syntax': '{id_nmdc_prefix}:(wfmgan|wfmp|wfmtan)-{id_shoulder}-{id_blade}{id_version}$'}}}})

    was_generated_by: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['FunctionalAnnotationAggMember',
                       'FunctionalAnnotation',
                       'DataObject'],
         'mappings': ['prov:wasGeneratedBy'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(wfmgan|wfmp|wfmtan)-{id_shoulder}-{id_blade}{id_version}$'}} })
    gene_function_id: str = Field(default=..., description="""The identifier for the gene function.""", json_schema_extra = { "linkml_meta": {'domain_of': ['FunctionalAnnotationAggMember'],
         'examples': [{'value': 'KEGG.ORTHOLOGY:K00627'}]} })
    count: int = Field(default=..., description="""The number of sequences (for a metagenome or metatranscriptome) or spectra (for metaproteomics) associated with the specified function.""", json_schema_extra = { "linkml_meta": {'domain_of': ['FunctionalAnnotationAggMember']} })
    type: Literal["https://w3id.org/nmdc/FunctionalAnnotationAggMember","nmdc:FunctionalAnnotationAggMember"] = Field(default="nmdc:FunctionalAnnotationAggMember", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('was_generated_by')
    def pattern_was_generated_by(cls, v):
        pattern=re.compile(r"^(nmdc):(wfmgan|wfmp|wfmtan)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_generated_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_generated_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('gene_function_id')
    def pattern_gene_function_id(cls, v):
        pattern=re.compile(r"(COG:COG\d+|PFAM:PF\d{5}|KEGG.ORTHOLOGY:K\d+)")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid gene_function_id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid gene_function_id format: {v}"
            raise ValueError(err_msg)
        return v


class Database(ConfiguredBaseModel):
    """
    An abstract holder for any set of metadata and data. It does not need to correspond to an actual managed database top level holder class. When translated to JSON-Schema this is the 'root' object. It should contain pointers to other objects of interest. For MongoDB, the lists of objects that Database slots point to correspond to **collections**.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'aliases': ['NMDC metadata object'],
         'class_uri': 'nmdc:Database',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'tree_root': True})

    biosample_set: Optional[list[Biosample]] = Field(default=None, description="""This property links a database object to the set of samples within it.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    calibration_set: Optional[list[CalibrationInformation]] = Field(default=None, description="""This property links a database object to the set of calibrations within it.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    collecting_biosamples_from_site_set: Optional[list[CollectingBiosamplesFromSite]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    configuration_set: Optional[list[Union[Configuration,MassSpectrometryConfiguration,ChromatographyConfiguration]]] = Field(default=None, description="""This property links a database object to the set of configurations within it.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    data_generation_set: Optional[list[Union[DataGeneration,NucleotideSequencing,MassSpectrometry]]] = Field(default=None, description="""This property links a database object to the set of data generations within it.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    data_object_set: Optional[list[DataObject]] = Field(default=None, description="""This property links a database object to the set of data objects within it.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    field_research_site_set: Optional[list[FieldResearchSite]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    functional_annotation_agg: Optional[list[FunctionalAnnotationAggMember]] = Field(default=None, description="""This property links a database object to a set of functional annotation aggregation (agg) results.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database']} })
    functional_annotation_set: Optional[list[FunctionalAnnotation]] = Field(default=None, description="""This property links a database object to the set of all functional annotations""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    genome_feature_set: Optional[list[GenomeFeature]] = Field(default=None, description="""This property links a database object to the set of all features""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    instrument_set: Optional[list[Instrument]] = Field(default=None, description="""This property links a database object to the set of instruments within it.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    manifest_set: Optional[list[Manifest]] = Field(default=None, description="""This property links a database object to the set of manifests within it.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    material_processing_set: Optional[list[Union[MaterialProcessing,Pooling,Extraction,LibraryPreparation,SubSamplingProcess,MixingProcess,FiltrationProcess,ChromatographicSeparationProcess,DissolvingProcess,ChemicalConversionProcess]]] = Field(default=None, description="""This property links a database object to the set of material processing within it.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    processed_sample_set: Optional[list[ProcessedSample]] = Field(default=None, description="""This property links a database object to the set of processed samples within it.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    storage_process_set: Optional[list[StorageProcess]] = Field(default=None, description="""This property links a database object to the set of storage processes within it.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    study_set: Optional[list[Study]] = Field(default=None, description="""This property links a database object to the set of studies within it.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })
    workflow_execution_set: Optional[list[Union[WorkflowExecution,AnnotatingWorkflow,MetagenomeAssembly,MetatranscriptomeAssembly,MetatranscriptomeExpressionAnalysis,MagsAnalysis,ReadQcAnalysis,ReadBasedTaxonomyAnalysis,MetabolomicsAnalysis,NomAnalysis,MetagenomeAnnotation,MetatranscriptomeAnnotation,MetaproteomicsAnalysis]]] = Field(default=None, description="""This property links a database object to the set of workflow executions.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Database'], 'mixins': ['object_set']} })


class GenomeFeature(ConfiguredBaseModel):
    """
    A feature localized to an interval along a genome
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:GenomeFeature',
         'comments': ['corresponds to an entry in GFF3'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'see_also': ['https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md'],
         'slot_usage': {'end': {'name': 'end', 'required': True},
                        'seqid': {'name': 'seqid', 'required': True},
                        'start': {'name': 'start', 'required': True}}})

    encodes: Optional[str] = Field(default=None, description="""The gene product encoded by this feature. Typically this is used for a CDS feature or gene feature which will encode a protein. It can also be used by a nc transcript ot gene feature that encoded a ncRNA""", json_schema_extra = { "linkml_meta": {'domain_of': ['GenomeFeature'],
         'todos': ['If we revert Reaction back into the schema, that would be a '
                   'reasonable domain for this slot']} })
    end: int = Field(default=..., description="""The end of the feature in positive 1-based integer coordinates""", ge=1, json_schema_extra = { "linkml_meta": {'close_mappings': ['biolink:end_interbase_coordinate'],
         'comments': ['unenforced constraint: end > start',
                      'For features that cross the origin of a circular feature, end = '
                      'the position of the end + the length of the landmark feature.'],
         'domain_of': ['GenomeFeature'],
         'is_a': 'gff_coordinate'} })
    feature_type: Optional[str] = Field(default=None, description="""TODO: Yuri to write""", json_schema_extra = { "linkml_meta": {'domain_of': ['GenomeFeature']} })
    phase: Optional[int] = Field(default=None, description="""The phase for a coding sequence entity. For example, phase of a CDS as represented in a GFF3 with a value of 0, 1 or 2.""", ge=0, le=2, json_schema_extra = { "linkml_meta": {'domain_of': ['GenomeFeature'], 'exact_mappings': ['biolink:phase']} })
    seqid: str = Field(default=..., description="""The ID of the landmark used to establish the coordinate system for the current feature.""", json_schema_extra = { "linkml_meta": {'domain_of': ['GenomeFeature'],
         'todos': ['change range from string to a object like uriorcurie?']} })
    start: int = Field(default=..., description="""The start of the feature in positive 1-based integer coordinates""", ge=1, json_schema_extra = { "linkml_meta": {'close_mappings': ['biolink:start_interbase_coordinate'],
         'domain_of': ['GenomeFeature'],
         'is_a': 'gff_coordinate'} })
    strand: Optional[str] = Field(default=None, description="""The strand on which a feature is located. Has a value of '+' (sense strand or forward strand) or  '-' (anti-sense strand or reverse strand).""", json_schema_extra = { "linkml_meta": {'domain_of': ['GenomeFeature'],
         'exact_mappings': ['biolink:strand'],
         'todos': ['set the range to an enum?']} })
    type: Literal["https://w3id.org/nmdc/GenomeFeature","nmdc:GenomeFeature"] = Field(default="nmdc:GenomeFeature", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    feature_category: Optional[ControlledIdentifiedTermValue] = Field(default=None, description="""A Sequence Ontology term that describes the category of a feature""", json_schema_extra = { "linkml_meta": {'domain_of': ['GenomeFeature', 'FunctionalAnnotation']} })


class FunctionalAnnotation(ConfiguredBaseModel):
    """
    An assignment of a function term (e.g. reaction or pathway) that is executed by a gene product,  or which the gene product plays an active role in. Functional annotations can be assigned manually by curators, or automatically in workflows.  In the context of NMDC, all function annotation is performed automatically, typically using HMM or Blast type methods
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:FunctionalAnnotation',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'narrow_mappings': ['biolink:GeneToGoTermAssociation'],
         'see_also': ['https://img.jgi.doe.gov/docs/functional-annotation.pdf',
                      'https://github.com/microbiomedata/mg_annotation/blob/master/functional-annotation.wdl'],
         'slot_usage': {'has_function': {'name': 'has_function',
                                         'notes': ['Still missing patterns for COG and '
                                                   'RetroRules',
                                                   'These patterns are not yet tied to '
                                                   'the listed prefixes.',
                                                   'Are these lists are intended to be '
                                                   'open examples or closed?']},
                        'was_generated_by': {'description': 'provenance for the '
                                                            'annotation.',
                                             'name': 'was_generated_by',
                                             'notes': ['To be consistent with the rest '
                                                       'of the NMDC schema we use the '
                                                       'PROV annotation model, rather '
                                                       'than GPAD'],
                                             'pattern': '^(nmdc):(wfmgan)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                                             'range': 'MetagenomeAnnotation',
                                             'structured_pattern': {'interpolated': True,
                                                                    'syntax': '{id_nmdc_prefix}:(wfmgan)-{id_shoulder}-{id_blade}{id_version}$'}}}})

    has_function: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['FunctionalAnnotation'],
         'notes': ['Still missing patterns for COG and RetroRules',
                   'These patterns are not yet tied to the listed prefixes.',
                   'Are these lists are intended to be open examples or closed?']} })
    subject: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['FunctionalAnnotation', 'OntologyRelation']} })
    was_generated_by: Optional[str] = Field(default=None, description="""provenance for the annotation.""", json_schema_extra = { "linkml_meta": {'domain_of': ['FunctionalAnnotationAggMember',
                       'FunctionalAnnotation',
                       'DataObject'],
         'mappings': ['prov:wasGeneratedBy'],
         'notes': ['To be consistent with the rest of the NMDC schema we use the PROV '
                   'annotation model, rather than GPAD'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(wfmgan)-{id_shoulder}-{id_blade}{id_version}$'}} })
    type: Literal["https://w3id.org/nmdc/FunctionalAnnotation","nmdc:FunctionalAnnotation"] = Field(default="nmdc:FunctionalAnnotation", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    feature_category: Optional[ControlledIdentifiedTermValue] = Field(default=None, description="""A Sequence Ontology term that describes the category of a feature""", json_schema_extra = { "linkml_meta": {'domain_of': ['GenomeFeature', 'FunctionalAnnotation']} })

    @field_validator('has_function')
    def pattern_has_function(cls, v):
        pattern=re.compile(r"^(KEGG_PATHWAY:\w{2,4}\d{5}|KEGG.REACTION:R\d+|RHEA:\d{5}|MetaCyc:[A-Za-z0-9+_.%-:]+|EC:\d{1,2}(\.\d{0,3}){0,3}|GO:\d{7}|MetaNetX:(MNXR\d+|EMPTY)|SEED:\w+|KEGG\.ORTHOLOGY:K\d+|EGGNOG:\w+|PFAM:PF\d{5}|TIGRFAM:TIGR\d+|SUPFAM:\w+|CATH:[1-6]\.[0-9]+\.[0-9]+\.[0-9]+|PANTHER.FAMILY:PTHR\d{5}(\:SF\d{1,3})?)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_function format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_function format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_generated_by')
    def pattern_was_generated_by(cls, v):
        pattern=re.compile(r"^(nmdc):(wfmgan)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_generated_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_generated_by format: {v}"
            raise ValueError(err_msg)
        return v


class AttributeValue(ConfiguredBaseModel):
    """
    The value for any value of a attribute for a sample. This object can hold both the un-normalized atomic value and the structured value
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'class_uri': 'nmdc:AttributeValue',
         'from_schema': 'https://w3id.org/nmdc/nmdc'})

    has_raw_value: Optional[str] = Field(default=None, description="""The value that was specified for an annotation in raw form, i.e. a string. E.g. \"2 cm\" or \"2-4 cm\"""", json_schema_extra = { "linkml_meta": {'domain_of': ['AttributeValue']} })
    type: Literal["https://w3id.org/nmdc/AttributeValue","nmdc:AttributeValue"] = Field(default="nmdc:AttributeValue", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })


class QuantityValue(AttributeValue):
    """
    A simple quantity, e.g. 2cm
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:QuantityValue',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'mappings': ['schema:QuantityValue'],
         'slot_usage': {'has_numeric_value': {'description': 'The number part of the '
                                                             'quantity',
                                              'name': 'has_numeric_value'},
                        'has_raw_value': {'description': 'Unnormalized atomic string '
                                                         'representation, should in '
                                                         'syntax {number} {unit}',
                                          'name': 'has_raw_value'},
                        'has_unit': {'description': 'The unit of the quantity',
                                     'name': 'has_unit',
                                     'range': 'UnitEnum',
                                     'required': True}}})

    has_maximum_numeric_value: Optional[Decimal] = Field(default=None, description="""The maximum value part, expressed as number, of the quantity value when the value covers a range.""", json_schema_extra = { "linkml_meta": {'domain_of': ['QuantityValue', 'PropertyAssertion'],
         'is_a': 'has_numeric_value'} })
    has_minimum_numeric_value: Optional[Decimal] = Field(default=None, description="""The minimum value part, expressed as number, of the quantity value when the value covers a range.""", json_schema_extra = { "linkml_meta": {'domain_of': ['QuantityValue', 'PropertyAssertion'],
         'is_a': 'has_numeric_value'} })
    has_numeric_value: Optional[Decimal] = Field(default=None, description="""The number part of the quantity""", json_schema_extra = { "linkml_meta": {'domain_of': ['QuantityValue', 'PropertyAssertion'],
         'mappings': ['qud:quantityValue', 'schema:value']} })
    has_unit: UnitEnum = Field(default=..., description="""The unit of the quantity""", json_schema_extra = { "linkml_meta": {'aliases': ['scale'],
         'domain_of': ['QuantityValue', 'PropertyAssertion'],
         'mappings': ['qud:unit', 'schema:unitCode']} })
    has_raw_value: Optional[str] = Field(default=None, description="""Unnormalized atomic string representation, should in syntax {number} {unit}""", json_schema_extra = { "linkml_meta": {'domain_of': ['AttributeValue']} })
    type: Literal["https://w3id.org/nmdc/QuantityValue","nmdc:QuantityValue"] = Field(default="nmdc:QuantityValue", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })


class ImageValue(AttributeValue):
    """
    An attribute value representing an image.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:ImageValue', 'from_schema': 'https://w3id.org/nmdc/nmdc'})

    url: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'Protocol', 'DataObject'],
         'notes': ['See issue 207 - this clashes with the mixs field']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    display_order: Optional[int] = Field(default=None, description="""When rendering information, this attribute to specify the order in which the information should be rendered.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue']} })
    has_raw_value: Optional[str] = Field(default=None, description="""The value that was specified for an annotation in raw form, i.e. a string. E.g. \"2 cm\" or \"2-4 cm\"""", json_schema_extra = { "linkml_meta": {'domain_of': ['AttributeValue']} })
    type: Literal["https://w3id.org/nmdc/ImageValue","nmdc:ImageValue"] = Field(default="nmdc:ImageValue", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })


class PersonValue(AttributeValue):
    """
    An attribute value representing a person
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:PersonValue',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'email': {'annotations': {'tooltip': {'tag': 'tooltip',
                                                              'value': 'Email address '
                                                                       'for this '
                                                                       'person.'}},
                                  'name': 'email'},
                        'has_raw_value': {'description': 'The full name of the '
                                                         'Investigator in format FIRST '
                                                         'LAST.',
                                          'name': 'has_raw_value',
                                          'notes': ['May eventually be deprecated in '
                                                    'favor of "name".']},
                        'name': {'annotations': {'tooltip': {'tag': 'tooltip',
                                                             'value': 'First name, '
                                                                      'middle initial, '
                                                                      'and last name '
                                                                      'of this '
                                                                      'person.'}},
                                 'description': 'The full name of the Investigator. It '
                                                'should follow the format FIRST '
                                                '[MIDDLE NAME| MIDDLE INITIAL] LAST, '
                                                'where MIDDLE NAME| MIDDLE INITIAL is '
                                                'optional.',
                                 'name': 'name'},
                        'orcid': {'annotations': {'tooltip': {'tag': 'tooltip',
                                                              'value': 'Open '
                                                                       'Researcher and '
                                                                       'Contributor ID '
                                                                       'for this '
                                                                       'person. See '
                                                                       'https://orcid.org'}},
                                  'name': 'orcid'}},
         'todos': ['add additional fields e.g for institution',
                   'deprecate "has_raw_value" in favor of "name"']})

    email: Optional[str] = Field(default=None, description="""An email address for an entity such as a person. This should be the primary email address used.""", json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'Email address for this person.'}},
         'domain_of': ['PersonValue'],
         'slot_uri': 'schema:email'} })
    name: Optional[str] = Field(default=None, description="""The full name of the Investigator. It should follow the format FIRST [MIDDLE NAME| MIDDLE INITIAL] LAST, where MIDDLE NAME| MIDDLE INITIAL is optional.""", json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'First name, middle initial, and last '
                                              'name of this person.'}},
         'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    orcid: Optional[str] = Field(default=None, description="""The ORCID of a person.""", json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'Open Researcher and Contributor ID for '
                                              'this person. See https://orcid.org'}},
         'domain_of': ['PersonValue']} })
    profile_image_url: Optional[str] = Field(default=None, description="""A url that points to an image of a person.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue']} })
    websites: Optional[list[str]] = Field(default=None, description="""A list of websites that are associated with the entity.""", json_schema_extra = { "linkml_meta": {'comments': ['DOIs should not be included as websites. Instead, use the '
                      'associated_dois slot.',
                      "A consortium's homepage website should be included in the "
                      'homepage_website slot, not in websites.',
                      'consortium is a convenience term for a Study whose '
                      'study_category value is consortium',
                      'the website slot and its subproperties are virtually identical '
                      'to the url slot, except that they are multivalued and url is '
                      'single-valued.'],
         'domain_of': ['PersonValue', 'Study'],
         'see_also': ['nmdc:url']} })
    has_raw_value: Optional[str] = Field(default=None, description="""The full name of the Investigator in format FIRST LAST.""", json_schema_extra = { "linkml_meta": {'domain_of': ['AttributeValue'],
         'notes': ['May eventually be deprecated in favor of "name".']} })
    type: Literal["https://w3id.org/nmdc/PersonValue","nmdc:PersonValue"] = Field(default="nmdc:PersonValue", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('websites')
    def pattern_websites(cls, v):
        pattern=re.compile(r"^[Hh][Tt][Tt][Pp][Ss]?:\/\/(?!.*[Dd][Oo][Ii]\.[Oo][Rr][Gg]).*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid websites format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid websites format: {v}"
            raise ValueError(err_msg)
        return v


class TextValue(AttributeValue):
    """
    A basic string value
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:TextValue', 'from_schema': 'https://w3id.org/nmdc/nmdc'})

    language: Optional[str] = Field(default=None, description="""Should use ISO 639-1 code e.g. \"en\", \"fr\"""", json_schema_extra = { "linkml_meta": {'domain_of': ['TextValue']} })
    has_raw_value: Optional[str] = Field(default=None, description="""The value that was specified for an annotation in raw form, i.e. a string. E.g. \"2 cm\" or \"2-4 cm\"""", json_schema_extra = { "linkml_meta": {'domain_of': ['AttributeValue']} })
    type: Literal["https://w3id.org/nmdc/TextValue","nmdc:TextValue"] = Field(default="nmdc:TextValue", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })


class TimestampValue(AttributeValue):
    """
    A value that is a timestamp. The range should be ISO-8601
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:TimestampValue',
         'from_schema': 'https://w3id.org/nmdc/nmdc'})

    has_raw_value: Optional[str] = Field(default=None, description="""The value that was specified for an annotation in raw form, i.e. a string. E.g. \"2 cm\" or \"2-4 cm\"""", json_schema_extra = { "linkml_meta": {'domain_of': ['AttributeValue']} })
    type: Literal["https://w3id.org/nmdc/TimestampValue","nmdc:TimestampValue"] = Field(default="nmdc:TimestampValue", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })


class ControlledTermValue(AttributeValue):
    """
    A controlled term or class from an ontology
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:ControlledTermValue',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'todos': ['add fields for ontology, branch']})

    term: Optional[Union[OntologyClass,FunctionalAnnotationTerm,OrthologyGroup]] = Field(default=None, description="""pointer to an ontology class""", json_schema_extra = { "linkml_meta": {'domain_of': ['ControlledTermValue']} })
    has_raw_value: Optional[str] = Field(default=None, description="""The value that was specified for an annotation in raw form, i.e. a string. E.g. \"2 cm\" or \"2-4 cm\"""", json_schema_extra = { "linkml_meta": {'domain_of': ['AttributeValue']} })
    type: Literal["https://w3id.org/nmdc/ControlledTermValue","nmdc:ControlledTermValue"] = Field(default="nmdc:ControlledTermValue", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })


class ControlledIdentifiedTermValue(ControlledTermValue):
    """
    A controlled term or class from an ontology, requiring the presence of term with an id
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:ControlledIdentifiedTermValue',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'term': {'name': 'term', 'required': True}}})

    term: Union[OntologyClass,FunctionalAnnotationTerm,OrthologyGroup] = Field(default=..., description="""pointer to an ontology class""", json_schema_extra = { "linkml_meta": {'domain_of': ['ControlledTermValue']} })
    has_raw_value: Optional[str] = Field(default=None, description="""The value that was specified for an annotation in raw form, i.e. a string. E.g. \"2 cm\" or \"2-4 cm\"""", json_schema_extra = { "linkml_meta": {'domain_of': ['AttributeValue']} })
    type: Literal["https://w3id.org/nmdc/ControlledIdentifiedTermValue","nmdc:ControlledIdentifiedTermValue"] = Field(default="nmdc:ControlledIdentifiedTermValue", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })


class GeolocationValue(AttributeValue):
    """
    A normalized value for a location on the earth's surface
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:GeolocationValue',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'mappings': ['schema:GeoCoordinates'],
         'slot_usage': {'has_raw_value': {'description': 'The raw value for a '
                                                         'geolocation should follow '
                                                         '{latitude} {longitude}',
                                          'name': 'has_raw_value'},
                        'latitude': {'name': 'latitude', 'required': True},
                        'longitude': {'name': 'longitude', 'required': True}}})

    latitude: float = Field(default=..., description="""The latitude of a location.""", json_schema_extra = { "linkml_meta": {'alt_descriptions': {'wikipedia': {'description': 'A geographic coordinate '
                                                           'that specifies the '
                                                           'north-south position of a '
                                                           'point on the surface of '
                                                           'the Earth or another '
                                                           'celestial body.',
                                            'source': 'wikipedia'}},
         'domain_of': ['GeolocationValue'],
         'examples': [{'value': '-33.460524'}],
         'mappings': ['schema:latitude'],
         'slot_uri': 'wgs84:lat'} })
    longitude: float = Field(default=..., description="""The longitude of a location.""", json_schema_extra = { "linkml_meta": {'alt_descriptions': {'wikipedia': {'description': 'A geographic coordinate '
                                                           'that specifies the '
                                                           'east-west position of a '
                                                           'point on the surface of '
                                                           'the Earth, or another '
                                                           'celestial body.',
                                            'source': 'wikipedia'}},
         'domain_of': ['GeolocationValue'],
         'examples': [{'value': '150.168149'}],
         'mappings': ['schema:longitude'],
         'slot_uri': 'wgs84:long'} })
    has_raw_value: Optional[str] = Field(default=None, description="""The raw value for a geolocation should follow {latitude} {longitude}""", json_schema_extra = { "linkml_meta": {'domain_of': ['AttributeValue']} })
    type: Literal["https://w3id.org/nmdc/GeolocationValue","nmdc:GeolocationValue"] = Field(default="nmdc:GeolocationValue", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })


class PropertyAssertion(AttributeValue):
    """
    A structured record of data that doesn't fit nicely within the constraints of other NMDC AttributeValues. Uses primitive ranges only.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:PropertyAssertion',
         'comments': ['This class enables flexible metadata capture for properties '
                      "that don't align with existing, policy-governed slots in NMDC "
                      'schema.',
                      'Interoperability note: This approach is aligned with the '
                      "BERtron schema's 'properties' slot pattern (see "
                      'https://github.com/ber-data/bertron-schema), which uses any_of '
                      "to support both TextValue and QuantityValue ranges. NMDC's "
                      'PropertyAssertion provides a more granular approach by using '
                      'primitive types with optional semantic annotations, enabling '
                      'better validation while maintaining flexibility for diverse '
                      'metadata types.',
                      'PropertyAssertion supports both categorical values (via '
                      'has_value_term_id) and numeric values (via has_numeric_value '
                      'with optional min/max ranges), along with temporal '
                      '(has_datetime_value) and boolean (has_boolean_value) data '
                      'types.'],
         'examples': [{'description': "Data provided from submission that doesn't "
                                      'conform to required abs_air_humidity units',
                       'object': {'has_attribute_id': 'MIXS:0000122',
                                  'has_attribute_label': 'absolute air humidity',
                                  'has_numeric_value': 50,
                                  'has_raw_value': '50 kPa',
                                  'has_unit': 'kPa',
                                  'type': 'nmdc:PropertyAssertion'}},
                      {'description': "Data provided from submission that doesn't "
                                      'conform to required UCUM unit',
                       'object': {'has_attribute_id': 'MIXS:0000119',
                                  'has_attribute_label': 'dissolved oxygen',
                                  'has_numeric_value': 5.5,
                                  'has_raw_value': '5.5 mL/L',
                                  'has_unit': 'mL/L',
                                  'type': 'nmdc:PropertyAssertion'}},
                      {'description': 'Unit provided is invalid for UCUM and standard',
                       'object': {'has_attribute_id': 'MIXS:0000112',
                                  'has_attribute_label': 'solar irradiance',
                                  'has_numeric_value': 250,
                                  'has_raw_value': '250 W/m2',
                                  'has_unit': 'W/m2',
                                  'type': 'nmdc:PropertyAssertion'}}],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'has_raw_value': {'description': 'Original contributor string '
                                                         'representation (unparsed)',
                                          'name': 'has_raw_value',
                                          'required': True},
                        'has_unit': {'description': 'UCUM unit code (required only '
                                                    'when numeric value is present)',
                                     'name': 'has_unit',
                                     'required': False}}})

    has_attribute_label: Optional[str] = Field(default=None, description="""Human-readable label for the property (e.g., MIxS label, ENVO term label).""", json_schema_extra = { "linkml_meta": {'comments': ['This provides a human-friendly name for the asserted property. '
                      'For example, "bicarbonate ion concentration" or "total '
                      'phosphorus". The label helps with readability and data '
                      'discovery.'],
         'domain_of': ['PropertyAssertion']} })
    has_attribute_id: Optional[str] = Field(default=None, description="""CURIE or IRI for the property (MIxS slot, NMDC slot, ENVO/OBI term, etc.).""", json_schema_extra = { "linkml_meta": {'comments': ['This provides a resolvable identifier for the property being '
                      'asserted. Examples include MIXS:0000117 for total phosphorus, '
                      'or ENVO:01001357 for bicarbonate ion concentration.',
                      'Prefer using standard ontology terms (ENVO, PATO, OBI, etc.) or '
                      'MIxS identifiers when available to enhance interoperability.'],
         'domain_of': ['PropertyAssertion']} })
    has_quantity_kind_id: Optional[str] = Field(default=None, description="""Optional CURIE or IRI for the physical quantity kind (e.g., qudt:QuantityKind).""", json_schema_extra = { "linkml_meta": {'comments': ['This slot enables precise semantic description of what physical '
                      'quantity is being measured, independent of the specific units '
                      'used. For example, qudt:MassConcentration or qudt:Temperature.',
                      'Using quantity kind identifiers from QUDT or similar '
                      'vocabularies improves data integration and enables automated '
                      'unit conversion.'],
         'domain_of': ['PropertyAssertion']} })
    has_value_term_id: Optional[str] = Field(default=None, description="""CURIE or IRI for categorical values (ENVO, PATO, METPO, etc.).""", json_schema_extra = { "linkml_meta": {'comments': ['Use this slot when the value of the property is a controlled '
                      'vocabulary term rather than a numeric or free-text value. For '
                      'example, ENVO:00002297 for "desert ecosystem" or PATO:0001199 '
                      'for "dry".'],
         'domain_of': ['PropertyAssertion']} })
    has_boolean_value: Optional[bool] = Field(default=None, description="""Links a quantity value to a boolean""", json_schema_extra = { "linkml_meta": {'domain_of': ['PropertyAssertion']} })
    has_datetime_value: Optional[str] = Field(default=None, description="""Date-time value for the property in ISO-8601 format.""", json_schema_extra = { "linkml_meta": {'comments': ['Use this slot for temporal properties. The value should follow '
                      'ISO-8601 format (e.g., "2025-06-12T14:30:00Z").'],
         'domain_of': ['PropertyAssertion']} })
    has_numeric_value: Optional[Decimal] = Field(default=None, description="""Links a quantity value to a number""", json_schema_extra = { "linkml_meta": {'domain_of': ['QuantityValue', 'PropertyAssertion'],
         'mappings': ['qud:quantityValue', 'schema:value']} })
    has_minimum_numeric_value: Optional[Decimal] = Field(default=None, description="""The minimum value part, expressed as number, of the quantity value when the value covers a range.""", json_schema_extra = { "linkml_meta": {'domain_of': ['QuantityValue', 'PropertyAssertion'],
         'is_a': 'has_numeric_value'} })
    has_maximum_numeric_value: Optional[Decimal] = Field(default=None, description="""The maximum value part, expressed as number, of the quantity value when the value covers a range.""", json_schema_extra = { "linkml_meta": {'domain_of': ['QuantityValue', 'PropertyAssertion'],
         'is_a': 'has_numeric_value'} })
    has_unit: Optional[str] = Field(default=None, description="""UCUM unit code (required only when numeric value is present)""", json_schema_extra = { "linkml_meta": {'aliases': ['scale'],
         'domain_of': ['QuantityValue', 'PropertyAssertion'],
         'mappings': ['qud:unit', 'schema:unitCode']} })
    has_raw_value: str = Field(default=..., description="""Original contributor string representation (unparsed)""", json_schema_extra = { "linkml_meta": {'domain_of': ['AttributeValue']} })
    type: Literal["https://w3id.org/nmdc/PropertyAssertion","nmdc:PropertyAssertion"] = Field(default="nmdc:PropertyAssertion", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })


class NamedThing(ConfiguredBaseModel):
    """
    a databased entity or concept/class
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'class_uri': 'nmdc:NamedThing',
         'from_schema': 'https://w3id.org/nmdc/nmdc'})

    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/NamedThing","nmdc:NamedThing"] = Field(default="nmdc:NamedThing", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class OntologyClass(NamedThing):
    """
    A representation of class defined in an external ontology.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:OntologyClass',
         'exact_mappings': ['biolink:OntologyClass', 'owl:Class', 'schema:Class'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         '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_\\-\\/\\.,]*$'}}})

    alternative_names: Optional[list[str]] = Field(default=None, description="""A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.  This should not be used for identifers which have their own slots (e.g., bioproject:PRJNA406974)""", json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass', 'Study', 'Biosample'],
         'exact_mappings': ['dcterms:alternative', 'skos:altLabel']} })
    relations: Optional[list[OntologyRelation]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass']} })
    definition: Optional[str] = Field(default=None, description="""The definition of the ontology term as provided by the ontology.""", json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass']} })
    is_obsolete: Optional[bool] = Field(default=None, description="""A boolean value indicating whether the ontology term is obsolete.""", json_schema_extra = { "linkml_meta": {'comments': ['If true (the ontology term is declared obsolete via the '
                      'ontology source itself), the term is no longer considered a '
                      'valid term to use in an annotation at NMDC, and it no longer '
                      'has ontology_relation_set records.'],
         'domain_of': ['OntologyClass']} })
    is_root: Optional[bool] = Field(default=None, description="""A boolean value indicating whether the ontology term is a root term; it is not a subclass of  any other term.""", json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ["The identifiers for terms from external ontologies can't have "
                   'their ids constrained to the nmdc namespace'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/OntologyClass","nmdc:OntologyClass"] = Field(default="nmdc:OntologyClass", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class FunctionalAnnotationTerm(OntologyClass):
    """
    Abstract grouping class for any term/descriptor that can be applied to a functional unit of a genome (protein, ncRNA, complex).
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'aliases': ['function', 'FunctionalAnnotation'],
         'class_uri': 'nmdc:FunctionalAnnotationTerm',
         'from_schema': 'https://w3id.org/nmdc/nmdc'})

    alternative_names: Optional[list[str]] = Field(default=None, description="""A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.  This should not be used for identifers which have their own slots (e.g., bioproject:PRJNA406974)""", json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass', 'Study', 'Biosample'],
         'exact_mappings': ['dcterms:alternative', 'skos:altLabel']} })
    relations: Optional[list[OntologyRelation]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass']} })
    definition: Optional[str] = Field(default=None, description="""The definition of the ontology term as provided by the ontology.""", json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass']} })
    is_obsolete: Optional[bool] = Field(default=None, description="""A boolean value indicating whether the ontology term is obsolete.""", json_schema_extra = { "linkml_meta": {'comments': ['If true (the ontology term is declared obsolete via the '
                      'ontology source itself), the term is no longer considered a '
                      'valid term to use in an annotation at NMDC, and it no longer '
                      'has ontology_relation_set records.'],
         'domain_of': ['OntologyClass']} })
    is_root: Optional[bool] = Field(default=None, description="""A boolean value indicating whether the ontology term is a root term; it is not a subclass of  any other term.""", json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ["The identifiers for terms from external ontologies can't have "
                   'their ids constrained to the nmdc namespace'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/FunctionalAnnotationTerm","nmdc:FunctionalAnnotationTerm"] = Field(default="nmdc:FunctionalAnnotationTerm", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class OrthologyGroup(FunctionalAnnotationTerm):
    """
    A set of genes or gene products in which all members are orthologous
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:OrthologyGroup',
         'exact_mappings': ['biolink:GeneFamily'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'id_prefixes': ['CATH',
                         'EGGNOG',
                         'KEGG.ORTHOLOGY',
                         'PANTHER.FAMILY',
                         'PFAM',
                         'SUPFAM',
                         'TIGRFAM'],
         'notes': ['KEGG.ORTHOLOGY prefix is used for KO numbers'],
         'todos': ["is OrthologyGroup instantiated in an MongoDB collection? Aren't "
                   'Pathways searchable in the Data Portal?']})

    alternative_names: Optional[list[str]] = Field(default=None, description="""A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.  This should not be used for identifers which have their own slots (e.g., bioproject:PRJNA406974)""", json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass', 'Study', 'Biosample'],
         'exact_mappings': ['dcterms:alternative', 'skos:altLabel']} })
    relations: Optional[list[OntologyRelation]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass']} })
    definition: Optional[str] = Field(default=None, description="""The definition of the ontology term as provided by the ontology.""", json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass']} })
    is_obsolete: Optional[bool] = Field(default=None, description="""A boolean value indicating whether the ontology term is obsolete.""", json_schema_extra = { "linkml_meta": {'comments': ['If true (the ontology term is declared obsolete via the '
                      'ontology source itself), the term is no longer considered a '
                      'valid term to use in an annotation at NMDC, and it no longer '
                      'has ontology_relation_set records.'],
         'domain_of': ['OntologyClass']} })
    is_root: Optional[bool] = Field(default=None, description="""A boolean value indicating whether the ontology term is a root term; it is not a subclass of  any other term.""", json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ["The identifiers for terms from external ontologies can't have "
                   'their ids constrained to the nmdc namespace'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/OrthologyGroup","nmdc:OrthologyGroup"] = Field(default="nmdc:OrthologyGroup", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class OntologyRelation(ConfiguredBaseModel):
    """
    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.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'aliases': ['OntologyAssociation'],
         'class_uri': 'nmdc:OntologyRelation',
         '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 statements 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'})

    type: Literal["https://w3id.org/nmdc/OntologyRelation","nmdc:OntologyRelation"] = Field(default="nmdc:OntologyRelation", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    subject: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['FunctionalAnnotation', 'OntologyRelation']} })
    predicate: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyRelation']} })
    object: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyRelation']} })


class FailureCategorization(ConfiguredBaseModel):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:FailureCategorization',
         'from_schema': 'https://w3id.org/nmdc/nmdc'})

    qc_failure_what: Optional[FailureWhatEnum] = Field(default=None, description="""Provides a summary about what caused a lab or workflow process to fail""", json_schema_extra = { "linkml_meta": {'comments': ['For example, low read count from a sequencer, malformed fastq '
                      'files, etc.'],
         'domain_of': ['FailureCategorization']} })
    qc_failure_where: Optional[FailureWhereEnum] = Field(default=None, description="""Describes the nmdc schema class that corresonds to where the failure occurred. Most commonly this would be the same as Class that generated the results.""", json_schema_extra = { "linkml_meta": {'comments': ['If the assembly size was too small to proceed to annotation '
                      'failure_where would be MetagenomeAssembly.'],
         'domain_of': ['FailureCategorization']} })
    type: Literal["https://w3id.org/nmdc/FailureCategorization","nmdc:FailureCategorization"] = Field(default="nmdc:FailureCategorization", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })


class MaterialEntity(NamedThing):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'aliases': ['Material', 'Physical entity'],
         'class_uri': 'nmdc:MaterialEntity',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'title': 'Material Entity'})

    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MaterialEntity","nmdc:MaterialEntity"] = Field(default="nmdc:MaterialEntity", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class Instrument(MaterialEntity):
    """
    A material entity that is designed to perform a function in a scientific investigation, but is not a reagent. This class models the make and model of the instrument, not the specific instance of the instrument.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'aliases': ['device'],
         'class_uri': 'nmdc:Instrument',
         'exact_mappings': ['OBI:0000968'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}}},
         'unique_keys': {'main': {'description': 'A unique instrument is defined by '
                                                 'its vendor and model.',
                                  'unique_key_name': 'main',
                                  'unique_key_slots': ['vendor', 'model']}}})

    vendor: Optional[InstrumentVendorEnum] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Instrument']} })
    model: Optional[InstrumentModelEnum] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Instrument']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/Instrument","nmdc:Instrument"] = Field(default="nmdc:Instrument", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class PlannedProcess(NamedThing):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'class_uri': 'OBI:0000011',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'title': 'Planned Process'})

    has_input: Optional[list[str]] = Field(default=None, description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'], 'domain_of': ['PlannedProcess']} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'], 'domain_of': ['PlannedProcess']} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/PlannedProcess","http://purl.obolibrary.org/obo/OBI_0000011","nmdc:PlannedProcess","OBI:0000011"] = Field(default="OBI:0000011", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class CollectingBiosamplesFromSite(PlannedProcess):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:CollectingBiosamplesFromSite',
         'close_mappings': ['OBI:0000744'],
         'comments': ['this illustrates implementing a Biosample relation with a '
                      'process class'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'has_input': {'name': 'has_input',
                                      'pattern': '^(nmdc):(frsite|site)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'range': 'Site',
                                      'required': True,
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(frsite|site)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'name': 'has_output',
                                       'pattern': '^(nmdc):bsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'range': 'Biosample',
                                       'required': True,
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:bsm-{id_shoulder}-{id_blade}$'}},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):clsite-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:clsite-{id_shoulder}-{id_blade}$'}}},
         'title': 'Collecting Biosamples From Site'})

    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(frsite|site)-{id_shoulder}-{id_blade}$'}} })
    has_output: list[str] = Field(default=..., description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:bsm-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:clsite-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/CollectingBiosamplesFromSite","nmdc:CollectingBiosamplesFromSite"] = Field(default="nmdc:CollectingBiosamplesFromSite", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(frsite|site)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):bsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):clsite-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class StorageProcess(PlannedProcess):
    """
    A planned process with the objective to preserve and protect material entities by placing them in an identified  location which may have a controlled environment.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:StorageProcess',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'related_mappings': ['OBI:0302893'],
         'slot_usage': {'has_input': {'name': 'has_input',
                                      'pattern': '^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'range': 'Sample',
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'name': 'has_output',
                                       'pattern': '^(nmdc):procsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'range': 'ProcessedSample',
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:procsm-{id_shoulder}-{id_blade}$'}},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):storpr-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:storpr-{id_shoulder}-{id_blade}$'}},
                        'substances_used': {'description': 'The substance(s) that a '
                                                           'processed sample is stored '
                                                           'in.',
                                            'name': 'substances_used'}}})

    substances_used: Optional[list[PortionOfSubstance]] = Field(default=None, description="""The substance(s) that a processed sample is stored in.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Extraction',
                       'StorageProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess',
                       'MobilePhaseSegment']} })
    contained_in: Optional[ContainerCategoryEnum] = Field(default=None, description="""A type of container.""", json_schema_extra = { "linkml_meta": {'domain_of': ['SubSamplingProcess', 'StorageProcess'],
         'examples': [{'value': 'test tube'},
                      {'value': 'falcon tube'},
                      {'value': 'whirlpak'}]} })
    temperature: Optional[QuantityValue] = Field(default=None, description="""The value of a temperature measurement or temperature used in a process.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['ChromatographyConfiguration',
                       'Extraction',
                       'SubSamplingProcess',
                       'StorageProcess',
                       'ChromatographicSeparationProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess'],
         'notes': ['Not to be confused with the MIXS:0000113']} })
    has_input: Optional[list[str]] = Field(default=None, description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:procsm-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:storpr-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/StorageProcess","nmdc:StorageProcess"] = Field(default="nmdc:StorageProcess", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):procsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):storpr-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class Protocol(ConfiguredBaseModel):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:Protocol', 'from_schema': 'https://w3id.org/nmdc/nmdc'})

    url: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'Protocol', 'DataObject'],
         'notes': ['See issue 207 - this clashes with the mixs field']} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    type: Literal["https://w3id.org/nmdc/Protocol","nmdc:Protocol"] = Field(default="nmdc:Protocol", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    protocol_for: Optional[ProtocolForEnum] = Field(default=None, description="""The type of planned process that the protocol describes.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Protocol']} })
    analysis_type: Optional[list[AnalysisTypeEnum]] = Field(default=None, title="analysis/data type", description="""Select all the data types associated or available for this biosample""", json_schema_extra = { "linkml_meta": {'comments': ['MIxS:investigation_type was included as a `see_also` but that '
                      "term doesn't resolve any more"],
         'domain_of': ['Protocol', 'Biosample'],
         'examples': [{'value': 'metagenomics; metabolomics; metaproteomics'}],
         'rank': 3,
         'recommended': True,
         'slot_group': 'Sample ID'} })


class CreditAssociation(ConfiguredBaseModel):
    """
    This class supports binding associated researchers to studies. There will be at least a slot for a CRediT Contributor Role and for a person value. Specifically see the associated researchers tab on the NMDC_SampleMetadata-V4_CommentsForUpdates at https://docs.google.com/spreadsheets/d/1INlBo5eoqn2efn4H2P2i8rwRBtnbDVTqXrochJEAPko/edit#gid=0
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'aliases': ['study role', 'credit table', 'associated researchers'],
         'class_uri': 'prov:Association',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'see_also': ['https://casrai.org/credit/']})

    applies_to_person: PersonValue = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['CreditAssociation']} })
    applied_roles: list[CreditEnum] = Field(default=..., json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'Identify all CRediT roles associated '
                                              'with this contributor. CRediT '
                                              'Information: '
                                              'https://info.orcid.org/credit-for-research-contribution '
                                              '; CRediT: https://credit.niso.org/'}},
         'domain_of': ['CreditAssociation']} })
    type: Literal["https://w3id.org/nmdc/CreditAssociation","http://www.w3.org/ns/prov#Association","nmdc:CreditAssociation","prov:Association"] = Field(default="prov:Association", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })


class Doi(ConfiguredBaseModel):
    """
    A centrally registered identifier symbol used to uniquely identify objects given by the International DOI Foundation. The DOI system is particularly used for electronic documents.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'aliases': ['DOIs', 'digital object identifiers'],
         'class_uri': 'nmdc:Doi',
         'exact_mappings': ['OBI:0002110'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'rules': [{'description': 'If doi_category is a publication_doi, then '
                                   'doi_provider is not required. Otherwise, '
                                   'doi_provider is required.',
                    'postconditions': {'slot_conditions': {'doi_provider': {'name': 'doi_provider',
                                                                            'required': True}}},
                    'preconditions': {'slot_conditions': {'doi_category': {'equals_string': 'dataset_doi',
                                                                           'name': 'doi_category'}}},
                    'title': 'dataset_dois_require_provider'},
                   {'description': 'If doi_category is a publication_doi, then '
                                   'doi_provider is not required. Otherwise, '
                                   'doi_provider is required.',
                    'postconditions': {'slot_conditions': {'doi_provider': {'name': 'doi_provider',
                                                                            'required': True}}},
                    'preconditions': {'slot_conditions': {'doi_category': {'equals_string': 'award_doi',
                                                                           'name': 'doi_category'}}},
                    'title': 'award_dois_require_provider'}]})

    doi_value: str = Field(default=..., description="""A digital object identifier, which is intended to persistantly identify some resource on the web.""", json_schema_extra = { "linkml_meta": {'aliases': ['DOI', 'digital object identifier'],
         'domain_of': ['Doi'],
         'exact_mappings': ['OBI:0002110'],
         'examples': [{'description': 'The DOI links to an electronic document.',
                       'value': 'doi:10.46936/10.25585/60000880'}],
         'narrow_mappings': ['edam.data:1188']} })
    doi_provider: Optional[DoiProviderEnum] = Field(default=None, description="""The authority, or organization, the DOI is associated with.""", json_schema_extra = { "linkml_meta": {'close_mappings': ['NCIT:C74932'],
         'domain_of': ['Doi'],
         'examples': [{'description': 'The corresponding DOI is associated with '
                                      'ESS-DIVE.',
                       'value': 'ess_dive'}]} })
    doi_category: DoiCategoryEnum = Field(default=..., description="""The resource type the corresponding doi resolves to.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Doi'],
         'examples': [{'description': 'The corresponding DOI is a dataset resource '
                                      'type.',
                       'value': 'dataset_doi'}]} })
    type: Literal["https://w3id.org/nmdc/Doi","nmdc:Doi"] = Field(default="nmdc:Doi", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('doi_value')
    def pattern_doi_value(cls, v):
        pattern=re.compile(r"^doi:10.\d{2,9}/.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid doi_value format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid doi_value format: {v}"
            raise ValueError(err_msg)
        return v


class Study(NamedThing):
    """
    A study summarizes the overall goal of a research initiative and outlines the key objective of its underlying projects.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'aliases': ['proposal',
                     'research proposal',
                     'research study',
                     'investigation',
                     'project',
                     'umbrella project',
                     'research initiative'],
         'alt_descriptions': {'embl.ena': {'description': 'A study (project) groups '
                                                          'together data submitted to '
                                                          'the archive and controls '
                                                          'its release date. A study '
                                                          'accession is typically used '
                                                          'when citing data submitted '
                                                          'to ENA',
                                           'source': 'embl.ena'}},
         'broad_mappings': ['prov:Activity'],
         'class_uri': 'nmdc:Study',
         'comments': ['The Study includes both consortia and research studies.'],
         'exact_mappings': ['OBI:0000066',
                            'SIO:000747',
                            'NCIT:C41198',
                            'ISA:Investigation'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'notes': ['sample GOLD link https://bioregistry.io/gold:Gs0110115',
                   'sample insdc.srs link '
                   'https://www.ebi.ac.uk/ena/browser/view/PRJEB45055 ?',
                   'sample mgnify link '
                   'https://www.ebi.ac.uk/metagenomics/studies/MGYS00005757',
                   'GOLD, insdc.srs and mgnify are reasonable prefixes for alternative '
                   'study identifiers, but no longer for the Study.id'],
         'slot_usage': {'alternative_identifiers': {'description': 'Unique identifier '
                                                                   'for a study '
                                                                   'submitted to '
                                                                   'additional '
                                                                   'resources. Matches '
                                                                   'that which has '
                                                                   'been submitted to '
                                                                   'NMDC',
                                                    'name': 'alternative_identifiers'},
                        'alternative_names': {'annotations': {'tooltip': {'tag': 'tooltip',
                                                                          'value': 'Project, '
                                                                                   'study, '
                                                                                   'or '
                                                                                   'sample '
                                                                                   'set '
                                                                                   'names '
                                                                                   'the '
                                                                                   'are '
                                                                                   'also '
                                                                                   'associated '
                                                                                   'with '
                                                                                   'this '
                                                                                   'submission '
                                                                                   'or '
                                                                                   'other '
                                                                                   'names '
                                                                                   '/ '
                                                                                   'identifiers '
                                                                                   'for '
                                                                                   'this '
                                                                                   'study.'}},
                                              'name': 'alternative_names'},
                        'description': {'annotations': {'tooltip': {'tag': 'tooltip',
                                                                    'value': 'Provide '
                                                                             'a brief '
                                                                             'description '
                                                                             'of your '
                                                                             'study.'}},
                                        'comments': ['Include links in other Study '
                                                     'slots, such as websites or '
                                                     'dois.'],
                                        'description': 'A brief, link-free summary of '
                                                       'a Study',
                                        'name': 'description'},
                        'homepage_website': {'annotations': {'tooltip': {'tag': 'tooltip',
                                                                         'value': 'Link '
                                                                                  'to '
                                                                                  'the '
                                                                                  "consortium's "
                                                                                  'homepage '
                                                                                  'if '
                                                                                  'the '
                                                                                  'study_category '
                                                                                  'is '
                                                                                  'a '
                                                                                  'consortium.'}},
                                             'name': 'homepage_website'},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):sty-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:sty-{id_shoulder}-{id_blade}$'}},
                        'insdc_bioproject_identifiers': {'annotations': {'tooltip': {'tag': 'tooltip',
                                                                                     'value': 'Provide '
                                                                                              'the '
                                                                                              'NCBI '
                                                                                              'BioProject '
                                                                                              'Accession '
                                                                                              'Number '
                                                                                              'associated '
                                                                                              'with '
                                                                                              'the '
                                                                                              'listed '
                                                                                              'NCBI '
                                                                                              'BioProject '
                                                                                              'Title.'}},
                                                         'description': 'Unique '
                                                                        'identifier '
                                                                        'for a '
                                                                        'bioproject '
                                                                        'submitted to '
                                                                        'INSDC that '
                                                                        'relates to '
                                                                        'the NMDC '
                                                                        'submitted '
                                                                        'study.',
                                                         'name': 'insdc_bioproject_identifiers'},
                        'name': {'annotations': {'tooltip': {'tag': 'tooltip',
                                                             'value': 'Provide a name '
                                                                      'for the study '
                                                                      'your samples '
                                                                      'will belong '
                                                                      'with.'}},
                                 'name': 'name'},
                        'notes': {'annotations': {'tooltip': {'tag': 'tooltip',
                                                              'value': 'Add any '
                                                                       'additional '
                                                                       'notes or '
                                                                       'comments about '
                                                                       'this study.'}},
                                  'name': 'notes'},
                        'part_of': {'comments': ['Value is the id of the umbrella '
                                                 'study or consortium.'],
                                    'description': 'Links a study or consortium to a '
                                                   'parent (or umbrella) study or '
                                                   'consortium.',
                                    'name': 'part_of',
                                    'pattern': '^(nmdc):sty-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                    'range': 'Study',
                                    'structured_pattern': {'interpolated': True,
                                                           'syntax': '{id_nmdc_prefix}:sty-{id_shoulder}-{id_blade}$'}},
                        'protocol_link': {'inlined_as_list': True,
                                          'multivalued': True,
                                          'name': 'protocol_link'},
                        'provenance_metadata': {'description': 'Provenance metadata '
                                                               'for this Study, '
                                                               'including when the '
                                                               'record was added to '
                                                               'and last modified in '
                                                               'the NMDC database.',
                                                'name': 'provenance_metadata'},
                        'related_identifiers': {'description': 'Unique identifier for '
                                                               'a study submitted to '
                                                               'additional resources. '
                                                               'Similar, but not '
                                                               'necessarily identical '
                                                               'to that which has been '
                                                               'submitted to NMDC',
                                                'name': 'related_identifiers'},
                        'websites': {'annotations': {'tooltip': {'tag': 'tooltip',
                                                                 'value': 'Link to the '
                                                                          'Principal '
                                                                          "Investigator's "
                                                                          'research '
                                                                          'lab webpage '
                                                                          'or the '
                                                                          'study '
                                                                          'webpage '
                                                                          'associated '
                                                                          'with this '
                                                                          'collection '
                                                                          'of samples. '
                                                                          'Multiple '
                                                                          'links can '
                                                                          'be '
                                                                          'provided.'}},
                                     'name': 'websites'}},
         'todos': ['determine how to get data values for submitted_to_insdc, '
                   'investigation_type, experimental_factor']})

    emsl_project_identifiers: Optional[list[str]] = Field(default=None, title="EMSL Project Identifiers", description="""Identifiers that link a NMDC study to the EMSL user facility website hosting the project description of an EMSL user project""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study'],
         'examples': [{'value': 'emsl.project:60141'}],
         'is_a': 'study_identifiers',
         'mixins': ['emsl_identifiers'],
         'notes': ['these identifiers are all currently 5 digits long but that could '
                   'change in the future'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/927#issuecomment-1802136437'],
         'todos': ['elaborate on description']} })
    gnps_task_identifiers: Optional[list[str]] = Field(default=None, title="GNPS task identifiers", description="""identifiers that link a NMDC study to a web-based report about metabolomics analysis progress and results""", json_schema_extra = { "linkml_meta": {'comments': ['this could be considered a related identifier, as the '
                      "metabolomics progress and results aren't a study per se",
                      'this identifier was registered with bioregistry but not '
                      'identifiers.org'],
         'domain_of': ['Study'],
         'examples': [{'value': 'gnps.task:4b848c342a4f4abc871bdf8a09a60807'}],
         'is_a': 'study_identifiers',
         'mixins': ['gnps_identifiers'],
         'see_also': ['https://microbiomedata.github.io/nmdc-schema/MetabolomicsAnalysis/']} })
    gold_study_identifiers: Optional[list[str]] = Field(default=None, title="GOLD Study Identifiers", description="""identifiers for corresponding project(s) in GOLD""", json_schema_extra = { "linkml_meta": {'comments': ['uses the prefix GS (but possibly in a different case)'],
         'domain_of': ['Study'],
         'examples': [{'value': 'gold:Gs0110115'}],
         'is_a': 'study_identifiers',
         'mixins': ['gold_identifiers'],
         'see_also': ['https://gold.jgi.doe.gov/studies']} })
    insdc_bioproject_identifiers: Optional[list[str]] = Field(default=None, description="""Unique identifier for a bioproject submitted to INSDC that relates to the NMDC submitted study.""", json_schema_extra = { "linkml_meta": {'aliases': ['NCBI bioproject identifiers', 'DDBJ bioproject identifiers'],
         'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'Provide the NCBI BioProject Accession '
                                              'Number associated with the listed NCBI '
                                              'BioProject Title.'}},
         'comments': ['these are distinct IDs from INSDC SRA/ENA project identifiers, '
                      'but are usually(?) one to one'],
         'domain_of': ['NucleotideSequencing', 'Study'],
         'examples': [{'description': 'Avena fatua rhizosphere microbial communities - '
                                      'H1_Rhizo_Litter_2 metatranscriptome',
                       'value': 'bioproject:PRJNA366857'}],
         'is_a': 'study_identifiers',
         'mixins': ['insdc_identifiers'],
         'see_also': ['https://www.ncbi.nlm.nih.gov/bioproject/',
                      'https://www.ddbj.nig.ac.jp/bioproject/index-e.html']} })
    jgi_portal_study_identifiers: Optional[list[str]] = Field(default=None, title="JGI Portal Study identifiers", description="""Identifiers that link a NMDC study to a website hosting raw and analyzed data for a JGI proposal.  The suffix of the curie can used to query the GOLD API and is interoperable with an award DOI from OSTI and a GOLD study identifier.""", json_schema_extra = { "linkml_meta": {'comments': ['Could this could be considered a related identifier?',
                      'Curie suffix is the Site Award Number from an OSTI award page',
                      'Site Award Number 507130 == award doi '
                      'doi:10.46936/10.25585/60000017 -- GOLD study identifier '
                      'gold:Gs0154044',
                      'bioregistry.io/jgi.proposal:507130 '
                      '==https://genome.jgi.doe.gov/portal/BioDefcarcycling/BioDefcarcycling.info.html'],
         'domain_of': ['Study'],
         'examples': [{'value': 'jgi.proposal:507130'}],
         'id_prefixes': ['jgi.proposal'],
         'is_a': 'study_identifiers',
         'mixins': ['jgi_portal_identifiers']} })
    mgnify_project_identifiers: Optional[list[str]] = Field(default=None, description="""identifiers for corresponding project in MGnify""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study'],
         'examples': [{'value': 'mgnify.proj:MGYS00005757'}],
         'is_a': 'study_identifiers',
         'mixins': ['mgnify_identifiers']} })
    neon_study_identifiers: Optional[list[str]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Study'],
         'is_a': 'study_identifiers',
         'mixins': ['neon_identifiers']} })
    related_identifiers: Optional[str] = Field(default=None, title="Related Identifiers", description="""Unique identifier for a study submitted to additional resources. Similar, but not necessarily identical to that which has been submitted to NMDC""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study']} })
    alternative_descriptions: Optional[list[str]] = Field(default=None, description="""A list of alternative descriptions for the entity. The distinction between description and alternative descriptions is application-specific.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study']} })
    alternative_names: Optional[list[str]] = Field(default=None, description="""A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.  This should not be used for identifers which have their own slots (e.g., bioproject:PRJNA406974)""", json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'Project, study, or sample set names the '
                                              'are also associated with this '
                                              'submission or other names / identifiers '
                                              'for this study.'}},
         'domain_of': ['OntologyClass', 'Study', 'Biosample'],
         'exact_mappings': ['dcterms:alternative', 'skos:altLabel']} })
    provenance_metadata: Optional[ProvenanceMetadata] = Field(default=None, description="""Provenance metadata for this Study, including when the record was added to and last modified in the NMDC database.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study', 'DataGeneration', 'Biosample']} })
    alternative_titles: Optional[list[str]] = Field(default=None, description="""A list of alternative titles for the entity. The distinction between title and alternative titles is application-specific.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study'], 'exact_mappings': ['dcterms:alternative']} })
    ecosystem: Optional[str] = Field(default=None, description="""An ecosystem is a combination of a physical environment (abiotic factors) and all the organisms (biotic factors) that interact with this environment. Ecosystem is in position 1/5 in a GOLD path.""", json_schema_extra = { "linkml_meta": {'comments': ['The abiotic factors play a profound role on the type and '
                      'composition of organisms in a given environment. The GOLD '
                      'Ecosystem at the top of the five-level classification system is '
                      'aimed at capturing the broader environment from which an '
                      'organism or environmental sample is collected. The three broad '
                      'groups under Ecosystem are Environmental, Host-associated, and '
                      'Engineered. They represent samples collected from a natural '
                      'environment or from another organism or from engineered '
                      'environments like bioreactors respectively.'],
         'domain_of': ['Study', 'Biosample'],
         'is_a': 'gold_path_field',
         'see_also': ['https://gold.jgi.doe.gov/help']} })
    ecosystem_category: Optional[str] = Field(default=None, description="""Ecosystem categories represent divisions within the ecosystem based on specific characteristics of the environment from where an organism or sample is isolated. Ecosystem category is in position 2/5 in a GOLD path.""", json_schema_extra = { "linkml_meta": {'comments': ['The Environmental ecosystem (for example) is divided into Air, '
                      'Aquatic and Terrestrial. Ecosystem categories for '
                      'Host-associated samples can be individual hosts or phyla and '
                      'for engineered samples it may be manipulated environments like '
                      'bioreactors, solid waste etc.'],
         'domain_of': ['Study', 'Biosample'],
         'is_a': 'gold_path_field',
         'see_also': ['https://gold.jgi.doe.gov/help']} })
    ecosystem_subtype: Optional[str] = Field(default=None, description="""Ecosystem subtypes represent further subdivision of Ecosystem types into more distinct subtypes. Ecosystem subtype is in position 4/5 in a GOLD path.""", json_schema_extra = { "linkml_meta": {'comments': ['Ecosystem Type Marine (Environmental -> Aquatic -> Marine) is '
                      'further divided (for example) into Intertidal zone, Coastal, '
                      'Pelagic, Intertidal zone etc. in the Ecosystem subtype '
                      'category.'],
         'domain_of': ['Study', 'Biosample'],
         'is_a': 'gold_path_field',
         'see_also': ['https://gold.jgi.doe.gov/help']} })
    ecosystem_type: Optional[str] = Field(default=None, description="""Ecosystem types represent things having common characteristics within the Ecosystem Category. These common characteristics based grouping is still broad but specific to the characteristics of a given environment. Ecosystem type is in position 3/5 in a GOLD path.""", json_schema_extra = { "linkml_meta": {'comments': ['The Aquatic ecosystem category (for example) may have ecosystem '
                      'types like Marine or Thermal springs etc. Ecosystem category '
                      'Air may have Indoor air or Outdoor air as different Ecosystem '
                      'Types. In the case of Host-associated samples, ecosystem type '
                      'can represent Respiratory system, Digestive system, Roots etc.'],
         'domain_of': ['Study', 'Biosample'],
         'is_a': 'gold_path_field',
         'see_also': ['https://gold.jgi.doe.gov/help']} })
    specific_ecosystem: Optional[str] = Field(default=None, description="""Specific ecosystems represent specific features of the environment like aphotic zone in an ocean or gastric mucosa within a host digestive system. Specific ecosystem is in position 5/5 in a GOLD path.""", json_schema_extra = { "linkml_meta": {'comments': ['Specific ecosystems help to define samples based on very '
                      'specific characteristics of an environment under the five-level '
                      'classification system.'],
         'domain_of': ['Study', 'Biosample'],
         'is_a': 'gold_path_field',
         'see_also': ['https://gold.jgi.doe.gov/help']} })
    associated_dois: Optional[list[Doi]] = Field(default=None, description="""A list of DOIs associated with a resource, such as a list of DOIS associated with a Study.""", json_schema_extra = { "linkml_meta": {'aliases': ['Associated DOIs', 'Associated digital object identifiers'],
         'domain_of': ['Study'],
         'examples': [{'description': 'An EMSL award DOI.',
                       'object': {'doi': 'doi:10.46936/intm.proj.2021.60141/60000423',
                                  'doi_category': 'award_doi',
                                  'doi_provider': 'emsl'}},
                      {'description': 'A publication DOI.',
                       'object': {'doi': 'doi:10.1101/2022.12.12.520098',
                                  'doi_category': 'publication_doi'}},
                      {'description': 'A data management plan DOI.',
                       'object': {'doi': 'doi:10.48321/D1Z60Q',
                                  'doi_category': 'data_management_plan_doi',
                                  'doi_provider': 'gsc'}}]} })
    funding_sources: Optional[list[str]] = Field(default=None, description="""A list of organizations, along with the award numbers, that underwrite financial support for projects of a particular type. Typically, they process applications and award funds to the chosen qualified applicants.""", json_schema_extra = { "linkml_meta": {'close_mappings': ['NCIT:C39409'],
         'comments': ['Include only the name of the funding organization and the award '
                      'or contract number.'],
         'domain_of': ['Study'],
         'examples': [{'value': 'National Sciences Foundation Dimensions of '
                                'Biodiversity (award no. 1342701)'},
                      {'value': 'U.S. Department of Energy, Office of Science, Office '
                                'of Biological and Environmental Research (BER) under '
                                'contract DE-AC05-00OR2275'}]} })
    has_credit_associations: Optional[list[CreditAssociation]] = Field(default=None, description="""This slot links a study to a credit association.  The credit association will be linked to a person value and to a CRediT Contributor Roles term. Overall semantics: person should get credit X for their participation in the study""", json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'Other researchers associated with this '
                                              'study.'}},
         'domain_of': ['Study'],
         'slot_uri': 'prov:qualifiedAssociation'} })
    homepage_website: Optional[list[str]] = Field(default=None, description="""The website address (URL) of an entity's homepage.""", max_length=1, json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': "Link to the consortium's homepage if "
                                              'the study_category is a consortium.'}},
         'domain_of': ['Study'],
         'examples': [{'value': 'https://www.neonscience.org/'}],
         'is_a': 'websites'} })
    notes: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'Add any additional notes or comments '
                                              'about this study.'}},
         'domain_of': ['Study']} })
    objective: Optional[str] = Field(default=None, description="""The scientific objectives associated with the entity. It SHOULD correspond to scientific norms for objectives field in a structured abstract.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study'], 'mappings': ['SIO:000337']} })
    part_of: Optional[list[str]] = Field(default=None, description="""Links a study or consortium to a parent (or umbrella) study or consortium.""", json_schema_extra = { "linkml_meta": {'aliases': ['is part of'],
         'comments': ['Value is the id of the umbrella study or consortium.'],
         'domain_of': ['Study', 'FieldResearchSite'],
         'slot_uri': 'dcterms:isPartOf',
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:sty-{id_shoulder}-{id_blade}$'}} })
    principal_investigator: Optional[PersonValue] = Field(default=None, description="""Principal Investigator who led the study and/or generated the dataset.""", json_schema_extra = { "linkml_meta": {'aliases': ['PI'], 'domain_of': ['Study', 'DataGeneration']} })
    protocol_link: Optional[list[Protocol]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    study_category: StudyCategoryEnum = Field(default=..., description="""The type of research initiative""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study']} })
    study_image: Optional[list[ImageValue]] = Field(default=None, description="""Links a study to one or more images.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study']} })
    title: Optional[str] = Field(default=None, description="""A name given to the entity that differs from the name/label programmatically assigned to it.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study'], 'exact_mappings': ['dcterms:title']} })
    websites: Optional[list[str]] = Field(default=None, description="""A list of websites that are associated with the entity.""", json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': "Link to the Principal Investigator's "
                                              'research lab webpage or the study '
                                              'webpage associated with this collection '
                                              'of samples. Multiple links can be '
                                              'provided.'}},
         'comments': ['DOIs should not be included as websites. Instead, use the '
                      'associated_dois slot.',
                      "A consortium's homepage website should be included in the "
                      'homepage_website slot, not in websites.',
                      'consortium is a convenience term for a Study whose '
                      'study_category value is consortium',
                      'the website slot and its subproperties are virtually identical '
                      'to the url slot, except that they are multivalued and url is '
                      'single-valued.'],
         'domain_of': ['PersonValue', 'Study'],
         'see_also': ['nmdc:url']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:sty-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'Provide a name for the study your '
                                              'samples will belong with.'}},
         'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""A brief, link-free summary of a Study""", json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'Provide a brief description of your '
                                              'study.'}},
         'comments': ['Include links in other Study slots, such as websites or dois.'],
         'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""Unique identifier for a study submitted to additional resources. Matches that which has been submitted to NMDC""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/Study","nmdc:Study"] = Field(default="nmdc:Study", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('emsl_project_identifiers')
    def pattern_emsl_project_identifiers(cls, v):
        pattern=re.compile(r"^emsl\.project:[0-9]{5}$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid emsl_project_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid emsl_project_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('gnps_task_identifiers')
    def pattern_gnps_task_identifiers(cls, v):
        pattern=re.compile(r"^gnps\.task:[a-f0-9]+$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid gnps_task_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid gnps_task_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('gold_study_identifiers')
    def pattern_gold_study_identifiers(cls, v):
        pattern=re.compile(r"^gold:Gs[0-9]+$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid gold_study_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid gold_study_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('insdc_bioproject_identifiers')
    def pattern_insdc_bioproject_identifiers(cls, v):
        pattern=re.compile(r"^bioproject:PRJ[DEN][A-Z][0-9]+$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid insdc_bioproject_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid insdc_bioproject_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('jgi_portal_study_identifiers')
    def pattern_jgi_portal_study_identifiers(cls, v):
        pattern=re.compile(r"^jgi.proposal:\d+$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid jgi_portal_study_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid jgi_portal_study_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('mgnify_project_identifiers')
    def pattern_mgnify_project_identifiers(cls, v):
        pattern=re.compile(r"^mgnify.proj:[A-Z]+[0-9]+$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid mgnify_project_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid mgnify_project_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('neon_study_identifiers')
    def pattern_neon_study_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid neon_study_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid neon_study_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('homepage_website')
    def pattern_homepage_website(cls, v):
        pattern=re.compile(r"^[Hh][Tt][Tt][Pp][Ss]?:\/\/(?!.*[Dd][Oo][Ii]\.[Oo][Rr][Gg]).*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid homepage_website format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid homepage_website format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('part_of')
    def pattern_part_of(cls, v):
        pattern=re.compile(r"^(nmdc):sty-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid part_of format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid part_of format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('websites')
    def pattern_websites(cls, v):
        pattern=re.compile(r"^[Hh][Tt][Tt][Pp][Ss]?:\/\/(?!.*[Dd][Oo][Ii]\.[Oo][Rr][Gg]).*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid websites format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid websites format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):sty-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class InformationObject(NamedThing):
    """
    Any data or knowledge that reduces uncertainty or enhances understanding about a system, process, or entity.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'class_uri': 'nmdc:InformationObject',
         'comments': ['The direct subclasses of NamedThing should aggregate the '
                      'relevant classes and make them uniform. PlannedProcess and '
                      "MaterialEntity are clearly disjoint. Let's do the same thing "
                      "for our modelling of things that don't consist of matter and "
                      "aren't processes.",
                      'InformationObjects may include embedded data or links to '
                      'external resources via the url slot',
                      'May appear as output from a process, inputs into a process, or '
                      'both',
                      'All slots relating one class to a InformationObject should be '
                      'is_a sub-properties of has_input or has_output, if they are '
                      'multivalued or otherwise organized',
                      'Historically information about many classes has been inlined '
                      'into the class. This is an alternative pattern.'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'see_also': ['nmdc:AttributeValue']})

    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/InformationObject","nmdc:InformationObject"] = Field(default="nmdc:InformationObject", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class Configuration(InformationObject):
    """
    A set of parameters that define the actions of a process and is shared among multiple instances of the process.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'class_uri': 'nmdc:Configuration',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'notes': ['This class is intended to represent the parameters within a method '
                   'file (or similar) that control a process.']})

    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/Configuration","nmdc:Configuration"] = Field(default="nmdc:Configuration", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MassSpectrometryConfiguration(Configuration):
    """
    A set of parameters that define and control the actions of a mass spectrometry process.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MassSpectrometryConfiguration',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'notes': ['This class is intended to represent a mass spectrometry method '
                   'file that controls a mass spectrometry process.'],
         'slot_usage': {'description': {'name': 'description', 'required': True},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):mscon-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:mscon-{id_shoulder}-{id_blade}$'}},
                        'ionization_source': {'name': 'ionization_source',
                                              'required': True},
                        'mass_analyzers': {'name': 'mass_analyzers', 'required': True},
                        'mass_spectrometry_acquisition_strategy': {'name': 'mass_spectrometry_acquisition_strategy',
                                                                   'required': True},
                        'mass_spectrum_collection_modes': {'name': 'mass_spectrum_collection_modes',
                                                           'required': True},
                        'name': {'name': 'name', 'required': True},
                        'polarity_mode': {'name': 'polarity_mode', 'required': True},
                        'resolution_categories': {'name': 'resolution_categories',
                                                  'required': True}}})

    mass_spectrometry_acquisition_strategy: MassSpectrometryAcquisitionStrategyEnum = Field(default=..., description="""Mode of running a mass spectrometer method by which m/z ranges are selected and ions possibly fragment.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MassSpectrometryConfiguration'],
         'exact_mappings': ['MS:1003213']} })
    resolution_categories: list[ResolutionCategoryEnum] = Field(default=..., description="""The relative resolution at which spectra were collected.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MassSpectrometryConfiguration'],
         'examples': [{'value': 'high'}, {'value': 'low'}]} })
    mass_analyzers: list[MassAnalyzerEnum] = Field(default=..., description="""The kind of mass analyzer(s) used during the spectra collection.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MassSpectrometryConfiguration'],
         'exact_mappings': ['MS:1000443']} })
    ionization_source: IonizationSourceEnum = Field(default=..., description="""The ionization source used to introduce processed samples into a mass spectrometer""", json_schema_extra = { "linkml_meta": {'domain_of': ['MassSpectrometryConfiguration'],
         'exact_mappings': ['MS:1000008']} })
    mass_spectrum_collection_modes: list[MassSpectrumCollectionModeEnum] = Field(default=..., description="""Indicates whether mass spectra were collected in full profile, reduced profile, or centroid mode during acquisition.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MassSpectrometryConfiguration']} })
    polarity_mode: PolarityModeEnum = Field(default=..., description="""the polarity of which ions are generated and detected""", json_schema_extra = { "linkml_meta": {'domain_of': ['MassSpectrometryConfiguration']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:mscon-{id_shoulder}-{id_blade}$'}} })
    name: str = Field(default=..., description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: str = Field(default=..., description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MassSpectrometryConfiguration","nmdc:MassSpectrometryConfiguration"] = Field(default="nmdc:MassSpectrometryConfiguration", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):mscon-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class ChromatographyConfiguration(Configuration):
    """
    A set of parameters that define and control the actions of a chromatography process.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:ChromatographyConfiguration',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'notes': ['This class is intended to represent a chromatography method file '
                   'associated with a mass spectrometry process.'],
         'slot_usage': {'chromatographic_category': {'name': 'chromatographic_category',
                                                     'required': True},
                        'description': {'name': 'description', 'required': True},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):chrcon-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:chrcon-{id_shoulder}-{id_blade}$'}},
                        'name': {'name': 'name', 'required': True},
                        'stationary_phase': {'name': 'stationary_phase',
                                             'required': True}}})

    chromatographic_category: ChromatographicCategoryEnum = Field(default=..., description="""The type of chromatography used in a process.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ChromatographyConfiguration',
                       'ChromatographicSeparationProcess']} })
    ordered_mobile_phases: Optional[list[MobilePhaseSegment]] = Field(default=None, description="""The solution(s) that moves through a chromatography column.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ChromatographyConfiguration',
                       'ChromatographicSeparationProcess'],
         'list_elements_ordered': True} })
    stationary_phase: StationaryPhaseEnum = Field(default=..., description="""The material the stationary phase is comprised of used in chromatography.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ChromatographyConfiguration',
                       'ChromatographicSeparationProcess']} })
    temperature: Optional[QuantityValue] = Field(default=None, description="""The value of a temperature measurement or temperature used in a process.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['ChromatographyConfiguration',
                       'Extraction',
                       'SubSamplingProcess',
                       'StorageProcess',
                       'ChromatographicSeparationProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess'],
         'notes': ['Not to be confused with the MIXS:0000113']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:chrcon-{id_shoulder}-{id_blade}$'}} })
    name: str = Field(default=..., description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: str = Field(default=..., description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/ChromatographyConfiguration","nmdc:ChromatographyConfiguration"] = Field(default="nmdc:ChromatographyConfiguration", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):chrcon-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class Manifest(InformationObject):
    """
    A qualified collection of DataObjects that can be analyzed together in the same experimental context.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:Manifest',
         'comments': ['Manifest are currently uncoupled from other modelling. For '
                      'example, there is no schema requirement that DataObjects in a '
                      'fractions Manifest were all obtained by analyzing the same '
                      'ProcessedSample.'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):manif-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'structured_pattern': {'syntax': '{id_nmdc_prefix}:manif-{id_shoulder}-{id_blade}$'}}}})

    manifest_category: ManifestCategoryEnum = Field(default=..., description="""The type of context in which the constituent DataObjects can be analyzed together.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Manifest']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'syntax': '{id_nmdc_prefix}:manif-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/Manifest","nmdc:Manifest"] = Field(default="nmdc:Manifest", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):manif-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class CalibrationInformation(InformationObject):
    """
    A calibration object that is associated with a process.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:CalibrationInformation',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'rules': [{'description': 'If the calibration_target is retention_index, a '
                                   'calibration_standard is required.',
                    'postconditions': {'slot_conditions': {'calibration_standard': {'name': 'calibration_standard',
                                                                                    'required': True}}},
                    'preconditions': {'slot_conditions': {'calibration_target': {'equals_string': 'retention_index',
                                                                                 'name': 'calibration_target'}}},
                    'title': 'calibration_standard_if_rt'},
                   {'description': 'If internal_calibration is false, a '
                                   'calibration_object is required.',
                    'postconditions': {'slot_conditions': {'calibration_object': {'name': 'calibration_object',
                                                                                  'required': True}}},
                    'preconditions': {'slot_conditions': {'internal_calibration': {'equals_expression': 'False',
                                                                                   'name': 'internal_calibration'}}},
                    'title': 'calibration_object_if_not_internal_calibration'}],
         'slot_usage': {'calibration_target': {'name': 'calibration_target',
                                               'required': True},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):calib-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:calib-{id_shoulder}-{id_blade}$'}},
                        'internal_calibration': {'name': 'internal_calibration',
                                                 'required': True}}})

    calibration_object: Optional[str] = Field(default=None, description="""the file containing calibration data object""", json_schema_extra = { "linkml_meta": {'domain_of': ['CalibrationInformation'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:dobj-{id_shoulder}-{id_blade}$'}} })
    internal_calibration: bool = Field(default=..., description="""whether internal calibration was used, if false, external calibration was used""", json_schema_extra = { "linkml_meta": {'domain_of': ['CalibrationInformation']} })
    calibration_target: CalibrationTargetEnum = Field(default=..., description="""the target measurement of the calibration""", json_schema_extra = { "linkml_meta": {'domain_of': ['CalibrationInformation']} })
    calibration_standard: Optional[CalibrationStandardEnum] = Field(default=None, description="""the reference standard(s) used for calibration""", json_schema_extra = { "linkml_meta": {'domain_of': ['CalibrationInformation']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:calib-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/CalibrationInformation","nmdc:CalibrationInformation"] = Field(default="nmdc:CalibrationInformation", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('calibration_object')
    def pattern_calibration_object(cls, v):
        pattern=re.compile(r"^(nmdc):dobj-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid calibration_object format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid calibration_object format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):calib-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class DataObject(InformationObject):
    """
    An object that primarily consists of symbols that represent information.   Files, records, and omics data are examples of data objects.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:DataObject',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'data_category': {'name': 'data_category', 'required': True},
                        'data_object_type': {'name': 'data_object_type',
                                             'required': True},
                        'description': {'name': 'description', 'required': True},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):dobj-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:dobj-{id_shoulder}-{id_blade}$'}},
                        'name': {'name': 'name', 'required': True},
                        'was_generated_by': {'name': 'was_generated_by',
                                             'pattern': '^(nmdc):(wfmag|wfmb|wfmgan|wfmgas|wfmsa|wfmp|wfmt|wfmtan|wfmtas|wfmtex|wfnom|wfrbt|wfrqc)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$|^(nmdc):(omprc|dgms|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                             'range': 'DataEmitterProcess',
                                             'structured_pattern': {'interpolated': True,
                                                                    'syntax': '{id_nmdc_prefix}:(wfmag|wfmb|wfmgan|wfmgas|wfmsa|wfmp|wfmt|wfmtan|wfmtas|wfmtex|wfnom|wfrbt|wfrqc)-{id_shoulder}-{id_blade}{id_version}$|{id_nmdc_prefix}:(omprc|dgms|dgns)-{id_shoulder}-{id_blade}$'}}}})

    compression_type: Optional[str] = Field(default=None, description="""If provided, specifies the compression type""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject'],
         'examples': [{'value': 'gzip'}],
         'todos': ['consider setting the range to an enum']} })
    data_category: DataCategoryEnum = Field(default=..., description="""The category of the file, such as instrument data from data generation or processed data from a workflow execution.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject']} })
    data_object_type: FileTypeEnum = Field(default=..., description="""The type of file represented by the data object.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject'],
         'examples': [{'value': 'Direct Infusion FT-ICR MS Analysis Results'},
                      {'value': 'GC-MS Metabolomics Results'}],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_type',
                                 'predicate': 'EXACT_SYNONYM'}]} })
    file_size_bytes: Optional[int] = Field(default=None, description="""Size of the file in bytes""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject']} })
    insdc_experiment_identifiers: Optional[list[str]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['NucleotideSequencing', 'DataObject'],
         'is_a': 'external_database_identifiers',
         'mixins': ['insdc_identifiers']} })
    md5_checksum: Optional[str] = Field(default=None, description="""MD5 checksum of file (pre-compressed)""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject']} })
    url: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'Protocol', 'DataObject'],
         'notes': ['See issue 207 - this clashes with the mixs field']} })
    was_generated_by: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['FunctionalAnnotationAggMember',
                       'FunctionalAnnotation',
                       'DataObject'],
         'mappings': ['prov:wasGeneratedBy'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(wfmag|wfmb|wfmgan|wfmgas|wfmsa|wfmp|wfmt|wfmtan|wfmtas|wfmtex|wfnom|wfrbt|wfrqc)-{id_shoulder}-{id_blade}{id_version}$|{id_nmdc_prefix}:(omprc|dgms|dgns)-{id_shoulder}-{id_blade}$'}} })
    in_manifest: Optional[list[str]] = Field(default=None, description="""one or more combinations of other DataObjects that can be analyzed together""", json_schema_extra = { "linkml_meta": {'comments': ['A DataObject can be part of multiple manifests, for example, a '
                      'DataObject could be part of a manifest for a single run of an '
                      'instrument and a manifest for technical replicates of a single '
                      'sample.'],
         'domain_of': ['DataObject'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:manif-{id_shoulder}-{id_blade}$'}} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:dobj-{id_shoulder}-{id_blade}$'}} })
    name: str = Field(default=..., description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: str = Field(default=..., description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/DataObject","nmdc:DataObject"] = Field(default="nmdc:DataObject", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('insdc_experiment_identifiers')
    def pattern_insdc_experiment_identifiers(cls, v):
        pattern=re.compile(r"^insdc.sra:(E|D|S)RX[0-9]{6,}$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid insdc_experiment_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid insdc_experiment_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_generated_by')
    def pattern_was_generated_by(cls, v):
        pattern=re.compile(r"^(nmdc):(wfmag|wfmb|wfmgan|wfmgas|wfmsa|wfmp|wfmt|wfmtan|wfmtas|wfmtex|wfnom|wfrbt|wfrqc)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$|^(nmdc):(omprc|dgms|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_generated_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_generated_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('in_manifest')
    def pattern_in_manifest(cls, v):
        pattern=re.compile(r"^(nmdc):manif-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid in_manifest format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid in_manifest format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):dobj-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class DataEmitterProcess(PlannedProcess):
    """
    A process that generates data objects as output.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'class_uri': 'nmdc:DataEmitterProcess',
         'from_schema': 'https://w3id.org/nmdc/nmdc'})

    has_input: Optional[list[str]] = Field(default=None, description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'], 'domain_of': ['PlannedProcess']} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'], 'domain_of': ['PlannedProcess']} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/DataEmitterProcess","nmdc:DataEmitterProcess"] = Field(default="nmdc:DataEmitterProcess", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class DataGeneration(DataEmitterProcess):
    """
    The methods and processes used to generate omics data from a biosample or organism.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'aliases': ['OmicsProcessing',
                     'assay',
                     'omics assay',
                     'sequencing project',
                     'experiment'],
         'alt_descriptions': {'embl.ena': {'description': 'An experiment contains '
                                                          'information about a '
                                                          'sequencing experiment '
                                                          'including library and '
                                                          'instrument details.',
                                           'source': 'embl.ena'}},
         'broad_mappings': ['OBI:0000070', 'ISA:Assay'],
         'class_uri': 'nmdc:DataGeneration',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'associated_studies': {'name': 'associated_studies',
                                               'pattern': '^(nmdc):(sty)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                               'range': 'Study',
                                               'structured_pattern': {'interpolated': True,
                                                                      'syntax': '{id_nmdc_prefix}:(sty)-{id_shoulder}-{id_blade}$'}},
                        'has_input': {'name': 'has_input',
                                      'pattern': '^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'range': 'Sample',
                                      'required': True,
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'name': 'has_output',
                                       'pattern': '^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'range': 'DataObject',
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}},
                        'provenance_metadata': {'description': 'Provenance metadata '
                                                               'for this '
                                                               'DataGeneration, '
                                                               'including when the '
                                                               'record was added to '
                                                               'and last modified in '
                                                               'the NMDC database.',
                                                'name': 'provenance_metadata'}}})

    analyte_category: str = Field(default=..., description="""The type of analyte(s) that were measured in the data generation process
""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration']} })
    associated_studies: list[str] = Field(default=..., description="""The study associated with a resource.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'Biosample'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(sty)-{id_shoulder}-{id_blade}$'}} })
    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    principal_investigator: Optional[PersonValue] = Field(default=None, description="""Principal Investigator who led the study and/or generated the dataset.""", json_schema_extra = { "linkml_meta": {'aliases': ['PI'], 'domain_of': ['Study', 'DataGeneration']} })
    instrument_instance_specifier: Optional[str] = Field(default=None, description="""A unique value that identifies an individual instrument instance, such as a serial number or similar identifiers assigned by the manufacturer or user.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration']} })
    provenance_metadata: Optional[ProvenanceMetadata] = Field(default=None, description="""Provenance metadata for this DataGeneration, including when the record was added to and last modified in the NMDC database.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study', 'DataGeneration', 'Biosample']} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/DataGeneration","nmdc:DataGeneration"] = Field(default="nmdc:DataGeneration", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('associated_studies')
    def pattern_associated_studies(cls, v):
        pattern=re.compile(r"^(nmdc):(sty)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid associated_studies format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid associated_studies format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class NucleotideSequencing(DataGeneration):
    """
    A DataGeneration in which the sequence of DNA or RNA molecules is generated.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:NucleotideSequencing',
         'comments': ['For example data generated from an Illumina or Pacific '
                      'Biosciences instrument.'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'analyte_category': {'name': 'analyte_category',
                                             'range': 'NucleotideSequencingEnum'},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):(dgns|omprc)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:(dgns|omprc)-{id_shoulder}-{id_blade}$'}}}})

    gold_sequencing_project_identifiers: Optional[list[str]] = Field(default=None, description="""identifiers for corresponding sequencing project in GOLD""", json_schema_extra = { "linkml_meta": {'domain_of': ['NucleotideSequencing'],
         'examples': [{'value': 'gold:Gp0108335'}],
         'is_a': 'omics_processing_identifiers',
         'mixins': ['gold_identifiers']} })
    insdc_bioproject_identifiers: Optional[list[str]] = Field(default=None, description="""identifiers for corresponding project in INSDC Bioproject""", json_schema_extra = { "linkml_meta": {'aliases': ['NCBI bioproject identifiers', 'DDBJ bioproject identifiers'],
         'comments': ['these are distinct IDs from INSDC SRA/ENA project identifiers, '
                      'but are usually(?) one to one'],
         'domain_of': ['NucleotideSequencing', 'Study'],
         'examples': [{'description': 'Avena fatua rhizosphere microbial communities - '
                                      'H1_Rhizo_Litter_2 metatranscriptome',
                       'value': 'bioproject:PRJNA366857'}],
         'is_a': 'study_identifiers',
         'mixins': ['insdc_identifiers'],
         'see_also': ['https://www.ncbi.nlm.nih.gov/bioproject/',
                      'https://www.ddbj.nig.ac.jp/bioproject/index-e.html']} })
    insdc_experiment_identifiers: Optional[list[str]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['NucleotideSequencing', 'DataObject'],
         'is_a': 'external_database_identifiers',
         'mixins': ['insdc_identifiers']} })
    ncbi_project_name: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['NucleotideSequencing']} })
    analyte_category: NucleotideSequencingEnum = Field(default=..., description="""The type of analyte(s) that were measured in the data generation process
""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration']} })
    associated_studies: list[str] = Field(default=..., description="""The study associated with a resource.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'Biosample'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(sty)-{id_shoulder}-{id_blade}$'}} })
    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    principal_investigator: Optional[PersonValue] = Field(default=None, description="""Principal Investigator who led the study and/or generated the dataset.""", json_schema_extra = { "linkml_meta": {'aliases': ['PI'], 'domain_of': ['Study', 'DataGeneration']} })
    instrument_instance_specifier: Optional[str] = Field(default=None, description="""A unique value that identifies an individual instrument instance, such as a serial number or similar identifiers assigned by the manufacturer or user.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration']} })
    provenance_metadata: Optional[ProvenanceMetadata] = Field(default=None, description="""Provenance metadata for this DataGeneration, including when the record was added to and last modified in the NMDC database.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study', 'DataGeneration', 'Biosample']} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dgns|omprc)-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/NucleotideSequencing","nmdc:NucleotideSequencing"] = Field(default="nmdc:NucleotideSequencing", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('gold_sequencing_project_identifiers')
    def pattern_gold_sequencing_project_identifiers(cls, v):
        pattern=re.compile(r"^gold:Gp[0-9]+$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid gold_sequencing_project_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid gold_sequencing_project_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('insdc_bioproject_identifiers')
    def pattern_insdc_bioproject_identifiers(cls, v):
        pattern=re.compile(r"^bioproject:PRJ[DEN][A-Z][0-9]+$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid insdc_bioproject_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid insdc_bioproject_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('insdc_experiment_identifiers')
    def pattern_insdc_experiment_identifiers(cls, v):
        pattern=re.compile(r"^insdc.sra:(E|D|S)RX[0-9]{6,}$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid insdc_experiment_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid insdc_experiment_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('associated_studies')
    def pattern_associated_studies(cls, v):
        pattern=re.compile(r"^(nmdc):(sty)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid associated_studies format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid associated_studies format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):(dgns|omprc)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MassSpectrometry(DataGeneration):
    """
    Spectrometry where the sample is converted into gaseous ions which are characterised by their mass-to-charge ratio and relative abundance.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MassSpectrometry',
         'exact_mappings': ['CHMO:0000470'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'rules': [{'description': 'If eluent_introduction_category is '
                                   'gas_chromatography, then generates_calibration is '
                                   'required.',
                    'postconditions': {'slot_conditions': {'generates_calibration': {'name': 'generates_calibration',
                                                                                     'required': True}}},
                    'preconditions': {'slot_conditions': {'eluent_introduction_category': {'equals_string': 'gas_chromatography',
                                                                                           'name': 'eluent_introduction_category'}}},
                    'title': 'generates_calibration_required_if_gc'},
                   {'description': 'If eluent_introduction_category is '
                                   'liquid_chromatography, then '
                                   'has_chromatography_configuration is required.',
                    'postconditions': {'slot_conditions': {'has_chromatography_configuration': {'name': 'has_chromatography_configuration',
                                                                                                'required': True}}},
                    'preconditions': {'slot_conditions': {'eluent_introduction_category': {'equals_string': 'liquid_chromatography',
                                                                                           'name': 'eluent_introduction_category'}}},
                    'title': 'has_chromatography_configuration_required_if_lc'},
                   {'description': 'If eluent_introduction_category is '
                                   'gas_chromatography, then '
                                   'has_chromatography_configuration is required.',
                    'postconditions': {'slot_conditions': {'has_chromatography_configuration': {'name': 'has_chromatography_configuration',
                                                                                                'required': True}}},
                    'preconditions': {'slot_conditions': {'eluent_introduction_category': {'equals_string': 'gas_chromatography',
                                                                                           'name': 'eluent_introduction_category'}}},
                    'title': 'has_chromatography_configuration_required_if_gc'}],
         'slot_usage': {'analyte_category': {'name': 'analyte_category',
                                             'range': 'MassSpectrometryEnum'},
                        'eluent_introduction_category': {'name': 'eluent_introduction_category',
                                                         'required': True},
                        'has_chromatography_configuration': {'name': 'has_chromatography_configuration',
                                                             'pattern': '^(nmdc):chrcon-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                                             'structured_pattern': {'interpolated': True,
                                                                                    'syntax': '{id_nmdc_prefix}:chrcon-{id_shoulder}-{id_blade}$'}},
                        'has_mass_spectrometry_configuration': {'name': 'has_mass_spectrometry_configuration',
                                                                'pattern': '^(nmdc):mscon-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                                                'required': True,
                                                                'structured_pattern': {'interpolated': True,
                                                                                       'syntax': '{id_nmdc_prefix}:mscon-{id_shoulder}-{id_blade}$'}},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):(dgms|omprc)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:(dgms|omprc)-{id_shoulder}-{id_blade}$'}}}})

    eluent_introduction_category: EluentIntroductionCategoryEnum = Field(default=..., description="""A high-level categorization for how the processed sample is introduced into a mass spectrometer.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MassSpectrometry'],
         'examples': [{'value': 'liquid_chromatography'},
                      {'value': 'direct_infusion_syringe'}]} })
    generates_calibration: Optional[str] = Field(default=None, description="""calibration information is generated a process""", json_schema_extra = { "linkml_meta": {'comments': ['A gas chromatography mass spectromery run generates data to '
                      'calibrate the retention index'],
         'domain_of': ['MassSpectrometry'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:calib-{id_shoulder}-{id_blade}$'}} })
    has_chromatography_configuration: Optional[str] = Field(default=None, description="""The identifier of the associated ChromatographyConfiguration, providing information about how a sample was introduced into the mass spectrometer.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MassSpectrometry'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:chrcon-{id_shoulder}-{id_blade}$'}} })
    has_mass_spectrometry_configuration: str = Field(default=..., description="""The identifier of the associated MassSpectrometryConfiguration.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MassSpectrometry'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:mscon-{id_shoulder}-{id_blade}$'}} })
    analyte_category: MassSpectrometryEnum = Field(default=..., description="""The type of analyte(s) that were measured in the data generation process
""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration']} })
    associated_studies: list[str] = Field(default=..., description="""The study associated with a resource.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'Biosample'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(sty)-{id_shoulder}-{id_blade}$'}} })
    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    principal_investigator: Optional[PersonValue] = Field(default=None, description="""Principal Investigator who led the study and/or generated the dataset.""", json_schema_extra = { "linkml_meta": {'aliases': ['PI'], 'domain_of': ['Study', 'DataGeneration']} })
    instrument_instance_specifier: Optional[str] = Field(default=None, description="""A unique value that identifies an individual instrument instance, such as a serial number or similar identifiers assigned by the manufacturer or user.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration']} })
    provenance_metadata: Optional[ProvenanceMetadata] = Field(default=None, description="""Provenance metadata for this DataGeneration, including when the record was added to and last modified in the NMDC database.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study', 'DataGeneration', 'Biosample']} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dgms|omprc)-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MassSpectrometry","nmdc:MassSpectrometry"] = Field(default="nmdc:MassSpectrometry", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('generates_calibration')
    def pattern_generates_calibration(cls, v):
        pattern=re.compile(r"^(nmdc):calib-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid generates_calibration format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid generates_calibration format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_chromatography_configuration')
    def pattern_has_chromatography_configuration(cls, v):
        pattern=re.compile(r"^(nmdc):chrcon-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_chromatography_configuration format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_chromatography_configuration format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_mass_spectrometry_configuration')
    def pattern_has_mass_spectrometry_configuration(cls, v):
        pattern=re.compile(r"^(nmdc):mscon-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_mass_spectrometry_configuration format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_mass_spectrometry_configuration format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('associated_studies')
    def pattern_associated_studies(cls, v):
        pattern=re.compile(r"^(nmdc):(sty)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid associated_studies format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid associated_studies format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):(dgms|omprc)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class WorkflowExecution(DataEmitterProcess):
    """
    Represents an instance of an execution of a particular workflow
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'aliases': ['analysis'],
         'alt_descriptions': {'embl.ena': {'description': 'An analysis contains '
                                                          'secondary analysis results '
                                                          'derived from sequence reads '
                                                          '(e.g. a genome assembly)',
                                           'source': 'embl.ena'}},
         'class_uri': 'nmdc:WorkflowExecution',
         'comments': ['Each instance of this (and all other) subclasses of '
                      'WorkflowExecution is a distinct run with start and stop times, '
                      'potentially with different inputs and outputs'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'rules': [{'description': 'If qc_status has a value of pass, then the '
                                   'has_output slot is required.',
                    'postconditions': {'slot_conditions': {'has_output': {'name': 'has_output',
                                                                          'required': True}}},
                    'preconditions': {'slot_conditions': {'qc_status': {'equals_string': 'pass',
                                                                        'name': 'qc_status'}}},
                    'title': 'qc_status_pass_has_output_required'},
                   {'description': 'If qc_status is not specified, then the has_output '
                                   'slot is required.',
                    'postconditions': {'slot_conditions': {'has_output': {'name': 'has_output',
                                                                          'required': True}}},
                    'preconditions': {'slot_conditions': {'qc_status': {'name': 'qc_status',
                                                                        'value_presence': 'ABSENT'}}},
                    'title': 'qc_status_pass_null_has_output_required'}],
         'slot_usage': {'git_url': {'description': 'The url that points to the exact '
                                                   'software repository location used '
                                                   'to run a workflow',
                                    'name': 'git_url',
                                    'required': True},
                        'has_input': {'name': 'has_input',
                                      'pattern': '^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'range': 'DataObject',
                                      'required': True,
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'name': 'has_output',
                                       'pattern': '^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'range': 'DataObject',
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}},
                        'processing_institution': {'name': 'processing_institution',
                                                   'required': True},
                        'started_at_time': {'name': 'started_at_time',
                                            'required': True},
                        'version': {'description': 'The NMDC release tag for a given '
                                                   'workflow release used for data '
                                                   'processing. If workflows are '
                                                   'processed externally, as denoted '
                                                   'by processing_institution, this '
                                                   'value represents the best mapping '
                                                   "between a processing institution's "
                                                   '(e.g., JGI) workflow metadata and '
                                                   'a NMDC tagged release.',
                                    'name': 'version'},
                        'was_informed_by': {'name': 'was_informed_by',
                                            'required': True}}})

    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}]} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution']} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/WorkflowExecution","nmdc:WorkflowExecution"] = Field(default="nmdc:WorkflowExecution", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class ProvenanceMetadata(ConfiguredBaseModel):
    """
    Metadata pertaining to how a record was created.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:ProvenanceMetadata',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'add_date': {'comments': ['Biosample and NucleotideSequencing '
                                                  'records brought in from GOLD before '
                                                  '2026-03-23 may carry GOLD-sourced '
                                                  'dates rather than NMDC-asserted '
                                                  'timestamps.'],
                                     'description': 'The date and time at which a '
                                                    'record was added to the NMDC '
                                                    'database.',
                                     'name': 'add_date',
                                     'range': 'datetime'},
                        'git_url': {'description': 'The url of the software repository '
                                                   'used to generate the NMDC metadata '
                                                   'record',
                                    'name': 'git_url'},
                        'mod_date': {'comments': ['Biosample and NucleotideSequencing '
                                                  'records brought in from GOLD before '
                                                  '2026-03-23 may carry GOLD-sourced '
                                                  'dates rather than NMDC-asserted '
                                                  'timestamps.'],
                                     'description': 'The date and time at which a '
                                                    'record was last modified in the '
                                                    'NMDC database.',
                                     'name': 'mod_date',
                                     'range': 'datetime'},
                        'version': {'description': 'The version tag of the software '
                                                   'used to generate the NMDC metadata '
                                                   'record',
                                    'name': 'version'}}})

    add_date: Optional[datetime ] = Field(default=None, description="""The date and time at which a record was added to the NMDC database.""", json_schema_extra = { "linkml_meta": {'comments': ['Biosample and NucleotideSequencing records brought in from GOLD '
                      'before 2026-03-23 may carry GOLD-sourced dates rather than '
                      'NMDC-asserted timestamps.'],
         'domain_of': ['ProvenanceMetadata']} })
    git_url: Optional[str] = Field(default=None, description="""The url of the software repository used to generate the NMDC metadata record""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    mod_date: Optional[datetime ] = Field(default=None, description="""The date and time at which a record was last modified in the NMDC database.""", json_schema_extra = { "linkml_meta": {'comments': ['Biosample and NucleotideSequencing records brought in from GOLD '
                      'before 2026-03-23 may carry GOLD-sourced dates rather than '
                      'NMDC-asserted timestamps.'],
         'domain_of': ['ProvenanceMetadata']} })
    version: Optional[str] = Field(default=None, description="""The version tag of the software used to generate the NMDC metadata record""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    source_system_of_record: Optional[SourceSystemEnum] = Field(default=None, description="""Identifies the system of origin for a record""", json_schema_extra = { "linkml_meta": {'domain_of': ['ProvenanceMetadata']} })
    submission_portal_identifier: Optional[list[str]] = Field(default=None, description="""The UUID of the NMDC Submission Portal entry that generated this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ProvenanceMetadata'],
         'examples': [{'value': 'c41dfeac-102e-43b2-adae-6a67f25791f0'}],
         'see_also': ['https://data.microbiomedata.org/submission/home']} })
    type: Literal["https://w3id.org/nmdc/ProvenanceMetadata","nmdc:ProvenanceMetadata"] = Field(default="nmdc:ProvenanceMetadata", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('submission_portal_identifier')
    def pattern_submission_portal_identifier(cls, v):
        pattern=re.compile(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid submission_portal_identifier format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid submission_portal_identifier format: {v}"
            raise ValueError(err_msg)
        return v


class AnnotatingWorkflow(WorkflowExecution):
    """
    A WorkflowExecution whose output indicates the potential functions of genes or gene products
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'class_uri': 'nmdc:AnnotatingWorkflow',
         'from_schema': 'https://w3id.org/nmdc/nmdc'})

    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}]} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution']} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/AnnotatingWorkflow","nmdc:AnnotatingWorkflow"] = Field(default="nmdc:AnnotatingWorkflow", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MetagenomeAnnotation(AnnotatingWorkflow):
    """
    A workflow execution activity that provides functional and structural annotation of assembled metagenome contigs
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MetagenomeAnnotation',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'gold_analysis_project_identifiers': {'name': 'gold_analysis_project_identifiers',
                                                              'pattern': '^gold:Ga[0-9]+$',
                                                              'structured_pattern': {'interpolated': True,
                                                                                     'syntax': '^gold:Ga[0-9]+$'}},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):wfmgan-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:wfmgan-{id_shoulder}-{id_blade}{id_version}$'}},
                        'img_identifiers': {'maximum_cardinality': 1,
                                            'name': 'img_identifiers'},
                        'was_informed_by': {'name': 'was_informed_by',
                                            'pattern': '^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                            'range': 'NucleotideSequencing',
                                            'structured_pattern': {'interpolated': True,
                                                                   'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}}}})

    img_identifiers: Optional[list[str]] = Field(default=None, title="IMG Identifiers", description="""A list of identifiers that relate the biosample to records in the IMG database.""", max_length=1, json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAnnotation',
                       'Biosample',
                       'MetatranscriptomeAnnotation',
                       'MetatranscriptomeExpressionAnalysis',
                       'MagsAnalysis'],
         'is_a': 'external_database_identifiers',
         'todos': ['add is_a or mixin modeling, like other '
                   'external_database_identifiers',
                   'what class would IMG records belong to?! Are they Studies, '
                   'Biosamples, or something else?']} })
    gold_analysis_project_identifiers: Optional[list[str]] = Field(default=None, description="""identifiers for corresponding analysis projects in GOLD""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAnnotation', 'MetatranscriptomeAnnotation'],
         'examples': [{'value': 'gold:Ga0526289'}],
         'is_a': 'analysis_identifiers',
         'mixins': ['gold_identifiers'],
         'structured_pattern': {'interpolated': True, 'syntax': '^gold:Ga[0-9]+$'}} })
    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution']} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmgan-{id_shoulder}-{id_blade}{id_version}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MetagenomeAnnotation","nmdc:MetagenomeAnnotation"] = Field(default="nmdc:MetagenomeAnnotation", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('img_identifiers')
    def pattern_img_identifiers(cls, v):
        pattern=re.compile(r"^img\.taxon:[a-zA-Z0-9_][a-zA-Z0-9_\/\.]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid img_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid img_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('gold_analysis_project_identifiers')
    def pattern_gold_analysis_project_identifiers(cls, v):
        pattern=re.compile(r"^gold:Ga[0-9]+$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid gold_analysis_project_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid gold_analysis_project_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_informed_by')
    def pattern_was_informed_by(cls, v):
        pattern=re.compile(r"^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_informed_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_informed_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):wfmgan-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class Sample(MaterialEntity):
    """
    A sample is a material entity that can be characterized by an experiment.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'class_uri': 'nmdc:Sample',
         'from_schema': 'https://w3id.org/nmdc/nmdc'})

    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/Sample","nmdc:Sample"] = Field(default="nmdc:Sample", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class Biosample(Sample):
    """
    Biological source material which can be characterized by an experiment.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'aliases': ['sample', 'material sample', 'specimen', 'biospecimen'],
         'alt_descriptions': {'embl.ena': {'description': 'A sample contains '
                                                          'information about the '
                                                          'sequenced source material. '
                                                          'Samples are associated with '
                                                          'checklists, which define '
                                                          'the fields used to annotate '
                                                          'the samples. Samples are '
                                                          'always associated with a '
                                                          'taxon.',
                                           'source': 'embl.ena'}},
         'class_uri': 'nmdc:Biosample',
         'exact_mappings': ['OBI:0000747',
                            'NCIT:C43412',
                            'http://purl.obolibrary.org/obo/FBcv_0003024'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'al_sat': {'description': 'The relative abundance of aluminum '
                                                  'in the sample',
                                   'examples': [{'value': '27%'}],
                                   'name': 'al_sat',
                                   'notes': ['Aluminum saturation is the percentage of '
                                             'the CEC occupies by aluminum. Like all '
                                             'cations, aluminum held by the cation '
                                             'exchange complex is in equilibrium with '
                                             'aluminum in the soil solution.'],
                                   'title': 'aluminum saturation/ extreme unusual '
                                            'properties',
                                   'todos': ['Example & validation. Can we configure '
                                             'things so that 27% & 27 % & 0.27 will '
                                             'validate?',
                                             "I think it's weird the way GSC writes "
                                             'the title. I recommend this change. '
                                             "Thoughts? I would argue this isn't an "
                                             "extreme unusual property. It's just a "
                                             'biogeochemical measurement.']},
                        'al_sat_meth': {'comments': ['Required when aluminum '
                                                     'saturation is provided.'],
                                        'description': 'Reference or method used in '
                                                       'determining Aluminum '
                                                       'saturation',
                                        'examples': [{'value': 'https://doi.org/10.1371/journal.pone.0176357'}],
                                        'name': 'al_sat_meth',
                                        'title': 'aluminum saturation method/ extreme '
                                                 'unusual properties',
                                        'todos': ["I think it's weird the way GSC "
                                                  'writes the title. I recommend this '
                                                  'change. Thoughts?']},
                        'alternative_identifiers': {'description': 'Unique identifier '
                                                                   'for a biosample '
                                                                   'submitted to '
                                                                   'additional '
                                                                   'resources. Matches '
                                                                   'the entity that '
                                                                   'has been submitted '
                                                                   'to NMDC',
                                                    'name': 'alternative_identifiers'},
                        'associated_studies': {'name': 'associated_studies',
                                               'pattern': '^(nmdc):sty-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                               'range': 'Study',
                                               'required': True,
                                               'structured_pattern': {'interpolated': True,
                                                                      'syntax': '{id_nmdc_prefix}:sty-{id_shoulder}-{id_blade}$'}},
                        'climate_environment': {'name': 'climate_environment',
                                                'todos': ['description says "can '
                                                          'include multiple climates" '
                                                          'but multivalued is set to '
                                                          'false',
                                                          'add examples, i need to see '
                                                          'some examples to add '
                                                          'correctly formatted '
                                                          'example.']},
                        'collected_from': {'name': 'collected_from',
                                           'pattern': '^(nmdc):frsite-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                           'structured_pattern': {'interpolated': True,
                                                                  'syntax': '{id_nmdc_prefix}:frsite-{id_shoulder}-{id_blade}$'}},
                        'cur_vegetation': {'comments': ['Values provided here can be '
                                                        'specific species of '
                                                        'vegetation or vegetation '
                                                        'regions',
                                                        'See for vegetation regions- '
                                                        'https://education.nationalgeographic.org/resource/vegetation-region'],
                                           'description': 'Vegetation classification '
                                                          'from one or more standard '
                                                          'classification systems, or '
                                                          'agricultural crop',
                                           'examples': [{'value': 'deciduous forest'},
                                                        {'value': 'forest'},
                                                        {'value': 'Bauhinia '
                                                                  'variegata'}],
                                           'name': 'cur_vegetation',
                                           'todos': ['Recommend changing this from '
                                                     'text value to some king of '
                                                     'ontology?']},
                        'cur_vegetation_meth': {'comments': ['Required when current '
                                                             'vegetation is provided.'],
                                                'examples': [{'value': 'https://doi.org/10.1111/j.1654-109X.2011.01154.x'}],
                                                'name': 'cur_vegetation_meth',
                                                'todos': ["I'm not sure this is a DOI, "
                                                          'PMID, or URI. Should pool '
                                                          'the community and find out '
                                                          'how they accomplish this if '
                                                          'provided.']},
                        'elev': {'comments': ['All elevations must be reported in '
                                              'meters. Provide the numerical portion '
                                              'only.',
                                              'Please use '
                                              'https://www.advancedconverter.com/map-tools/find-altitude-by-coordinates, '
                                              'if needed, to help estimate the '
                                              'elevation based on latitude and '
                                              'longitude coordinates.'],
                                 'examples': [{'value': '100'}],
                                 'name': 'elev',
                                 'range': 'float',
                                 'title': 'elevation, meters'},
                        'env_broad_scale': {'name': 'env_broad_scale',
                                            'required': True},
                        'env_local_scale': {'name': 'env_local_scale',
                                            'required': True},
                        'env_medium': {'name': 'env_medium', 'required': True},
                        'extreme_event': {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                                                             'value': 'date, '
                                                                                      'string'}},
                                          'examples': [{'value': '1980-05-18, volcanic '
                                                                 'eruption'}],
                                          'name': 'extreme_event',
                                          'range': 'string'},
                        'fire': {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                                                    'value': 'date '
                                                                             'string'}},
                                 'comments': ['Provide the date the fire occurred. If '
                                              'extended burning occurred provide the '
                                              'date range.'],
                                 'examples': [{'value': '1871-10-10'},
                                              {'value': '1871-10-01 to 1871-10-31'}],
                                 'name': 'fire',
                                 'pattern': '^[12]\\d{3}(?:(?:-(?:0[1-9]|1[0-2]))(?:-(?:0[1-9]|[12]\\d|3[01]))?)?(\\s+to\\s+[12]\\d{3}(?:(?:-(?:0[1-9]|1[0-2]))(?:-(?:0[1-9]|[12]\\d|3[01]))?)?)?$',
                                 'range': 'string',
                                 'todos': ['is "to" acceptable? Is there a better way '
                                           'to request that be written?']},
                        'flooding': {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                                                        'value': 'date '
                                                                                 'string'}},
                                     'comments': ['Provide the date the flood '
                                                  'occurred. If extended flooding '
                                                  'occurred provide the date range.'],
                                     'examples': [{'value': '1927-04-15'},
                                                  {'value': '1927-04 to 1927-05'}],
                                     'name': 'flooding',
                                     'range': 'string',
                                     'todos': ['is "to" acceptable? Is there a better '
                                               'way to request that be written?',
                                               'What about if the "day" isn\'t known? '
                                               'Is this ok?']},
                        'gaseous_environment': {'examples': [{'value': 'CO2; 500ppm '
                                                                       'above ambient; '
                                                                       'constant'},
                                                             {'value': 'nitric '
                                                                       'oxide;0.5 '
                                                                       'micromole per '
                                                                       'liter;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
                                                'name': 'gaseous_environment',
                                                'todos': ['would like to see usage '
                                                          'examples for this slot. '
                                                          'Requiring micromole/L seems '
                                                          "too limiting and doesn't "
                                                          'match expected_value value',
                                                          'did I do this right? keep '
                                                          "the example that's provided "
                                                          'and add another? so as to '
                                                          'not override']},
                        'gold_biosample_identifiers': {'annotations': {'tooltip': {'tag': 'tooltip',
                                                                                   'value': 'Provide '
                                                                                            'the '
                                                                                            'GOLD '
                                                                                            'biosample '
                                                                                            'IDs '
                                                                                            'associated '
                                                                                            'with '
                                                                                            'this '
                                                                                            'biosample.'}},
                                                       'comments': ['This is the ID '
                                                                    'provided by GOLD '
                                                                    'that starts with '
                                                                    "'Gb'"],
                                                       'description': 'Unique '
                                                                      'identifier for '
                                                                      'a biosample '
                                                                      'submitted to '
                                                                      'GOLD that '
                                                                      'matches the '
                                                                      'NMDC submitted '
                                                                      'biosample',
                                                       'name': 'gold_biosample_identifiers'},
                        'heavy_metals': {'comments': ['For multiple heavy metals and '
                                                      'concentrations, separate by ;'],
                                         'description': 'Heavy metals present in the '
                                                        'sample and their '
                                                        'concentrations.',
                                         'examples': [{'value': 'mercury 0.09 '
                                                                'micrograms per gram'},
                                                      {'value': 'mercury 0.09 ug/g; '
                                                                'chromium 0.03 ug/g'}],
                                         'name': 'heavy_metals',
                                         'title': 'heavy metals/ extreme unusual '
                                                  'properties',
                                         'todos': ['Example & validation. Can we '
                                                   'configure things so that 27% & 27 '
                                                   '% & 0.27 will validate?',
                                                   "I think it's weird the way GSC "
                                                   'writes the title. I recommend this '
                                                   'change. Thoughts? I would argue '
                                                   "this isn't an extreme unusual "
                                                   "property. It's just a "
                                                   'biogeochemical measurement.']},
                        'heavy_metals_meth': {'comments': ['Required when heavy metals '
                                                           'are provided'],
                                              'examples': [{'value': 'https://doi.org/10.3390/ijms9040434'},
                                                           {'value': 'doi:10.1007/BF01056090'},
                                                           {'value': 'https://doi.org/10.1007/s00216-006-0322-8'}],
                                              'multivalued': True,
                                              'name': 'heavy_metals_meth',
                                              'title': 'heavy metals method/ extreme '
                                                       'unusual properties'},
                        'id': {'description': 'An NMDC assigned unique identifier for '
                                              'a biosample submitted to NMDC.',
                               'name': 'id',
                               'pattern': '^(nmdc):bsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:bsm-{id_shoulder}-{id_blade}$'}},
                        'lat_lon': {'name': 'lat_lon',
                                    'notes': ['This is currently a required field but '
                                              "it's not clear if this should be "
                                              'required for human hosts']},
                        'ph_meth': {'comments': ['This can include a link to the '
                                                 'instrument used or a citation for '
                                                 'the method.'],
                                    'examples': [{'value': 'https://www.southernlabware.com/pc9500-benchtop-ph-conductivity-meter-kit-ph-accuracy-2000mv-ph-range-2-000-to-20-000.html?gclid=Cj0KCQiAwJWdBhCYARIsAJc4idCO5vtvbVMf545fcvdROFqa6zjzNSoywNx6K4k9Coo9cCc2pybtvGsaAiR0EALw_wcB'},
                                                 {'value': 'https://doi.org/10.2136/sssabookser5.3.c16'}],
                                    'name': 'ph_meth'},
                        'provenance_metadata': {'description': 'Provenance metadata '
                                                               'for this Biosample, '
                                                               'including when the '
                                                               'record was added to '
                                                               'and last modified in '
                                                               'the NMDC database.',
                                                'name': 'provenance_metadata'},
                        'season_precpt': {'comments': ['Seasons are defined as spring '
                                                       '(March, April, May), summer '
                                                       '(June, July, August), autumn '
                                                       '(September, October, November) '
                                                       'and winter (December, January, '
                                                       'February).'],
                                          'name': 'season_precpt',
                                          'notes': ['mean and average are the same '
                                                    'thing, but it seems like bad '
                                                    'practice to not be consistent. '
                                                    'Changed mean to average'],
                                          'title': 'average seasonal precipitation',
                                          'todos': ['check validation & examples. '
                                                    'always mm? so value only? Or '
                                                    'value + unit']},
                        'sieving': {'comments': ['Describe how samples were composited '
                                                 'or sieved.',
                                                 "Use 'sample link' to indicate which "
                                                 'samples were combined.'],
                                    'examples': [{'value': 'combined 2 cores | 4mm '
                                                           'sieved'},
                                                 {'value': '4 mm sieved and '
                                                           'homogenized'},
                                                 {'value': '50 g | 5 cores | 2 mm '
                                                           'sieved'}],
                                    'name': 'sieving',
                                    'todos': ['check validation and examples']},
                        'slope_aspect': {'comments': ['Aspect is the orientation of '
                                                      'slope, measured clockwise in '
                                                      'degrees from 0 to 360, where 0 '
                                                      'is north-facing, 90 is '
                                                      'east-facing, 180 is '
                                                      'south-facing, and 270 is '
                                                      'west-facing.'],
                                         'description': 'The direction a slope faces. '
                                                        'While looking down a slope '
                                                        'use a compass to record the '
                                                        'direction you are facing '
                                                        '(direction or degrees). This '
                                                        'measure provides an '
                                                        'indication of sun and wind '
                                                        'exposure that will influence '
                                                        'soil temperature and '
                                                        'evapotranspiration.',
                                         'name': 'slope_aspect'},
                        'slope_gradient': {'examples': [{'value': '10%'},
                                                        {'value': '10 %'},
                                                        {'value': '0.10'}],
                                           'name': 'slope_gradient',
                                           'todos': ['Slope is a percent. How does the '
                                                     'validation work? Check to '
                                                     'correct examples']},
                        'source_mat_id': {'comments': ['Identifiers must be prefixed. '
                                                       'Possible FAIR prefixes are '
                                                       'IGSNs '
                                                       '(http://www.geosamples.org/getigsn), '
                                                       'NCBI biosample accession '
                                                       'numbers, ARK identifiers '
                                                       '(https://arks.org/). These IDs '
                                                       'enable linking to derived '
                                                       'analytes and subsamples. If '
                                                       'you have not assigned FAIR '
                                                       'identifiers to your samples, '
                                                       'you can generate UUIDs '
                                                       '(https://www.uuidgenerator.net/).'],
                                          'description': 'A globally unique identifier '
                                                         'assigned to the biological '
                                                         'sample.',
                                          'examples': [{'value': 'igsn:AU1243'},
                                                       {'value': 'UUID:24f1467a-40f4-11ed-b878-0242ac120002'}],
                                          'name': 'source_mat_id',
                                          'title': 'source material identifier',
                                          'todos': ['Currently, the comments say to '
                                                    'use UUIDs. However, if we '
                                                    'implement assigning NMDC '
                                                    'identifiers with the minter we '
                                                    'dont need to require a GUID. It '
                                                    'can be an optional field to fill '
                                                    'out only if they already have a '
                                                    'resolvable ID.']},
                        'tot_carb': {'examples': [{'value': '1 ug/L'}],
                                     'name': 'tot_carb',
                                     'todos': ['is this inorganic and organic? both? '
                                               'could use some clarification.',
                                               "ug/L doesn't seem like the right "
                                               'units. Should check this slots usage '
                                               'in databases and re-evaluate. I '
                                               "couldn't find any references that "
                                               'provided this data in this format']},
                        'tot_nitro_cont_meth': {'examples': [{'value': 'https://doi.org/10.2134/agronmonogr9.2.c32'},
                                                             {'value': 'https://acsess.onlinelibrary.wiley.com/doi/full/10.2136/sssaj2009.0389?casa_token=bm0pYIUdNMgAAAAA%3AOWVRR0STHaOe-afTcTdxn5m1hM8n2ltM0wY-b1iYpYdD9dhwppk5j3LvC2IO5yhOIvyLVeQz4NZRCZo'}],
                                                'name': 'tot_nitro_cont_meth'},
                        'tot_org_c_meth': {'examples': [{'value': 'https://doi.org/10.1080/07352680902776556'}],
                                           'name': 'tot_org_c_meth'},
                        'tot_org_carb': {'name': 'tot_org_carb',
                                         'todos': ['check description. How are they '
                                                   'different?']},
                        'water_cont_soil_meth': {'comments': ['Required if providing '
                                                              'water content'],
                                                 'examples': [{'value': 'J. Nat. Prod. '
                                                                        'Plant '
                                                                        'Resour., '
                                                                        '2012, 2 '
                                                                        '(4):500-503'},
                                                              {'value': 'https://dec.alaska.gov/applications/spar/webcalc/definitions.htm'}],
                                                 'name': 'water_cont_soil_meth',
                                                 'todos': ['Why is it soil water '
                                                           'content method in the name '
                                                           'but not the title? Is this '
                                                           'slot used in other '
                                                           'samples?',
                                                           'Soil water content can be '
                                                           'measure MANY ways and '
                                                           'often, multiple ways are '
                                                           'used in one experiment '
                                                           '(gravimetric water content '
                                                           'and water holding capacity '
                                                           'and water filled pore '
                                                           'space, to name a few).',
                                                           'Should this be multi '
                                                           'valued? How to we manage '
                                                           'and validate this?']},
                        'water_content': {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                                                             'value': 'string'},
                                                          'Preferred_unit': {'tag': 'Preferred_unit',
                                                                             'value': 'gram '
                                                                                      'per '
                                                                                      'gram '
                                                                                      'or '
                                                                                      'cubic '
                                                                                      'centimeter '
                                                                                      'per '
                                                                                      'cubic '
                                                                                      'centimeter'}},
                                          'examples': [{'value': '0.75 g water/g dry '
                                                                 'soil'},
                                                       {'value': '75% water holding '
                                                                 'capacity'},
                                                       {'value': '1.1 g fresh weight/ '
                                                                 'dry weight'},
                                                       {'value': '10% water filled '
                                                                 'pore space'}],
                                          'multivalued': True,
                                          'name': 'water_content',
                                          'range': 'string',
                                          'todos': ['value in preferred unit is too '
                                                    'limiting. need to change this',
                                                    'check and correct validation so '
                                                    'examples are accepted',
                                                    'how to manage multiple water '
                                                    'content methods?']},
                        'watering_regm': {'examples': [{'value': '1 '
                                                                 'liter;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'},
                                                       {'value': '75% water holding '
                                                                 'capacity; constant'}],
                                          'name': 'watering_regm'}},
         'unique_keys': {'samp_name_unique_key': {'unique_key_name': 'samp_name_unique_key',
                                                  'unique_key_slots': ['samp_name']}}})

    associated_studies: list[str] = Field(default=..., description="""The study associated with a resource.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'Biosample'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:sty-{id_shoulder}-{id_blade}$'}} })
    biosample_categories: Optional[list[BiosampleCategoryEnum]] = Field(default=None, title="Categories the biosample belongs to", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample']} })
    collected_from: Optional[str] = Field(default=None, description="""The Site from which a Biosample was collected""", json_schema_extra = { "linkml_meta": {'comments': ['this illustrates implementing a Biosample relation with a '
                      '(binary) slot'],
         'domain_of': ['Biosample'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:frsite-{id_shoulder}-{id_blade}$'},
         'todos': ['add an OBO slot_uri ?']} })
    embargoed: Optional[bool] = Field(default=None, description="""If true, the data are embargoed and not available for public access.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'recommended': True,
         'todos': ['make this required?',
                   'first apply to Biosample',
                   'try to apply to all Biosamples in a particular nmdc-server '
                   'SubmissionMetadata?',
                   'applying to a Study may not be granular enough']} })
    host_disease_stat: Optional[str] = Field(default=None, title="host disease status", description="""List of diseases with which the host has been diagnosed; can include multiple diagnoses. The value of the field depends on host; for humans the terms should be chosen from the DO (Human Disease Ontology) at https://www.disease-ontology.org, non-human host diseases are free text""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'disease name or Disease Ontology '
                                                     'term'}},
         'domain_of': ['Biosample'],
         'keywords': ['disease', 'host', 'host.', 'status'],
         'slot_uri': 'MIXS:0000031',
         'string_serialization': '{termLabel} [{termID}]|{text}'} })
    img_identifiers: Optional[list[str]] = Field(default=None, title="IMG Identifiers", description="""A list of identifiers that relate the biosample to records in the IMG database.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAnnotation',
                       'Biosample',
                       'MetatranscriptomeAnnotation',
                       'MetatranscriptomeExpressionAnalysis',
                       'MagsAnalysis'],
         'is_a': 'external_database_identifiers',
         'todos': ['add is_a or mixin modeling, like other '
                   'external_database_identifiers',
                   'what class would IMG records belong to?! Are they Studies, '
                   'Biosamples, or something else?']} })
    neon_biosample_identifiers: Optional[list[str]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'is_a': 'biosample_identifiers',
         'mixins': ['neon_identifiers']} })
    alternative_names: Optional[list[str]] = Field(default=None, description="""A list of alternative names used to refer to the entity. The distinction between name and alternative names is application-specific.  This should not be used for identifers which have their own slots (e.g., bioproject:PRJNA406974)""", json_schema_extra = { "linkml_meta": {'domain_of': ['OntologyClass', 'Study', 'Biosample'],
         'exact_mappings': ['dcterms:alternative', 'skos:altLabel']} })
    provenance_metadata: Optional[ProvenanceMetadata] = Field(default=None, description="""Provenance metadata for this Biosample, including when the record was added to and last modified in the NMDC database.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Study', 'DataGeneration', 'Biosample']} })
    gold_biosample_identifiers: Optional[list[str]] = Field(default=None, description="""Unique identifier for a biosample submitted to GOLD that matches the NMDC submitted biosample""", json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'Provide the GOLD biosample IDs '
                                              'associated with this biosample.'}},
         'comments': ["This is the ID provided by GOLD that starts with 'Gb'"],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'gold:Gb0312930'}],
         'is_a': 'biosample_identifiers',
         'mixins': ['gold_identifiers']} })
    insdc_biosample_identifiers: Optional[list[str]] = Field(default=None, description="""identifiers for corresponding sample in INSDC""", json_schema_extra = { "linkml_meta": {'aliases': ['EBI biosample identifiers',
                     'NCBI biosample identifiers',
                     'DDBJ biosample identifiers'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'biosample:SAMEA5989477'},
                      {'description': 'I13_N_5-10 sample from Soil fungal diversity '
                                      'along elevational gradients',
                       'value': 'biosample:SAMD00212331'}],
         'is_a': 'biosample_identifiers',
         'mixins': ['insdc_identifiers'],
         'see_also': ['https://github.com/bioregistry/bioregistry/issues/108',
                      'https://www.ebi.ac.uk/biosamples/',
                      'https://www.ncbi.nlm.nih.gov/biosample',
                      'https://www.ddbj.nig.ac.jp/biosample/index-e.html']} })
    emsl_biosample_identifiers: Optional[list[str]] = Field(default=None, title="EMSL Biosample Identifiers", description="""A list of identifiers for the biosample from the EMSL database.  This is used to link the biosample, as modeled by NMDC, to the biosample in the planned EMSL NEXUS database.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'is_a': 'biosample_identifiers',
         'mixins': ['emsl_identifiers'],
         'todos': ['removed "planned" once NEXUS is online',
                   'determine real expansion for emsl prefix']} })
    igsn_biosample_identifiers: Optional[list[str]] = Field(default=None, title="IGSN Biosample Identifiers", description="""A list of identifiers for the biosample from the IGSN database.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'is_a': 'biosample_identifiers',
         'mixins': ['igsn_identifiers']} })
    abs_air_humidity: Optional[QuantityValue] = Field(default=None, title="absolute air humidity", description="""Actual mass of water vapor present in the air water vapor mixture.""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram per gram, kilogram per '
                                                     'kilogram, kilogram, pound, gram '
                                                     'per cubic meter, kilogram per '
                                                     'cubic meter, percent'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[lb_av]|g/g|kg|kg/kg'}},
         'comments': ['Can be calculated via mass of water vapor divided by the volume '
                      'of the air and water vapor mixture.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '9 g/g'}],
         'keywords': ['absolute', 'air', 'humidity'],
         'slot_uri': 'MIXS:0000122',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    add_recov_method: Optional[str] = Field(default=None, title="secondary and tertiary recovery methods and start date", description="""Additional (i.e. Secondary, tertiary, etc.) recovery methods deployed for increase of hydrocarbon recovery from resource and start date for each one of them. If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Polymer Addition;2018-06-21T14:30Z'}],
         'keywords': ['date', 'method', 'recover', 'secondary', 'start'],
         'slot_uri': 'MIXS:0001009',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({add_recov_methods});{date_time_stamp}$'}} })
    additional_info: Optional[TextValue] = Field(default=None, title="additional info", description="""Information that doesn't fit anywhere else. Can also be used to propose new entries for fields with controlled vocabulary""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['information'],
         'slot_uri': 'MIXS:0000300'} })
    address: Optional[str] = Field(default=None, title="address", description="""The street name and building number where the sampling occurred""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'slot_uri': 'MIXS:0000218',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{integer} {text}$'}} })
    adj_room: Optional[TextValue] = Field(default=None, title="adjacent rooms", description="""List of rooms (room number, room name) immediately adjacent to the sampling room""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['adjacent', 'room'],
         'slot_uri': 'MIXS:0000219',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{room_name};{room_number}$'}} })
    aero_struc: Optional[AeroStrucEnum] = Field(default=None, title="aerospace structure", description="""Aerospace structures typically consist of thin plates with stiffeners for the external surfaces, bulkheads and frames to support the shape and fasteners such as welds, rivets, screws and bolts to hold the components together""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'plane'}],
         'slot_uri': 'MIXS:0000773'} })
    agrochem_addition: Optional[list[TextValue]] = Field(default=None, title="history/agrochemical additions", description="""Addition of fertilizers, pesticides, etc. - amount and time of applications""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, mole per liter, milligram '
                                                     'per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'roundup;5 milligram per liter;2018-06-21'}],
         'keywords': ['history'],
         'slot_uri': 'MIXS:0000639',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{agrochemical_name};{amount} '
                                          '{unit};{date_time_stamp}$'}} })
    air_PM_concen: Optional[list[str]] = Field(default=None, title="air particulate matter concentration", description="""Concentration of substances that remain suspended in the air, and comprise mixtures of organic and inorganic substances (PM10 and PM2.5); can report multiple PM's by entering numeric values preceded by name of PM""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'PM2.5;10 microgram per cubic meter'}],
         'keywords': ['air', 'concentration', 'particle', 'particulate'],
         'slot_uri': 'MIXS:0000108',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{particulate_matter_name};{float} {unit}$'}} })
    air_temp: Optional[QuantityValue] = Field(default=None, title="air temperature", description="""Temperature of the air at the time of sampling""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '20 Cel'}],
         'keywords': ['air', 'temperature'],
         'slot_uri': 'MIXS:0000124',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    air_temp_regm: Optional[list[TextValue]] = Field(default=None, title="air temperature regimen", description="""Information about treatment involving an exposure to varying temperatures; should include the temperature, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include different temperature regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'temperature value;treatment '
                                                     'interval and duration'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '25 degree '
                                'Celsius;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['air', 'regimen', 'temperature'],
         'slot_uri': 'MIXS:0000551',
         'string_serialization': '{float} {unit};{Rn/start_time/end_time/duration}'} })
    al_sat: Optional[QuantityValue] = Field(default=None, title="aluminum saturation/ extreme unusual properties", description="""The relative abundance of aluminum in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'percentage'},
                         'storage_units': {'tag': 'storage_units', 'value': '%'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '27%'}],
         'keywords': ['extreme', 'properties', 'saturation', 'unusual'],
         'notes': ['Aluminum saturation is the percentage of the CEC occupies by '
                   'aluminum. Like all cations, aluminum held by the cation exchange '
                   'complex is in equilibrium with aluminum in the soil solution.'],
         'slot_uri': 'MIXS:0000607',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'},
         'todos': ['Example & validation. Can we configure things so that 27% & 27 % & '
                   '0.27 will validate?',
                   "I think it's weird the way GSC writes the title. I recommend this "
                   "change. Thoughts? I would argue this isn't an extreme unusual "
                   "property. It's just a biogeochemical measurement."]} })
    al_sat_meth: Optional[str] = Field(default=None, title="aluminum saturation method/ extreme unusual properties", description="""Reference or method used in determining Aluminum saturation""", json_schema_extra = { "linkml_meta": {'comments': ['Required when aluminum saturation is provided.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'https://doi.org/10.1371/journal.pone.0176357'}],
         'keywords': ['extreme', 'method', 'properties', 'saturation', 'unusual'],
         'slot_uri': 'MIXS:0000324',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL})$'},
         'todos': ["I think it's weird the way GSC writes the title. I recommend this "
                   'change. Thoughts?']} })
    alkalinity: Optional[QuantityValue] = Field(default=None, title="alkalinity", description="""Alkalinity, the ability of a solution to neutralize acids to the equivalence point of carbonate or bicarbonate""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milliequivalent per liter, '
                                                     'milligram per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'meq/L|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '50 mg/L'}],
         'keywords': ['alkalinity'],
         'slot_uri': 'MIXS:0000421',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    alkalinity_method: Optional[str] = Field(default=None, title="alkalinity method", description="""Method used for alkalinity measurement""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'titration'}],
         'keywords': ['alkalinity', 'method'],
         'slot_uri': 'MIXS:0000298'} })
    alkyl_diethers: Optional[QuantityValue] = Field(default=None, title="alkyl diethers", description="""Concentration of alkyl diethers""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'mol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.005 mol/L'}],
         'slot_uri': 'MIXS:0000490',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    alt: Optional[QuantityValue] = Field(default=None, title="altitude", description="""Heights of objects such as airplanes, space shuttles, rockets, atmospheric balloons and heights of places such as atmospheric layers and clouds. It is used to measure the height of an object which is above the earth's surface. In this context, the altitude measurement is the vertical distance between the earth's surface above sea level and the sampled position in the air""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '100 m'}],
         'slot_uri': 'MIXS:0000094',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    aminopept_act: Optional[QuantityValue] = Field(default=None, title="aminopeptidase activity", description="""Measurement of aminopeptidase activity""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'mole per liter per hour'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mol/L/h'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.269 mol/L/h'}],
         'slot_uri': 'MIXS:0000172',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    ammonium: Optional[QuantityValue] = Field(default=None, title="ammonium", description="""Concentration of ammonium in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter, milligram '
                                                     'per liter, parts per million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1.5 mg/L'}],
         'slot_uri': 'MIXS:0000427',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    amount_light: Optional[QuantityValue] = Field(default=None, title="amount of light", description="""The unit of illuminance and luminous emittance, measuring luminous flux per unit area""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'lux, lumens per square meter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'lm/m2|lx'}},
         'domain_of': ['Biosample'],
         'keywords': ['light'],
         'slot_uri': 'MIXS:0000140',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    ances_data: Optional[TextValue] = Field(default=None, title="ancestral data", description="""Information about either pedigree or other ancestral information description (e.g. parental variety in case of mutant or selection), e.g. A/3*B (meaning [(A x B) x B] x B)""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'A/3*B'}],
         'slot_uri': 'MIXS:0000247'} })
    annual_precpt: Optional[QuantityValue] = Field(default=None, title="mean annual precipitation", description="""The average of all annual precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'millimeter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mm'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '225 mm'}],
         'keywords': ['mean'],
         'slot_uri': 'MIXS:0000644',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    annual_temp: Optional[QuantityValue] = Field(default=None, title="mean annual temperature", description="""Mean annual temperature""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '12.5 Cel'}],
         'keywords': ['mean', 'temperature'],
         'slot_uri': 'MIXS:0000642',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    antibiotic_regm: Optional[list[TextValue]] = Field(default=None, title="antibiotic regimen", description="""Information about treatment involving antibiotic administration; should include the name of antibiotic, amount administered, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple antibiotic regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'antibiotic name;antibiotic '
                                                     'amount;treatment interval and '
                                                     'duration'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'penicillin;5 '
                                'milligram;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['regimen'],
         'slot_uri': 'MIXS:0000553',
         'string_serialization': '{text};{float} '
                                 '{unit};{Rn/start_time/end_time/duration}'} })
    api: Optional[QuantityValue] = Field(default=None, title="API gravity", description="""API gravity is a measure of how heavy or light a petroleum liquid is compared to water (source: https://en.wikipedia.org/wiki/API_gravity) (e.g. 31.1   API)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degrees API'},
                         'units_alignment_excuse': {'tag': 'units_alignment_excuse',
                                                    'value': 'non_ucum_unit'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '31.1 API'}],
         'slot_uri': 'MIXS:0000157',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    arch_struc: Optional[ArchStrucEnum] = Field(default=None, title="architectural structure", description="""An architectural structure is a human-made, free-standing, immobile outdoor construction""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'shed'}],
         'slot_uri': 'MIXS:0000774'} })
    aromatics_pc: Optional[TextValue] = Field(default=None, title="aromatics wt%", description="""Saturate, Aromatic, Resin and Asphaltene  (SARA) is an analysis method that divides  crude oil  components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'percent'}},
         'domain_of': ['Biosample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000133',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{name};{float} {unit}$'}} })
    asphaltenes_pc: Optional[TextValue] = Field(default=None, title="asphaltenes wt%", description="""Saturate, Aromatic, Resin and Asphaltene  (SARA) is an analysis method that divides  crude oil  components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'percent'}},
         'domain_of': ['Biosample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000135',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{name};{float} {unit}$'}} })
    atmospheric_data: Optional[list[TextValue]] = Field(default=None, title="atmospheric data", description="""Measurement of atmospheric data; can include multiple data""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'atmospheric data '
                                                     'name;measurement value'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'wind speed;9 knots'}],
         'slot_uri': 'MIXS:0001097',
         'string_serialization': '{text};{float} {unit}'} })
    avg_dew_point: Optional[QuantityValue] = Field(default=None, title="average dew point", description="""The average of dew point measures taken at the beginning of every hour over a 24 hour period on the sampling day""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '25.5 Cel'}],
         'keywords': ['average'],
         'slot_uri': 'MIXS:0000141',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    avg_occup: Optional[TextValue] = Field(default=None, title="average daily occupancy", description="""Daily average occupancy of room. Indicate the number of person(s) daily occupying the sampling room""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['average'],
         'slot_uri': 'MIXS:0000775'} })
    avg_temp: Optional[QuantityValue] = Field(default=None, title="average temperature", description="""The average of temperatures taken at the beginning of every hour over a 24 hour period on the sampling day""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '12.5 Cel'}],
         'keywords': ['average', 'temperature'],
         'slot_uri': 'MIXS:0000142',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    bac_prod: Optional[QuantityValue] = Field(default=None, title="bacterial production", description="""Bacterial production in the water column measured by isotope uptake""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per cubic meter per '
                                                     'day'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mg/m3/d'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '5 mg/m3/d'}],
         'keywords': ['production'],
         'slot_uri': 'MIXS:0000683',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    bac_resp: Optional[QuantityValue] = Field(default=None, title="bacterial respiration", description="""Measurement of bacterial respiration in the water column""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per cubic meter per '
                                                     'day, micromole oxygen per liter '
                                                     'per hour'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'mg/m3/d|umol/L/h'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '300 umol/L/h'}],
         'slot_uri': 'MIXS:0000684',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    bacteria_carb_prod: Optional[QuantityValue] = Field(default=None, title="bacterial carbon production", description="""Measurement of bacterial carbon production""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'ng/h'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '50 ng/h'}],
         'keywords': ['carbon', 'production'],
         'slot_uri': 'MIXS:0000173',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    barometric_press: Optional[QuantityValue] = Field(default=None, title="barometric pressure", description="""Force per unit area exerted against a surface by the weight of air above that surface""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'millibar'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mbar'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1013 mbar'}],
         'keywords': ['pressure'],
         'slot_uri': 'MIXS:0000096',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    basin: Optional[TextValue] = Field(default=None, title="basin name", description="""Name of the basin (e.g. Campos)""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Campos'}],
         'slot_uri': 'MIXS:0000290'} })
    bathroom_count: Optional[TextValue] = Field(default=None, title="bathroom count", description="""The number of bathrooms in the building""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '1'}],
         'keywords': ['count'],
         'slot_uri': 'MIXS:0000776'} })
    bedroom_count: Optional[TextValue] = Field(default=None, title="bedroom count", description="""The number of bedrooms in the building""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '2'}],
         'keywords': ['count'],
         'slot_uri': 'MIXS:0000777'} })
    benzene: Optional[QuantityValue] = Field(default=None, title="benzene", description="""Concentration of benzene in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter, parts per '
                                                     'million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L'}},
         'domain_of': ['Biosample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000153',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    biochem_oxygen_dem: Optional[QuantityValue] = Field(default=None, title="biochemical oxygen demand", description="""Amount of dissolved oxygen needed by aerobic biological organisms in a body of water to break down organic material present in a given water sample at certain temperature over a specific time period""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mg/L'}},
         'domain_of': ['Biosample'],
         'keywords': ['oxygen'],
         'slot_uri': 'MIXS:0000653',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    biocide: Optional[str] = Field(default=None, title="biocide administration", description="""List of biocides (commercial name of product and supplier) and date of administration""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'name;name;timestamp'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'ALPHA 1427;Baker Hughes;2008-01-23'}],
         'keywords': ['administration'],
         'recommended': True,
         'slot_uri': 'MIXS:0001011',
         'string_serialization': '{text};{text};{timestamp}'} })
    biocide_admin_method: Optional[str] = Field(default=None, title="biocide administration method", description="""Method of biocide administration (dose, frequency, duration, time elapsed between last biociding and sampling) (e.g. 150 mg/l; weekly; 4 hr; 3 days)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement '
                                                     'value;frequency;duration;duration'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'}},
         'domain_of': ['Biosample'],
         'keywords': ['administration', 'method'],
         'recommended': True,
         'slot_uri': 'MIXS:0000456',
         'string_serialization': '{float} '
                                 '{unit};{Rn/start_time/end_time/duration};{duration}'} })
    biol_stat: Optional[BiolStatEnum] = Field(default=None, title="biological status", description="""The level of genome modification""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'natural'}],
         'keywords': ['status'],
         'slot_uri': 'MIXS:0000858'} })
    biomass: Optional[list[TextValue]] = Field(default=None, title="biomass", description="""Amount of biomass; should include the name for the part of biomass measured, e.g. Microbial, total. Can include multiple measurements""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'biomass type;measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'ton, kilogram, gram'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'total;20 gram'}],
         'keywords': ['biomass'],
         'slot_uri': 'MIXS:0000174',
         'string_serialization': '{text};{float} {unit}'} })
    biotic_regm: Optional[TextValue] = Field(default=None, title="biotic regimen", description="""Information about treatment(s) involving use of biotic factors, such as bacteria, viruses or fungi""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'sample inoculated with Rhizobium spp. Culture'}],
         'keywords': ['regimen'],
         'slot_uri': 'MIXS:0001038'} })
    biotic_relationship: Optional[BioticRelationshipEnum] = Field(default=None, title="observed biotic relationship", description="""Description of relationship(s) between the subject organism and other organism(s) it is associated with. E.g., parasite on species X; mutualist with species Y. The target organism is the subject of the relationship, and the other organism(s) is the object""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'free living'}],
         'keywords': ['observed', 'relationship'],
         'slot_uri': 'MIXS:0000028'} })
    bishomohopanol: Optional[QuantityValue] = Field(default=None, title="bishomohopanol", description="""Concentration of bishomohopanol""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microgram per liter, microgram '
                                                     'per gram'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'ug/L|ug/g'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '14 ug/L'}],
         'slot_uri': 'MIXS:0000175',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    blood_press_diast: Optional[QuantityValue] = Field(default=None, title="host blood pressure diastolic", description="""Resting diastolic blood pressure, measured as mm mercury""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'millimeter mercury'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mm[Hg]'}},
         'domain_of': ['Biosample'],
         'keywords': ['host', 'host.', 'pressure'],
         'slot_uri': 'MIXS:0000258',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    blood_press_syst: Optional[QuantityValue] = Field(default=None, title="host blood pressure systolic", description="""Resting systolic blood pressure, measured as mm mercury""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'millimeter mercury'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mm[Hg]'}},
         'domain_of': ['Biosample'],
         'keywords': ['host', 'host.', 'pressure'],
         'slot_uri': 'MIXS:0000259',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    bromide: Optional[QuantityValue] = Field(default=None, title="bromide", description="""Concentration of bromide""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'parts per million'},
                         'storage_units': {'tag': 'storage_units', 'value': '[ppm]'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.05 [ppm]'}],
         'slot_uri': 'MIXS:0000176',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    build_docs: Optional[BuildDocsEnum] = Field(default=None, title="design, construction, and operation documents", description="""The building design, construction and operation documents""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'maintenance plans'}],
         'keywords': ['documents'],
         'slot_uri': 'MIXS:0000787'} })
    build_occup_type: Optional[list[BuildOccupTypeEnum]] = Field(default=None, title="building occupancy type", description="""The primary function for which a building or discrete part of a building is intended to be used""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'market'}],
         'keywords': ['type'],
         'slot_uri': 'MIXS:0000761'} })
    building_setting: Optional[BuildingSettingEnum] = Field(default=None, title="building setting", description="""A location (geography) where a building is set""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'rural'}],
         'slot_uri': 'MIXS:0000768'} })
    built_struc_age: Optional[QuantityValue] = Field(default=None, title="built structure age", description="""The age of the built structure since construction""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'year'},
                         'storage_units': {'tag': 'storage_units', 'value': 'a'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '15 a'}],
         'keywords': ['age'],
         'slot_uri': 'MIXS:0000145',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    built_struc_set: Optional[BuiltStrucSetEnum] = Field(default=None, title="built structure setting", description="""The characterization of the location of the built structure as high or low human density""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'rural'}],
         'slot_uri': 'MIXS:0000778'} })
    built_struc_type: Optional[TextValue] = Field(default=None, title="built structure type", description="""A physical structure that is a body or assemblage of bodies in space to form a system capable of supporting loads""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'], 'keywords': ['type'], 'slot_uri': 'MIXS:0000721'} })
    calcium: Optional[QuantityValue] = Field(default=None, title="calcium", description="""Concentration of calcium in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter, micromole '
                                                     'per liter, parts per million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L|umol/L|mg/kg'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.2 umol/L'}],
         'slot_uri': 'MIXS:0000432',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    carb_dioxide: Optional[QuantityValue] = Field(default=None, title="carbon dioxide", description="""Carbon dioxide (gas) amount or concentration at the time of sampling""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter, parts per '
                                                     'million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '410 [ppm]'}],
         'keywords': ['carbon'],
         'slot_uri': 'MIXS:0000097',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    carb_monoxide: Optional[QuantityValue] = Field(default=None, title="carbon monoxide", description="""Carbon monoxide (gas) amount or concentration at the time of sampling""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter, parts per '
                                                     'million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.1 [ppm]'}],
         'keywords': ['carbon'],
         'slot_uri': 'MIXS:0000098',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    carb_nitro_ratio: Optional[QuantityValue] = Field(default=None, title="carbon/nitrogen ratio", description="""Ratio of amount or concentrations of carbon to nitrogen""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value'},
                         'storage_units': {'tag': 'storage_units', 'value': '1'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.417361111'}],
         'keywords': ['carbon', 'nitrogen', 'ratio'],
         'slot_uri': 'MIXS:0000310',
         'string_serialization': '{float}:{float}'} })
    ceil_area: Optional[QuantityValue] = Field(default=None, title="ceiling area", description="""The area of the ceiling space within the room""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'square meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm2'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '25 m2'}],
         'keywords': ['area', 'ceiling'],
         'slot_uri': 'MIXS:0000148',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    ceil_cond: Optional[DamagedEnum] = Field(default=None, title="ceiling condition", description="""The physical condition of the ceiling at the time of sampling; photos or video preferred; use drawings to indicate location of damaged areas""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'damaged'}],
         'keywords': ['ceiling', 'condition'],
         'slot_uri': 'MIXS:0000779'} })
    ceil_finish_mat: Optional[CeilFinishMatEnum] = Field(default=None, title="ceiling finish material", description="""The type of material used to finish a ceiling""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'stucco'}],
         'keywords': ['ceiling', 'material'],
         'slot_uri': 'MIXS:0000780'} })
    ceil_struc: Optional[CeilStrucEnum] = Field(default=None, title="ceiling structure", description="""The construction format of the ceiling""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'concrete'}],
         'keywords': ['ceiling'],
         'slot_uri': 'MIXS:0000782'} })
    ceil_texture: Optional[CeilingWallTextureEnum] = Field(default=None, title="ceiling texture", description="""The feel, appearance, or consistency of a ceiling surface""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'popcorn'}],
         'keywords': ['ceiling', 'texture'],
         'slot_uri': 'MIXS:0000783'} })
    ceil_thermal_mass: Optional[QuantityValue] = Field(default=None, title="ceiling thermal mass", description="""The ability of the ceiling to provide inertia against temperature fluctuations. Generally this means concrete that is exposed. A metal deck that supports a concrete slab will act thermally as long as it is exposed to room air flow""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'joule per degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'J/K'}},
         'domain_of': ['Biosample'],
         'keywords': ['ceiling', 'mass'],
         'slot_uri': 'MIXS:0000143',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    ceil_type: Optional[CeilTypeEnum] = Field(default=None, title="ceiling type", description="""The type of ceiling according to the ceiling's appearance or construction""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'coffered'}],
         'keywords': ['ceiling', 'type'],
         'slot_uri': 'MIXS:0000784'} })
    ceil_water_mold: Optional[MoldVisibilityEnum] = Field(default=None, title="ceiling signs of water/mold", description="""Signs of the presence of mold or mildew on the ceiling""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'presence of mold visible'}],
         'keywords': ['ceiling'],
         'slot_uri': 'MIXS:0000781'} })
    chem_administration: Optional[list[Union[ControlledTermValue,ControlledIdentifiedTermValue]]] = Field(default=None, title="chemical administration", description="""List of chemical compounds administered to the host or site where sampling occurred, and when (e.g. Antibiotics, n fertilizer, air filter); can include multiple compounds. For chemical entities of biological interest ontology (chebi) (v 163), http://purl.bioontology.org/ontology/chebi""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'CHEBI;timestamp'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'agar [CHEBI:2509];2018-05-11T20:00Z'}],
         'keywords': ['administration'],
         'slot_uri': 'MIXS:0000751',
         'string_serialization': '{termLabel} [{termID}];{timestamp}'} })
    chem_mutagen: Optional[list[TextValue]] = Field(default=None, title="chemical mutagen", description="""Treatment involving use of mutagens; should include the name of mutagen, amount administered, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple mutagen regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'mutagen name;mutagen '
                                                     'amount;treatment interval and '
                                                     'duration'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'nitrous acid;0.5 milligram per '
                                'liter;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'slot_uri': 'MIXS:0000555',
         'string_serialization': '{text};{float} '
                                 '{unit};{Rn/start_time/end_time/duration}'} })
    chem_oxygen_dem: Optional[QuantityValue] = Field(default=None, title="chemical oxygen demand", description="""A measure of the capacity of water to consume oxygen during the decomposition of organic matter and the oxidation of inorganic chemicals such as ammonia and nitrite""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mg/L'}},
         'domain_of': ['Biosample'],
         'keywords': ['oxygen'],
         'slot_uri': 'MIXS:0000656',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    chem_treat_method: Optional[str] = Field(default=None, title="chemical treatment method", description="""Method of chemical administration(dose, frequency, duration, time elapsed between administration and sampling) (e.g. 50 mg/l; twice a week; 1 hr; 0 days)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement '
                                                     'value;frequency;duration;duration'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'}},
         'domain_of': ['Biosample'],
         'keywords': ['method', 'treatment'],
         'slot_uri': 'MIXS:0000457',
         'string_serialization': '{float} '
                                 '{unit};{Rn/start_time/end_time/duration};{duration};{duration}'} })
    chem_treatment: Optional[str] = Field(default=None, title="chemical treatment", description="""List of chemical compounds administered upstream the sampling location where sampling occurred (e.g. Glycols, H2S scavenger, corrosion and scale inhibitors, demulsifiers, and other production chemicals etc.). The commercial name of the product and name of the supplier should be provided. The date of administration should also be included""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'name;name;timestamp'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'ACCENT 1125;DOW;2010-11-17'}],
         'keywords': ['treatment'],
         'slot_uri': 'MIXS:0001012',
         'string_serialization': '{text};{text};{timestamp}'} })
    chloride: Optional[QuantityValue] = Field(default=None, title="chloride", description="""Concentration of chloride in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter, parts per '
                                                     'million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '5000 mg/L'}],
         'slot_uri': 'MIXS:0000429',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    chlorophyll: Optional[QuantityValue] = Field(default=None, title="chlorophyll", description="""Concentration of chlorophyll""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per cubic meter, '
                                                     'microgram per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'mg/m3|ug/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '5 mg/m3'}],
         'slot_uri': 'MIXS:0000177',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    climate_environment: Optional[list[TextValue]] = Field(default=None, title="climate environment", description="""Treatment involving an exposure to a particular climate; treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple climates""", json_schema_extra = { "linkml_meta": {'deprecated': 'true, slot is inconsistently used and provides redundant '
                       'information to other slots, '
                       'https://github.com/GenomicsStandardsConsortium/mixs/issues/591 '
                       'and https://github.com/microbiomedata/nmdc-schema/issues/586',
         'domain_of': ['Biosample'],
         'examples': [{'value': 'tropical '
                                'climate;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['environment'],
         'slot_uri': 'MIXS:0001040',
         'todos': ['description says "can include multiple climates" but multivalued '
                   'is set to false',
                   'add examples, i need to see some examples to add correctly '
                   'formatted example.']} })
    collection_date: Optional[TimestampValue] = Field(default=None, title="collection date", description="""The time of sampling, either as an instance (single point in time) or interval. In case no exact time is available, the date/time can be right truncated i.e. all of these are valid times: 2008-01-23T19:23:10+00:00; 2008-01-23T19:23:10; 2008-01-23; 2008-01; 2008; Except: 2008-01; 2008 all are ISO8601 compliant""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '2013-03-25T12:42:31+01:00'}],
         'keywords': ['date'],
         'slot_uri': 'MIXS:0000011'} })
    conduc: Optional[QuantityValue] = Field(default=None, title="conductivity", description="""Electrical conductivity of water""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milliSiemens per centimeter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'mS/cm|uS/cm'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '10 uS/cm'}],
         'slot_uri': 'MIXS:0000692',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    cool_syst_id: Optional[TextValue] = Field(default=None, title="cooling system identifier", description="""The cooling system identifier""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '12345'}],
         'keywords': ['identifier'],
         'slot_uri': 'MIXS:0000785'} })
    crop_rotation: Optional[TextValue] = Field(default=None, title="history/crop rotation", description="""Whether or not crop is rotated, and if yes, rotation schedule""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'crop rotation status;schedule'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'yes;R2/2017-01-01/2018-12-31/P6M'}],
         'keywords': ['history'],
         'slot_uri': 'MIXS:0000318'} })
    cult_root_med: Optional[TextValue] = Field(default=None, title="culture rooting medium", description="""Name or reference for the hydroponic or in vitro culture rooting medium; can be the name of a commonly used medium or reference to a specific medium, e.g. Murashige and Skoog medium. If the medium has not been formally published, use the rooting medium descriptors""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'http://himedialabs.com/TD/PT158.pdf'}],
         'keywords': ['culture'],
         'slot_uri': 'MIXS:0001041',
         'structured_pattern': {'interpolated': True,
                                'syntax': '^({text}|{PMID}|{DOI}|{URL})$'}} })
    cur_land_use: Optional[str] = Field(default=None, title="current land use", description="""Present state of sample site""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'enumeration'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'conifers'}],
         'keywords': ['land', 'use'],
         'slot_uri': 'MIXS:0001080',
         'string_serialization': '[cities|farmstead|industrial '
                                 'areas|roads/railroads|rock|sand|gravel|mudflats|salt '
                                 'flats|badlands|permanent snow or ice|saline '
                                 'seeps|mines/quarries|oil waste areas|small '
                                 'grains|row crops|vegetable crops|horticultural '
                                 'plants (e.g. tulips)|marshlands '
                                 '(grass,sedges,rushes)|tundra '
                                 '(mosses,lichens)|rangeland|pastureland (grasslands '
                                 'used for livestock grazing)|hayland|meadows '
                                 '(grasses,alfalfa,fescue,bromegrass,timothy)|shrub '
                                 'land (e.g. mesquite,sage-brush,creosote bush,shrub '
                                 'oak,eucalyptus)|successional shrub land (tree '
                                 'saplings,hazels,sumacs,chokecherry,shrub '
                                 'dogwoods,blackberries)|shrub crops '
                                 '(blueberries,nursery ornamentals,filberts)|vine '
                                 'crops (grapes)|conifers (e.g. '
                                 'pine,spruce,fir,cypress)|hardwoods (e.g. '
                                 'oak,hickory,elm,aspen)|intermixed hardwood and '
                                 'conifers|tropical (e.g. mangrove,palms)|rainforest '
                                 '(evergreen forest receiving >406 cm annual '
                                 'rainfall)|swamp (permanent or semi-permanent water '
                                 'body dominated by woody plants)|crop trees '
                                 '(nuts,fruit,christmas trees,nursery trees)]'} })
    cur_vegetation: Optional[TextValue] = Field(default=None, title="current vegetation", description="""Vegetation classification from one or more standard classification systems, or agricultural crop""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'current vegetation type'}},
         'comments': ['Values provided here can be specific species of vegetation or '
                      'vegetation regions',
                      'See for vegetation regions- '
                      'https://education.nationalgeographic.org/resource/vegetation-region'],
         'domain_of': ['FieldResearchSite', 'Biosample'],
         'examples': [{'value': 'deciduous forest'},
                      {'value': 'forest'},
                      {'value': 'Bauhinia variegata'}],
         'keywords': ['vegetation'],
         'slot_uri': 'MIXS:0000312',
         'todos': ['Recommend changing this from text value to some king of ontology?']} })
    cur_vegetation_meth: Optional[str] = Field(default=None, title="current vegetation method", description="""Reference or method used in vegetation classification""", json_schema_extra = { "linkml_meta": {'comments': ['Required when current vegetation is provided.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'https://doi.org/10.1111/j.1654-109X.2011.01154.x'}],
         'keywords': ['method', 'vegetation'],
         'slot_uri': 'MIXS:0000314',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL})$'},
         'todos': ["I'm not sure this is a DOI, PMID, or URI. Should pool the "
                   'community and find out how they accomplish this if provided.']} })
    date_last_rain: Optional[TimestampValue] = Field(default=None, title="date last rain", description="""The date of the last time it rained""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '2013-03-25T12:42:31+01:00'}],
         'keywords': ['date', 'rain'],
         'slot_uri': 'MIXS:0000786'} })
    density: Optional[QuantityValue] = Field(default=None, title="density", description="""Density of the sample, which is its mass per unit volume (aka volumetric mass density)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram per cubic meter, gram per '
                                                     'cubic centimeter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'g/cm3|g/m3|kg/m3'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1000 kg/m3'}],
         'keywords': ['density'],
         'slot_uri': 'MIXS:0000435',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    depos_env: Optional[DeposEnvEnum] = Field(default=None, title="depositional environment", description="""Main depositional environment (https://en.wikipedia.org/wiki/Depositional_environment). If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['environment'],
         'recommended': True,
         'slot_uri': 'MIXS:0000992'} })
    depth: Optional[QuantityValue] = Field(default=None, title="depth", description="""The vertical distance below local surface. For sediment or soil samples depth is measured from sediment or soil surface, respectively. Depth can be reported as an interval for subsurface samples""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '10 m'}],
         'keywords': ['depth'],
         'slot_uri': 'MIXS:0000018',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    dew_point: Optional[QuantityValue] = Field(default=None, title="dew point", description="""The temperature to which a given parcel of humid air must be cooled, at constant barometric pressure, for water vapor to condense into water""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '22 Cel'}],
         'slot_uri': 'MIXS:0000129',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    diether_lipids: Optional[list[TextValue]] = Field(default=None, title="diether lipids", description="""Concentration of diether lipids; can include multiple types of diether lipids""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'diether lipid name;measurement '
                                                     'value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'nanogram per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.2 nanogram per liter'}],
         'slot_uri': 'MIXS:0000178',
         'string_serialization': '{text};{float} {unit}'} })
    diss_carb_dioxide: Optional[QuantityValue] = Field(default=None, title="dissolved carbon dioxide", description="""Concentration of dissolved carbon dioxide in the sample or liquid portion of the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter, milligram '
                                                     'per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'mg/L|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '5 mg/L'}],
         'keywords': ['carbon', 'dissolved'],
         'slot_uri': 'MIXS:0000436',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    diss_hydrogen: Optional[QuantityValue] = Field(default=None, title="dissolved hydrogen", description="""Concentration of dissolved hydrogen""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.3 umol/L'}],
         'keywords': ['dissolved'],
         'slot_uri': 'MIXS:0000179',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    diss_inorg_carb: Optional[QuantityValue] = Field(default=None, title="dissolved inorganic carbon", description="""Dissolved inorganic carbon concentration in the sample, typically measured after filtering the sample using a 0.45 micrometer filter""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microgram per liter, milligram '
                                                     'per liter, parts per million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L|ug/L|umol/kg'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '2059 umol/kg'}],
         'keywords': ['carbon', 'dissolved', 'inorganic'],
         'slot_uri': 'MIXS:0000434',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    diss_inorg_nitro: Optional[QuantityValue] = Field(default=None, title="dissolved inorganic nitrogen", description="""Concentration of dissolved inorganic nitrogen""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microgram per liter, micromole '
                                                     'per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'ug/L|umol/L|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '761 umol/L'}],
         'keywords': ['dissolved', 'inorganic', 'nitrogen'],
         'slot_uri': 'MIXS:0000698',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    diss_inorg_phosp: Optional[QuantityValue] = Field(default=None, title="dissolved inorganic phosphorus", description="""Concentration of dissolved inorganic phosphorus in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L|ug/L|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '56.5 umol/L'}],
         'keywords': ['dissolved', 'inorganic', 'phosphorus'],
         'slot_uri': 'MIXS:0000106',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    diss_iron: Optional[QuantityValue] = Field(default=None, title="dissolved iron", description="""Concentration of dissolved iron in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mg/L'}},
         'domain_of': ['Biosample'],
         'keywords': ['dissolved'],
         'recommended': True,
         'slot_uri': 'MIXS:0000139',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    diss_org_carb: Optional[QuantityValue] = Field(default=None, title="dissolved organic carbon", description="""Concentration of dissolved organic carbon in the sample, liquid portion of the sample, or aqueous phase of the fluid""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter, milligram '
                                                     'per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'mg/L|umol/L|ug/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '197 umol/L'}],
         'keywords': ['carbon', 'dissolved', 'organic'],
         'slot_uri': 'MIXS:0000433',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    diss_org_nitro: Optional[QuantityValue] = Field(default=None, title="dissolved organic nitrogen", description="""Dissolved organic nitrogen concentration measured as; total dissolved nitrogen - NH4 - NO3 - NO2""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units',
                                           'value': 'mg/L|ug/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.05 mg/L'}],
         'keywords': ['dissolved', 'nitrogen', 'organic'],
         'slot_uri': 'MIXS:0000162',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    diss_oxygen: Optional[QuantityValue] = Field(default=None, title="dissolved oxygen", description="""Concentration of dissolved oxygen""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per kilogram, '
                                                     'milligram per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'mg/L|umol/kg|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '175 umol/L'}],
         'keywords': ['dissolved', 'oxygen'],
         'slot_uri': 'MIXS:0000119',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    diss_oxygen_fluid: Optional[QuantityValue] = Field(default=None, title="dissolved oxygen in fluids", description="""Concentration of dissolved oxygen in the oil field produced fluids as it contributes to oxygen-corrosion and microbial activity (e.g. Mic)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per kilogram, '
                                                     'milligram per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'mg/L|umol/kg'}},
         'domain_of': ['Biosample'],
         'keywords': ['dissolved', 'oxygen'],
         'slot_uri': 'MIXS:0000438',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    door_comp_type: Optional[DoorCompTypeEnum] = Field(default=None, title="door type, composite", description="""The composite type of the door""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'revolving'}],
         'keywords': ['door', 'type'],
         'slot_uri': 'MIXS:0000795'} })
    door_cond: Optional[DamagedRupturedEnum] = Field(default=None, title="door condition", description="""The physical condition of the door""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'new'}],
         'keywords': ['condition', 'door'],
         'slot_uri': 'MIXS:0000788'} })
    door_direct: Optional[DoorDirectEnum] = Field(default=None, title="door direction of opening", description="""The direction the door opens""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'inward'}],
         'keywords': ['direction', 'door'],
         'slot_uri': 'MIXS:0000789'} })
    door_loc: Optional[CompassDirections8Enum] = Field(default=None, title="door location", description="""The relative location of the door in the room""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'north'}],
         'keywords': ['door', 'location'],
         'slot_uri': 'MIXS:0000790'} })
    door_mat: Optional[DoorMatEnum] = Field(default=None, title="door material", description="""The material the door is composed of""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'wood'}],
         'keywords': ['door', 'material'],
         'slot_uri': 'MIXS:0000791'} })
    door_move: Optional[DoorMoveEnum] = Field(default=None, title="door movement", description="""The type of movement of the door""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'swinging'}],
         'keywords': ['door'],
         'slot_uri': 'MIXS:0000792'} })
    door_size: Optional[QuantityValue] = Field(default=None, title="door area or size", description="""The size of the door""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'square meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm2'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '2.5 m2'}],
         'keywords': ['area', 'door', 'size'],
         'slot_uri': 'MIXS:0000158',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    door_type: Optional[DoorTypeEnum] = Field(default=None, title="door type", description="""The type of door material""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'wooden'}],
         'keywords': ['door', 'type'],
         'slot_uri': 'MIXS:0000794'} })
    door_type_metal: Optional[DoorTypeMetalEnum] = Field(default=None, title="door type, metal", description="""The type of metal door""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'hollow'}],
         'keywords': ['door', 'type'],
         'slot_uri': 'MIXS:0000796'} })
    door_type_wood: Optional[str] = Field(default=None, title="door type, wood", description="""The type of wood door""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'enumeration'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'battened'}],
         'keywords': ['door', 'type'],
         'slot_uri': 'MIXS:0000797',
         'string_serialization': '[bettened and ledged|battened|ledged and '
                                 'braced|battened|ledged and framed|battened|ledged, '
                                 'braced and frame|framed and paneled|glashed or '
                                 'sash|flush|louvered|wire gauged]'} })
    door_water_mold: Optional[MoldVisibilityEnum] = Field(default=None, title="door signs of water/mold", description="""Signs of the presence of mold or mildew on a door""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'presence of mold visible'}],
         'keywords': ['door'],
         'slot_uri': 'MIXS:0000793'} })
    down_par: Optional[QuantityValue] = Field(default=None, title="downward PAR", description="""Visible waveband radiance and irradiance measurements in the water column""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microEinstein per square meter '
                                                     'per second, microEinstein per '
                                                     'square centimeter per second'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'umol/m2/s'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '28.71 umol/m2/s'}],
         'slot_uri': 'MIXS:0000703',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    drainage_class: Optional[DrainageClassEnum] = Field(default=None, title="drainage classification", description="""Drainage classification from a standard system such as the USDA system""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'well'}],
         'keywords': ['classification'],
         'slot_uri': 'MIXS:0001085'} })
    drawings: Optional[DrawingsEnum] = Field(default=None, title="drawings", description="""The buildings architectural drawings; if design is chosen, indicate phase-conceptual, schematic, design development, and construction documents""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'sketch'}],
         'keywords': ['drawings'],
         'slot_uri': 'MIXS:0000798'} })
    efficiency_percent: Optional[QuantityValue] = Field(default=None, title="efficiency percent", description="""Percentage of volatile solids removed from the anaerobic digestor""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter'},
                         'units_alignment_excuse': {'tag': 'units_alignment_excuse',
                                                    'value': 'mixs_inconsistent'}},
         'domain_of': ['Biosample'],
         'keywords': ['percent'],
         'slot_uri': 'MIXS:0000657',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    elev: Optional[float] = Field(default=None, title="elevation, meters", description="""Elevation of the sampling site is its height above a fixed reference point, most commonly the mean sea level. Elevation is mainly used when referring to points on the earth's surface, while altitude is used for points above the surface, such as an aircraft in flight or a spacecraft in orbit""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'meter'}},
         'comments': ['All elevations must be reported in meters. Provide the '
                      'numerical portion only.',
                      'Please use '
                      'https://www.advancedconverter.com/map-tools/find-altitude-by-coordinates, '
                      'if needed, to help estimate the elevation based on latitude and '
                      'longitude coordinates.'],
         'domain_of': ['FieldResearchSite', 'Biosample'],
         'examples': [{'value': '100'}],
         'keywords': ['elevation'],
         'slot_uri': 'MIXS:0000093',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    elevator: Optional[TextValue] = Field(default=None, title="elevator count", description="""The number of elevators within the built structure""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '2'}],
         'keywords': ['count'],
         'slot_uri': 'MIXS:0000799'} })
    emulsions: Optional[list[TextValue]] = Field(default=None, title="emulsions", description="""Amount or concentration of substances such as paints, adhesives, mayonnaise, hair colorants, emulsified oils, etc.; can include multiple emulsion types""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'emulsion name;measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram per liter'}},
         'domain_of': ['Biosample'],
         'slot_uri': 'MIXS:0000660',
         'string_serialization': '{text};{float} {unit}'} })
    env_broad_scale: ControlledIdentifiedTermValue = Field(default=..., title="broad-scale environmental context", description="""Report the major environmental system the sample or specimen came from. The system(s) identified should have a coarse spatial grain, to provide the general environmental context of where the sampling was done (e.g. in the desert or a rainforest). We recommend using subclasses of EnvO s biome class:  http://purl.obolibrary.org/obo/ENVO_00000428. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS""", json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'The biome or major environmental system '
                                              'where the sample or specimen '
                                              'originated. Choose values from '
                                              "subclasses of the 'biome' class "
                                              '[ENVO:00000428] in the Environment '
                                              'Ontology (ENVO). For host-associated or '
                                              'plant-associated samples, use terms '
                                              'from the UBERON or Plant Ontology to '
                                              'describe the broad anatomical or '
                                              'morphological context'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'oceanic epipelagic zone biome [ENVO:01000035]'}],
         'is_a': 'mixs_env_triad_field',
         'keywords': ['context', 'environmental'],
         'slot_uri': 'MIXS:0000012',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{termLabel} \\[{termID}\\]$'}} })
    env_local_scale: ControlledIdentifiedTermValue = Field(default=..., title="local environmental context", description="""Report the entity or entities which are in the sample or specimen s local vicinity and which you believe have significant causal influences on your sample or specimen. We recommend using EnvO terms which are of smaller spatial grain than your entry for env_broad_scale. Terms, such as anatomical sites, from other OBO Library ontologies which interoperate with EnvO (e.g. UBERON) are accepted in this field. EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'Environmental entities having '
                                                     'causal influences upon the '
                                                     'entity at time of sampling'},
                         'tooltip': {'tag': 'tooltip',
                                     'value': 'The specific environmental entities or '
                                              'features near the sample or specimen '
                                              'that significantly influence its '
                                              'characteristics or composition. These '
                                              'entities are typically smaller in scale '
                                              'than the broad environmental context. '
                                              'Values for this field should be '
                                              'countable, material nouns and must be '
                                              'chosen from subclasses of BFO:0000040 '
                                              '(material entity) that appear in the '
                                              'Environment Ontology (ENVO). For '
                                              'host-associated or plant-associated '
                                              'samples, use terms from the UBERON or '
                                              'Plant Ontology to describe specific '
                                              'anatomical structures or plant parts.'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'litter layer [ENVO:01000338]'}],
         'is_a': 'mixs_env_triad_field',
         'keywords': ['context', 'environmental'],
         'slot_uri': 'MIXS:0000013',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{termLabel} \\[{termID}\\]$'}} })
    env_medium: ControlledIdentifiedTermValue = Field(default=..., title="environmental medium", description="""Report the environmental material(s) immediately surrounding the sample or specimen at the time of sampling. We recommend using subclasses of 'environmental material' (http://purl.obolibrary.org/obo/ENVO_00010483). EnvO documentation about how to use the field: https://github.com/EnvironmentOntology/envo/wiki/Using-ENVO-with-MIxS . Terms from other OBO ontologies are permissible as long as they reference mass/volume nouns (e.g. air, water, blood) and not discrete, countable entities (e.g. a tree, a leaf, a table top)""", json_schema_extra = { "linkml_meta": {'annotations': {'tooltip': {'tag': 'tooltip',
                                     'value': 'The predominant environmental material '
                                              'or substrate that directly surrounds or '
                                              'hosts the sample or specimen at the '
                                              'time of sampling. Choose values from '
                                              "subclasses of the 'environmental "
                                              "material' class [ENVO:00010483] in the "
                                              'Environment Ontology (ENVO). Values for '
                                              'this field should be measurable or mass '
                                              'material nouns, representing continuous '
                                              'environmental materials. For '
                                              'host-associated or plant-associated '
                                              'samples, use terms from the UBERON or '
                                              'Plant Ontology to indicate a tissue, '
                                              'organ, or plant structure'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'soil [ENVO:00001998]'}],
         'is_a': 'mixs_env_triad_field',
         'keywords': ['environmental'],
         'slot_uri': 'MIXS:0000014',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{termLabel} \\[{termID}\\]$'}} })
    env_package: Optional[TextValue] = Field(default=None, description="""MIxS extension for reporting of measurements and observations obtained from one or more of the environments where the sample was obtained. All environmental packages listed here are further defined in separate subtables. By giving the name of the environmental package, a selection of fields can be made from the subtables and can be reported""", json_schema_extra = { "linkml_meta": {'aliases': ['environmental package'],
         'domain_of': ['Biosample'],
         'notes': ['no longer in MIxS as of 6.0?']} })
    escalator: Optional[TextValue] = Field(default=None, title="escalator count", description="""The number of escalators within the built structure""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '4'}],
         'keywords': ['count'],
         'slot_uri': 'MIXS:0000800'} })
    ethylbenzene: Optional[QuantityValue] = Field(default=None, title="ethylbenzene", description="""Concentration of ethylbenzene in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter, parts per '
                                                     'million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L'}},
         'domain_of': ['Biosample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000155',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    exp_duct: Optional[QuantityValue] = Field(default=None, title="exposed ductwork", description="""The amount of exposed ductwork in the room""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'square meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm2'}},
         'domain_of': ['Biosample'],
         'slot_uri': 'MIXS:0000144',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    exp_pipe: Optional[QuantityValue] = Field(default=None, title="exposed pipes", description="""The number of exposed pipes in the room""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': '1'}},
         'domain_of': ['Biosample'],
         'keywords': ['pipes'],
         'slot_uri': 'MIXS:0000220',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{integer} {text}$'}} })
    experimental_factor: Optional[Union[ControlledTermValue,ControlledIdentifiedTermValue]] = Field(default=None, title="experimental factor", description="""Variable aspects of an experiment design that can be used to describe an experiment, or set of experiments, in an increasingly detailed manner. This field accepts ontology terms from Experimental Factor Ontology (EFO) and/or Ontology for Biomedical Investigations (OBI)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'text or EFO and/or OBI'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'time series design [EFO:0001779]'}],
         'keywords': ['experimental', 'factor'],
         'slot_uri': 'MIXS:0000008',
         'string_serialization': '{termLabel} [{termID}]|{text}'} })
    ext_door: Optional[TextValue] = Field(default=None, title="exterior door count", description="""The number of exterior doors in the built structure""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['count', 'door', 'exterior'],
         'slot_uri': 'MIXS:0000170'} })
    ext_wall_orient: Optional[CompassDirections8Enum] = Field(default=None, title="orientations of exterior wall", description="""The orientation of the exterior wall""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'northwest'}],
         'keywords': ['exterior', 'wall'],
         'slot_uri': 'MIXS:0000817'} })
    ext_window_orient: Optional[CompassDirections8Enum] = Field(default=None, title="orientations of exterior window", description="""The compass direction the exterior window of the room is facing""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'southwest'}],
         'keywords': ['exterior', 'window'],
         'slot_uri': 'MIXS:0000818'} })
    extreme_event: Optional[str] = Field(default=None, title="history/extreme events", description="""Unusual physical events that may have affected microbial populations""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'date, string'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1980-05-18, volcanic eruption'}],
         'keywords': ['event', 'history'],
         'slot_uri': 'MIXS:0000320'} })
    fao_class: Optional[FaoClassEnum] = Field(default=None, title="soil_taxonomic/FAO classification", description="""Soil classification from the FAO World soil distribution from International Soil Reference and Information Centre (ISRIC). The list of available soil classifications can be found at https://www.isric.org/explore/world-soil-distribution""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Luvisols'}],
         'keywords': ['classification'],
         'slot_uri': 'MIXS:0001083'} })
    fertilizer_regm: Optional[list[TextValue]] = Field(default=None, title="fertilizer regimen", description="""Information about treatment involving the use of fertilizers; should include the name of fertilizer, amount administered, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple fertilizer regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'fertilizer name;fertilizer '
                                                     'amount;treatment interval and '
                                                     'duration'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, mole per liter, milligram '
                                                     'per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'urea;0.6 milligram per '
                                'liter;R2/2018-05-11:T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['regimen'],
         'slot_uri': 'MIXS:0000556',
         'string_serialization': '{text};{float} '
                                 '{unit};{Rn/start_time/end_time/duration}'} })
    field: Optional[TextValue] = Field(default=None, title="field name", description="""Name of the hydrocarbon field (e.g. Albacora)""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'], 'recommended': True, 'slot_uri': 'MIXS:0000291'} })
    filter_type: Optional[list[FilterTypeEnum]] = Field(default=None, title="filter type", description="""A device which removes solid particulates or airborne molecular contaminants""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'HEPA'}],
         'keywords': ['filter', 'type'],
         'slot_uri': 'MIXS:0000765'} })
    fire: Optional[str] = Field(default=None, title="history/fire", description="""Historical and/or physical evidence of fire""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'date string'}},
         'comments': ['Provide the date the fire occurred. If extended burning '
                      'occurred provide the date range.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '1871-10-10'}, {'value': '1871-10-01 to 1871-10-31'}],
         'keywords': ['history'],
         'slot_uri': 'MIXS:0001086',
         'todos': ['is "to" acceptable? Is there a better way to request that be '
                   'written?']} })
    fireplace_type: Optional[FireplaceTypeEnum] = Field(default=None, title="fireplace type", description="""A firebox with chimney""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'wood burning'}],
         'keywords': ['type'],
         'slot_uri': 'MIXS:0000802'} })
    flooding: Optional[str] = Field(default=None, title="history/flooding", description="""Historical and/or physical evidence of flooding""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'date string'}},
         'comments': ['Provide the date the flood occurred. If extended flooding '
                      'occurred provide the date range.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '1927-04-15'}, {'value': '1927-04 to 1927-05'}],
         'keywords': ['history'],
         'slot_uri': 'MIXS:0000319',
         'todos': ['is "to" acceptable? Is there a better way to request that be '
                   'written?',
                   'What about if the "day" isn\'t known? Is this ok?']} })
    floor_age: Optional[QuantityValue] = Field(default=None, title="floor age", description="""The time period since installment of the carpet or flooring""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'years, weeks, days'},
                         'storage_units': {'tag': 'storage_units', 'value': 'a|d|wk'}},
         'domain_of': ['Biosample'],
         'keywords': ['age', 'floor'],
         'slot_uri': 'MIXS:0000164',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    floor_area: Optional[QuantityValue] = Field(default=None, title="floor area", description="""The area of the floor space within the room""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'square meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm2'}},
         'domain_of': ['Biosample'],
         'keywords': ['area', 'floor'],
         'slot_uri': 'MIXS:0000165',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    floor_cond: Optional[DamagedEnum] = Field(default=None, title="floor condition", description="""The physical condition of the floor at the time of sampling; photos or video preferred; use drawings to indicate location of damaged areas""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'new'}],
         'keywords': ['condition', 'floor'],
         'slot_uri': 'MIXS:0000803'} })
    floor_count: Optional[TextValue] = Field(default=None, title="floor count", description="""The number of floors in the building, including basements and mechanical penthouse""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['count', 'floor'],
         'slot_uri': 'MIXS:0000225'} })
    floor_finish_mat: Optional[str] = Field(default=None, title="floor finish material", description="""The floor covering type; the finished surface that is walked on""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'enumeration'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'carpet'}],
         'keywords': ['floor', 'material'],
         'slot_uri': 'MIXS:0000804',
         'string_serialization': '[tile|wood strip or parquet|carpet|rug|laminate '
                                 'wood|lineoleum|vinyl composition tile|sheet '
                                 'vinyl|stone|bamboo|cork|terrazo|concrete|none;specify '
                                 'unfinished|sealed|clear finish|paint]'} })
    floor_struc: Optional[FloorStrucEnum] = Field(default=None, title="floor structure", description="""Refers to the structural elements and subfloor upon which the finish flooring is installed""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'concrete'}],
         'keywords': ['floor'],
         'slot_uri': 'MIXS:0000806'} })
    floor_thermal_mass: Optional[QuantityValue] = Field(default=None, title="floor thermal mass", description="""The ability of the floor to provide inertia against temperature fluctuations""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'joule per degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'J/K'}},
         'domain_of': ['Biosample'],
         'keywords': ['floor', 'mass'],
         'slot_uri': 'MIXS:0000166',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    floor_water_mold: Optional[FloorWaterMoldEnum] = Field(default=None, title="floor signs of water/mold", description="""Signs of the presence of mold or mildew in a room""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'ceiling discoloration'}],
         'keywords': ['floor'],
         'slot_uri': 'MIXS:0000805'} })
    fluor: Optional[QuantityValue] = Field(default=None, title="fluorescence", description="""Raw or converted fluorescence of water""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram chlorophyll a per '
                                                     'cubic meter, volts'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mg/m3|V'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '2.5 V'}],
         'slot_uri': 'MIXS:0000704',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    freq_clean: Optional[QuantityValue] = Field(default=None, title="frequency of cleaning", description="""The number of times the sample location is cleaned per day.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': '1/d'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '2 1/d'}],
         'keywords': ['frequency'],
         'slot_uri': 'MIXS:0000226'} })
    freq_cook: Optional[QuantityValue] = Field(default=None, title="frequency of cooking", description="""The number of times a meal is cooked per week""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': '1/d'}},
         'domain_of': ['Biosample'],
         'keywords': ['frequency'],
         'slot_uri': 'MIXS:0000227',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{integer} {text}$'}} })
    fungicide_regm: Optional[list[TextValue]] = Field(default=None, title="fungicide regimen", description="""Information about treatment involving use of fungicides; should include the name of fungicide, amount administered, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple fungicide regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, mole per liter, milligram '
                                                     'per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'bifonazole;1 mole per '
                                'liter;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['regimen'],
         'slot_uri': 'MIXS:0000557'} })
    furniture: Optional[FurnitureEnum] = Field(default=None, title="furniture", description="""The types of furniture present in the sampled room""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'chair'}],
         'slot_uri': 'MIXS:0000807'} })
    gaseous_environment: Optional[list[TextValue]] = Field(default=None, title="gaseous environment", description="""Use of conditions with differing gaseous environments; should include the name of gaseous compound, amount administered, treatment duration, interval and total experimental duration; can include multiple gaseous environment regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'CO2; 500ppm above ambient; constant'},
                      {'value': 'nitric oxide;0.5 micromole per '
                                'liter;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['environment'],
         'slot_uri': 'MIXS:0000558',
         'todos': ['would like to see usage examples for this slot. Requiring '
                   "micromole/L seems too limiting and doesn't match expected_value "
                   'value',
                   "did I do this right? keep the example that's provided and add "
                   'another? so as to not override']} })
    gaseous_substances: Optional[list[TextValue]] = Field(default=None, title="gaseous substances", description="""Amount or concentration of substances such as hydrogen sulfide, carbon dioxide, methane, etc.; can include multiple substances""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'gaseous substance '
                                                     'name;measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter'}},
         'domain_of': ['Biosample'],
         'slot_uri': 'MIXS:0000661',
         'string_serialization': '{text};{float} {unit}'} })
    gender_restroom: Optional[GenderRestroomEnum] = Field(default=None, title="gender of restroom", description="""The gender type of the restroom""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'male'}],
         'slot_uri': 'MIXS:0000808'} })
    genetic_mod: Optional[str] = Field(default=None, title="genetic modification", description="""Genetic modifications of the genome of an organism, which may occur naturally by spontaneous mutation, or be introduced by some experimental means, e.g. specification of a transgene or the gene knocked-out or details of transient transfection""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'PMID:19497774'}],
         'slot_uri': 'MIXS:0000859',
         'structured_pattern': {'interpolated': True,
                                'syntax': '^({PMID}|{DOI}|{URL})$'}} })
    geo_loc_name: Optional[TextValue] = Field(default=None, title="geographic location (country and/or sea,region)", description="""The geographical origin of the sample as defined by the country or sea name followed by specific region name. Country or sea names should be chosen from the INSDC country list (http://insdc.org/country.html), or the GAZ ontology (http://purl.bioontology.org/ontology/GAZ)""", json_schema_extra = { "linkml_meta": {'domain_of': ['FieldResearchSite', 'Biosample'],
         'examples': [{'value': 'USA: Maryland, Bethesda'}],
         'keywords': ['geographic', 'location'],
         'slot_uri': 'MIXS:0000010',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{country}: {region}, {specific_location}$'}} })
    glucosidase_act: Optional[QuantityValue] = Field(default=None, title="glucosidase activity", description="""Measurement of glucosidase activity""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'mol per liter per hour'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mol/L/h'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '5 mol/L/h'}],
         'slot_uri': 'MIXS:0000137',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    gravidity: Optional[TextValue] = Field(default=None, title="gravidity", description="""Whether or not subject is gravid, and if yes date due or date post-conception, specifying which is used""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'yes;due date:2018-05-11'}],
         'slot_uri': 'MIXS:0000875',
         'string_serialization': '{boolean};{timestamp}'} })
    gravity: Optional[list[TextValue]] = Field(default=None, title="gravity", description="""Information about treatment involving use of gravity factor to study various types of responses in presence, absence or modified levels of gravity; treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple treatments""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'gravity factor value;treatment '
                                                     'interval and duration'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'meter per square second, g'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '12 g;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'slot_uri': 'MIXS:0000559',
         'string_serialization': '{float} {unit};{Rn/start_time/end_time/duration}'} })
    growth_facil: Optional[Union[ControlledTermValue,ControlledIdentifiedTermValue]] = Field(default=None, title="growth facility", description="""Type of facility where the sampled plant was grown; controlled vocabulary: growth chamber, open top chamber, glasshouse, experimental garden, field. Alternatively use Crop Ontology (CO) terms, see http://www.cropontology.org/ontology/CO_715/Crop%20Research""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'free text or CO'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'Growth chamber [CO_715:0000189]'}],
         'keywords': ['facility', 'growth'],
         'slot_uri': 'MIXS:0001043',
         'string_serialization': '{text}|{termLabel} [{termID}]'} })
    growth_habit: Optional[GrowthHabitEnum] = Field(default=None, title="growth habit", description="""Characteristic shape, appearance or growth form of a plant species""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'spreading'}],
         'keywords': ['growth'],
         'slot_uri': 'MIXS:0001044'} })
    growth_hormone_regm: Optional[list[TextValue]] = Field(default=None, title="growth hormone regimen", description="""Information about treatment involving use of growth hormones; should include the name of growth hormone, amount administered, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple growth hormone regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'growth hormone name;growth '
                                                     'hormone amount;treatment '
                                                     'interval and duration'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, mole per liter, milligram '
                                                     'per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'abscisic acid;0.5 milligram per '
                                'liter;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['growth', 'regimen'],
         'slot_uri': 'MIXS:0000560',
         'string_serialization': '{text};{float} '
                                 '{unit};{Rn/start_time/end_time/duration}'} })
    hall_count: Optional[TextValue] = Field(default=None, title="hallway/corridor count", description="""The total count of hallways and corridors in the built structure""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['corridor', 'count', 'hallway'],
         'slot_uri': 'MIXS:0000228'} })
    handidness: Optional[HandidnessEnum] = Field(default=None, title="handidness", description="""The handidness of the individual sampled""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'right handedness'}],
         'slot_uri': 'MIXS:0000809'} })
    hc_produced: Optional[HcProducedEnum] = Field(default=None, title="hydrocarbon type produced", description="""Main hydrocarbon type produced from resource (i.e. Oil, gas, condensate, etc). If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Gas'}],
         'keywords': ['hydrocarbon', 'type'],
         'slot_uri': 'MIXS:0000989'} })
    hcr: Optional[HcrEnum] = Field(default=None, title="hydrocarbon resource type", description="""Main Hydrocarbon Resource type. The term \"Hydrocarbon Resource\" HCR defined as a natural environmental feature containing large amounts of hydrocarbons at high concentrations potentially suitable for commercial exploitation. This term should not be confused with the Hydrocarbon Occurrence term which also includes hydrocarbon-rich environments with currently limited commercial interest such as seeps, outcrops, gas hydrates etc. If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Oil Sand'}],
         'keywords': ['hydrocarbon', 'resource', 'type'],
         'slot_uri': 'MIXS:0000988'} })
    hcr_fw_salinity: Optional[QuantityValue] = Field(default=None, title="formation water salinity", description="""Original formation water salinity (prior to secondary recovery e.g. Waterflooding) expressed as TDS""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mg/L'}},
         'domain_of': ['Biosample'],
         'keywords': ['salinity', 'water'],
         'recommended': True,
         'slot_uri': 'MIXS:0000406',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    hcr_geol_age: Optional[GeolAgeEnum] = Field(default=None, title="hydrocarbon resource geological age", description="""Geological age of hydrocarbon resource (Additional info: https://en.wikipedia.org/wiki/Period_(geology)). If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Silurian'}],
         'keywords': ['age', 'hydrocarbon', 'resource'],
         'recommended': True,
         'slot_uri': 'MIXS:0000993'} })
    hcr_pressure: Optional[TextValue] = Field(default=None, title="hydrocarbon resource original pressure", description="""Original pressure of the hydrocarbon resource""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'atmosphere, kilopascal'}},
         'domain_of': ['Biosample'],
         'keywords': ['hydrocarbon', 'pressure', 'resource'],
         'slot_uri': 'MIXS:0000395',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{float} *- *{float} {unit}$'}} })
    hcr_temp: Optional[TextValue] = Field(default=None, title="hydrocarbon resource original temperature", description="""Original temperature of the hydrocarbon resource""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '150-295 degree Celsius'}],
         'keywords': ['hydrocarbon', 'resource', 'temperature'],
         'slot_uri': 'MIXS:0000393',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{float} *- *{float} {unit}$'}} })
    heat_cool_type: Optional[list[HeatCoolTypeEnum]] = Field(default=None, title="heating and cooling system type", description="""Methods of conditioning or heating a room or building""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'heat pump'}],
         'keywords': ['type'],
         'slot_uri': 'MIXS:0000766'} })
    heat_deliv_loc: Optional[CompassDirections8Enum] = Field(default=None, title="heating delivery locations", description="""The location of heat delivery within the room""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'north'}],
         'keywords': ['delivery', 'location', 'locations'],
         'slot_uri': 'MIXS:0000810'} })
    heat_sys_deliv_meth: Optional[str] = Field(default=None, title="heating system delivery method", description="""The method by which the heat is delivered through the system""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'radiant'}],
         'keywords': ['delivery', 'method'],
         'slot_uri': 'MIXS:0000812'} })
    heat_system_id: Optional[TextValue] = Field(default=None, title="heating system identifier", description="""The heating system identifier""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['identifier'],
         'slot_uri': 'MIXS:0000833'} })
    heavy_metals: Optional[list[TextValue]] = Field(default=None, title="heavy metals/ extreme unusual properties", description="""Heavy metals present in the sample and their concentrations.""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'heavy metal name;measurement '
                                                     'value unit'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microgram per gram'}},
         'comments': ['For multiple heavy metals and concentrations, separate by ;'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'mercury 0.09 micrograms per gram'},
                      {'value': 'mercury 0.09 ug/g; chromium 0.03 ug/g'}],
         'keywords': ['extreme', 'properties', 'unusual'],
         'slot_uri': 'MIXS:0000652',
         'string_serialization': '{text};{float} {unit}',
         'todos': ['Example & validation. Can we configure things so that 27% & 27 % & '
                   '0.27 will validate?',
                   "I think it's weird the way GSC writes the title. I recommend this "
                   "change. Thoughts? I would argue this isn't an extreme unusual "
                   "property. It's just a biogeochemical measurement."]} })
    heavy_metals_meth: Optional[list[str]] = Field(default=None, title="heavy metals method/ extreme unusual properties", description="""Reference or method used in determining heavy metals""", json_schema_extra = { "linkml_meta": {'comments': ['Required when heavy metals are provided'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'https://doi.org/10.3390/ijms9040434'},
                      {'value': 'doi:10.1007/BF01056090'},
                      {'value': 'https://doi.org/10.1007/s00216-006-0322-8'}],
         'keywords': ['extreme', 'method', 'properties', 'unusual'],
         'slot_uri': 'MIXS:0000343',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL})$'}} })
    height_carper_fiber: Optional[QuantityValue] = Field(default=None, title="height carpet fiber mat", description="""The average carpet fiber height in the indoor environment""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'centimeter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'cm'}},
         'domain_of': ['Biosample'],
         'keywords': ['height'],
         'slot_uri': 'MIXS:0000167',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    herbicide_regm: Optional[list[TextValue]] = Field(default=None, title="herbicide regimen", description="""Information about treatment involving use of herbicides; information about treatment involving use of growth hormones; should include the name of herbicide, amount administered, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, mole per liter, milligram '
                                                     'per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'atrazine;10 milligram per '
                                'liter;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['regimen'],
         'slot_uri': 'MIXS:0000561'} })
    horizon_meth: Optional[str] = Field(default=None, title="horizon method", description="""Reference or method used in determining the horizon""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['horizon', 'method'],
         'slot_uri': 'MIXS:0000321',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL})$'}} })
    host_age: Optional[QuantityValue] = Field(default=None, title="host age", description="""Age of host at the time of sampling; relevant scale depends on species and study, e.g. Could be seconds for amoebae or centuries for trees""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'year, day, hour'},
                         'storage_units': {'tag': 'storage_units', 'value': 'a|d|h'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '10 d'}],
         'keywords': ['age', 'host', 'host.'],
         'slot_uri': 'MIXS:0000255',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    host_body_habitat: Optional[TextValue] = Field(default=None, title="host body habitat", description="""Original body habitat where the sample was obtained from""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['body', 'habitat', 'host', 'host.'],
         'slot_uri': 'MIXS:0000866'} })
    host_body_product: Optional[Union[ControlledTermValue,ControlledIdentifiedTermValue]] = Field(default=None, title="host body product", description="""Substance produced by the body, e.g. Stool, mucus, where the sample was obtained from. Use terms from the foundational model of anatomy ontology (fma) or Uber-anatomy ontology (UBERON)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'FMA or UBERON'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'mucus [UBERON:0000912]'}],
         'keywords': ['body', 'host', 'host.', 'product'],
         'slot_uri': 'MIXS:0000888',
         'string_serialization': '{termLabel} [{termID}]'} })
    host_body_site: Optional[Union[ControlledTermValue,ControlledIdentifiedTermValue]] = Field(default=None, title="host body site", description="""Name of body site where the sample was obtained from, such as a specific organ or tissue (tongue, lung etc...). Use terms from the foundational model of anatomy ontology (fma) or the Uber-anatomy ontology (UBERON)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'FMA or UBERON'}},
         'domain_of': ['Biosample'],
         'keywords': ['body', 'host', 'site'],
         'slot_uri': 'MIXS:0000867',
         'string_serialization': '{termLabel} [{termID}]'} })
    host_body_temp: Optional[QuantityValue] = Field(default=None, title="host body temperature", description="""Core body temperature of the host when sample was collected""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '15 Cel'}],
         'keywords': ['body', 'host', 'host.', 'temperature'],
         'slot_uri': 'MIXS:0000274',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    host_color: Optional[TextValue] = Field(default=None, title="host color", description="""The color of host""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['host', 'host.'],
         'slot_uri': 'MIXS:0000260'} })
    host_common_name: Optional[TextValue] = Field(default=None, title="host common name", description="""Common name of the host""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': ''}},
         'domain_of': ['Biosample'],
         'keywords': ['host', 'host.'],
         'slot_uri': 'MIXS:0000248'} })
    host_diet: Optional[list[TextValue]] = Field(default=None, title="host diet", description="""Type of diet depending on the host, for animals omnivore, herbivore etc., for humans high-fat, meditteranean etc.; can include multiple diet types""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['diet', 'host', 'host.'],
         'slot_uri': 'MIXS:0000869'} })
    host_dry_mass: Optional[QuantityValue] = Field(default=None, title="host dry mass", description="""Measurement of dry mass""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'kilogram, gram'},
                         'storage_units': {'tag': 'storage_units', 'value': 'g|kg'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '500 g'}],
         'keywords': ['dry', 'host', 'host.', 'mass'],
         'slot_uri': 'MIXS:0000257',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    host_family_relation: Optional[list[str]] = Field(default=None, title="host family relationship", description="""Familial relationships to other hosts in the same study; can include multiple relationships.""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'relationship type;arbitrary '
                                                     'identifier'}},
         'comments': ['Legacy MIxS slot removed from GSC MIxS v6.2.2. Retained for '
                      'submission-schema compatibility.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'offspring;Mussel25'}],
         'slot_uri': 'MIXS:0000872'} })
    host_genotype: Optional[TextValue] = Field(default=None, title="host genotype", description="""Observed genotype""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['host', 'host.'],
         'slot_uri': 'MIXS:0000365'} })
    host_growth_cond: Optional[TextValue] = Field(default=None, title="host growth conditions", description="""Literature reference giving growth conditions of the host""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'https://academic.oup.com/icesjms/article/68/2/349/617247'}],
         'keywords': ['condition', 'growth', 'host', 'host.'],
         'slot_uri': 'MIXS:0000871',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL}|{text})$'}} })
    host_height: Optional[QuantityValue] = Field(default=None, title="host height", description="""The height of subject""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'centimeter, millimeter, meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'cm|m|mm'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.1 m'}],
         'keywords': ['height', 'host', 'host.'],
         'slot_uri': 'MIXS:0000264',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    host_last_meal: Optional[list[str]] = Field(default=None, title="host last meal", description="""Content of last meal and time since feeding; can include multiple values""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'content;duration'}},
         'domain_of': ['Biosample'],
         'keywords': ['host', 'host.'],
         'slot_uri': 'MIXS:0000870',
         'string_serialization': '{text};{duration}'} })
    host_length: Optional[QuantityValue] = Field(default=None, title="host length", description="""The length of subject""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'centimeter, millimeter, meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'cm|m|mm'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1 m'}],
         'keywords': ['host', 'host.', 'length'],
         'slot_uri': 'MIXS:0000256',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    host_life_stage: Optional[TextValue] = Field(default=None, title="host life stage", description="""Description of life stage of host""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value', 'value': 'stage'}},
         'domain_of': ['Biosample'],
         'keywords': ['host', 'host.', 'life'],
         'slot_uri': 'MIXS:0000251'} })
    host_phenotype: Optional[Union[ControlledTermValue,ControlledIdentifiedTermValue]] = Field(default=None, title="host phenotype", description="""Phenotype of human or other host. Use terms from the phenotypic quality ontology (pato) or the Human Phenotype Ontology (HP)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'PATO or HP'}},
         'domain_of': ['Biosample'],
         'keywords': ['host', 'host.'],
         'slot_uri': 'MIXS:0000874',
         'string_serialization': '{termLabel} [{termID}]'} })
    host_sex: Optional[str] = Field(default=None, title="host sex", description="""Gender or physical sex of the host""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'enumeration'}},
         'comments': ['example of non-binary from Excel sheets does not match any of '
                      'the enumerated values'],
         'domain_of': ['Biosample'],
         'keywords': ['host', 'host.'],
         'slot_uri': 'MIXS:0000811',
         'string_serialization': '[female|hermaphrodite|non-binary|male|transgender|transgender '
                                 '(female to male)|transgender (male to female) '
                                 '|undeclared]'} })
    host_shape: Optional[TextValue] = Field(default=None, title="host shape", description="""Morphological shape of host""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'round'}],
         'keywords': ['host', 'host.'],
         'slot_uri': 'MIXS:0000261'} })
    host_subject_id: Optional[TextValue] = Field(default=None, title="host subject id", description="""A unique identifier by which each subject can be referred to, de-identified""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['host', 'host.', 'identifier'],
         'slot_uri': 'MIXS:0000861'} })
    host_subspecf_genlin: Optional[list[str]] = Field(default=None, title="host subspecific genetic lineage", description="""Information about the genetic distinctness of the host organism below the subspecies level e.g., serovar, serotype, biotype, ecotype, variety, cultivar, or any relevant genetic typing schemes like Group I plasmid. Subspecies should not be recorded in this term, but in the NCBI taxonomy. Supply both the lineage name and the lineage rank separated by a colon, e.g., biovar:abc123""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'Genetic lineage below lowest '
                                                     'rank of NCBI taxonomy, which is '
                                                     'subspecies, e.g. serovar, '
                                                     'biotype, ecotype, variety, '
                                                     'cultivar'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'serovar:Newport, variety:glabrum, cultivar: Red '
                                'Delicious'}],
         'keywords': ['host', 'host.', 'lineage'],
         'slot_uri': 'MIXS:0001318',
         'string_serialization': '{rank name}:{text}'} })
    host_substrate: Optional[TextValue] = Field(default=None, title="host substrate", description="""The growth substrate of the host""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'rock'}],
         'keywords': ['host', 'host.'],
         'slot_uri': 'MIXS:0000252'} })
    host_symbiont: Optional[list[str]] = Field(default=None, title="observed host symbionts", description="""The taxonomic name of the organism(s) found living in mutualistic, commensalistic, or parasitic symbiosis with the specific host. The sampled symbiont can have its own symbionts. For example, parasites may have hyperparasites (=parasites of the parasite)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'species name or common name'}},
         'domain_of': ['Biosample'],
         'keywords': ['host', 'host.', 'observed', 'symbiosis'],
         'slot_uri': 'MIXS:0001298'} })
    host_taxid: Optional[ControlledIdentifiedTermValue] = Field(default=None, title="host taxid", description="""NCBI taxon id of the host, e.g. 9606""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'NCBI taxon identifier'}},
         'comments': ['Homo sapiens [NCBITaxon:9606] would be a reasonable '
                      'has_raw_value'],
         'domain_of': ['Biosample'],
         'keywords': ['host', 'host.', 'taxon'],
         'slot_uri': 'MIXS:0000250'} })
    host_tot_mass: Optional[QuantityValue] = Field(default=None, title="host total mass", description="""Total mass of the host at collection, the unit depends on host""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'kilogram, gram'},
                         'storage_units': {'tag': 'storage_units', 'value': 'g|kg'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '2500 g'}],
         'keywords': ['host', 'host.', 'mass', 'total'],
         'slot_uri': 'MIXS:0000263',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    host_wet_mass: Optional[QuantityValue] = Field(default=None, title="host wet mass", description="""Measurement of wet mass""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'kilogram, gram'},
                         'storage_units': {'tag': 'storage_units', 'value': 'g|kg'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1500 g'}],
         'keywords': ['host', 'host.', 'mass', 'wet'],
         'slot_uri': 'MIXS:0000567',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    humidity: Optional[QuantityValue] = Field(default=None, title="humidity", description="""Amount of water vapour in the air, at the time of sampling""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'g/m3|%'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '25 g/m3'}],
         'keywords': ['humidity'],
         'slot_uri': 'MIXS:0000100',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    humidity_regm: Optional[list[TextValue]] = Field(default=None, title="humidity regimen", description="""Information about treatment involving an exposure to varying degree of humidity; information about treatment involving use of growth hormones; should include amount of humidity administered, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'humidity value;treatment '
                                                     'interval and duration'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram per cubic meter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '25 gram per cubic '
                                'meter;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['humidity', 'regimen'],
         'slot_uri': 'MIXS:0000568',
         'string_serialization': '{float} {unit};{Rn/start_time/end_time/duration}'} })
    indoor_space: Optional[IndoorSpaceEnum] = Field(default=None, title="indoor space", description="""A distinguishable space within a structure, the purpose for which discrete areas of a building is used""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'foyer'}],
         'keywords': ['indoor'],
         'slot_uri': 'MIXS:0000763'} })
    indoor_surf: Optional[IndoorSurfEnum] = Field(default=None, title="indoor surface", description="""Type of indoor surface""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'wall'}],
         'keywords': ['indoor', 'surface'],
         'slot_uri': 'MIXS:0000764'} })
    indust_eff_percent: Optional[QuantityValue] = Field(default=None, title="industrial effluent percent", description="""Percentage of industrial effluents received by wastewater treatment plant""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'percentage'},
                         'storage_units': {'tag': 'storage_units', 'value': '%'}},
         'domain_of': ['Biosample'],
         'keywords': ['percent'],
         'slot_uri': 'MIXS:0000662',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    inorg_particles: Optional[list[TextValue]] = Field(default=None, title="inorganic particles", description="""Concentration of particles such as sand, grit, metal particles, ceramics, etc.; can include multiple particles""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'inorganic particle '
                                                     'name;measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'mole per liter, milligram per '
                                                     'liter'}},
         'domain_of': ['Biosample'],
         'keywords': ['inorganic', 'particle'],
         'slot_uri': 'MIXS:0000664',
         'string_serialization': '{text};{float} {unit}'} })
    inside_lux: Optional[QuantityValue] = Field(default=None, title="inside lux light", description="""The recorded value at sampling time (power density)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'kilowatt per square metre'},
                         'units_alignment_excuse': {'tag': 'units_alignment_excuse',
                                                    'value': 'mixs_inconsistent'}},
         'domain_of': ['Biosample'],
         'keywords': ['inside', 'light'],
         'slot_uri': 'MIXS:0000168',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    int_wall_cond: Optional[DamagedEnum] = Field(default=None, title="interior wall condition", description="""The physical condition of the wall at the time of sampling; photos or video preferred; use drawings to indicate location of damaged areas""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'damaged'}],
         'keywords': ['condition', 'interior', 'wall'],
         'slot_uri': 'MIXS:0000813'} })
    iw_bt_date_well: Optional[TimestampValue] = Field(default=None, title="injection water breakthrough date of specific well", description="""Injection water breakthrough date per well following a secondary and/or tertiary recovery""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '2013-03-25T12:42:31+01:00'}],
         'keywords': ['date', 'water'],
         'slot_uri': 'MIXS:0001010'} })
    iwf: Optional[QuantityValue] = Field(default=None, title="injection water fraction", description="""Proportion of the produced fluids derived from injected water at the time of sampling. (e.g. 87%)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'percent'},
                         'storage_units': {'tag': 'storage_units', 'value': '%'}},
         'comments': ['percent or float?'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.79'}],
         'keywords': ['fraction', 'water'],
         'slot_uri': 'MIXS:0000455',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    last_clean: Optional[TimestampValue] = Field(default=None, title="last time swept/mopped/vacuumed", description="""The last time the floor was cleaned (swept, mopped, vacuumed)""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '2013-03-25T12:42:31+01:00'}],
         'keywords': ['time'],
         'slot_uri': 'MIXS:0000814'} })
    lat_lon: Optional[GeolocationValue] = Field(default=None, title="geographic location (latitude and longitude)", description="""The geographical origin of the sample as defined by latitude and longitude. The values should be reported in decimal degrees, limited to 8 decimal points, and in WGS84 system""", json_schema_extra = { "linkml_meta": {'domain_of': ['FieldResearchSite', 'Biosample'],
         'examples': [{'value': '50.586825 6.408977'}],
         'keywords': ['geographic', 'location'],
         'notes': ["This is currently a required field but it's not clear if this "
                   'should be required for human hosts'],
         'slot_uri': 'MIXS:0000009',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{lat} {lon}$'}} })
    light_intensity: Optional[QuantityValue] = Field(default=None, title="light intensity", description="""Measurement of light intensity""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'lux'},
                         'storage_units': {'tag': 'storage_units', 'value': 'lx'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.3 lx'}],
         'keywords': ['intensity', 'light'],
         'slot_uri': 'MIXS:0000706',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    light_regm: Optional[TextValue] = Field(default=None, title="light regimen", description="""Information about treatment(s) involving exposure to light, including both light intensity and quality""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'exposure type;light '
                                                     'intensity;light quality'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'lux; micrometer, nanometer, '
                                                     'angstrom'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'incandescant light;10 lux;450 nanometer'}],
         'keywords': ['light', 'regimen'],
         'slot_uri': 'MIXS:0000569',
         'string_serialization': '{text};{float} {unit};{float} {unit}'} })
    light_type: Optional[list[LightTypeEnum]] = Field(default=None, title="light type", description="""Application of light to achieve some practical or aesthetic effect. Lighting includes the use of both artificial light sources such as lamps and light fixtures, as well as natural illumination by capturing daylight. Can also include absence of light""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'desk lamp'}],
         'keywords': ['light', 'type'],
         'slot_uri': 'MIXS:0000769'} })
    link_addit_analys: Optional[TextValue] = Field(default=None, title="links to additional analysis", description="""Link to additional analysis results performed on the sample""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['link'],
         'slot_uri': 'MIXS:0000340',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL})$'}} })
    link_class_info: Optional[str] = Field(default=None, title="link to classification information", description="""Link to digitized soil maps or other soil classification information""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'PMID,DOI or url'}},
         'domain_of': ['Biosample'],
         'keywords': ['classification', 'information', 'link'],
         'slot_uri': 'MIXS:0000329',
         'string_serialization': '{termLabel} [{termID}]'} })
    link_climate_info: Optional[TextValue] = Field(default=None, title="link to climate information", description="""Link to climate resource""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['information', 'link'],
         'slot_uri': 'MIXS:0000328',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL})$'}} })
    lithology: Optional[LithologyEnum] = Field(default=None, title="lithology", description="""Hydrocarbon resource main lithology (Additional information: http://petrowiki.org/Lithology_and_rock_type_determination). If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Volcanic'}],
         'keywords': ['lithology'],
         'recommended': True,
         'slot_uri': 'MIXS:0000990'} })
    local_class: Optional[TextValue] = Field(default=None, title="soil_taxonomic/local classification", description="""Soil classification based on local soil classification system""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'local classification name'}},
         'domain_of': ['FieldResearchSite', 'Biosample'],
         'keywords': ['classification'],
         'slot_uri': 'MIXS:0000330'} })
    local_class_meth: Optional[str] = Field(default=None, title="soil_taxonomic/local classification method", description="""Reference or method used in determining the local soil classification""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['classification', 'method'],
         'slot_uri': 'MIXS:0000331',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL})$'}} })
    magnesium: Optional[QuantityValue] = Field(default=None, title="magnesium", description="""Concentration of magnesium in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'mole per liter, milligram per '
                                                     'liter, parts per million, '
                                                     'micromole per kilogram'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L|mol/L|umol/kg|mg/kg'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '52.8 umol/kg'}],
         'slot_uri': 'MIXS:0000431',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    max_occup: Optional[QuantityValue] = Field(default=None, title="maximum occupancy", description="""The maximum amount of people allowed in the indoor environment""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': '1'}},
         'domain_of': ['Biosample'],
         'keywords': ['maximum'],
         'slot_uri': 'MIXS:0000229',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{integer} {text}$'}} })
    mean_frict_vel: Optional[QuantityValue] = Field(default=None, title="mean friction velocity", description="""Measurement of mean friction velocity""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'meter per second'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm/s'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.5 m/s'}],
         'keywords': ['mean', 'velocity'],
         'slot_uri': 'MIXS:0000498',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    mean_peak_frict_vel: Optional[QuantityValue] = Field(default=None, title="mean peak friction velocity", description="""Measurement of mean peak friction velocity""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'meter per second'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm/s'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1 m/s'}],
         'keywords': ['mean', 'peak', 'velocity'],
         'slot_uri': 'MIXS:0000502',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    mech_struc: Optional[MechStrucEnum] = Field(default=None, title="mechanical structure", description="""mechanical structure: a moving structure""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'elevator'}],
         'slot_uri': 'MIXS:0000815'} })
    mechanical_damage: Optional[list[str]] = Field(default=None, title="mechanical damage", description="""Information about any mechanical damage exerted on the plant; can include multiple damages and sites""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'damage type;body site'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'pruning;bark'}],
         'slot_uri': 'MIXS:0001052',
         'string_serialization': '{text};{text}'} })
    methane: Optional[QuantityValue] = Field(default=None, title="methane", description="""Methane (gas) amount or concentration at the time of sampling""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter, parts per '
                                                     'billion, parts per million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppb]|[ppm]|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1800 [ppb]'}],
         'slot_uri': 'MIXS:0000101',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    micro_biomass_meth: Optional[str] = Field(default=None, title="microbial biomass method", description="""Reference or method used in determining microbial biomass""", json_schema_extra = { "linkml_meta": {'comments': ['slot name/scn was microbial_biomass_meth'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'http://dx.doi.org/10.1016/j.soilbio.2005.01.021'}],
         'keywords': ['biomass', 'method', 'microbial'],
         'slot_uri': 'MIXS:0000339'} })
    microbial_biomass: Optional[QuantityValue] = Field(default=None, title="microbial biomass", description="""The part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 micrometer. If you keep this, you would need to have correction factors used for conversion to the final units""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'ton, kilogram, gram per kilogram '
                                                     'soil'},
                         'units_alignment_excuse': {'tag': 'units_alignment_excuse',
                                                    'value': 'complex_unit'}},
         'domain_of': ['Biosample'],
         'keywords': ['biomass', 'microbial'],
         'slot_uri': 'MIXS:0000650',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    mineral_nutr_regm: Optional[list[TextValue]] = Field(default=None, title="mineral nutrient regimen", description="""Information about treatment involving the use of mineral supplements; should include the name of mineral nutrient, amount administered, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple mineral nutrient regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'mineral nutrient name;mineral '
                                                     'nutrient amount;treatment '
                                                     'interval and duration'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, mole per liter, milligram '
                                                     'per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'potassium;15 '
                                'gram;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['mineral', 'nutrient', 'regimen'],
         'slot_uri': 'MIXS:0000570',
         'string_serialization': '{text};{float} '
                                 '{unit};{Rn/start_time/end_time/duration}'} })
    misc_param: Optional[list[PropertyAssertion]] = Field(default=None, title="miscellaneous parameter", description="""Structured miscellaneous property assertions. Use when a value cannot cleanly fit an existing, policy-governed slot.""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'parameter name;measurement '
                                                     'value'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'Bicarbonate ion concentration;2075 micromole per '
                                'kilogram'}],
         'keywords': ['parameter'],
         'slot_uri': 'MIXS:0000752',
         'string_serialization': '{text};{float} {unit}',
         'todos': ['This slot should not be available in the submission portal.']} })
    n_alkanes: Optional[list[TextValue]] = Field(default=None, title="n-alkanes", description="""Concentration of n-alkanes; can include multiple n-alkanes""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'n-alkane name;measurement '
                                                     'value'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'n-hexadecane;100 milligram per liter'}],
         'slot_uri': 'MIXS:0000503',
         'string_serialization': '{text};{float} {unit}'} })
    nitrate: Optional[QuantityValue] = Field(default=None, title="nitrate", description="""Concentration of nitrate in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter, milligram '
                                                     'per liter, parts per million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '65 umol/L'}],
         'keywords': ['nitrate'],
         'slot_uri': 'MIXS:0000425',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    nitrite: Optional[QuantityValue] = Field(default=None, title="nitrite", description="""Concentration of nitrite in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter, milligram '
                                                     'per liter, parts per million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.5 umol/L'}],
         'keywords': ['nitrite'],
         'slot_uri': 'MIXS:0000426',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    nitro: Optional[QuantityValue] = Field(default=None, title="nitrogen", description="""Concentration of nitrogen (total)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'umol/L|%'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '4.2 umol/L'}],
         'keywords': ['nitrogen'],
         'slot_uri': 'MIXS:0000504',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    non_min_nutr_regm: Optional[list[str]] = Field(default=None, title="non-mineral nutrient regimen", description="""Information about treatment involving the exposure of plant to non-mineral nutrient such as oxygen, hydrogen or carbon; should include the name of non-mineral nutrient, amount administered, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple non-mineral nutrient regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, mole per liter, milligram '
                                                     'per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'https://phylogenomics.me/protocols/16s-pcr-protocol/'}],
         'keywords': ['non-mineral', 'nutrient', 'regimen'],
         'slot_uri': 'MIXS:0000571'} })
    number_pets: Optional[QuantityValue] = Field(default=None, title="number of pets", description="""The number of pets residing in the sampled space""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': '1'}},
         'domain_of': ['Biosample'],
         'keywords': ['number'],
         'slot_uri': 'MIXS:0000231',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{integer} {text}$'}} })
    number_plants: Optional[QuantityValue] = Field(default=None, title="number of houseplants", description="""The number of plant(s) in the sampling space""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': '1'}},
         'domain_of': ['Biosample'],
         'keywords': ['number'],
         'slot_uri': 'MIXS:0000230',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{integer} {text}$'}} })
    number_resident: Optional[QuantityValue] = Field(default=None, title="number of residents", description="""The number of individuals currently occupying in the sampling location""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': '1'}},
         'domain_of': ['Biosample'],
         'keywords': ['number'],
         'slot_uri': 'MIXS:0000232',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{integer} {text}$'}} })
    occup_density_samp: Optional[QuantityValue] = Field(default=None, title="occupant density at sampling", description="""Average number of occupants at time of sampling per square footage""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units',
                                           'value': '1/[sft_i]'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.1'}],
         'keywords': ['density'],
         'slot_uri': 'MIXS:0000217'} })
    occup_document: Optional[OccupDocumentEnum] = Field(default=None, title="occupancy documentation", description="""The type of documentation of occupancy""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'estimate'}],
         'keywords': ['documentation'],
         'slot_uri': 'MIXS:0000816'} })
    occup_samp: Optional[QuantityValue] = Field(default=None, title="occupancy at sampling", description="""Number of occupants present at time of sample within the given space""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': '1'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '10'}],
         'slot_uri': 'MIXS:0000772',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{integer} {text}$'}} })
    org_carb: Optional[QuantityValue] = Field(default=None, title="organic carbon", description="""Concentration of organic carbon""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units',
                                           'value': 'umol/L|%|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.015 mg/L'}],
         'keywords': ['carbon', 'organic'],
         'slot_uri': 'MIXS:0000508',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    org_count_qpcr_info: Optional[str] = Field(default=None, title="organism count qPCR information", description="""If qpcr was used for the cell count, the target gene name, the primer sequence and the cycling conditions should also be provided. (Example: 16S rrna; FWD:ACGTAGCTATGACGT REV:GTGCTAGTCGAGTAC; initial denaturation:90C_5min; denaturation:90C_2min; annealing:52C_30 sec; elongation:72C_30 sec; 90 C for 1 min; final elongation:72C_5min; 30 cycles)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'gene name;FWD:forward primer '
                                                     'sequence;REV:reverse primer '
                                                     'sequence;initial '
                                                     'denaturation:degrees_minutes;denaturation:degrees_minutes;annealing:degrees_minutes;elongation:degrees_minutes;final '
                                                     'elongation:degrees_minutes; '
                                                     'total cycles'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'number of cells per gram (or ml '
                                                     'or cm^2)'}},
         'domain_of': ['Biosample'],
         'keywords': ['count', 'information', 'organism'],
         'slot_uri': 'MIXS:0000099',
         'string_serialization': '{text};FWD:{dna};REV:{dna};initial '
                                 'denaturation:degrees_minutes;denaturation:degrees_minutes;annealing:degrees_minutes;elongation:degrees_minutes;final '
                                 'elongation:degrees_minutes; total cycles'} })
    org_matter: Optional[QuantityValue] = Field(default=None, title="organic matter", description="""Concentration of organic matter""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microgram per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'ug/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '200 ug/L'}],
         'keywords': ['organic'],
         'slot_uri': 'MIXS:0000204',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    org_nitro: Optional[QuantityValue] = Field(default=None, title="organic nitrogen", description="""Concentration of organic nitrogen""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'ug/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '4 ug/L'}],
         'keywords': ['nitrogen', 'organic'],
         'slot_uri': 'MIXS:0000205',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    org_particles: Optional[list[TextValue]] = Field(default=None, title="organic particles", description="""Concentration of particles such as faeces, hairs, food, vomit, paper fibers, plant material, humus, etc""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'particle name;measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram per liter'}},
         'domain_of': ['Biosample'],
         'keywords': ['organic', 'particle'],
         'slot_uri': 'MIXS:0000665',
         'string_serialization': '{text};{float} {unit}'} })
    organism_count: Optional[list[QuantityValue]] = Field(default=None, title="organism count", description="""Total cell count of any organism (or group of organisms) per gram, volume or area of sample, should include name of organism followed by count. The method that was used for the enumeration (e.g. qPCR, atp, mpn, etc.) Should also be provided. (example: total prokaryotes; 3.5e7 cells per ml; qpcr)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'organism name;measurement '
                                                     'value;enumeration'},
                         'storage_units': {'tag': 'storage_units', 'value': '1'}},
         'domain_of': ['Biosample'],
         'keywords': ['count', 'organism'],
         'slot_uri': 'MIXS:0000103',
         'string_serialization': '{text};{float} {unit};[ATP|MPN|qPCR|other]'} })
    owc_tvdss: Optional[QuantityValue] = Field(default=None, title="oil water contact depth", description="""Depth of the original oil water contact (OWC) zone (average) (m TVDSS)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm'}},
         'domain_of': ['Biosample'],
         'keywords': ['depth', 'oil', 'water'],
         'slot_uri': 'MIXS:0000405',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    oxy_stat_samp: Optional[OxyStatSampEnum] = Field(default=None, title="oxygenation status of sample", description="""Oxygenation status of sample""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'aerobic'}],
         'keywords': ['oxygen', 'sample', 'status'],
         'slot_uri': 'MIXS:0000753'} })
    oxygen: Optional[QuantityValue] = Field(default=None, title="oxygen", description="""Oxygen (gas) amount or concentration at the time of sampling""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter, parts per '
                                                     'million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '600 [ppm]'}],
         'keywords': ['oxygen'],
         'slot_uri': 'MIXS:0000104',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    part_org_carb: Optional[QuantityValue] = Field(default=None, title="particulate organic carbon", description="""Concentration of particulate organic carbon""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units',
                                           'value': 'ug/L|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.02 mg/L'}],
         'keywords': ['carbon', 'organic', 'particle', 'particulate'],
         'slot_uri': 'MIXS:0000515',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    part_org_nitro: Optional[QuantityValue] = Field(default=None, title="particulate organic nitrogen", description="""Concentration of particulate organic nitrogen""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microgram per liter, micromole '
                                                     'per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'ug/L|umol/L|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.3 umol/L'}],
         'keywords': ['nitrogen', 'organic', 'particle', 'particulate'],
         'slot_uri': 'MIXS:0000719',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    particle_class: Optional[list[TextValue]] = Field(default=None, title="particle classification", description="""Particles are classified, based on their size, into six general categories:clay, silt, sand, gravel, cobbles, and boulders; should include amount of particle preceded by the name of the particle type; can include multiple values""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'particle name;measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micrometer'}},
         'domain_of': ['Biosample'],
         'keywords': ['classification', 'particle'],
         'slot_uri': 'MIXS:0000206',
         'string_serialization': '{text};{float} {unit}'} })
    permeability: Optional[TextValue] = Field(default=None, title="permeability", description="""Measure of the ability of a hydrocarbon resource to allow fluids to pass through it. (Additional information: https://en.wikipedia.org/wiki/Permeability_(earth_sciences))""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value range'},
                         'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'mD'}},
         'domain_of': ['Biosample'],
         'slot_uri': 'MIXS:0000404',
         'string_serialization': '{integer} - {integer} {unit}'} })
    perturbation: Optional[list[TextValue]] = Field(default=None, title="perturbation", description="""Type of perturbation, e.g. chemical administration, physical disturbance, etc., coupled with perturbation regimen including how many times the perturbation was repeated, how long each perturbation lasted, and the start and end time of the entire perturbation period; can include multiple perturbation types""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'perturbation type '
                                                     'name;perturbation interval and '
                                                     'duration'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'antibiotic '
                                'addition;R2/2018-05-11T14:30Z/2018-05-11T19:30Z/P1H30M'}],
         'keywords': ['perturbation'],
         'slot_uri': 'MIXS:0000754',
         'string_serialization': '{text};{Rn/start_time/end_time/duration}'} })
    pesticide_regm: Optional[list[TextValue]] = Field(default=None, title="pesticide regimen", description="""Information about treatment involving use of insecticides; should include the name of pesticide, amount administered, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple pesticide regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, mole per liter, milligram '
                                                     'per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'pyrethrum;0.6 milligram per '
                                'liter;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['regimen'],
         'slot_uri': 'MIXS:0000573'} })
    petroleum_hydrocarb: Optional[QuantityValue] = Field(default=None, title="petroleum hydrocarbon", description="""Concentration of petroleum hydrocarbon""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.05 umol/L'}],
         'keywords': ['hydrocarbon', 'petroleum'],
         'slot_uri': 'MIXS:0000516',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    ph: Optional[float] = Field(default=None, title="pH", description="""pH measurement of the sample, or liquid portion of sample, or aqueous phase of the fluid""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '7.2'}],
         'keywords': ['ph'],
         'slot_uri': 'MIXS:0001001'} })
    ph_meth: Optional[TextValue] = Field(default=None, title="pH method", description="""Reference or method used in determining pH""", json_schema_extra = { "linkml_meta": {'comments': ['This can include a link to the instrument used or a citation '
                      'for the method.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'https://www.southernlabware.com/pc9500-benchtop-ph-conductivity-meter-kit-ph-accuracy-2000mv-ph-range-2-000-to-20-000.html?gclid=Cj0KCQiAwJWdBhCYARIsAJc4idCO5vtvbVMf545fcvdROFqa6zjzNSoywNx6K4k9Coo9cCc2pybtvGsaAiR0EALw_wcB'},
                      {'value': 'https://doi.org/10.2136/sssabookser5.3.c16'}],
         'keywords': ['method', 'ph'],
         'slot_uri': 'MIXS:0001106'} })
    ph_regm: Optional[list[TextValue]] = Field(default=None, title="pH regimen", description="""Information about treatment involving exposure of plants to varying levels of ph of the growth media, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple regimen""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '7.6;R2/2018-05-11:T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['ph', 'regimen'],
         'slot_uri': 'MIXS:0001056'} })
    phaeopigments: Optional[list[TextValue]] = Field(default=None, title="phaeopigments", description="""Concentration of phaeopigments; can include multiple phaeopigments""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'phaeopigment name;measurement '
                                                     'value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per cubic meter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '2.5 milligram per cubic meter'}],
         'slot_uri': 'MIXS:0000180',
         'string_serialization': '{text};{float} {unit}'} })
    phosphate: Optional[QuantityValue] = Field(default=None, title="phosphate", description="""Concentration of phosphate""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.7 umol/L'}],
         'keywords': ['phosphate'],
         'slot_uri': 'MIXS:0000505',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    phosplipid_fatt_acid: Optional[list[TextValue]] = Field(default=None, title="phospholipid fatty acid", description="""Concentration of phospholipid fatty acids; can include multiple values""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'phospholipid fatty acid '
                                                     'name;measurement value'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '2.98 milligram per liter'}],
         'slot_uri': 'MIXS:0000181',
         'string_serialization': '{text};{float} {unit}'} })
    photon_flux: Optional[QuantityValue] = Field(default=None, title="photon flux", description="""Measurement of photon flux""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'number of photons per second per '
                                                     'unit area'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'umol/m2/s'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '3.926 umol/m2/s'}],
         'slot_uri': 'MIXS:0000725',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    plant_growth_med: Optional[Union[ControlledTermValue,ControlledIdentifiedTermValue]] = Field(default=None, title="plant growth medium", description="""Specification of the media for growing the plants or tissue cultured samples, e.g. soil, aeroponic, hydroponic, in vitro solid culture medium, in vitro liquid culture medium. Recommended value is a specific value from EO:plant growth medium (follow this link for terms http://purl.obolibrary.org/obo/EO_0007147) or other controlled vocabulary""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'EO or enumeration'}},
         'domain_of': ['Biosample'],
         'keywords': ['growth', 'plant'],
         'slot_uri': 'MIXS:0001057',
         'string_serialization': '{termLabel} [{termID}] or [husk|other artificial '
                                 'liquid medium|other artificial solid medium|peat '
                                 'moss|perlite|pumice|sand|soil|vermiculite|water]'} })
    plant_product: Optional[TextValue] = Field(default=None, title="plant product", description="""Substance produced by the plant, where the sample was obtained from""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'product name'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'xylem sap [PO:0025539]'}],
         'keywords': ['plant', 'product'],
         'slot_uri': 'MIXS:0001058'} })
    plant_sex: Optional[PlantSexEnum] = Field(default=None, title="plant sex", description="""Sex of the reproductive parts on the whole plant, e.g. pistillate, staminate, monoecieous, hermaphrodite""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Hermaphroditic'}],
         'keywords': ['plant'],
         'slot_uri': 'MIXS:0001059'} })
    plant_struc: Optional[Union[ControlledTermValue,ControlledIdentifiedTermValue]] = Field(default=None, title="plant structure", description="""Name of plant structure the sample was obtained from; for Plant Ontology (PO) (v releases/2017-12-14) terms, see http://purl.bioontology.org/ontology/PO, e.g. petiole epidermis (PO_0000051). If an individual flower is sampled, the sex of it can be recorded here""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'epidermis [PO:0005679]'}],
         'keywords': ['plant'],
         'slot_uri': 'MIXS:0001060',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{termLabel} \\[{termID}\\]$'}} })
    pollutants: Optional[list[TextValue]] = Field(default=None, title="pollutants", description="""Pollutant types and, amount or concentrations measured at the time of sampling; can report multiple pollutants by entering numeric values preceded by name of pollutant""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'pollutant name;measurement '
                                                     'value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, mole per liter, milligram '
                                                     'per liter, microgram per cubic '
                                                     'meter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'lead;0.15 microgram per cubic meter'}],
         'slot_uri': 'MIXS:0000107',
         'string_serialization': '{text};{float} {unit}'} })
    porosity: Optional[TextValue] = Field(default=None, title="porosity", description="""Porosity of deposited sediment is volume of voids divided by the total volume of sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value or range'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'percentage'}},
         'domain_of': ['Biosample'],
         'keywords': ['porosity'],
         'slot_uri': 'MIXS:0000211',
         'string_serialization': '{float} - {float} {unit}'} })
    potassium: Optional[QuantityValue] = Field(default=None, title="potassium", description="""Concentration of potassium in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter, parts per '
                                                     'million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L|mg/kg'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '463 mg/L'}],
         'slot_uri': 'MIXS:0000430',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    pour_point: Optional[QuantityValue] = Field(default=None, title="pour point", description="""Temperature at which a liquid becomes semi solid and loses its flow characteristics. In crude oil a high  pour point  is generally associated with a high paraffin content, typically found in crude deriving from a larger proportion of plant material. (soure: https://en.wikipedia.org/wiki/pour_point)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'domain_of': ['Biosample'],
         'slot_uri': 'MIXS:0000127',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    pre_treatment: Optional[TextValue] = Field(default=None, title="pre-treatment", description="""The process of pre-treatment removes materials that can be easily collected from the raw wastewater""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'pre-treatment type'}},
         'domain_of': ['Biosample'],
         'slot_uri': 'MIXS:0000348'} })
    pres_animal_insect: Optional[str] = Field(default=None, title="presence of pets, animals, or insects", description="""The type and number of animals or insects present in the sampling space""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'enumeration;count'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'cat;5'}],
         'keywords': ['animal', 'presence'],
         'slot_uri': 'MIXS:0000819',
         'string_serialization': '[cat|dog|rodent|snake|other];{integer}'} })
    pressure: Optional[QuantityValue] = Field(default=None, title="pressure", description="""Pressure to which the sample is subject to, in atmospheres""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'atmosphere'},
                         'storage_units': {'tag': 'storage_units', 'value': 'atm'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '50 atm'}],
         'keywords': ['pressure'],
         'slot_uri': 'MIXS:0000412',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    prev_land_use_meth: Optional[str] = Field(default=None, title="history/previous land use method", description="""Reference or method used in determining previous land use and dates""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['history', 'land', 'method', 'use'],
         'slot_uri': 'MIXS:0000316',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL})$'}} })
    previous_land_use: Optional[str] = Field(default=None, title="history/previous land use", description="""Previous land use and dates""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'land use name;date'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'fallow;2018-05-11T14:30Z'}],
         'keywords': ['history', 'land', 'use'],
         'slot_uri': 'MIXS:0000315',
         'string_serialization': '{text};{timestamp}'} })
    primary_prod: Optional[QuantityValue] = Field(default=None, title="primary production", description="""Measurement of primary production, generally measured as isotope uptake""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per cubic meter per '
                                                     'day, gram per square meter per '
                                                     'day'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'g/m2/d|mg/m3/d'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '100 mg/m3/d'}],
         'keywords': ['primary', 'production'],
         'slot_uri': 'MIXS:0000728',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    primary_treatment: Optional[TextValue] = Field(default=None, title="primary treatment", description="""The process to produce both a generally homogeneous liquid capable of being treated biologically and a sludge that can be separately treated or processed""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'primary treatment type'}},
         'domain_of': ['Biosample'],
         'keywords': ['primary', 'treatment'],
         'slot_uri': 'MIXS:0000349'} })
    prod_rate: Optional[QuantityValue] = Field(default=None, title="production rate", description="""Oil and/or gas production rates per well (e.g. 524 m3 / day)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'cubic meter per day'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm3/d'}},
         'domain_of': ['Biosample'],
         'keywords': ['production', 'rate'],
         'recommended': True,
         'slot_uri': 'MIXS:0000452',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    prod_start_date: Optional[TimestampValue] = Field(default=None, title="production start date", description="""Date of field's first production""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '2013-03-25T12:42:31+01:00'}],
         'keywords': ['date', 'production', 'start'],
         'recommended': True,
         'slot_uri': 'MIXS:0001008'} })
    profile_position: Optional[ProfilePositionEnum] = Field(default=None, title="profile position", description="""Cross-sectional position in the hillslope where sample was collected.sample area position in relation to surrounding areas""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'summit'}],
         'slot_uri': 'MIXS:0001084'} })
    quad_pos: Optional[QuadPosEnum] = Field(default=None, title="quadrant position", description="""The quadrant position of the sampling room within the building""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'West side'}],
         'slot_uri': 'MIXS:0000820'} })
    radiation_regm: Optional[list[TextValue]] = Field(default=None, title="radiation regimen", description="""Information about treatment involving exposure of plant or a plant part to a particular radiation regimen; should include the radiation type, amount or intensity administered, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple radiation regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'radiation type name;radiation '
                                                     'amount;treatment interval and '
                                                     'duration'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'rad, gray'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'gamma radiation;60 '
                                'gray;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['regimen'],
         'slot_uri': 'MIXS:0000575',
         'string_serialization': '{text};{float} '
                                 '{unit};{Rn/start_time/end_time/duration}'} })
    rainfall_regm: Optional[list[TextValue]] = Field(default=None, title="rainfall regimen", description="""Information about treatment involving an exposure to a given amount of rainfall, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value;treatment '
                                                     'interval and duration'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'millimeter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '15 '
                                'millimeter;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['rain', 'regimen'],
         'slot_uri': 'MIXS:0000576',
         'string_serialization': '{float} {unit};{Rn/start_time/end_time/duration}'} })
    reactor_type: Optional[TextValue] = Field(default=None, title="reactor type", description="""Anaerobic digesters can be designed and engineered to operate using a number of different process configurations, as batch or continuous, mesophilic, high solid or low solid, and single stage or multistage""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'reactor type name'}},
         'domain_of': ['Biosample'],
         'keywords': ['type'],
         'slot_uri': 'MIXS:0000350'} })
    redox_potential: Optional[QuantityValue] = Field(default=None, title="redox potential", description="""Redox potential, measured relative to a hydrogen cell, indicating oxidation or reduction potential""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'millivolt'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mV'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '300 mV'}],
         'slot_uri': 'MIXS:0000182',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    rel_air_humidity: Optional[QuantityValue] = Field(default=None, title="relative air humidity", description="""Partial vapor and air pressure, density of the vapor and air, or by the actual mass of the vapor and air""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'percentage'},
                         'storage_units': {'tag': 'storage_units', 'value': '%'}},
         'comments': ['percent or float?'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.8'}],
         'keywords': ['air', 'humidity', 'relative'],
         'slot_uri': 'MIXS:0000121',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    rel_humidity_out: Optional[QuantityValue] = Field(default=None, title="outside relative humidity", description="""The recorded outside relative humidity value at the time of sampling""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram of air, kilogram of air'},
                         'units_alignment_excuse': {'tag': 'units_alignment_excuse',
                                                    'value': 'mixs_inconsistent'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '12 per kilogram of air'}],
         'keywords': ['humidity', 'relative'],
         'slot_uri': 'MIXS:0000188',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    rel_samp_loc: Optional[RelSampLocEnum] = Field(default=None, title="relative sampling location", description="""The sampling location within the train car""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'center of car'}],
         'keywords': ['location', 'relative'],
         'slot_uri': 'MIXS:0000821'} })
    reservoir: Optional[TextValue] = Field(default=None, title="reservoir name", description="""Name of the reservoir (e.g. Carapebus)""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'], 'recommended': True, 'slot_uri': 'MIXS:0000303'} })
    resins_pc: Optional[TextValue] = Field(default=None, title="resins wt%", description="""Saturate, Aromatic, Resin and Asphaltene  (SARA) is an analysis method that divides  crude oil  components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'percent'}},
         'domain_of': ['Biosample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000134',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{name};{float} {unit}$'}} })
    room_air_exch_rate: Optional[QuantityValue] = Field(default=None, title="room air exchange rate", description="""The rate at which outside air replaces indoor air in a given space""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'liter per hour'},
                         'storage_units': {'tag': 'storage_units', 'value': 'L/h'}},
         'domain_of': ['Biosample'],
         'keywords': ['air', 'rate', 'room'],
         'slot_uri': 'MIXS:0000169',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    room_architec_elem: Optional[str] = Field(default=None, title="room architectural elements", description="""The unique details and component parts that, together, form the architecture of a distinguishable space within a built structure""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'], 'keywords': ['room'], 'slot_uri': 'MIXS:0000233'} })
    room_condt: Optional[RoomCondtEnum] = Field(default=None, title="room condition", description="""The condition of the room at the time of sampling""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'new'}],
         'keywords': ['condition', 'room'],
         'slot_uri': 'MIXS:0000822'} })
    room_connected: Optional[RoomConnectedEnum] = Field(default=None, title="rooms connected by a doorway", description="""List of rooms connected to the sampling room by a doorway""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'office'}],
         'keywords': ['doorway', 'room'],
         'slot_uri': 'MIXS:0000826'} })
    room_count: Optional[TextValue] = Field(default=None, title="room count", description="""The total count of rooms in the built structure including all room types""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['count', 'room'],
         'slot_uri': 'MIXS:0000234'} })
    room_dim: Optional[TextValue] = Field(default=None, title="room dimensions", description="""The length, width and height of sampling room""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'meter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '4 meter x 4 meter x 4 meter'}],
         'keywords': ['dimensions', 'room'],
         'slot_uri': 'MIXS:0000192',
         'string_serialization': '{integer} {unit} x {integer} {unit} x {integer} '
                                 '{unit}'} })
    room_door_dist: Optional[TextValue] = Field(default=None, title="room door distance", description="""Distance between doors (meters) in the hallway between the sampling room and adjacent rooms""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'meter'}},
         'domain_of': ['Biosample'],
         'keywords': ['distance', 'door', 'room'],
         'slot_uri': 'MIXS:0000193',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{integer} {text}$'}} })
    room_door_share: Optional[TextValue] = Field(default=None, title="rooms that share a door with sampling room", description="""List of room(s) (room number, room name) sharing a door with the sampling room""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['door', 'room'],
         'slot_uri': 'MIXS:0000242',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{room_name};{room_number}$'}} })
    room_hallway: Optional[TextValue] = Field(default=None, title="rooms that are on the same hallway", description="""List of room(s) (room number, room name) located in the same hallway as sampling room""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['hallway', 'room'],
         'slot_uri': 'MIXS:0000238',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{room_name};{room_number}$'}} })
    room_loc: Optional[RoomLocEnum] = Field(default=None, title="room location in building", description="""The position of the room within the building""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'interior room'}],
         'keywords': ['location', 'room'],
         'slot_uri': 'MIXS:0000823'} })
    room_moist_dam_hist: Optional[int] = Field(default=None, title="room moisture damage or mold history", description="""The history of moisture damage or mold in the past 12 months. Number of events of moisture damage or mold observed""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['history', 'moisture', 'room'],
         'slot_uri': 'MIXS:0000235'} })
    room_net_area: Optional[TextValue] = Field(default=None, title="room net area", description="""The net floor area of sampling room. Net area excludes wall thicknesses""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'square feet, square meter'}},
         'domain_of': ['Biosample'],
         'keywords': ['area', 'room'],
         'slot_uri': 'MIXS:0000194',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{integer} {text}$'}} })
    room_occup: Optional[QuantityValue] = Field(default=None, title="room occupancy", description="""Count of room occupancy at time of sampling""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': '1'}},
         'domain_of': ['Biosample'],
         'keywords': ['room'],
         'slot_uri': 'MIXS:0000236',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{integer} {text}$'}} })
    room_samp_pos: Optional[RoomSampPosEnum] = Field(default=None, title="room sampling position", description="""The horizontal sampling position in the room relative to architectural elements""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'south corner'}],
         'keywords': ['room'],
         'slot_uri': 'MIXS:0000824'} })
    room_type: Optional[str] = Field(default=None, title="room type", description="""The main purpose or activity of the sampling room. A room is any distinguishable space within a structure""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'enumeration'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'bathroom'}],
         'keywords': ['room', 'type'],
         'slot_uri': 'MIXS:0000825',
         'string_serialization': '[attic|bathroom|closet|conference '
                                 'room|elevator|examining room|hallway|kitchen|mail '
                                 'room|private office|open '
                                 'office|stairwell|,restroom|lobby|vestibule|mechanical '
                                 'or electrical room|data '
                                 'center|laboratory_wet|laboratory_dry|gymnasium|natatorium|auditorium|lockers|cafe|warehouse]'} })
    room_vol: Optional[TextValue] = Field(default=None, title="room volume", description="""Volume of sampling room""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'cubic feet, cubic meter'}},
         'domain_of': ['Biosample'],
         'keywords': ['room', 'volume'],
         'slot_uri': 'MIXS:0000195',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{integer} {text}$'}} })
    room_wall_share: Optional[TextValue] = Field(default=None, title="rooms that share a wall with sampling room", description="""List of room(s) (room number, room name) sharing a wall with the sampling room""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['room', 'wall'],
         'slot_uri': 'MIXS:0000243',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{room_name};{room_number}$'}} })
    room_window_count: Optional[int] = Field(default=None, title="room window count", description="""Number of windows in the room""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['count', 'room', 'window'],
         'slot_uri': 'MIXS:0000237'} })
    root_cond: Optional[TextValue] = Field(default=None, title="rooting conditions", description="""Relevant rooting conditions such as field plot size, sowing density, container dimensions, number of plants per container""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'http://himedialabs.com/TD/PT158.pdf'}],
         'keywords': ['condition'],
         'slot_uri': 'MIXS:0001061',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL}|{text})$'}} })
    root_med_carbon: Optional[TextValue] = Field(default=None, title="rooting medium carbon", description="""Source of organic carbon in the culture rooting medium; e.g. sucrose""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'carbon source name;measurement '
                                                     'value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'sucrose'}],
         'keywords': ['carbon'],
         'slot_uri': 'MIXS:0000577',
         'string_serialization': '{text};{float} {unit}'} })
    root_med_macronutr: Optional[TextValue] = Field(default=None, title="rooting medium macronutrients", description="""Measurement of the culture rooting medium macronutrients (N,P, K, Ca, Mg, S); e.g. KH2PO4 (170 mg/L)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'macronutrient name;measurement '
                                                     'value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'KH2PO4;170  milligram per liter'}],
         'keywords': ['macronutrients'],
         'slot_uri': 'MIXS:0000578',
         'string_serialization': '{text};{float} {unit}'} })
    root_med_micronutr: Optional[TextValue] = Field(default=None, title="rooting medium micronutrients", description="""Measurement of the culture rooting medium micronutrients (Fe, Mn, Zn, B, Cu, Mo); e.g. H3BO3 (6.2 mg/L)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'micronutrient name;measurement '
                                                     'value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'H3BO3;6.2  milligram per liter'}],
         'keywords': ['micronutrients'],
         'slot_uri': 'MIXS:0000579',
         'string_serialization': '{text};{float} {unit}'} })
    root_med_ph: Optional[QuantityValue] = Field(default=None, title="rooting medium pH", description="""pH measurement of the culture rooting medium; e.g. 5.5""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': '[pH]'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '7.5'}],
         'keywords': ['ph'],
         'slot_uri': 'MIXS:0001062'} })
    root_med_regl: Optional[TextValue] = Field(default=None, title="rooting medium regulators", description="""Growth regulators in the culture rooting medium such as cytokinins, auxins, gybberellins, abscisic acid; e.g. 0.5  mg/L NAA""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'regulator name;measurement '
                                                     'value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'abscisic acid;0.75 milligram per liter'}],
         'slot_uri': 'MIXS:0000581',
         'string_serialization': '{text};{float} {unit}'} })
    root_med_solid: Optional[TextValue] = Field(default=None, title="rooting medium solidifier", description="""Specification of the solidifying agent in the culture rooting medium; e.g. agar""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'agar'}],
         'slot_uri': 'MIXS:0001063'} })
    root_med_suppl: Optional[TextValue] = Field(default=None, title="rooting medium organic supplements", description="""Organic supplements of the culture rooting medium, such as vitamins, amino acids, organic acids, antibiotics activated charcoal; e.g. nicotinic acid (0.5  mg/L)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'supplement name;measurement '
                                                     'value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'nicotinic acid;0.5 milligram per liter'}],
         'keywords': ['organic'],
         'slot_uri': 'MIXS:0000580',
         'string_serialization': '{text};{float} {unit}'} })
    salinity: Optional[QuantityValue] = Field(default=None, title="salinity", description="""The total concentration of all dissolved salts in a liquid or solid sample. While salinity can be measured by a complete chemical analysis, this method is difficult and time consuming. More often, it is instead derived from the conductivity measurement. This is known as practical salinity. These derivations compare the specific conductance of the sample to a salinity standard such as seawater""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'practical salinity unit, '
                                                     'percentage'},
                         'storage_units': {'tag': 'storage_units', 'value': '%|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '70 mg/L'}],
         'keywords': ['salinity'],
         'slot_uri': 'MIXS:0000183',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    salinity_meth: Optional[str] = Field(default=None, title="salinity method", description="""Reference or method used in determining salinity.""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'PMID,DOI or url'}},
         'comments': ['Legacy MIxS slot removed from GSC MIxS v6.2.2. Retained for '
                      'submission-schema compatibility.'],
         'domain_of': ['Biosample'],
         'slot_uri': 'MIXS:0000341',
         'structured_pattern': {'interpolated': True, 'syntax': '^{PMID}|{DOI}|{URL}$'}} })
    salt_regm: Optional[list[TextValue]] = Field(default=None, title="salt regimen", description="""Information about treatment involving use of salts as supplement to liquid and soil growth media; should include the name of salt, amount administered, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple salt regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, microgram, mole per liter, '
                                                     'gram per liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'NaCl;5 gram per '
                                'liter;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['regimen', 'salt'],
         'slot_uri': 'MIXS:0000582'} })
    samp_capt_status: Optional[SampCaptStatusEnum] = Field(default=None, title="sample capture status", description="""Reason for the sample""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'farm sample'}],
         'keywords': ['sample', 'status'],
         'slot_uri': 'MIXS:0000860'} })
    samp_collec_device: Optional[str] = Field(default=None, title="sample collection device", description="""The device used to collect an environmental sample. This field accepts terms listed under environmental sampling device (http://purl.obolibrary.org/obo/ENVO). This field also accepts terms listed under specimen collection device (http://purl.obolibrary.org/obo/GENEPIO_0002094)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'device name'}},
         'domain_of': ['Biosample'],
         'keywords': ['device', 'sample'],
         'slot_uri': 'MIXS:0000002',
         'string_serialization': '{termLabel} [{termID}]|{text}',
         'structured_aliases': [{'contexts': ['https://github.com/GenomicsStandardsConsortium/mixs/releases/tag/v6.2.2'],
                                 'literal_form': 'samp_collect_device'}]} })
    samp_collec_method: Optional[str] = Field(default=None, title="sample collection method", description="""The method employed for collecting the sample""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['method', 'sample'],
         'slot_uri': 'MIXS:0001225',
         'structured_aliases': [{'contexts': ['https://github.com/GenomicsStandardsConsortium/mixs/releases/tag/v6.2.2'],
                                 'literal_form': 'samp_collect_method'}]} })
    samp_collect_point: Optional[SampCollectPointEnum] = Field(default=None, title="sample collection point", description="""Sampling point on the asset were sample was collected (e.g. Wellhead, storage tank, separator, etc). If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'well'}],
         'keywords': ['sample'],
         'slot_uri': 'MIXS:0001015'} })
    samp_dis_stage: Optional[SampDisStageEnum] = Field(default=None, title="sample disease stage", description="""Stage of the disease at the time of sample collection, e.g. inoculation, penetration, infection, growth and reproduction, dissemination of pathogen""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'infection'}],
         'keywords': ['disease', 'sample'],
         'slot_uri': 'MIXS:0000249'} })
    samp_floor: Optional[str] = Field(default=None, title="sampling floor", description="""The floor of the building, where the sampling room is located""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'enumeration'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '4th floor'}],
         'keywords': ['floor'],
         'slot_uri': 'MIXS:0000828'} })
    samp_loc_corr_rate: Optional[TextValue] = Field(default=None, title="corrosion rate at sample location", description="""Metal corrosion rate is the speed of metal deterioration due to environmental conditions. As environmental conditions change corrosion rates change accordingly. Therefore, long term corrosion rates are generally more informative than short term rates and for that reason they are preferred during reporting. In the case of suspected MIC, corrosion rate measurements at the time of sampling might provide insights into the involvement of certain microbial community members in MIC as well as potential microbial interplays""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'millimeter per year'}},
         'domain_of': ['Biosample'],
         'keywords': ['location', 'rate', 'sample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000136',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{float} *- *{float} {unit}$'}} })
    samp_mat_process: Optional[Union[ControlledTermValue,ControlledIdentifiedTermValue]] = Field(default=None, title="sample material processing", description="""A brief description of any processing applied to the sample during or after retrieving the sample from environment, or a link to the relevant protocol(s) performed""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'filtering of seawater, storing samples in ethanol'}],
         'keywords': ['material', 'process', 'sample'],
         'slot_uri': 'MIXS:0000016'} })
    samp_md: Optional[QuantityValue] = Field(default=None, title="sample measured depth", description="""In non deviated well, measured depth is equal to the true vertical depth, TVD (TVD=TVDSS plus the reference or datum it refers to). In deviated wells, the MD is the length of trajectory of the borehole measured from the same reference or datum. Common datums used are ground level (GL), drilling rig floor (DF), rotary table (RT), kelly bushing (KB) and mean sea level (MSL). If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value;enumeration'},
                         'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1534 m'}],
         'keywords': ['depth', 'measurement', 'sample'],
         'slot_uri': 'MIXS:0000413',
         'string_serialization': '{float} {unit};[GL|DF|RT|KB|MSL|other]'} })
    samp_name: Optional[str] = Field(default=None, title="sample name", description="""A local identifier or name that for the material sample used for extracting nucleic acids, and subsequent sequencing. It can refer either to the original material collected or to any derived sub-samples. It can have any format, but we suggest that you make it concise, unique and consistent within your lab, and as informative as possible. INSDC requires every sample name from a single Submitter to be unique. Use of a globally unique identifier for the field source_mat_id is recommended in addition to sample_name""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': ''}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'ISDsoil1'}],
         'keywords': ['sample'],
         'slot_uri': 'MIXS:0001107'} })
    samp_preserv: Optional[TextValue] = Field(default=None, title="preservative added to sample", description="""Preservative added to the sample (e.g. Rnalater, alcohol, formaldehyde, etc.). Where appropriate include volume added (e.g. Rnalater; 2 ml)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milliliter'}},
         'domain_of': ['Biosample'],
         'keywords': ['sample'],
         'slot_uri': 'MIXS:0000463',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{name};{float} {unit}$'}} })
    samp_room_id: Optional[TextValue] = Field(default=None, title="sampling room ID or name", description="""Sampling room number. This ID should be consistent with the designations on the building floor plans""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['identifier', 'room'],
         'slot_uri': 'MIXS:0000244'} })
    samp_size: Optional[QuantityValue] = Field(default=None, title="amount or size of sample collected", description="""The total amount or size (volume (ml), mass (g) or area (m2) ) of sample collected""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units',
                                           'value': 'L|g|mL|mg'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '5 L'}],
         'keywords': ['sample', 'size'],
         'slot_uri': 'MIXS:0000001',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    samp_sort_meth: Optional[list[str]] = Field(default=None, title="sample size sorting method", description="""Method by which samples are sorted; open face filter collecting total suspended particles, prefilter to remove particles larger than X micrometers in diameter, where common values of X would be 10 and 2.5 full size sorting in a cascade impactor""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['method', 'sample', 'size'],
         'slot_uri': 'MIXS:0000216'} })
    samp_store_dur: Optional[TextValue] = Field(default=None, title="sample storage duration", description="""Duration for which the sample was stored. Indicate the duration for which the sample was stored written in ISO 8601 format""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'P1Y6M'}],
         'keywords': ['duration', 'period', 'sample', 'storage'],
         'slot_uri': 'MIXS:0000116',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{duration}$'}} })
    samp_store_loc: Optional[TextValue] = Field(default=None, title="sample storage location", description="""Location at which sample was stored, usually name of a specific freezer/room""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'location name'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'Freezer no:5'}],
         'keywords': ['location', 'sample', 'storage'],
         'slot_uri': 'MIXS:0000755'} })
    samp_store_temp: Optional[QuantityValue] = Field(default=None, title="sample storage temperature", description="""Temperature at which sample was stored, e.g. -80 degree Celsius""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '-80 Cel'}],
         'keywords': ['sample', 'storage', 'temperature'],
         'slot_uri': 'MIXS:0000110',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    samp_subtype: Optional[SampSubtypeEnum] = Field(default=None, title="sample subtype", description="""Name of sample sub-type. For example if \"sample type\" is \"Produced Water\" then subtype could be \"Oil Phase\" or \"Water Phase\". If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'biofilm'}],
         'keywords': ['sample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000999'} })
    samp_taxon_id: Optional[ControlledIdentifiedTermValue] = Field(default=None, title="taxonomy ID of DNA sample", description="""NCBI taxon id of the sample.  Maybe be a single taxon or mixed taxa sample. Use 'synthetic metagenome  for mock community/positive controls, or 'blank sample' for negative controls""", json_schema_extra = { "linkml_meta": {'comments': ['coal metagenome [NCBITaxon:1260732] would be a reasonable '
                      'has_raw_value'],
         'domain_of': ['Biosample'],
         'keywords': ['dna', 'identifier', 'sample', 'taxon'],
         'slot_uri': 'MIXS:0001320',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{text} \\[{NCBItaxon_id}\\]$'}} })
    samp_time_out: Optional[TextValue] = Field(default=None, title="sampling time outside", description="""The recent and long term history of outside sampling""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value', 'value': 'time'},
                         'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'hour'}},
         'domain_of': ['Biosample'],
         'keywords': ['time'],
         'slot_uri': 'MIXS:0000196',
         'string_serialization': '{float}'} })
    samp_transport_cond: Optional[TextValue] = Field(default=None, title="sample transport conditions", description="""Sample transport duration (in days or hrs) and temperature the sample was exposed to (e.g. 5.5 days; 20   C)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value;measurement '
                                                     'value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'days;degree Celsius'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '5 days;-20 degree Celsius'}],
         'keywords': ['condition', 'sample', 'transport'],
         'slot_uri': 'MIXS:0000410',
         'string_serialization': '{float} {unit};{float} {unit}'} })
    samp_tvdss: Optional[TextValue] = Field(default=None, title="sample true vertical depth subsea", description="""Depth of the sample i.e. The vertical distance between the sea level and the sampled position in the subsurface. Depth can be reported as an interval for subsurface samples e.g. 1325.75-1362.25 m""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value or measurement '
                                                     'value range'},
                         'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'meter'}},
         'domain_of': ['Biosample'],
         'keywords': ['depth', 'sample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000409',
         'string_serialization': '{float}-{float} {unit}'} })
    samp_type: Optional[TextValue] = Field(default=None, title="sample type", description="""The type of material from which the sample was obtained. For the Hydrocarbon package, samples include types like core, rock trimmings, drill cuttings, piping section, coupon, pigging debris, solid deposit, produced fluid, produced water, injected water, swabs, etc. For the Food Package, samples are usually categorized as food, body products or tissues, or environmental material. This field accepts terms listed under environmental specimen (http://purl.obolibrary.org/obo/GENEPIO_0001246)""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'built environment sample [GENEPIO:0001248]'}],
         'keywords': ['sample', 'type'],
         'slot_uri': 'MIXS:0000998',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{termLabel} \\[{termID}\\]$'}} })
    samp_weather: Optional[SampWeatherEnum] = Field(default=None, title="sampling day weather", description="""The weather on the sampling day""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'foggy'}],
         'keywords': ['day', 'weather'],
         'slot_uri': 'MIXS:0000827'} })
    samp_well_name: Optional[TextValue] = Field(default=None, title="sample well name", description="""Name of the well (e.g. BXA1123) where sample was taken""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['sample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000296'} })
    saturates_pc: Optional[TextValue] = Field(default=None, title="saturates wt%", description="""Saturate, Aromatic, Resin and Asphaltene  (SARA) is an analysis method that divides  crude oil  components according to their polarizability and polarity. There are three main methods to obtain SARA results. The most popular one is known as the Iatroscan TLC-FID and is referred to as IP-143 (source: https://en.wikipedia.org/wiki/Saturate,_aromatic,_resin_and_asphaltene)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'percent'}},
         'domain_of': ['Biosample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000131',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{name};{float} {unit}$'}} })
    season: Optional[SeasonEnum] = Field(default=None, title="season", description="""The season when sampling occurred. Any of the four periods into which the year is divided by the equinoxes and solstices. This field accepts terms listed under season (http://purl.obolibrary.org/obo/NCIT_C94729)""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'autumn [NCIT:C94733]'}],
         'keywords': ['season'],
         'slot_uri': 'MIXS:0000829'} })
    season_environment: Optional[list[TextValue]] = Field(default=None, title="seasonal environment", description="""Treatment involving an exposure to a particular season (e.g. Winter, summer, rabi, rainy etc.), treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'rainy;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['environment', 'season'],
         'slot_uri': 'MIXS:0001068'} })
    season_precpt: Optional[QuantityValue] = Field(default=None, title="average seasonal precipitation", description="""The average of all seasonal precipitation values known, or an estimated equivalent value derived by such methods as regional indexes or Isohyetal maps""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'millimeter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mm'}},
         'comments': ['Seasons are defined as spring (March, April, May), summer '
                      '(June, July, August), autumn (September, October, November) and '
                      'winter (December, January, February).'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '10 mm'}],
         'keywords': ['mean', 'season'],
         'notes': ['mean and average are the same thing, but it seems like bad '
                   'practice to not be consistent. Changed mean to average'],
         'slot_uri': 'MIXS:0000645',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'},
         'todos': ['check validation & examples. always mm? so value only? Or value + '
                   'unit']} })
    season_temp: Optional[QuantityValue] = Field(default=None, title="mean seasonal temperature", description="""Mean seasonal temperature""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '18 Cel'}],
         'keywords': ['mean', 'season', 'temperature'],
         'slot_uri': 'MIXS:0000643',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    season_use: Optional[SeasonUseEnum] = Field(default=None, title="seasonal use", description="""The seasons the space is occupied""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Winter'}],
         'keywords': ['season', 'use'],
         'slot_uri': 'MIXS:0000830'} })
    secondary_treatment: Optional[TextValue] = Field(default=None, title="secondary treatment", description="""The process for substantially degrading the biological content of the sewage""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'secondary treatment type'}},
         'domain_of': ['Biosample'],
         'keywords': ['secondary', 'treatment'],
         'slot_uri': 'MIXS:0000351'} })
    sediment_type: Optional[SedimentTypeEnum] = Field(default=None, title="sediment type", description="""Information about the sediment type based on major constituents""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'biogenous'}],
         'keywords': ['sediment', 'type'],
         'slot_uri': 'MIXS:0001078'} })
    sewage_type: Optional[TextValue] = Field(default=None, title="sewage type", description="""Type of wastewater treatment plant as municipial or industrial""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'sewage type name'}},
         'domain_of': ['Biosample'],
         'keywords': ['type'],
         'slot_uri': 'MIXS:0000215'} })
    shad_dev_water_mold: Optional[str] = Field(default=None, title="shading device signs of water/mold", description="""Signs of the presence of mold or mildew on the shading device""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'no presence of mold visible'}],
         'keywords': ['device'],
         'slot_uri': 'MIXS:0000834'} })
    shading_device_cond: Optional[DamagedRupturedEnum] = Field(default=None, title="shading device condition", description="""The physical condition of the shading device at the time of sampling""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'new'}],
         'keywords': ['condition', 'device'],
         'slot_uri': 'MIXS:0000831'} })
    shading_device_loc: Optional[ShadingDeviceLocEnum] = Field(default=None, title="shading device location", description="""The location of the shading device in relation to the built structure""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'exterior'}],
         'keywords': ['device', 'location'],
         'slot_uri': 'MIXS:0000832'} })
    shading_device_mat: Optional[TextValue] = Field(default=None, title="shading device material", description="""The material the shading device is composed of""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'material name'}},
         'domain_of': ['Biosample'],
         'keywords': ['device', 'material'],
         'slot_uri': 'MIXS:0000245'} })
    shading_device_type: Optional[ShadingDeviceTypeEnum] = Field(default=None, title="shading device type", description="""The type of shading device""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'description': 'was slatted aluminum awning',
                       'value': 'slatted aluminum'}],
         'keywords': ['device', 'type'],
         'slot_uri': 'MIXS:0000835'} })
    sieving: Optional[TextValue] = Field(default=None, title="sieving", description="""Collection design of pooled samples and/or sieve size and amount of sample sieved""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'design name and/or size;amount'}},
         'comments': ['Describe how samples were composited or sieved.',
                      "Use 'sample link' to indicate which samples were combined."],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'combined 2 cores | 4mm sieved'},
                      {'value': '4 mm sieved and homogenized'},
                      {'value': '50 g | 5 cores | 2 mm sieved'}],
         'slot_uri': 'MIXS:0000322',
         'string_serialization': '{text};{float} {unit}',
         'todos': ['check validation and examples']} })
    silicate: Optional[QuantityValue] = Field(default=None, title="silicate", description="""Concentration of silicate""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.05 umol/L'}],
         'slot_uri': 'MIXS:0000184',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    size_frac: Optional[TextValue] = Field(default=None, title="size fraction selected", description="""Filtering pore size used in sample preparation""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'filter size value range'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0-0.22 micrometer'}],
         'keywords': ['fraction', 'size'],
         'slot_uri': 'MIXS:0000017',
         'string_serialization': '{float}-{float} {unit}'} })
    size_frac_low: Optional[QuantityValue] = Field(default=None, title="size-fraction lower threshold", description="""Refers to the mesh/pore size used to pre-filter/pre-sort the sample. Materials smaller than the size threshold are excluded from the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micrometer'},
                         'storage_units': {'tag': 'storage_units', 'value': 'um'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.2 um'}],
         'keywords': ['lower'],
         'slot_uri': 'MIXS:0000735',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    size_frac_up: Optional[QuantityValue] = Field(default=None, title="size-fraction upper threshold", description="""Mesh or pore size of the device used to retain the sample. Materials larger than the size threshold are excluded from the sample.""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micrometer'},
                         'storage_units': {'tag': 'storage_units', 'value': 'um'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '20 um'}],
         'keywords': ['upper'],
         'slot_uri': 'MIXS:0000736',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    slope_aspect: Optional[QuantityValue] = Field(default=None, title="slope aspect", description="""The direction a slope faces. While looking down a slope use a compass to record the direction you are facing (direction or degrees). This measure provides an indication of sun and wind exposure that will influence soil temperature and evapotranspiration.""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'degree'},
                         'storage_units': {'tag': 'storage_units', 'value': 'deg'}},
         'comments': ['Aspect is the orientation of slope, measured clockwise in '
                      'degrees from 0 to 360, where 0 is north-facing, 90 is '
                      'east-facing, 180 is south-facing, and 270 is west-facing.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '35 deg'}],
         'keywords': ['slope'],
         'slot_uri': 'MIXS:0000647',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    slope_gradient: Optional[QuantityValue] = Field(default=None, title="slope gradient", description="""Commonly called 'slope'. The angle between ground surface and a horizontal line (in percent). This is the direction that overland water would flow. This measure is usually taken with a hand level meter or clinometer""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'percentage'},
                         'storage_units': {'tag': 'storage_units', 'value': '%'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '10%'}, {'value': '10 %'}, {'value': '0.10'}],
         'keywords': ['slope'],
         'slot_uri': 'MIXS:0000646',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'},
         'todos': ['Slope is a percent. How does the validation work? Check to correct '
                   'examples']} })
    sludge_retent_time: Optional[QuantityValue] = Field(default=None, title="sludge retention time", description="""The time activated sludge remains in reactor""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'hours'},
                         'storage_units': {'tag': 'storage_units', 'value': 'h'}},
         'domain_of': ['Biosample'],
         'keywords': ['time'],
         'slot_uri': 'MIXS:0000669',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    sodium: Optional[QuantityValue] = Field(default=None, title="sodium", description="""Sodium concentration in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter, parts per '
                                                     'million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '10.5 mg/L'}],
         'slot_uri': 'MIXS:0000428',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    soil_horizon: Optional[SoilHorizonEnum] = Field(default=None, title="soil horizon", description="""Specific layer in the land area which measures parallel to the soil surface and possesses physical characteristics which differ from the layers above and beneath""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'A horizon'}],
         'keywords': ['horizon', 'soil'],
         'slot_uri': 'MIXS:0001082'} })
    soil_text_measure: Optional[str] = Field(default=None, title="soil texture measurement", description="""The relative proportion of different grain sizes of mineral particles in a soil, as described using a standard system; express as % sand (50 um to 2 mm), silt (2 um to 50 um), and clay (<2 um) with textural name (e.g., silty clay loam) optional.""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value'}},
         'comments': ['Legacy MIxS slot removed from GSC MIxS v6.2.2. Retained for '
                      'submission-schema compatibility.',
                      "Old MIxS used 'quantity value' range but this is clearly "
                      'structured text, not a single quantity.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'ite loam; 20% sand; 40% silt; 40% clay'}],
         'slot_uri': 'MIXS:0000335'} })
    soil_texture_meth: Optional[str] = Field(default=None, title="soil texture method", description="""Reference or method used in determining soil texture""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'https://uwlab.soils.wisc.edu/wp-content/uploads/sites/17/2015/09/particle_size.pdf'}],
         'keywords': ['method', 'soil', 'texture'],
         'slot_uri': 'MIXS:0000336'} })
    soil_type: Optional[TextValue] = Field(default=None, title="soil type", description="""Description of the soil type or classification. This field accepts terms under soil (http://purl.obolibrary.org/obo/ENVO_00001998).  Multiple terms can be separated by pipes""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'ENVO:00001998'}},
         'domain_of': ['FieldResearchSite', 'Biosample'],
         'examples': [{'value': 'plinthosol [ENVO:00002250]'}],
         'keywords': ['soil', 'type'],
         'slot_uri': 'MIXS:0000332'} })
    soil_type_meth: Optional[TextValue] = Field(default=None, title="soil type method", description="""Reference or method used in determining soil series name or other lower-level classification""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'https://www.lrh.usace.army.mil/Portals/38/docs/PR/BluestoneSFEIS/Appendix%20K-Soil%20Descriptions.pdf'}],
         'keywords': ['method', 'soil', 'type'],
         'slot_uri': 'MIXS:0000334'} })
    solar_irradiance: Optional[QuantityValue] = Field(default=None, title="solar irradiance", description="""The amount of solar energy that arrives at a specific area of a surface during a specific time interval""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'kilowatts per square meter per '
                                                     'day, ergs per square centimeter '
                                                     'per second'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'kW/m2/d|erg/cm2/s'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1.36 kW/m2/d'}],
         'slot_uri': 'MIXS:0000112',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    soluble_inorg_mat: Optional[list[TextValue]] = Field(default=None, title="soluble inorganic material", description="""Concentration of substances such as ammonia, road-salt, sea-salt, cyanide, hydrogen sulfide, thiocyanates, thiosulfates, etc""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'soluble inorganic material '
                                                     'name;measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, microgram, mole per liter, '
                                                     'gram per liter, parts per '
                                                     'million'}},
         'domain_of': ['Biosample'],
         'keywords': ['inorganic', 'material', 'soluble'],
         'slot_uri': 'MIXS:0000672',
         'string_serialization': '{text};{float} {unit}'} })
    soluble_org_mat: Optional[list[TextValue]] = Field(default=None, title="soluble organic material", description="""Concentration of substances such as urea, fruit sugars, soluble proteins, drugs, pharmaceuticals, etc""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'soluble organic material '
                                                     'name;measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, microgram, mole per liter, '
                                                     'gram per liter, parts per '
                                                     'million'}},
         'domain_of': ['Biosample'],
         'keywords': ['material', 'organic', 'soluble'],
         'slot_uri': 'MIXS:0000673',
         'string_serialization': '{text};{float} {unit}'} })
    soluble_react_phosp: Optional[QuantityValue] = Field(default=None, title="soluble reactive phosphorus", description="""Concentration of soluble reactive phosphorus""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter, milligram '
                                                     'per liter, parts per million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L|umol/L|ug/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.1 mg/L'}],
         'keywords': ['phosphorus', 'soluble'],
         'slot_uri': 'MIXS:0000738',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    source_mat_id: Optional[TextValue] = Field(default=None, title="source material identifier", description="""A globally unique identifier assigned to the biological sample.""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'for cultures of microorganisms: '
                                                     'identifiers for two culture '
                                                     'collections; for other material '
                                                     'a unique arbitrary identifer'}},
         'comments': ['Identifiers must be prefixed. Possible FAIR prefixes are IGSNs '
                      '(http://www.geosamples.org/getigsn), NCBI biosample accession '
                      'numbers, ARK identifiers (https://arks.org/). These IDs enable '
                      'linking to derived analytes and subsamples. If you have not '
                      'assigned FAIR identifiers to your samples, you can generate '
                      'UUIDs (https://www.uuidgenerator.net/).'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'igsn:AU1243'},
                      {'value': 'UUID:24f1467a-40f4-11ed-b878-0242ac120002'}],
         'keywords': ['identifier', 'material', 'source'],
         'slot_uri': 'MIXS:0000026',
         'todos': ['Currently, the comments say to use UUIDs. However, if we implement '
                   'assigning NMDC identifiers with the minter we dont need to require '
                   'a GUID. It can be an optional field to fill out only if they '
                   'already have a resolvable ID.']} })
    space_typ_state: Optional[SpaceTypStateEnum] = Field(default=None, title="space typical state", description="""Customary or normal state of the space""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'typically occupied'}],
         'slot_uri': 'MIXS:0000770'} })
    specific: Optional[SpecificEnum] = Field(default=None, title="specifications", description="""The building specifications. If design is chosen, indicate phase: conceptual, schematic, design development, construction documents""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'construction'}],
         'slot_uri': 'MIXS:0000836'} })
    specific_humidity: Optional[QuantityValue] = Field(default=None, title="specific humidity", description="""The mass of water vapour in a unit mass of moist air, usually expressed as grams of vapour per kilogram of air, or, in air conditioning, as grains per pound""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram of air, kilogram of air'},
                         'storage_units': {'tag': 'storage_units', 'value': 'g/kg'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '15 per kilogram of air'}],
         'keywords': ['humidity'],
         'slot_uri': 'MIXS:0000214',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    sr_dep_env: Optional[SrDepEnvEnum] = Field(default=None, title="source rock depositional environment", description="""Source rock depositional environment (https://en.wikipedia.org/wiki/Source_rock). If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Marine'}],
         'keywords': ['environment', 'source'],
         'slot_uri': 'MIXS:0000996'} })
    sr_geol_age: Optional[GeolAgeEnum] = Field(default=None, title="source rock geological age", description="""Geological age of source rock (Additional info: https://en.wikipedia.org/wiki/Period_(geology)). If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Silurian'}],
         'keywords': ['age', 'source'],
         'slot_uri': 'MIXS:0000997'} })
    sr_kerog_type: Optional[SrKerogTypeEnum] = Field(default=None, title="source rock kerogen type", description="""Origin of kerogen. Type I: Algal (aquatic), Type II: planktonic and soft plant material (aquatic or terrestrial), Type III: terrestrial woody/ fibrous plant material (terrestrial), Type IV: oxidized recycled woody debris (terrestrial) (additional information: https://en.wikipedia.org/wiki/Kerogen). If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Type IV'}],
         'keywords': ['source', 'type'],
         'slot_uri': 'MIXS:0000994'} })
    sr_lithology: Optional[SrLithologyEnum] = Field(default=None, title="source rock lithology", description="""Lithology of source rock (https://en.wikipedia.org/wiki/Source_rock). If \"other\" is specified, please propose entry in \"additional info\" field""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Coal'}],
         'keywords': ['lithology', 'source'],
         'slot_uri': 'MIXS:0000995'} })
    standing_water_regm: Optional[list[TextValue]] = Field(default=None, title="standing water regimen", description="""Treatment involving an exposure to standing water during a plant's life span, types can be flood water or standing water, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple regimens""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'standing '
                                'water;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['regimen', 'water'],
         'slot_uri': 'MIXS:0001069'} })
    store_cond: Optional[TextValue] = Field(default=None, title="storage conditions", description="""Explain how and for how long the soil sample was stored before DNA extraction (fresh/frozen/other)""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '-20 degree Celsius freezer;P2Y10D'}],
         'keywords': ['condition', 'storage'],
         'slot_uri': 'MIXS:0000327'} })
    substructure_type: Optional[list[SubstructureTypeEnum]] = Field(default=None, title="substructure type", description="""The substructure or under building is that largely hidden section of the building which is built off the foundations to the ground floor level""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'basement'}],
         'keywords': ['type'],
         'slot_uri': 'MIXS:0000767'} })
    sulfate: Optional[QuantityValue] = Field(default=None, title="sulfate", description="""Concentration of sulfate in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter, milligram '
                                                     'per liter, parts per million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '5 umol/L'}],
         'keywords': ['sulfate'],
         'slot_uri': 'MIXS:0000423',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    sulfate_fw: Optional[QuantityValue] = Field(default=None, title="sulfate in formation water", description="""Original sulfate concentration in the hydrocarbon resource""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mg/L'}},
         'domain_of': ['Biosample'],
         'keywords': ['sulfate', 'water'],
         'slot_uri': 'MIXS:0000407',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    sulfide: Optional[QuantityValue] = Field(default=None, title="sulfide", description="""Concentration of sulfide in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter, milligram '
                                                     'per liter, parts per million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '2 umol/L'}],
         'keywords': ['sulfide'],
         'slot_uri': 'MIXS:0000424',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    surf_air_cont: Optional[list[SurfAirContEnum]] = Field(default=None, title="surface-air contaminant", description="""Contaminant identified on surface""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'radon'}],
         'recommended': True,
         'slot_uri': 'MIXS:0000759'} })
    surf_humidity: Optional[QuantityValue] = Field(default=None, title="surface humidity", description="""Surfaces: water activity as a function of air and material moisture""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'percentage'},
                         'storage_units': {'tag': 'storage_units', 'value': '%'}},
         'comments': ['percent or float?'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.1'}],
         'keywords': ['humidity', 'surface'],
         'recommended': True,
         'slot_uri': 'MIXS:0000123',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    surf_material: Optional[SurfMaterialEnum] = Field(default=None, title="surface material", description="""Surface materials at the point of sampling""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'wood'}],
         'keywords': ['material', 'surface'],
         'slot_uri': 'MIXS:0000758'} })
    surf_moisture: Optional[QuantityValue] = Field(default=None, title="surface moisture", description="""Water held on a surface""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'parts per million, gram per '
                                                     'cubic meter, gram per square '
                                                     'meter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|g/m2|g/m3'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.01 g/m2'}],
         'keywords': ['moisture', 'surface'],
         'recommended': True,
         'slot_uri': 'MIXS:0000128',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    surf_moisture_ph: Optional[float] = Field(default=None, title="surface moisture pH", description="""ph measurement of surface""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '7'}],
         'keywords': ['moisture', 'ph', 'surface'],
         'recommended': True,
         'slot_uri': 'MIXS:0000760'} })
    surf_temp: Optional[QuantityValue] = Field(default=None, title="surface temperature", description="""Temperature of the surface at the time of sampling""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '15 Cel'}],
         'keywords': ['surface', 'temperature'],
         'recommended': True,
         'slot_uri': 'MIXS:0000125',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    suspend_part_matter: Optional[QuantityValue] = Field(default=None, title="suspended particulate matter", description="""Concentration of suspended particulate matter""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.5 mg/L'}],
         'keywords': ['particle', 'particulate', 'suspended'],
         'slot_uri': 'MIXS:0000741',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    suspend_solids: Optional[list[TextValue]] = Field(default=None, title="suspended solids", description="""Concentration of substances including a wide variety of material, such as silt, decaying plant and animal matter; can include multiple substances""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'suspended solid name;measurement '
                                                     'value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram, microgram, milligram per '
                                                     'liter, mole per liter, gram per '
                                                     'liter, part per million'}},
         'domain_of': ['Biosample'],
         'keywords': ['solids', 'suspended'],
         'slot_uri': 'MIXS:0000150',
         'string_serialization': '{text};{float} {unit}'} })
    tan: Optional[QuantityValue] = Field(default=None, title="total acid number", description="""Total Acid Number  (TAN) is a measurement of acidity that is determined by the amount of  potassium hydroxide  in milligrams that is needed to neutralize the acids in one gram of oil.  It is an important quality measurement of  crude oil. (source: https://en.wikipedia.org/wiki/Total_acid_number)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mg/L'}},
         'domain_of': ['Biosample'],
         'keywords': ['number', 'total'],
         'recommended': True,
         'slot_uri': 'MIXS:0000120',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    temp: Optional[QuantityValue] = Field(default=None, title="temperature", description="""Temperature of the sample at the time of sampling""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '25 Cel'}],
         'keywords': ['temperature'],
         'slot_uri': 'MIXS:0000113',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    temp_out: Optional[QuantityValue] = Field(default=None, title="temperature outside house", description="""The recorded temperature value at sampling time outside""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '5 Cel'}],
         'keywords': ['house', 'temperature'],
         'slot_uri': 'MIXS:0000197',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tertiary_treatment: Optional[TextValue] = Field(default=None, title="tertiary treatment", description="""The process providing a final treatment stage to raise the effluent quality before it is discharged to the receiving environment""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'tertiary treatment type'}},
         'domain_of': ['Biosample'],
         'keywords': ['treatment'],
         'slot_uri': 'MIXS:0000352'} })
    tidal_stage: Optional[TidalStageEnum] = Field(default=None, title="tidal stage", description="""Stage of tide""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'high tide'}],
         'slot_uri': 'MIXS:0000750'} })
    tillage: Optional[list[TillageEnum]] = Field(default=None, title="history/tillage", description="""Note method(s) used for tilling""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'chisel'}],
         'keywords': ['history'],
         'slot_uri': 'MIXS:0001081'} })
    tiss_cult_growth_med: Optional[TextValue] = Field(default=None, title="tissue culture growth media", description="""Description of plant tissue culture growth media used""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'https://link.springer.com/content/pdf/10.1007/BF02796489.pdf'}],
         'keywords': ['culture', 'growth'],
         'slot_uri': 'MIXS:0001070',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL}|{text})$'}} })
    toluene: Optional[QuantityValue] = Field(default=None, title="toluene", description="""Concentration of toluene in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter, parts per '
                                                     'million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L'}},
         'domain_of': ['Biosample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000154',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tot_carb: Optional[QuantityValue] = Field(default=None, title="total carbon", description="""Total carbon content""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'ug/L|%'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1 ug/L'}],
         'keywords': ['carbon', 'total'],
         'slot_uri': 'MIXS:0000525',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'},
         'todos': ['is this inorganic and organic? both? could use some clarification.',
                   "ug/L doesn't seem like the right units. Should check this slots "
                   "usage in databases and re-evaluate. I couldn't find any references "
                   'that provided this data in this format']} })
    tot_depth_water_col: Optional[QuantityValue] = Field(default=None, title="total depth of water column", description="""Measurement of total depth of water column""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '500 m'}],
         'keywords': ['depth', 'total', 'water'],
         'slot_uri': 'MIXS:0000634',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tot_diss_nitro: Optional[QuantityValue] = Field(default=None, title="total dissolved nitrogen", description="""Total dissolved nitrogen concentration, reported as nitrogen, measured by: total dissolved nitrogen = NH4 + NO3NO2 + dissolved organic nitrogen""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microgram per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'ug/L|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '40 ug/L'}],
         'keywords': ['dissolved', 'nitrogen', 'total'],
         'slot_uri': 'MIXS:0000744',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tot_inorg_nitro: Optional[QuantityValue] = Field(default=None, title="total inorganic nitrogen", description="""Total inorganic nitrogen content""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microgram per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'ug/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '40 ug/L'}],
         'keywords': ['inorganic', 'nitrogen', 'total'],
         'slot_uri': 'MIXS:0000745',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tot_iron: Optional[QuantityValue] = Field(default=None, title="total iron", description="""Concentration of total iron in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter, milligram '
                                                     'per kilogram'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'mg/L|mg/kg'}},
         'domain_of': ['Biosample'],
         'keywords': ['total'],
         'recommended': True,
         'slot_uri': 'MIXS:0000105',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tot_nitro: Optional[QuantityValue] = Field(default=None, title="total nitrogen concentration", description="""Total nitrogen concentration of water samples, calculated by: total nitrogen = total dissolved nitrogen + particulate nitrogen. Can also be measured without filtering, reported as nitrogen""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microgram per liter, micromole '
                                                     'per liter, milligram per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'mg/L|ug/L|umol/L|%'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '50 umol/L'}],
         'keywords': ['concentration', 'nitrogen', 'total'],
         'slot_uri': 'MIXS:0000102',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tot_nitro_cont_meth: Optional[str] = Field(default=None, title="total nitrogen content method", description="""Reference or method used in determining the total nitrogen""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'https://doi.org/10.2134/agronmonogr9.2.c32'},
                      {'value': 'https://acsess.onlinelibrary.wiley.com/doi/full/10.2136/sssaj2009.0389?casa_token=bm0pYIUdNMgAAAAA%3AOWVRR0STHaOe-afTcTdxn5m1hM8n2ltM0wY-b1iYpYdD9dhwppk5j3LvC2IO5yhOIvyLVeQz4NZRCZo'}],
         'keywords': ['content', 'method', 'nitrogen', 'total'],
         'slot_uri': 'MIXS:0000338',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL})$'}} })
    tot_nitro_content: Optional[QuantityValue] = Field(default=None, title="total nitrogen content", description="""Total nitrogen content of the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units',
                                           'value': 'mg/L|ug/L|umol/L|%'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '5 mg/L'}],
         'keywords': ['content', 'nitrogen', 'total'],
         'slot_uri': 'MIXS:0000530',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tot_org_c_meth: Optional[str] = Field(default=None, title="total organic carbon method", description="""Reference or method used in determining total organic carbon""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'https://doi.org/10.1080/07352680902776556'}],
         'keywords': ['carbon', 'method', 'organic', 'total'],
         'slot_uri': 'MIXS:0000337',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL})$'}} })
    tot_org_carb: Optional[QuantityValue] = Field(default=None, title="total organic carbon", description="""Total organic carbon content""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram Carbon per kilogram sample '
                                                     'material'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '5 mg/L'}],
         'keywords': ['carbon', 'organic', 'total'],
         'slot_uri': 'MIXS:0000533',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'},
         'todos': ['check description. How are they different?']} })
    tot_part_carb: Optional[QuantityValue] = Field(default=None, title="total particulate carbon", description="""Total particulate carbon content""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microgram per liter, micromole '
                                                     'per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'ug/L|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '35 umol/L'}],
         'keywords': ['carbon', 'particle', 'particulate', 'total'],
         'slot_uri': 'MIXS:0000747',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tot_phosp: Optional[QuantityValue] = Field(default=None, title="total phosphorus", description="""Total phosphorus concentration in the sample, calculated by: total phosphorus = total dissolved phosphorus + particulate phosphorus""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'micromole per liter, milligram '
                                                     'per liter, parts per million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L|umol/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.03 mg/L'}],
         'keywords': ['phosphorus', 'total'],
         'slot_uri': 'MIXS:0000117',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tot_phosphate: Optional[QuantityValue] = Field(default=None, title="total phosphate", description="""Total amount or concentration of phosphate""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microgram per liter, micromole '
                                                     'per liter'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'ug/L|umol/L'}},
         'domain_of': ['Biosample'],
         'keywords': ['phosphate', 'total'],
         'slot_uri': 'MIXS:0000689',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tot_sulfur: Optional[QuantityValue] = Field(default=None, title="total sulfur", description="""Concentration of total sulfur in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter, parts per '
                                                     'million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L'}},
         'domain_of': ['Biosample'],
         'keywords': ['sulfur', 'total'],
         'recommended': True,
         'slot_uri': 'MIXS:0000419',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    train_line: Optional[TrainLineEnum] = Field(default=None, title="train line", description="""The subway line name""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'red'}],
         'keywords': ['train'],
         'slot_uri': 'MIXS:0000837'} })
    train_stat_loc: Optional[TrainStatLocEnum] = Field(default=None, title="train station collection location", description="""The train station collection location""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'forest hills'}],
         'keywords': ['location', 'train'],
         'slot_uri': 'MIXS:0000838'} })
    train_stop_loc: Optional[TrainStopLocEnum] = Field(default=None, title="train stop collection location", description="""The train stop collection location""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'end'}],
         'keywords': ['location', 'stop', 'train'],
         'slot_uri': 'MIXS:0000839'} })
    turbidity: Optional[QuantityValue] = Field(default=None, title="turbidity", description="""Measure of the amount of cloudiness or haziness in water caused by individual particles""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units',
                                           'value': '[NTU]|[FNU]'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.3 [NTU]'}],
         'slot_uri': 'MIXS:0000191',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tvdss_of_hcr_press: Optional[QuantityValue] = Field(default=None, title="depth (TVDSS) of hydrocarbon resource pressure", description="""True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original pressure was measured (e.g. 1578 m)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm'}},
         'domain_of': ['Biosample'],
         'keywords': ['depth', 'hydrocarbon', 'pressure', 'resource'],
         'slot_uri': 'MIXS:0000397',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    tvdss_of_hcr_temp: Optional[QuantityValue] = Field(default=None, title="depth (TVDSS) of hydrocarbon resource temperature", description="""True vertical depth subsea (TVDSS) of the hydrocarbon resource where the original temperature was measured (e.g. 1345 m)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm'}},
         'domain_of': ['Biosample'],
         'keywords': ['depth', 'hydrocarbon', 'resource', 'temperature'],
         'slot_uri': 'MIXS:0000394',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    typ_occup_density: Optional[float] = Field(default=None, title="typical occupant density", description="""Customary or normal density of occupants""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '25'}],
         'keywords': ['density'],
         'slot_uri': 'MIXS:0000771'} })
    ventilation_rate: Optional[QuantityValue] = Field(default=None, title="ventilation rate", description="""Ventilation rate of the system in the sampled premises""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'cubic meter per minute, liters '
                                                     'per second'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': 'L/s|m3/min'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '750 m3/min'}],
         'keywords': ['rate'],
         'slot_uri': 'MIXS:0000114',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    ventilation_type: Optional[TextValue] = Field(default=None, title="ventilation type", description="""Ventilation system used in the sampled premises""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'ventilation type name'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'Operable windows'}],
         'keywords': ['type'],
         'slot_uri': 'MIXS:0000756'} })
    vfa: Optional[QuantityValue] = Field(default=None, title="volatile fatty acids", description="""Concentration of Volatile Fatty Acids in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter, parts per '
                                                     'million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L'}},
         'domain_of': ['Biosample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000152',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    vfa_fw: Optional[QuantityValue] = Field(default=None, title="vfa in formation water", description="""Original volatile fatty acid concentration in the hydrocarbon resource""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'mg/L'}},
         'domain_of': ['Biosample'],
         'keywords': ['water'],
         'slot_uri': 'MIXS:0000408',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    vis_media: Optional[str] = Field(default=None, title="visual media", description="""The building visual media""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'enumeration'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '3D scans'}],
         'slot_uri': 'MIXS:0000840',
         'string_serialization': '[photos|videos|commonly of the building|site context '
                                 '(adjacent buildings, vegetation, terrain, '
                                 'streets)|interiors|equipment|3D scans]'} })
    viscosity: Optional[TextValue] = Field(default=None, title="viscosity", description="""A measure of oil's resistance  to gradual deformation by  shear stress  or  tensile stress (e.g. 3.5 cp; 100   C)""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value;measurement '
                                                     'value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'cP at degree Celsius'}},
         'domain_of': ['Biosample'],
         'slot_uri': 'MIXS:0000126',
         'string_serialization': '{float} {unit};{float} {unit}'} })
    volatile_org_comp: Optional[list[TextValue]] = Field(default=None, title="volatile organic compounds", description="""Concentration of carbon-based chemicals that easily evaporate at room temperature; can report multiple volatile organic compounds by entering numeric values preceded by name of compound""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'volatile organic compound '
                                                     'name;measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'microgram per cubic meter, parts '
                                                     'per million, nanogram per '
                                                     'liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': 'formaldehyde;500 nanogram per liter'}],
         'keywords': ['organic'],
         'slot_uri': 'MIXS:0000115',
         'string_serialization': '{text};{float} {unit}'} })
    wall_area: Optional[QuantityValue] = Field(default=None, title="wall area", description="""The total area of the sampled room's walls""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'square meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm2'}},
         'domain_of': ['Biosample'],
         'keywords': ['area', 'wall'],
         'slot_uri': 'MIXS:0000198',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    wall_const_type: Optional[WallConstTypeEnum] = Field(default=None, title="wall construction type", description="""The building class of the wall defined by the composition of the building elements and fire-resistance rating""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'fire resistive'}],
         'keywords': ['type', 'wall'],
         'slot_uri': 'MIXS:0000841'} })
    wall_finish_mat: Optional[WallFinishMatEnum] = Field(default=None, title="wall finish material", description="""The material utilized to finish the outer most layer of the wall""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'wood'}],
         'keywords': ['material', 'wall'],
         'slot_uri': 'MIXS:0000842'} })
    wall_height: Optional[QuantityValue] = Field(default=None, title="wall height", description="""The average height of the walls in the sampled room""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'centimeter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'cm'}},
         'domain_of': ['Biosample'],
         'keywords': ['height', 'wall'],
         'slot_uri': 'MIXS:0000221',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    wall_loc: Optional[CompassDirections8Enum] = Field(default=None, title="wall location", description="""The relative location of the wall within the room""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'north'}],
         'keywords': ['location', 'wall'],
         'slot_uri': 'MIXS:0000843'} })
    wall_surf_treatment: Optional[WallSurfTreatmentEnum] = Field(default=None, title="wall surface treatment", description="""The surface treatment of interior wall""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'paneling'}],
         'keywords': ['surface', 'treatment', 'wall'],
         'slot_uri': 'MIXS:0000845'} })
    wall_texture: Optional[CeilingWallTextureEnum] = Field(default=None, title="wall texture", description="""The feel, appearance, or consistency of a wall surface""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'popcorn'}],
         'keywords': ['texture', 'wall'],
         'slot_uri': 'MIXS:0000846'} })
    wall_thermal_mass: Optional[QuantityValue] = Field(default=None, title="wall thermal mass", description="""The ability of the wall to provide inertia against temperature fluctuations. Generally this means concrete or concrete block that is either exposed or covered only with paint""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'joule per degree Celsius'},
                         'storage_units': {'tag': 'storage_units', 'value': 'J/K'}},
         'domain_of': ['Biosample'],
         'keywords': ['mass', 'wall'],
         'slot_uri': 'MIXS:0000222',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    wall_water_mold: Optional[MoldVisibilityEnum] = Field(default=None, title="wall signs of water/mold", description="""Signs of the presence of mold or mildew on a wall""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'no presence of mold visible'}],
         'keywords': ['wall'],
         'slot_uri': 'MIXS:0000844'} })
    wastewater_type: Optional[TextValue] = Field(default=None, title="wastewater type", description="""The origin of wastewater such as human waste, rainfall, storm drains, etc""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'wastewater type name'}},
         'domain_of': ['Biosample'],
         'keywords': ['type'],
         'slot_uri': 'MIXS:0000353'} })
    water_cont_soil_meth: Optional[str] = Field(default=None, title="water content method", description="""Reference or method used in determining the water content of soil""", json_schema_extra = { "linkml_meta": {'comments': ['Required if providing water content'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'J. Nat. Prod. Plant Resour., 2012, 2 (4):500-503'},
                      {'value': 'https://dec.alaska.gov/applications/spar/webcalc/definitions.htm'}],
         'keywords': ['content', 'method', 'water'],
         'slot_uri': 'MIXS:0000323',
         'todos': ['Why is it soil water content method in the name but not the title? '
                   'Is this slot used in other samples?',
                   'Soil water content can be measure MANY ways and often, multiple '
                   'ways are used in one experiment (gravimetric water content and '
                   'water holding capacity and water filled pore space, to name a '
                   'few).',
                   'Should this be multi valued? How to we manage and validate this?']} })
    water_content: Optional[list[str]] = Field(default=None, title="water content", description="""Water content measurement""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value', 'value': 'string'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'gram per gram or cubic '
                                                     'centimeter per cubic '
                                                     'centimeter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.75 g water/g dry soil'},
                      {'value': '75% water holding capacity'},
                      {'value': '1.1 g fresh weight/ dry weight'},
                      {'value': '10% water filled pore space'}],
         'keywords': ['content', 'water'],
         'slot_uri': 'MIXS:0000185',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'},
         'todos': ['value in preferred unit is too limiting. need to change this',
                   'check and correct validation so examples are accepted',
                   'how to manage multiple water content methods?']} })
    water_current: Optional[QuantityValue] = Field(default=None, title="water current", description="""Measurement of magnitude and direction of flow within a fluid""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'cubic meter per second, knots'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[kn_i]|m3/s'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '10 m3/s'}],
         'keywords': ['water'],
         'slot_uri': 'MIXS:0000203',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    water_cut: Optional[QuantityValue] = Field(default=None, title="water cut", description="""Current amount of water (%) in a produced fluid stream; or the average of the combined streams""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'percent'},
                         'storage_units': {'tag': 'storage_units', 'value': '%'}},
         'comments': ['percent or float?'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '45%'}],
         'keywords': ['water'],
         'slot_uri': 'MIXS:0000454',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    water_feat_size: Optional[QuantityValue] = Field(default=None, title="water feature size", description="""The size of the water feature""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'square meter'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm2'}},
         'domain_of': ['Biosample'],
         'keywords': ['feature', 'size', 'water'],
         'slot_uri': 'MIXS:0000223',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    water_feat_type: Optional[WaterFeatTypeEnum] = Field(default=None, title="water feature type", description="""The type of water feature present within the building being sampled""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'stream'}],
         'keywords': ['feature', 'type', 'water'],
         'slot_uri': 'MIXS:0000847'} })
    water_prod_rate: Optional[QuantityValue] = Field(default=None, title="water production rate", description="""Water production rates per well (e.g. 987 m3 / day)""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'cubic meter per day'},
                         'storage_units': {'tag': 'storage_units', 'value': 'm3/d'}},
         'domain_of': ['Biosample'],
         'keywords': ['production', 'rate', 'water'],
         'recommended': True,
         'slot_uri': 'MIXS:0000453',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    water_temp_regm: Optional[list[TextValue]] = Field(default=None, title="water temperature regimen", description="""Information about treatment involving an exposure to water with varying degree of temperature, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degree Celsius'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '15 degree '
                                'Celsius;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'}],
         'keywords': ['regimen', 'temperature', 'water'],
         'slot_uri': 'MIXS:0000590'} })
    watering_regm: Optional[list[TextValue]] = Field(default=None, title="watering regimen", description="""Information about treatment involving an exposure to watering frequencies, treatment regimen including how many times the treatment was repeated, how long each treatment lasted, and the start and end time of the entire treatment; can include multiple regimens""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milliliter, liter'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1 liter;R2/2018-05-11T14:30/2018-05-11T19:30/P1H30M'},
                      {'value': '75% water holding capacity; constant'}],
         'keywords': ['regimen', 'water'],
         'slot_uri': 'MIXS:0000591'} })
    weekday: Optional[WeekdayEnum] = Field(default=None, title="weekday", description="""The day of the week when sampling occurred""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'Sunday'}],
         'slot_uri': 'MIXS:0000848'} })
    win: Optional[TextValue] = Field(default=None, title="well identification number", description="""A unique identifier of a well or wellbore. This is part of the Global Framework for Well Identification initiative which is compiled by the Professional Petroleum Data Management Association (PPDM) in an effort to improve well identification systems. (Supporting information: https://ppdm.org/ and http://dl.ppdm.org/dl/690)""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['identifier', 'number'],
         'recommended': True,
         'slot_uri': 'MIXS:0000297'} })
    wind_direction: Optional[TextValue] = Field(default=None, title="wind direction", description="""Wind direction is the direction from which a wind originates""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'degrees or cardinal direction'}},
         'domain_of': ['Biosample'],
         'keywords': ['direction', 'wind'],
         'slot_uri': 'MIXS:0000757'} })
    wind_speed: Optional[QuantityValue] = Field(default=None, title="wind speed", description="""speed of wind measured at the time of sampling""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units',
                                           'value': 'km/h|m/s'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '21 km/h'}],
         'keywords': ['speed', 'wind'],
         'slot_uri': 'MIXS:0000118',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    window_cond: Optional[DamagedRupturedEnum] = Field(default=None, title="window condition", description="""The physical condition of the window at the time of sampling""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'rupture'}],
         'keywords': ['condition', 'window'],
         'slot_uri': 'MIXS:0000849'} })
    window_cover: Optional[WindowCoverEnum] = Field(default=None, title="window covering", description="""The type of window covering""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'curtains'}],
         'keywords': ['window'],
         'slot_uri': 'MIXS:0000850'} })
    window_horiz_pos: Optional[WindowHorizPosEnum] = Field(default=None, title="window horizontal position", description="""The horizontal position of the window on the wall""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'middle'}],
         'keywords': ['window'],
         'slot_uri': 'MIXS:0000851'} })
    window_loc: Optional[CompassDirections8Enum] = Field(default=None, title="window location", description="""The relative location of the window within the room""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'west'}],
         'keywords': ['location', 'window'],
         'slot_uri': 'MIXS:0000852'} })
    window_mat: Optional[WindowMatEnum] = Field(default=None, title="window material", description="""The type of material used to finish a window""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'wood'}],
         'keywords': ['material', 'window'],
         'slot_uri': 'MIXS:0000853'} })
    window_open_freq: Optional[TextValue] = Field(default=None, title="window open frequency", description="""The number of times windows are opened per week""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'keywords': ['frequency', 'window'],
         'slot_uri': 'MIXS:0000246'} })
    window_size: Optional[TextValue] = Field(default=None, title="window area/size", description="""The window's length and width""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'inch, meter'}},
         'domain_of': ['Biosample'],
         'keywords': ['window'],
         'slot_uri': 'MIXS:0000224',
         'string_serialization': '{float} {unit} x {float} {unit}'} })
    window_status: Optional[WindowStatusEnum] = Field(default=None, title="window status", description="""Defines whether the windows were open or closed during environmental testing""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'open'}],
         'keywords': ['status', 'window'],
         'slot_uri': 'MIXS:0000855'} })
    window_type: Optional[WindowTypeEnum] = Field(default=None, title="window type", description="""The type of windows""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'fixed window'}],
         'keywords': ['type', 'window'],
         'slot_uri': 'MIXS:0000856'} })
    window_vert_pos: Optional[WindowVertPosEnum] = Field(default=None, title="window vertical position", description="""The vertical position of the window on the wall""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'middle'}],
         'keywords': ['window'],
         'slot_uri': 'MIXS:0000857'} })
    window_water_mold: Optional[MoldVisibilityEnum] = Field(default=None, title="window signs of water/mold", description="""Signs of the presence of mold or mildew on the window""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'no presence of mold visible'}],
         'keywords': ['window'],
         'slot_uri': 'MIXS:0000854'} })
    xylene: Optional[QuantityValue] = Field(default=None, title="xylene", description="""Concentration of xylene in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'milligram per liter, parts per '
                                                     'million'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/L'}},
         'domain_of': ['Biosample'],
         'recommended': True,
         'slot_uri': 'MIXS:0000156',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    ecosystem: Optional[str] = Field(default=None, description="""An ecosystem is a combination of a physical environment (abiotic factors) and all the organisms (biotic factors) that interact with this environment. Ecosystem is in position 1/5 in a GOLD path.""", json_schema_extra = { "linkml_meta": {'comments': ['The abiotic factors play a profound role on the type and '
                      'composition of organisms in a given environment. The GOLD '
                      'Ecosystem at the top of the five-level classification system is '
                      'aimed at capturing the broader environment from which an '
                      'organism or environmental sample is collected. The three broad '
                      'groups under Ecosystem are Environmental, Host-associated, and '
                      'Engineered. They represent samples collected from a natural '
                      'environment or from another organism or from engineered '
                      'environments like bioreactors respectively.'],
         'domain_of': ['Study', 'Biosample'],
         'is_a': 'gold_path_field',
         'see_also': ['https://gold.jgi.doe.gov/help']} })
    ecosystem_category: Optional[str] = Field(default=None, description="""Ecosystem categories represent divisions within the ecosystem based on specific characteristics of the environment from where an organism or sample is isolated. Ecosystem category is in position 2/5 in a GOLD path.""", json_schema_extra = { "linkml_meta": {'comments': ['The Environmental ecosystem (for example) is divided into Air, '
                      'Aquatic and Terrestrial. Ecosystem categories for '
                      'Host-associated samples can be individual hosts or phyla and '
                      'for engineered samples it may be manipulated environments like '
                      'bioreactors, solid waste etc.'],
         'domain_of': ['Study', 'Biosample'],
         'is_a': 'gold_path_field',
         'see_also': ['https://gold.jgi.doe.gov/help']} })
    ecosystem_type: Optional[str] = Field(default=None, description="""Ecosystem types represent things having common characteristics within the Ecosystem Category. These common characteristics based grouping is still broad but specific to the characteristics of a given environment. Ecosystem type is in position 3/5 in a GOLD path.""", json_schema_extra = { "linkml_meta": {'comments': ['The Aquatic ecosystem category (for example) may have ecosystem '
                      'types like Marine or Thermal springs etc. Ecosystem category '
                      'Air may have Indoor air or Outdoor air as different Ecosystem '
                      'Types. In the case of Host-associated samples, ecosystem type '
                      'can represent Respiratory system, Digestive system, Roots etc.'],
         'domain_of': ['Study', 'Biosample'],
         'is_a': 'gold_path_field',
         'see_also': ['https://gold.jgi.doe.gov/help']} })
    ecosystem_subtype: Optional[str] = Field(default=None, description="""Ecosystem subtypes represent further subdivision of Ecosystem types into more distinct subtypes. Ecosystem subtype is in position 4/5 in a GOLD path.""", json_schema_extra = { "linkml_meta": {'comments': ['Ecosystem Type Marine (Environmental -> Aquatic -> Marine) is '
                      'further divided (for example) into Intertidal zone, Coastal, '
                      'Pelagic, Intertidal zone etc. in the Ecosystem subtype '
                      'category.'],
         'domain_of': ['Study', 'Biosample'],
         'is_a': 'gold_path_field',
         'see_also': ['https://gold.jgi.doe.gov/help']} })
    specific_ecosystem: Optional[str] = Field(default=None, description="""Specific ecosystems represent specific features of the environment like aphotic zone in an ocean or gastric mucosa within a host digestive system. Specific ecosystem is in position 5/5 in a GOLD path.""", json_schema_extra = { "linkml_meta": {'comments': ['Specific ecosystems help to define samples based on very '
                      'specific characteristics of an environment under the five-level '
                      'classification system.'],
         'domain_of': ['Study', 'Biosample'],
         'is_a': 'gold_path_field',
         'see_also': ['https://gold.jgi.doe.gov/help']} })
    ecosystem_path_id: Optional[int] = Field(default=None, description="""A unique id representing the GOLD classifiers associated with a sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': '6026'}],
         'see_also': ['https://gold.jgi.doe.gov/ecosystem_classification']} })
    community: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample']} })
    habitat: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['FieldResearchSite', 'Biosample']} })
    host_name: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample']} })
    location: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample']} })
    ncbi_taxonomy_name: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample']} })
    proport_woa_temperature: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample']} })
    salinity_category: Optional[str] = Field(default=None, description="""Categorical description of the sample's salinity. Examples: halophile, halotolerant, hypersaline, huryhaline""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'notes': ['maps to gold:salinity'],
         'see_also': ['https://github.com/microbiomedata/nmdc-metadata/pull/297']} })
    sample_collection_site: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample']} })
    soluble_iron_micromol: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample']} })
    subsurface_depth: Optional[QuantityValue] = Field(default=None, json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'm'}},
         'domain_of': ['Biosample']} })
    dna_isolate_meth: Optional[str] = Field(default=None, title="DNA isolation method", description="""Describe the method/protocol/kit used to extract DNA/RNA.""", json_schema_extra = { "linkml_meta": {'aliases': ['Sample Isolation Method'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'phenol/chloroform extraction'}],
         'rank': 16,
         'recommended': True} })
    rna_isolate_meth: Optional[str] = Field(default=None, title="RNA isolation method", description="""Describe the method/protocol/kit used to extract DNA/RNA.""", json_schema_extra = { "linkml_meta": {'aliases': ['Sample Isolation Method'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'phenol/chloroform extraction'}],
         'rank': 16,
         'recommended': True} })
    collection_date_inc: Optional[str] = Field(default=None, title="incubation collection date", description="""Date the incubation was harvested/collected/ended. Only relevant for incubation samples.""", json_schema_extra = { "linkml_meta": {'comments': ['Date should be formatted as YYYY(-MM(-DD)). Ie, 2021-04-15, '
                      '2021-04 and 2021 are all acceptable.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '2021-04-15'}, {'value': '2021-04'}, {'value': '2021'}],
         'notes': ['MIxS collection_date accepts (truncated) ISO8601. DH taking '
                   'arbitrary precision date only'],
         'rank': 2,
         'recommended': True,
         'see_also': ['MIXS:0000011'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{date, arbitrary precision}'} })
    collection_time: Optional[str] = Field(default=None, title="collection time, GMT", description="""The time of sampling, either as an instance (single point) or interval.""", json_schema_extra = { "linkml_meta": {'comments': ['Time should be entered as HH:MM(:SS) in GMT. See here for a '
                      'converter: https://www.worldtimebuddy.com/pst-to-gmt-converter'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '13:33'}, {'value': '13:33:55'}],
         'notes': ['MIxS collection_date accepts (truncated) ISO8601. DH taking '
                   'seconds optional time only'],
         'rank': 1,
         'recommended': True,
         'see_also': ['MIXS:0000011'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{time, seconds optional}'} })
    collection_time_inc: Optional[str] = Field(default=None, title="incubation collection time, GMT", description="""Time the incubation was harvested/collected/ended. Only relevant for incubation samples.""", json_schema_extra = { "linkml_meta": {'comments': ['Time should be entered as HH:MM(:SS) in GMT. See here for a '
                      'converter: https://www.worldtimebuddy.com/pst-to-gmt-converter'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '13:33'}, {'value': '13:33:55'}],
         'notes': ['MIxS collection_date accepts (truncated) ISO8601. DH taking '
                   'seconds optional time only'],
         'rank': 3,
         'recommended': True,
         'see_also': ['MIXS:0000011'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{time, seconds optional}'} })
    experimental_factor_other: Optional[str] = Field(default=None, title="experimental factor- other", description="""Other details about your sample that you feel can't be accurately represented in the available columns.""", json_schema_extra = { "linkml_meta": {'comments': ['This slot accepts open-ended text about your sample.',
                      'We recommend using key:value pairs.',
                      'Provided pairs will be considered for inclusion as future '
                      'slots/terms in this data collection template.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'experimental treatment: value'}],
         'rank': 7,
         'recommended': True,
         'see_also': ['MIXS:0000008', 'MIXS:0000300'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{text}'} })
    filter_method: Optional[str] = Field(default=None, title="filter method", description="""Type of filter used or how the sample was filtered""", json_schema_extra = { "linkml_meta": {'comments': ['describe the filter or provide a catalog number and '
                      'manufacturer'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'C18'}, {'value': 'Basix PES, 13-100-106 FisherSci'}],
         'rank': 6,
         'recommended': True,
         'see_also': ['MIXS:0000765'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{text}'} })
    isotope_exposure: Optional[str] = Field(default=None, title="isotope exposure/addition", description="""List isotope exposure or addition applied to your sample.""", json_schema_extra = { "linkml_meta": {'comments': ['This is required when your experimental design includes the use '
                      'of isotopically labeled compounds'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '13C glucose'}, {'value': '18O water'}],
         'rank': 16,
         'recommended': True,
         'see_also': ['MIXS:0000751'],
         'slot_group': 'MIxS Inspired',
         'todos': ['Can we make the H218O correctly super and subscripted?']} })
    micro_biomass_c_meth: Optional[str] = Field(default=None, title="microbial biomass carbon method", description="""Reference or method used in determining microbial biomass carbon""", json_schema_extra = { "linkml_meta": {'comments': ['required if "microbial_biomass_c" is provided'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'https://doi.org/10.1016/0038-0717(87)90052-6'},
                      {'value': 'https://doi.org/10.1016/0038-0717(87)90052-6 | '
                                'https://www.sciencedirect.com/science/article/abs/pii/0038071787900526'}],
         'rank': 11,
         'recommended': True,
         'see_also': ['MIXS:0000339'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{PMID}|{DOI}|{URL}',
         'todos': ['How should we separate values? | or ;? lets be consistent']} })
    micro_biomass_n_meth: Optional[str] = Field(default=None, title="microbial biomass nitrogen method", description="""Reference or method used in determining microbial biomass nitrogen""", json_schema_extra = { "linkml_meta": {'comments': ['required if "microbial_biomass_n" is provided'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'https://doi.org/10.1016/0038-0717(87)90052-6'},
                      {'value': 'https://doi.org/10.1016/0038-0717(87)90052-6 | '
                                'https://www.sciencedirect.com/science/article/abs/pii/0038071787900526'}],
         'rank': 13,
         'see_also': ['MIXS:0000339'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{PMID}|{DOI}|{URL}'} })
    microbial_biomass_c: Optional[str] = Field(default=None, title="microbial biomass carbon", description="""The part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 micrometer.""", json_schema_extra = { "linkml_meta": {'comments': ['If you provide this, correction factors used for conversion to '
                      'the final units and method are required'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.05 ug C/g dry soil'}],
         'rank': 10,
         'see_also': ['MIXS:0000650'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{float} {unit}'} })
    microbial_biomass_n: Optional[str] = Field(default=None, title="microbial biomass nitrogen", description="""The part of the organic matter in the soil that constitutes living microorganisms smaller than 5-10 micrometer.""", json_schema_extra = { "linkml_meta": {'comments': ['If you provide this, correction factors used for conversion to '
                      'the final units and method are required'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.05 ug N/g dry soil'}],
         'rank': 12,
         'see_also': ['MIXS:0000650'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{float} {unit}'} })
    non_microb_biomass: Optional[str] = Field(default=None, title="non-microbial biomass", description="""Amount of biomass; should include the name for the part of biomass measured, e.g.insect, plant, total. Can include multiple measurements separated by ;""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'],
         'examples': [{'value': 'insect 0.23 ug; plant 1g'}],
         'rank': 8,
         'see_also': ['MIXS:0000174', 'MIXS:0000650'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{text};{float} {unit}'} })
    non_microb_biomass_method: Optional[str] = Field(default=None, title="non-microbial biomass method", description="""Reference or method used in determining biomass""", json_schema_extra = { "linkml_meta": {'comments': ['required if "non-microbial biomass" is provided'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'https://doi.org/10.1038/s41467-021-26181-3'}],
         'rank': 9,
         'see_also': ['MIXS:0000650'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{PMID}|{DOI}|{URL}'} })
    org_nitro_method: Optional[str] = Field(default=None, title="organic nitrogen method", description="""Method used for obtaining organic nitrogen""", json_schema_extra = { "linkml_meta": {'comments': ['required if "org_nitro" is provided'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'https://doi.org/10.1016/0038-0717(85)90144-0'}],
         'rank': 14,
         'see_also': ['MIXS:0000338', 'MIXS:0000205'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{PMID}|{DOI}|{URL}'} })
    other_treatment: Optional[str] = Field(default=None, title="other treatments", description="""Other treatments applied to your samples that are not applicable to the provided fields""", json_schema_extra = { "linkml_meta": {'comments': ['This is an open text field to provide any treatments that '
                      'cannot be captured in the provided slots.'],
         'domain_of': ['Biosample'],
         'notes': ['Values entered here will be used to determine potential new '
                   'slots.'],
         'rank': 15,
         'recommended': True,
         'see_also': ['MIXS:0000300'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{text}'} })
    start_date_inc: Optional[str] = Field(default=None, title="incubation start date", description="""Date the incubation was started. Only relevant for incubation samples.""", json_schema_extra = { "linkml_meta": {'comments': ['Date should be formatted as YYYY(-MM(-DD)). Ie, 2021-04-15, '
                      '2021-04 and 2021 are all acceptable.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '2021-04-15'}, {'value': '2021-04'}, {'value': '2021'}],
         'notes': ['MIxS collection_date accepts (truncated) ISO8601. DH taking '
                   'arbitrary precision date only'],
         'rank': 4,
         'recommended': True,
         'see_also': ['MIXS:0000011'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{date, arbitrary precision}'} })
    start_time_inc: Optional[str] = Field(default=None, title="incubation start time, GMT", description="""Time the incubation was started. Only relevant for incubation samples.""", json_schema_extra = { "linkml_meta": {'comments': ['Time should be entered as HH:MM(:SS) in GMT. See here for a '
                      'converter: https://www.worldtimebuddy.com/pst-to-gmt-converter'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '13:33'}, {'value': '13:33:55'}],
         'notes': ['MIxS collection_date accepts (truncated) ISO8601. DH taking '
                   'seconds optional time only'],
         'rank': 5,
         'recommended': True,
         'see_also': ['MIXS:0000011'],
         'slot_group': 'MIxS Inspired',
         'string_serialization': '{time, seconds optional}'} })
    project_id: Optional[str] = Field(default=None, title="project ID", description="""Proposal IDs or names associated with dataset""", json_schema_extra = { "linkml_meta": {'domain_of': ['Biosample'], 'rank': 1, 'recommended': True} })
    replicate_number: Optional[int] = Field(default=None, title="replicate number", description="""If sending biological replicates, indicate the rep number here.""", json_schema_extra = { "linkml_meta": {'comments': ['This will guide staff in ensuring your samples are blocked & '
                      'randomized correctly'],
         'domain_of': ['Biosample'],
         'rank': 6,
         'recommended': True} })
    sample_shipped: Optional[str] = Field(default=None, title="sample shipped amount", description="""The total amount or size (volume, mass, or area) of sample sent to EMSL.""", json_schema_extra = { "linkml_meta": {'comments': ['This field is only required when completing metadata for '
                      'samples being submitted to EMSL for analyses.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '15 g'}, {'value': '100 uL'}, {'value': '5 mL'}],
         'rank': 3,
         'recommended': True} })
    sample_type: Optional[SampleTypeEnum] = Field(default=None, title="sample type", description="""Type of sample being submitted""", json_schema_extra = { "linkml_meta": {'comments': ["This can vary from 'environmental package' if the sample is an "
                      'extraction.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'water extracted soil'}],
         'rank': 2,
         'recommended': True} })
    technical_reps: Optional[int] = Field(default=None, title="number technical replicate", description="""If sending technical replicates of the same sample, indicate the replicate count.""", json_schema_extra = { "linkml_meta": {'comments': ['This field is only required when completing metadata for '
                      'samples being submitted to EMSL for analyses.'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '2'}],
         'rank': 5,
         'recommended': True} })
    analysis_type: Optional[list[AnalysisTypeEnum]] = Field(default=None, title="analysis/data type", description="""Select all the data types associated or available for this biosample""", json_schema_extra = { "linkml_meta": {'comments': ['MIxS:investigation_type was included as a `see_also` but that '
                      "term doesn't resolve any more"],
         'domain_of': ['Protocol', 'Biosample'],
         'examples': [{'value': 'metagenomics; metabolomics; metaproteomics'}],
         'rank': 3,
         'recommended': True,
         'slot_group': 'Sample ID'} })
    sample_link: Optional[list[str]] = Field(default=None, title="sample linkage", description="""A unique identifier to assign parent-child, subsample, or sibling samples. This is relevant when a sample or other material was used to generate the new sample.""", json_schema_extra = { "linkml_meta": {'comments': ['This field allows multiple entries separated by ; (Examples: '
                      'Soil collected from the field will link with the soil used in '
                      'an incubation. The soil a plant was grown in links to the plant '
                      'sample. An original culture sample was transferred to a new '
                      'vial and generated a new sample)'],
         'domain_of': ['Biosample'],
         'examples': [{'value': 'igsn:DSJ0284'}],
         'rank': 5,
         'recommended': True,
         'slot_group': 'Sample ID',
         'string_serialization': '{text}:{text}'} })
    bulk_elect_conductivity: Optional[QuantityValue] = Field(default=None, title="bulk electrical conductivity", description="""Electrical conductivity is a measure of the ability to carry electric current, which is mostly dictated by the chemistry of and amount of water.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'mS/cm'}},
         'comments': ['Provide the value output of the field instrument.'],
         'domain_of': ['Biosample'],
         'examples': [{'description': 'The conductivity measurement was 0.017 '
                                      'millisiemens per centimeter.',
                       'object': {'has_numeric_value': 0.017,
                                  'has_raw_value': '0.017 mS/cm',
                                  'has_unit': 'mS/cm'}}]} })
    infiltrations: Optional[list[str]] = Field(default=None, description="""The amount of time it takes to complete each infiltration activity""", json_schema_extra = { "linkml_meta": {'aliases': ['infiltration_1', 'infiltration_2'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '00:01:32'}, {'value': '00:00:53'}],
         'list_elements_ordered': True,
         'see_also': ['https://www.protocols.io/view/field-sampling-protocol-kqdg3962pg25/v1']} })
    zinc: Optional[QuantityValue] = Field(default=None, title="zinc", description="""Concentration of zinc in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'mg/kg (ppm)'},
                         'occurrence': {'tag': 'occurrence', 'value': '1'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/kg|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '2.5 mg/kg'}],
         'see_also': ['https://www.ornl.gov/content/bio-scales-0']} })
    manganese: Optional[QuantityValue] = Field(default=None, title="manganese", description="""Concentration of manganese in the sample""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'mg/kg (ppm)'},
                         'occurrence': {'tag': 'occurrence', 'value': '1'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/kg|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '24.7 mg/kg'}],
         'see_also': ['https://www.ornl.gov/content/bio-scales-0']} })
    ammonium_nitrogen: Optional[QuantityValue] = Field(default=None, title="ammonium nitrogen", description="""Concentration of ammonium nitrogen in the sample""", json_schema_extra = { "linkml_meta": {'aliases': ['NH4-N'],
         'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'mg/kg'},
                         'occurrence': {'tag': 'occurrence', 'value': '1'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/kg|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '2.3 mg/kg'}],
         'see_also': ['https://www.ornl.gov/content/bio-scales-0']} })
    nitrate_nitrogen: Optional[QuantityValue] = Field(default=None, title="nitrate_nitrogen", description="""Concentration of nitrate nitrogen in the sample""", json_schema_extra = { "linkml_meta": {'aliases': ['NO3-N'],
         'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'mg/kg'},
                         'occurrence': {'tag': 'occurrence', 'value': '1'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/kg|mg/L'}},
         'comments': ['often below some specified limit of detection'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '0.29 mg/kg'}],
         'see_also': ['https://www.ornl.gov/content/bio-scales-0']} })
    nitrite_nitrogen: Optional[QuantityValue] = Field(default=None, title="nitrite_nitrogen", description="""Concentration of nitrite nitrogen in the sample""", json_schema_extra = { "linkml_meta": {'aliases': ['NO2-N'],
         'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'mg/kg'},
                         'occurrence': {'tag': 'occurrence', 'value': '1'},
                         'storage_units': {'tag': 'storage_units',
                                           'value': '[ppm]|mg/kg|mg/L'}},
         'domain_of': ['Biosample'],
         'examples': [{'value': '1.2 mg/kg'}],
         'see_also': ['https://www.ornl.gov/content/bio-scales-0']} })
    lbc_thirty: Optional[QuantityValue] = Field(default=None, title="lime buffer capacity (at 30 minutes)", description="""lime buffer capacity, determined after 30 minute incubation""", json_schema_extra = { "linkml_meta": {'aliases': ['lbc30', 'lime buffer capacity (at 30 minutes)'],
         'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'ppm CaCO3/pH'},
                         'occurrence': {'tag': 'occurrence', 'value': '1'},
                         'storage_units': {'tag': 'storage_units', 'value': '[ppm]'}},
         'comments': ['This is the mass of lime, in mg, needed to raise the pH of one '
                      'kg of soil by one pH unit'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '543 [ppm]'}],
         'see_also': ['https://www.ornl.gov/content/bio-scales-0',
                      'https://secure.caes.uga.edu/extension/publications/files/pdf/C%20874_5.PDF']} })
    lbceq: Optional[QuantityValue] = Field(default=None, title="lime buffer capacity (after 5 day incubation)", description="""lime buffer capacity, determined at equilibrium after 5 day incubation""", json_schema_extra = { "linkml_meta": {'aliases': ['lime buffer capacity (at 5-day equilibrium)'],
         'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'measurement value'},
                         'Preferred_unit': {'tag': 'Preferred_unit',
                                            'value': 'ppm CaCO3/pH'},
                         'occurrence': {'tag': 'occurrence', 'value': '1'},
                         'storage_units': {'tag': 'storage_units', 'value': '[ppm]'}},
         'comments': ['This is the mass of lime, in mg, needed to raise the pH of one '
                      'kg of soil by one pH unit'],
         'domain_of': ['Biosample'],
         'examples': [{'value': '1575 [ppm]'}],
         'see_also': ['https://www.ornl.gov/content/bio-scales-0']} })
    id: str = Field(default=..., description="""An NMDC assigned unique identifier for a biosample submitted to NMDC.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:bsm-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""Unique identifier for a biosample submitted to additional resources. Matches the entity that has been submitted to NMDC""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/Biosample","nmdc:Biosample"] = Field(default="nmdc:Biosample", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('associated_studies')
    def pattern_associated_studies(cls, v):
        pattern=re.compile(r"^(nmdc):sty-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid associated_studies format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid associated_studies format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('collected_from')
    def pattern_collected_from(cls, v):
        pattern=re.compile(r"^(nmdc):frsite-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid collected_from format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid collected_from format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('img_identifiers')
    def pattern_img_identifiers(cls, v):
        pattern=re.compile(r"^img\.taxon:[a-zA-Z0-9_][a-zA-Z0-9_\/\.]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid img_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid img_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('neon_biosample_identifiers')
    def pattern_neon_biosample_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid neon_biosample_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid neon_biosample_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('gold_biosample_identifiers')
    def pattern_gold_biosample_identifiers(cls, v):
        pattern=re.compile(r"^gold:Gb[0-9]+$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid gold_biosample_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid gold_biosample_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('insdc_biosample_identifiers')
    def pattern_insdc_biosample_identifiers(cls, v):
        pattern=re.compile(r"^biosample:SAM[NED]([A-Z])?[0-9]+$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid insdc_biosample_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid insdc_biosample_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('emsl_biosample_identifiers')
    def pattern_emsl_biosample_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid emsl_biosample_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid emsl_biosample_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('igsn_biosample_identifiers')
    def pattern_igsn_biosample_identifiers(cls, v):
        pattern=re.compile(r"^igsn:[A-Za-z]{2,4}[A-Za-z0-9.-]{1,71}$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid igsn_biosample_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid igsn_biosample_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('abs_air_humidity')
    def pattern_abs_air_humidity(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid abs_air_humidity format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid abs_air_humidity format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('add_recov_method')
    def pattern_add_recov_method(cls, v):
        pattern=re.compile(r"^(Water Injection|Dump Flood|Gas Injection|Wag Immiscible Injection|Polymer Addition|Surfactant Addition|Not Applicable|other);(\d{4})(-(0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01])(T([01]\d|2[0-3]):([0-5]\d)(:([0-5]\d))?(\.\d+)?(Z|([+-][01]\d:[0-5]\d))?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid add_recov_method format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid add_recov_method format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('address')
    def pattern_address(cls, v):
        pattern=re.compile(r"^[1-9][0-9]* .*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid address format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid address format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('adj_room')
    def pattern_adj_room(cls, v):
        pattern=re.compile(r"^([^\s-]{1,2}|[^\s-]+.+[^\s-]+);[1-9][0-9]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid adj_room format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid adj_room format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('agrochem_addition')
    def pattern_agrochem_addition(cls, v):
        pattern=re.compile(r"^.*;[-+]?[0-9]*\.?[0-9]+ ([^\s-]{1,2}|[^\s-]+.+[^\s-]+);(\d{4})(-(0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01])(T([01]\d|2[0-3]):([0-5]\d)(:([0-5]\d))?(\.\d+)?(Z|([+-][01]\d:[0-5]\d))?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid agrochem_addition format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid agrochem_addition format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('air_PM_concen')
    def pattern_air_PM_concen(cls, v):
        pattern=re.compile(r"^.*;[-+]?[0-9]*\.?[0-9]+ ([^\s-]{1,2}|[^\s-]+.+[^\s-]+)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid air_PM_concen format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid air_PM_concen format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('air_temp')
    def pattern_air_temp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid air_temp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid air_temp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('al_sat')
    def pattern_al_sat(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid al_sat format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid al_sat format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('al_sat_meth')
    def pattern_al_sat_meth(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid al_sat_meth format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid al_sat_meth format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alkalinity')
    def pattern_alkalinity(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alkalinity format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alkalinity format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alkyl_diethers')
    def pattern_alkyl_diethers(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alkyl_diethers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alkyl_diethers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alt')
    def pattern_alt(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alt format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alt format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('aminopept_act')
    def pattern_aminopept_act(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid aminopept_act format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid aminopept_act format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ammonium')
    def pattern_ammonium(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ammonium format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ammonium format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('amount_light')
    def pattern_amount_light(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid amount_light format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid amount_light format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('annual_precpt')
    def pattern_annual_precpt(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid annual_precpt format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid annual_precpt format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('annual_temp')
    def pattern_annual_temp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid annual_temp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid annual_temp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('api')
    def pattern_api(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid api format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid api format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('aromatics_pc')
    def pattern_aromatics_pc(cls, v):
        pattern=re.compile(r"^.*;[-+]?[0-9]*\.?[0-9]+ ([^\s-]{1,2}|[^\s-]+.+[^\s-]+)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid aromatics_pc format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid aromatics_pc format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('asphaltenes_pc')
    def pattern_asphaltenes_pc(cls, v):
        pattern=re.compile(r"^.*;[-+]?[0-9]*\.?[0-9]+ ([^\s-]{1,2}|[^\s-]+.+[^\s-]+)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid asphaltenes_pc format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid asphaltenes_pc format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('avg_dew_point')
    def pattern_avg_dew_point(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid avg_dew_point format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid avg_dew_point format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('avg_temp')
    def pattern_avg_temp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid avg_temp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid avg_temp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('bac_prod')
    def pattern_bac_prod(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid bac_prod format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid bac_prod format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('bac_resp')
    def pattern_bac_resp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid bac_resp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid bac_resp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('bacteria_carb_prod')
    def pattern_bacteria_carb_prod(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid bacteria_carb_prod format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid bacteria_carb_prod format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('barometric_press')
    def pattern_barometric_press(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid barometric_press format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid barometric_press format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('benzene')
    def pattern_benzene(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid benzene format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid benzene format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('biochem_oxygen_dem')
    def pattern_biochem_oxygen_dem(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid biochem_oxygen_dem format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid biochem_oxygen_dem format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('bishomohopanol')
    def pattern_bishomohopanol(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid bishomohopanol format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid bishomohopanol format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('blood_press_diast')
    def pattern_blood_press_diast(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid blood_press_diast format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid blood_press_diast format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('blood_press_syst')
    def pattern_blood_press_syst(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid blood_press_syst format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid blood_press_syst format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('bromide')
    def pattern_bromide(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid bromide format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid bromide format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('built_struc_age')
    def pattern_built_struc_age(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid built_struc_age format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid built_struc_age format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('calcium')
    def pattern_calcium(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid calcium format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid calcium format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('carb_dioxide')
    def pattern_carb_dioxide(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid carb_dioxide format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid carb_dioxide format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('carb_monoxide')
    def pattern_carb_monoxide(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid carb_monoxide format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid carb_monoxide format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ceil_area')
    def pattern_ceil_area(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ceil_area format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ceil_area format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ceil_thermal_mass')
    def pattern_ceil_thermal_mass(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ceil_thermal_mass format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ceil_thermal_mass format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('chem_oxygen_dem')
    def pattern_chem_oxygen_dem(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid chem_oxygen_dem format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid chem_oxygen_dem format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('chloride')
    def pattern_chloride(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid chloride format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid chloride format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('chlorophyll')
    def pattern_chlorophyll(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid chlorophyll format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid chlorophyll format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('conduc')
    def pattern_conduc(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid conduc format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid conduc format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('cult_root_med')
    def pattern_cult_root_med(cls, v):
        pattern=re.compile(r"^(.*|PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid cult_root_med format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid cult_root_med format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('cur_vegetation_meth')
    def pattern_cur_vegetation_meth(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid cur_vegetation_meth format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid cur_vegetation_meth format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('density')
    def pattern_density(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid density format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid density format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('depth')
    def pattern_depth(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid depth format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid depth format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('dew_point')
    def pattern_dew_point(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid dew_point format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid dew_point format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('diss_carb_dioxide')
    def pattern_diss_carb_dioxide(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid diss_carb_dioxide format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid diss_carb_dioxide format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('diss_hydrogen')
    def pattern_diss_hydrogen(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid diss_hydrogen format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid diss_hydrogen format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('diss_inorg_carb')
    def pattern_diss_inorg_carb(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid diss_inorg_carb format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid diss_inorg_carb format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('diss_inorg_nitro')
    def pattern_diss_inorg_nitro(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid diss_inorg_nitro format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid diss_inorg_nitro format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('diss_inorg_phosp')
    def pattern_diss_inorg_phosp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid diss_inorg_phosp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid diss_inorg_phosp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('diss_iron')
    def pattern_diss_iron(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid diss_iron format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid diss_iron format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('diss_org_carb')
    def pattern_diss_org_carb(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid diss_org_carb format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid diss_org_carb format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('diss_org_nitro')
    def pattern_diss_org_nitro(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid diss_org_nitro format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid diss_org_nitro format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('diss_oxygen')
    def pattern_diss_oxygen(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid diss_oxygen format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid diss_oxygen format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('diss_oxygen_fluid')
    def pattern_diss_oxygen_fluid(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid diss_oxygen_fluid format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid diss_oxygen_fluid format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('door_size')
    def pattern_door_size(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid door_size format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid door_size format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('down_par')
    def pattern_down_par(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid down_par format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid down_par format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('efficiency_percent')
    def pattern_efficiency_percent(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid efficiency_percent format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid efficiency_percent format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('elev')
    def pattern_elev(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid elev format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid elev format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('env_broad_scale')
    def pattern_env_broad_scale(cls, v):
        pattern=re.compile(r"^([^\s-]{1,2}|[^\s-]+.+[^\s-]+) \[[a-zA-Z]{2,}:[a-zA-Z0-9]\d+\]$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid env_broad_scale format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid env_broad_scale format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('env_local_scale')
    def pattern_env_local_scale(cls, v):
        pattern=re.compile(r"^([^\s-]{1,2}|[^\s-]+.+[^\s-]+) \[[a-zA-Z]{2,}:[a-zA-Z0-9]\d+\]$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid env_local_scale format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid env_local_scale format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('env_medium')
    def pattern_env_medium(cls, v):
        pattern=re.compile(r"^([^\s-]{1,2}|[^\s-]+.+[^\s-]+) \[[a-zA-Z]{2,}:[a-zA-Z0-9]\d+\]$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid env_medium format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid env_medium format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ethylbenzene')
    def pattern_ethylbenzene(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ethylbenzene format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ethylbenzene format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('exp_duct')
    def pattern_exp_duct(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid exp_duct format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid exp_duct format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('exp_pipe')
    def pattern_exp_pipe(cls, v):
        pattern=re.compile(r"^[1-9][0-9]* .*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid exp_pipe format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid exp_pipe format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('experimental_factor')
    def pattern_experimental_factor(cls, v):
        pattern=re.compile(r"^\S+.*\S+ \[[a-zA-Z]{2,}:\d+\]$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid experimental_factor format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid experimental_factor format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('fire')
    def pattern_fire(cls, v):
        pattern=re.compile(r"^[12]\d{3}(?:(?:-(?:0[1-9]|1[0-2]))(?:-(?:0[1-9]|[12]\d|3[01]))?)?(\s+to\s+[12]\d{3}(?:(?:-(?:0[1-9]|1[0-2]))(?:-(?:0[1-9]|[12]\d|3[01]))?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid fire format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid fire format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('floor_age')
    def pattern_floor_age(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid floor_age format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid floor_age format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('floor_area')
    def pattern_floor_area(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid floor_area format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid floor_area format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('floor_thermal_mass')
    def pattern_floor_thermal_mass(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid floor_thermal_mass format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid floor_thermal_mass format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('fluor')
    def pattern_fluor(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid fluor format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid fluor format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('freq_cook')
    def pattern_freq_cook(cls, v):
        pattern=re.compile(r"^[1-9][0-9]* .*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid freq_cook format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid freq_cook format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('genetic_mod')
    def pattern_genetic_mod(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid genetic_mod format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid genetic_mod format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('geo_loc_name')
    def pattern_geo_loc_name(cls, v):
        pattern=re.compile(r"^([^\s-]{1,2}|[^\s-]+.+[^\s-]+): ([^\s-]{1,2}|[^\s-]+.+[^\s-]+), ([^\s-]{1,2}|[^\s-]+.+[^\s-]+)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid geo_loc_name format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid geo_loc_name format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('glucosidase_act')
    def pattern_glucosidase_act(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid glucosidase_act format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid glucosidase_act format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('hcr_fw_salinity')
    def pattern_hcr_fw_salinity(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid hcr_fw_salinity format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid hcr_fw_salinity format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('hcr_pressure')
    def pattern_hcr_pressure(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+ *- *[-+]?[0-9]*\.?[0-9]+ ([^\s-]{1,2}|[^\s-]+.+[^\s-]+)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid hcr_pressure format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid hcr_pressure format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('hcr_temp')
    def pattern_hcr_temp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+ *- *[-+]?[0-9]*\.?[0-9]+ ([^\s-]{1,2}|[^\s-]+.+[^\s-]+)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid hcr_temp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid hcr_temp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('heavy_metals_meth')
    def pattern_heavy_metals_meth(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid heavy_metals_meth format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid heavy_metals_meth format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('height_carper_fiber')
    def pattern_height_carper_fiber(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid height_carper_fiber format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid height_carper_fiber format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('horizon_meth')
    def pattern_horizon_meth(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid horizon_meth format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid horizon_meth format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('host_age')
    def pattern_host_age(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid host_age format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid host_age format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('host_body_temp')
    def pattern_host_body_temp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid host_body_temp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid host_body_temp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('host_dry_mass')
    def pattern_host_dry_mass(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid host_dry_mass format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid host_dry_mass format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('host_growth_cond')
    def pattern_host_growth_cond(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)|.*)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid host_growth_cond format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid host_growth_cond format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('host_height')
    def pattern_host_height(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid host_height format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid host_height format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('host_length')
    def pattern_host_length(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid host_length format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid host_length format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('host_tot_mass')
    def pattern_host_tot_mass(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid host_tot_mass format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid host_tot_mass format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('host_wet_mass')
    def pattern_host_wet_mass(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid host_wet_mass format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid host_wet_mass format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('humidity')
    def pattern_humidity(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid humidity format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid humidity format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('indust_eff_percent')
    def pattern_indust_eff_percent(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid indust_eff_percent format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid indust_eff_percent format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('inside_lux')
    def pattern_inside_lux(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid inside_lux format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid inside_lux format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('iwf')
    def pattern_iwf(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid iwf format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid iwf format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('lat_lon')
    def pattern_lat_lon(cls, v):
        pattern=re.compile(r"^(-?((?:[0-8]?[0-9](?:\.\d{0,8})?)|90)) -?[0-9]+(?:\.[0-9]{0,8})?$|^-?(1[0-7]{1,2})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid lat_lon format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid lat_lon format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('light_intensity')
    def pattern_light_intensity(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid light_intensity format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid light_intensity format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('link_addit_analys')
    def pattern_link_addit_analys(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid link_addit_analys format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid link_addit_analys format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('link_climate_info')
    def pattern_link_climate_info(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid link_climate_info format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid link_climate_info format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('local_class_meth')
    def pattern_local_class_meth(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid local_class_meth format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid local_class_meth format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('magnesium')
    def pattern_magnesium(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid magnesium format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid magnesium format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('max_occup')
    def pattern_max_occup(cls, v):
        pattern=re.compile(r"^[1-9][0-9]* .*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid max_occup format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid max_occup format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('mean_frict_vel')
    def pattern_mean_frict_vel(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid mean_frict_vel format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid mean_frict_vel format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('mean_peak_frict_vel')
    def pattern_mean_peak_frict_vel(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid mean_peak_frict_vel format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid mean_peak_frict_vel format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('methane')
    def pattern_methane(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid methane format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid methane format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('microbial_biomass')
    def pattern_microbial_biomass(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid microbial_biomass format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid microbial_biomass format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('nitrate')
    def pattern_nitrate(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid nitrate format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid nitrate format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('nitrite')
    def pattern_nitrite(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid nitrite format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid nitrite format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('nitro')
    def pattern_nitro(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid nitro format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid nitro format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('number_pets')
    def pattern_number_pets(cls, v):
        pattern=re.compile(r"^[1-9][0-9]* .*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid number_pets format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid number_pets format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('number_plants')
    def pattern_number_plants(cls, v):
        pattern=re.compile(r"^[1-9][0-9]* .*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid number_plants format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid number_plants format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('number_resident')
    def pattern_number_resident(cls, v):
        pattern=re.compile(r"^[1-9][0-9]* .*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid number_resident format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid number_resident format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('occup_samp')
    def pattern_occup_samp(cls, v):
        pattern=re.compile(r"^[1-9][0-9]* .*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid occup_samp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid occup_samp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('org_carb')
    def pattern_org_carb(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid org_carb format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid org_carb format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('org_matter')
    def pattern_org_matter(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid org_matter format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid org_matter format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('org_nitro')
    def pattern_org_nitro(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid org_nitro format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid org_nitro format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('owc_tvdss')
    def pattern_owc_tvdss(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid owc_tvdss format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid owc_tvdss format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('oxygen')
    def pattern_oxygen(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid oxygen format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid oxygen format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('part_org_carb')
    def pattern_part_org_carb(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid part_org_carb format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid part_org_carb format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('part_org_nitro')
    def pattern_part_org_nitro(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid part_org_nitro format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid part_org_nitro format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('petroleum_hydrocarb')
    def pattern_petroleum_hydrocarb(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid petroleum_hydrocarb format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid petroleum_hydrocarb format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('phosphate')
    def pattern_phosphate(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid phosphate format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid phosphate format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('photon_flux')
    def pattern_photon_flux(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid photon_flux format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid photon_flux format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('plant_struc')
    def pattern_plant_struc(cls, v):
        pattern=re.compile(r"^([^\s-]{1,2}|[^\s-]+.+[^\s-]+) \[[a-zA-Z]{2,}:[a-zA-Z0-9]\d+\]$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid plant_struc format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid plant_struc format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('potassium')
    def pattern_potassium(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid potassium format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid potassium format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('pour_point')
    def pattern_pour_point(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid pour_point format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid pour_point format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('pressure')
    def pattern_pressure(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid pressure format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid pressure format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('prev_land_use_meth')
    def pattern_prev_land_use_meth(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid prev_land_use_meth format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid prev_land_use_meth format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('primary_prod')
    def pattern_primary_prod(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid primary_prod format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid primary_prod format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('prod_rate')
    def pattern_prod_rate(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid prod_rate format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid prod_rate format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('redox_potential')
    def pattern_redox_potential(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid redox_potential format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid redox_potential format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('rel_air_humidity')
    def pattern_rel_air_humidity(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid rel_air_humidity format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid rel_air_humidity format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('rel_humidity_out')
    def pattern_rel_humidity_out(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid rel_humidity_out format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid rel_humidity_out format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('resins_pc')
    def pattern_resins_pc(cls, v):
        pattern=re.compile(r"^.*;[-+]?[0-9]*\.?[0-9]+ ([^\s-]{1,2}|[^\s-]+.+[^\s-]+)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid resins_pc format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid resins_pc format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('room_air_exch_rate')
    def pattern_room_air_exch_rate(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid room_air_exch_rate format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid room_air_exch_rate format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('room_door_dist')
    def pattern_room_door_dist(cls, v):
        pattern=re.compile(r"^[1-9][0-9]* .*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid room_door_dist format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid room_door_dist format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('room_door_share')
    def pattern_room_door_share(cls, v):
        pattern=re.compile(r"^([^\s-]{1,2}|[^\s-]+.+[^\s-]+);[1-9][0-9]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid room_door_share format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid room_door_share format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('room_hallway')
    def pattern_room_hallway(cls, v):
        pattern=re.compile(r"^([^\s-]{1,2}|[^\s-]+.+[^\s-]+);[1-9][0-9]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid room_hallway format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid room_hallway format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('room_net_area')
    def pattern_room_net_area(cls, v):
        pattern=re.compile(r"^[1-9][0-9]* .*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid room_net_area format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid room_net_area format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('room_occup')
    def pattern_room_occup(cls, v):
        pattern=re.compile(r"^[1-9][0-9]* .*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid room_occup format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid room_occup format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('room_vol')
    def pattern_room_vol(cls, v):
        pattern=re.compile(r"^[1-9][0-9]* .*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid room_vol format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid room_vol format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('room_wall_share')
    def pattern_room_wall_share(cls, v):
        pattern=re.compile(r"^([^\s-]{1,2}|[^\s-]+.+[^\s-]+);[1-9][0-9]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid room_wall_share format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid room_wall_share format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('root_cond')
    def pattern_root_cond(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)|.*)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid root_cond format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid root_cond format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('salinity')
    def pattern_salinity(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid salinity format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid salinity format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('salinity_meth')
    def pattern_salinity_meth(cls, v):
        pattern=re.compile(r"^PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid salinity_meth format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid salinity_meth format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('samp_floor')
    def pattern_samp_floor(cls, v):
        pattern=re.compile(r"^(?:(?:\d*1[1-3]th|\d*1st|\d*2nd|\d*3rd|\d*[04-9]th) floor|basement|lobby)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid samp_floor format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid samp_floor format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('samp_loc_corr_rate')
    def pattern_samp_loc_corr_rate(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+ *- *[-+]?[0-9]*\.?[0-9]+ ([^\s-]{1,2}|[^\s-]+.+[^\s-]+)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid samp_loc_corr_rate format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid samp_loc_corr_rate format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('samp_preserv')
    def pattern_samp_preserv(cls, v):
        pattern=re.compile(r"^.*;[-+]?[0-9]*\.?[0-9]+ ([^\s-]{1,2}|[^\s-]+.+[^\s-]+)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid samp_preserv format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid samp_preserv format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('samp_size')
    def pattern_samp_size(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid samp_size format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid samp_size format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('samp_store_dur')
    def pattern_samp_store_dur(cls, v):
        pattern=re.compile(r"^P(?:(?:\d+D|\d+M(?:\d+D)?|\d+Y(?:\d+M(?:\d+D)?)?)(?:T(?:\d+H(?:\d+M(?:\d+S)?)?|\d+M(?:\d+S)?|\d+S))?|T(?:\d+H(?:\d+M(?:\d+S)?)?|\d+M(?:\d+S)?|\d+S)|\d+W)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid samp_store_dur format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid samp_store_dur format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('samp_store_temp')
    def pattern_samp_store_temp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid samp_store_temp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid samp_store_temp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('samp_taxon_id')
    def pattern_samp_taxon_id(cls, v):
        pattern=re.compile(r"^.* \[NCBITaxon:\d+\]$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid samp_taxon_id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid samp_taxon_id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('samp_type')
    def pattern_samp_type(cls, v):
        pattern=re.compile(r"^([^\s-]{1,2}|[^\s-]+.+[^\s-]+) \[[a-zA-Z]{2,}:[a-zA-Z0-9]\d+\]$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid samp_type format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid samp_type format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('saturates_pc')
    def pattern_saturates_pc(cls, v):
        pattern=re.compile(r"^.*;[-+]?[0-9]*\.?[0-9]+ ([^\s-]{1,2}|[^\s-]+.+[^\s-]+)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid saturates_pc format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid saturates_pc format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('season_precpt')
    def pattern_season_precpt(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid season_precpt format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid season_precpt format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('season_temp')
    def pattern_season_temp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid season_temp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid season_temp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('silicate')
    def pattern_silicate(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid silicate format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid silicate format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('size_frac_low')
    def pattern_size_frac_low(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid size_frac_low format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid size_frac_low format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('size_frac_up')
    def pattern_size_frac_up(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid size_frac_up format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid size_frac_up format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('slope_aspect')
    def pattern_slope_aspect(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid slope_aspect format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid slope_aspect format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('slope_gradient')
    def pattern_slope_gradient(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid slope_gradient format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid slope_gradient format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('sludge_retent_time')
    def pattern_sludge_retent_time(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid sludge_retent_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid sludge_retent_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('sodium')
    def pattern_sodium(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid sodium format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid sodium format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('solar_irradiance')
    def pattern_solar_irradiance(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid solar_irradiance format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid solar_irradiance format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('soluble_react_phosp')
    def pattern_soluble_react_phosp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid soluble_react_phosp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid soluble_react_phosp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('specific_humidity')
    def pattern_specific_humidity(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid specific_humidity format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid specific_humidity format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('sulfate')
    def pattern_sulfate(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid sulfate format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid sulfate format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('sulfate_fw')
    def pattern_sulfate_fw(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid sulfate_fw format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid sulfate_fw format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('sulfide')
    def pattern_sulfide(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid sulfide format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid sulfide format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('surf_humidity')
    def pattern_surf_humidity(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid surf_humidity format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid surf_humidity format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('surf_moisture')
    def pattern_surf_moisture(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid surf_moisture format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid surf_moisture format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('surf_temp')
    def pattern_surf_temp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid surf_temp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid surf_temp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('suspend_part_matter')
    def pattern_suspend_part_matter(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid suspend_part_matter format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid suspend_part_matter format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tan')
    def pattern_tan(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tan format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tan format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('temp')
    def pattern_temp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid temp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid temp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('temp_out')
    def pattern_temp_out(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid temp_out format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid temp_out format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tiss_cult_growth_med')
    def pattern_tiss_cult_growth_med(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)|.*)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tiss_cult_growth_med format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tiss_cult_growth_med format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('toluene')
    def pattern_toluene(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid toluene format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid toluene format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_carb')
    def pattern_tot_carb(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_carb format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_carb format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_depth_water_col')
    def pattern_tot_depth_water_col(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_depth_water_col format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_depth_water_col format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_diss_nitro')
    def pattern_tot_diss_nitro(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_diss_nitro format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_diss_nitro format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_inorg_nitro')
    def pattern_tot_inorg_nitro(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_inorg_nitro format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_inorg_nitro format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_iron')
    def pattern_tot_iron(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_iron format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_iron format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_nitro')
    def pattern_tot_nitro(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_nitro format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_nitro format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_nitro_cont_meth')
    def pattern_tot_nitro_cont_meth(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_nitro_cont_meth format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_nitro_cont_meth format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_nitro_content')
    def pattern_tot_nitro_content(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_nitro_content format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_nitro_content format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_org_c_meth')
    def pattern_tot_org_c_meth(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_org_c_meth format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_org_c_meth format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_org_carb')
    def pattern_tot_org_carb(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_org_carb format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_org_carb format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_part_carb')
    def pattern_tot_part_carb(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_part_carb format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_part_carb format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_phosp')
    def pattern_tot_phosp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_phosp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_phosp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_phosphate')
    def pattern_tot_phosphate(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_phosphate format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_phosphate format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tot_sulfur')
    def pattern_tot_sulfur(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tot_sulfur format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tot_sulfur format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('turbidity')
    def pattern_turbidity(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid turbidity format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid turbidity format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tvdss_of_hcr_press')
    def pattern_tvdss_of_hcr_press(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tvdss_of_hcr_press format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tvdss_of_hcr_press format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('tvdss_of_hcr_temp')
    def pattern_tvdss_of_hcr_temp(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid tvdss_of_hcr_temp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid tvdss_of_hcr_temp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ventilation_rate')
    def pattern_ventilation_rate(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ventilation_rate format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ventilation_rate format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('vfa')
    def pattern_vfa(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid vfa format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid vfa format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('vfa_fw')
    def pattern_vfa_fw(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid vfa_fw format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid vfa_fw format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('wall_area')
    def pattern_wall_area(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid wall_area format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid wall_area format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('wall_height')
    def pattern_wall_height(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid wall_height format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid wall_height format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('wall_thermal_mass')
    def pattern_wall_thermal_mass(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid wall_thermal_mass format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid wall_thermal_mass format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('water_content')
    def pattern_water_content(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid water_content format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid water_content format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('water_current')
    def pattern_water_current(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid water_current format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid water_current format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('water_cut')
    def pattern_water_cut(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid water_cut format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid water_cut format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('water_feat_size')
    def pattern_water_feat_size(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid water_feat_size format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid water_feat_size format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('water_prod_rate')
    def pattern_water_prod_rate(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid water_prod_rate format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid water_prod_rate format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('wind_speed')
    def pattern_wind_speed(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid wind_speed format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid wind_speed format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('xylene')
    def pattern_xylene(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid xylene format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid xylene format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('infiltrations')
    def pattern_infiltrations(cls, v):
        pattern=re.compile(r"^(?:[0-9]|[1-9][0-9]|9[0-9]|0[0-9]|0[0-5][0-9]):[0-5][0-9]:[0-5][0-9]$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid infiltrations format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid infiltrations format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):bsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MobilePhaseSegment(ConfiguredBaseModel):
    """
    A fluid mixture of substances that flow though a chromatographic stationary phase.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MobilePhaseSegment',
         'comments': ['Can be assembled into a list to account for a gradient.',
                      'Works best for separations that can be accounted for by a '
                      'series of essentially linear changes in the mobile phase '
                      'composition.',
                      "For gradients, each segment should declare it's duration.",
                      'For step-wise separations that might be implemented with a '
                      'syringe and a cartridge, it will probably be more important to '
                      'assert volumes.'],
         'from_schema': 'https://w3id.org/nmdc/nmdc'})

    duration: Optional[QuantityValue] = Field(default=None, description="""The elapsed time of an activity.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'h|min'}},
         'domain_of': ['MixingProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess',
                       'MobilePhaseSegment'],
         'examples': [{'object': {'has_numeric_value': 2, 'has_unit': 'h'}}]} })
    substances_used: Optional[list[PortionOfSubstance]] = Field(default=None, description="""The substances that are combined to enable a ChemicalConversionProcess.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Extraction',
                       'StorageProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess',
                       'MobilePhaseSegment']} })
    type: Literal["https://w3id.org/nmdc/MobilePhaseSegment","nmdc:MobilePhaseSegment"] = Field(default="nmdc:MobilePhaseSegment", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    volume: Optional[QuantityValue] = Field(default=None, description="""The volume of a substance.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'mL|uL'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['Extraction',
                       'SubSamplingProcess',
                       'FiltrationProcess',
                       'MobilePhaseSegment',
                       'PortionOfSubstance']} })


class MaterialProcessing(PlannedProcess):
    """
    A process that takes one or more samples as inputs and generates one or more samples as outputs.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'broad_mappings': ['OBI:0000094'],
         'class_uri': 'nmdc:MaterialProcessing',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'notes': ['This class is a replacement for BiosampleProcessing.'],
         'slot_usage': {'has_input': {'name': 'has_input',
                                      'pattern': '^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'range': 'Sample',
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'name': 'has_output',
                                       'pattern': '^(nmdc):(procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'range': 'ProcessedSample',
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:(procsm)-{id_shoulder}-{id_blade}$'}}}})

    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    has_input: Optional[list[str]] = Field(default=None, description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(procsm)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MaterialProcessing","nmdc:MaterialProcessing"] = Field(default="nmdc:MaterialProcessing", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class Pooling(MaterialProcessing):
    """
    physical combination of several instances of like material.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:Pooling',
         'exact_mappings': ['OBI:0600016'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'has_input': {'minimum_cardinality': 2,
                                      'name': 'has_input',
                                      'pattern': '^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'required': True,
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'maximum_cardinality': 1,
                                       'minimum_cardinality': 1,
                                       'name': 'has_output',
                                       'pattern': '^(nmdc):procsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'required': True,
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:procsm-{id_shoulder}-{id_blade}$'}},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):poolp-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:poolp-{id_shoulder}-{id_blade}$'}}}})

    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", min_length=2, json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: list[str] = Field(default=..., description="""An output from a process.""", min_length=1, max_length=1, json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:procsm-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:poolp-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/Pooling","nmdc:Pooling"] = Field(default="nmdc:Pooling", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):procsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):poolp-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class Extraction(MaterialProcessing):
    """
    A material separation in which a desired component of an input material is separated from the remainder.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:Extraction',
         'exact_mappings': ['OBI:0302884'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'has_input': {'name': 'has_input',
                                      'pattern': '^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'range': 'Sample',
                                      'required': True,
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'name': 'has_output',
                                       'pattern': '^(nmdc):(procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'required': True,
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:(procsm)-{id_shoulder}-{id_blade}$'}},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):extrp-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:extrp-{id_shoulder}-{id_blade}$'}},
                        'volume': {'description': 'The volume of the solvent/solute '
                                                  'being used, not the input.',
                                   'name': 'volume'}}})

    substances_used: Optional[list[PortionOfSubstance]] = Field(default=None, description="""The substances that are combined to enable a ChemicalConversionProcess.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Extraction',
                       'StorageProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess',
                       'MobilePhaseSegment']} })
    extraction_targets: Optional[list[ExtractionTargetEnum]] = Field(default=None, description="""Provides the target biomolecule that has been separated from a sample during an extraction process.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Extraction'],
         'narrow_mappings': ['NCIT:C177560', 'MIXS:0000037'],
         'notes': ['todos, remove nucl_acid_ext from OmicsProcessing (DataGeneration)'],
         'rank': 1000} })
    input_mass: Optional[QuantityValue] = Field(default=None, title="sample mass used", description="""Total mass of sample used in activity.""", json_schema_extra = { "linkml_meta": {'aliases': ['sample mass', 'sample weight'],
         'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'g'}},
         'domain_of': ['Extraction'],
         'exact_mappings': ['MS:1000004'],
         'narrow_mappings': ['MIXS:0000111']} })
    volume: Optional[QuantityValue] = Field(default=None, description="""The volume of the solvent/solute being used, not the input.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'mL|uL'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['Extraction',
                       'SubSamplingProcess',
                       'FiltrationProcess',
                       'MobilePhaseSegment',
                       'PortionOfSubstance']} })
    temperature: Optional[QuantityValue] = Field(default=None, description="""The value of a temperature measurement or temperature used in a process.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['ChromatographyConfiguration',
                       'Extraction',
                       'SubSamplingProcess',
                       'StorageProcess',
                       'ChromatographicSeparationProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess'],
         'notes': ['Not to be confused with the MIXS:0000113']} })
    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: list[str] = Field(default=..., description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(procsm)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:extrp-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/Extraction","nmdc:Extraction"] = Field(default="nmdc:Extraction", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):extrp-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class LibraryPreparation(MaterialProcessing):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'aliases': ['LibraryConstruction'],
         'class_uri': 'nmdc:LibraryPreparation',
         'close_mappings': ['OBI:0000711'],
         'comments': ['OBI:0000711 specifies a DNA input (but not ONLY a DNA input)'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'has_input': {'name': 'has_input',
                                      'pattern': '^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'required': True,
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'name': 'has_output',
                                       'pattern': '^(nmdc):(procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'required': True,
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:(procsm)-{id_shoulder}-{id_blade}$'}},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):libprp-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:libprp-{id_shoulder}-{id_blade}$'}},
                        'pcr_cond': {'description': 'Description of reaction '
                                                    'conditions and components of '
                                                    'polymerase chain reaction '
                                                    'performed during library '
                                                    'preparation',
                                     'name': 'pcr_cond'}}})

    is_stranded: Optional[bool] = Field(default=None, description="""Is the (RNA) library stranded or non-stranded (unstranded).""", json_schema_extra = { "linkml_meta": {'comments': ['A value of true means the library is stranded, flase means '
                      'non-stranded.'],
         'domain_of': ['LibraryPreparation']} })
    library_preparation_kit: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['LibraryPreparation'], 'exact_mappings': ['GENEPIO:0001450']} })
    library_type: Optional[LibraryTypeEnum] = Field(default=None, title="library type", json_schema_extra = { "linkml_meta": {'domain_of': ['LibraryPreparation'], 'examples': [{'value': 'DNA'}]} })
    nucl_acid_amp: Optional[TextValue] = Field(default=None, title="nucleic acid amplification", description="""A link to a literature reference, electronic resource or a standard operating procedure (SOP), that describes the enzymatic amplification (PCR, TMA, NASBA) of specific nucleic acids""", json_schema_extra = { "linkml_meta": {'domain_of': ['LibraryPreparation'],
         'examples': [{'value': 'https://phylogenomics.me/protocols/16s-pcr-protocol/'}],
         'slot_uri': 'MIXS:0000038',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^({PMID}|{DOI}|{URL})$'}} })
    pcr_cond: Optional[str] = Field(default=None, title="pcr conditions", description="""Description of reaction conditions and components of polymerase chain reaction performed during library preparation""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'initial '
                                                     'denaturation:degrees_minutes;annealing:degrees_minutes;elongation:degrees_minutes;final '
                                                     'elongation:degrees_minutes;total '
                                                     'cycles'}},
         'domain_of': ['LibraryPreparation'],
         'examples': [{'value': 'initial '
                                'denaturation:94_3;annealing:50_1;elongation:72_1.5;final '
                                'elongation:72_10;35'},
                      {'value': 'initial denaturation:94degC_1.5min'}],
         'keywords': ['condition', 'pcr'],
         'slot_uri': 'MIXS:0000049',
         'string_serialization': 'initial '
                                 'denaturation:degrees_minutes;annealing:degrees_minutes;elongation:degrees_minutes;final '
                                 'elongation:degrees_minutes;total cycles'} })
    pcr_cycles: Optional[int] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['LibraryPreparation'], 'exact_mappings': ['OBI:0002475']} })
    pcr_primers: Optional[str] = Field(default=None, title="pcr primers", description="""PCR primers that were used to amplify the sequence of the targeted gene, locus or subfragment. This field should contain all the primers used for a single PCR reaction if multiple forward or reverse primers are present in a single PCR reaction. The primer sequence should be reported in uppercase letters""", json_schema_extra = { "linkml_meta": {'domain_of': ['LibraryPreparation'],
         'examples': [{'value': 'FWD:GTGCCAGCMGCCGCGGTAA;REV:GGACTACHVGGGTWTCTAAT'}],
         'keywords': ['pcr'],
         'slot_uri': 'MIXS:0000046',
         'structured_pattern': {'interpolated': True,
                                'syntax': 'FWD:{dna_bases};REV:{dna_bases}'}} })
    stranded_orientation: Optional[StrandedOrientationEnum] = Field(default=None, description="""Lists the strand orientiation for a stranded RNA library preparation.""", json_schema_extra = { "linkml_meta": {'domain_of': ['LibraryPreparation']} })
    target_gene: Optional[TargetGeneEnum] = Field(default=None, title="target gene", description="""Targeted gene or locus name for marker gene studies""", json_schema_extra = { "linkml_meta": {'domain_of': ['LibraryPreparation'],
         'examples': [{'value': '16S rRNA, 18S rRNA, nif, amoA, rpo'}],
         'keywords': ['target'],
         'slot_uri': 'MIXS:0000044'} })
    target_subfragment: Optional[TextValue] = Field(default=None, title="target subfragment", description="""Name of subfragment of a gene or locus. Important to e.g. identify special regions on marker genes like V6 on 16S rRNA""", json_schema_extra = { "linkml_meta": {'domain_of': ['LibraryPreparation'],
         'examples': [{'value': 'V6, V9, ITS'}],
         'keywords': ['target'],
         'slot_uri': 'MIXS:0000045'} })
    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: list[str] = Field(default=..., description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(procsm)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:libprp-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/LibraryPreparation","nmdc:LibraryPreparation"] = Field(default="nmdc:LibraryPreparation", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('nucl_acid_amp')
    def pattern_nucl_acid_amp(cls, v):
        pattern=re.compile(r"^(PMID:\d+|doi:10.\d{2,9}/.*|https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*))$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid nucl_acid_amp format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid nucl_acid_amp format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('pcr_primers')
    def pattern_pcr_primers(cls, v):
        pattern=re.compile(r"FWD:[ACGT];REV:[ACGT]")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid pcr_primers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid pcr_primers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):libprp-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class SubSamplingProcess(MaterialProcessing):
    """
    Separating a sample aliquot from the starting material for downstream activity.

    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:SubSamplingProcess',
         'contributors': ['ORCID:0009-0001-1555-1601',
                          'ORCID:0000-0002-8683-0050',
                          'ORCID:0000-0001-9076-6066',
                          'ORCID:0009-0008-4013-7737'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'notes': ['A subsample may be (a) a portion of the sample obtained by '
                   'selection or division; (b) an individual unit of the lot taken as '
                   'part of the sample; (c) the final unit of multistage sampling. The '
                   "term 'subsample' is used either in the sense of a 'sample of a "
                   "sample' or as a synonym for 'unit'. In practice, the meaning is "
                   'usually apparent from the context or is defined.',
                   'TODO - Montana to visit slot descriptions'],
         'related_mappings': ['OBI:0000744'],
         'slot_usage': {'has_input': {'name': 'has_input',
                                      'pattern': '^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'range': 'Sample',
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'description': 'The subsample.',
                                       'name': 'has_output',
                                       'pattern': '^(nmdc):(procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'range': 'ProcessedSample',
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:(procsm)-{id_shoulder}-{id_blade}$'}},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):subspr-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:subspr-{id_shoulder}-{id_blade}$'}},
                        'mass': {'description': 'The output mass of the SubSampling '
                                                'Process.',
                                 'name': 'mass'},
                        'volume': {'description': 'The output volume of the '
                                                  'SubSampling Process.',
                                   'name': 'volume'}}})

    container_size: Optional[QuantityValue] = Field(default=None, description="""The volume of the container an analyte is stored in or an activity takes place in""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'mL'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['SubSamplingProcess', 'FiltrationProcess']} })
    contained_in: Optional[ContainerCategoryEnum] = Field(default=None, description="""A type of container.""", json_schema_extra = { "linkml_meta": {'domain_of': ['SubSamplingProcess', 'StorageProcess'],
         'examples': [{'value': 'test tube'},
                      {'value': 'falcon tube'},
                      {'value': 'whirlpak'}]} })
    temperature: Optional[QuantityValue] = Field(default=None, description="""The value of a temperature measurement or temperature used in a process.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['ChromatographyConfiguration',
                       'Extraction',
                       'SubSamplingProcess',
                       'StorageProcess',
                       'ChromatographicSeparationProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess'],
         'notes': ['Not to be confused with the MIXS:0000113']} })
    volume: Optional[QuantityValue] = Field(default=None, description="""The output volume of the SubSampling Process.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'mL|uL'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['Extraction',
                       'SubSamplingProcess',
                       'FiltrationProcess',
                       'MobilePhaseSegment',
                       'PortionOfSubstance']} })
    mass: Optional[QuantityValue] = Field(default=None, title="mass", description="""The output mass of the SubSampling Process.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'g'}},
         'domain_of': ['SubSamplingProcess', 'PortionOfSubstance'],
         'exact_mappings': ['PATO:0000125']} })
    sampled_portion: Optional[list[SamplePortionEnum]] = Field(default=None, description="""The portion of the sample that is taken for downstream activity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['SubSamplingProcess', 'ProcessedSample']} })
    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    has_input: Optional[list[str]] = Field(default=None, description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""The subsample.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(procsm)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:subspr-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/SubSamplingProcess","nmdc:SubSamplingProcess"] = Field(default="nmdc:SubSamplingProcess", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):subspr-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MixingProcess(MaterialProcessing):
    """
    The combining of components, particles or layers into a more homogeneous state.

    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MixingProcess',
         'comments': ['The mixing may be achieved manually or mechanically by shifting '
                      'the material with stirrers or pumps or by revolving or shaking '
                      'the container.',
                      'The process must not permit segregation of particles of '
                      'different size or properties.',
                      'Homogeneity may be considered to have been achieved in a '
                      'practical sense when the sampling error of the processed '
                      'portion is negligible compared to the total error of the '
                      'measurement system.'],
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'has_input': {'name': 'has_input',
                                      'pattern': '^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'range': 'Sample',
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'description': 'The mixed sample.',
                                       'name': 'has_output',
                                       'pattern': '^(nmdc):procsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'range': 'ProcessedSample',
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:procsm-{id_shoulder}-{id_blade}$'}},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):mixpro-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'syntax': '{id_nmdc_prefix}:mixpro-{id_shoulder}-{id_blade}$'}}}})

    duration: Optional[QuantityValue] = Field(default=None, description="""The elapsed time of an activity.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'h|min'}},
         'domain_of': ['MixingProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess',
                       'MobilePhaseSegment'],
         'examples': [{'object': {'has_numeric_value': 2, 'has_unit': 'h'}}]} })
    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    has_input: Optional[list[str]] = Field(default=None, description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""The mixed sample.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:procsm-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'syntax': '{id_nmdc_prefix}:mixpro-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MixingProcess","nmdc:MixingProcess"] = Field(default="nmdc:MixingProcess", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):procsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):mixpro-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class FiltrationProcess(MaterialProcessing):
    """
    The process of segregation of phases; e.g. the separation of suspended solids from a liquid or gas, usually by forcing a carrier gas or liquid through a porous medium.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:FiltrationProcess',
         'contributors': ['ORCID:0009-0001-1555-1601',
                          'ORCID:0000-0002-8683-0050',
                          'ORCID:0000-0001-9076-6066',
                          'ORCID:0009-0008-4013-7737'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'related_mappings': ['CHMO:0001640'],
         'slot_usage': {'has_input': {'name': 'has_input',
                                      'pattern': '^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'range': 'Sample',
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'name': 'has_output',
                                       'pattern': '^(nmdc):procsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'range': 'ProcessedSample',
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:procsm-{id_shoulder}-{id_blade}$'}},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):filtpr-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:filtpr-{id_shoulder}-{id_blade}$'}},
                        'volume': {'description': 'The volume of sample filtered.',
                                   'name': 'volume'}}})

    conditionings: Optional[list[str]] = Field(default=None, description="""Preliminary treatment of either phase with a suitable solution of the other phase (in the absence of main extractable solute(s)) so that when the subsequent equilibration is carried out changes in the (volume) phase ratio or in the concentrations of other components are minimized.""", json_schema_extra = { "linkml_meta": {'domain_of': ['FiltrationProcess'], 'list_elements_ordered': True} })
    container_size: Optional[QuantityValue] = Field(default=None, description="""The volume of the container an analyte is stored in or an activity takes place in""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'mL'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['SubSamplingProcess', 'FiltrationProcess']} })
    filter_material: Optional[str] = Field(default=None, description="""A porous material on which solid particles present in air or other fluid which flows through it are largely caught and retained.""", json_schema_extra = { "linkml_meta": {'comments': ['Filters are made with a variety of materials: cellulose and '
                      'derivatives, glass fibre, ceramic, synthetic plastics and '
                      'fibres. Filters may be naturally porous or be made so by '
                      'mechanical or other means. Membrane/ceramic filters are '
                      'prepared with highly controlled pore size in a sheet of '
                      'suitable material such as polyfluoroethylene, polycarbonate or '
                      'cellulose esters. Nylon mesh is sometimes used for '
                      'reinforcement. The pores constitute 80–85% of the filter volume '
                      'commonly and several pore sizes are available for air sampling '
                      '(0.45−0.8 μm are commonly employed).'],
         'domain_of': ['FiltrationProcess']} })
    filter_pore_size: Optional[QuantityValue] = Field(default=None, description="""A quantitative or qualitative measurement of the physical dimensions of the pores in a material.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'um'}},
         'domain_of': ['FiltrationProcess']} })
    filtration_category: Optional[str] = Field(default=None, description="""The type of conditioning applied to a filter, device, etc.""", json_schema_extra = { "linkml_meta": {'domain_of': ['FiltrationProcess']} })
    is_pressurized: Optional[bool] = Field(default=None, description="""Whether or not pressure was applied to a thing or process.""", json_schema_extra = { "linkml_meta": {'domain_of': ['FiltrationProcess']} })
    separation_method: Optional[SeparationMethodEnum] = Field(default=None, description="""The method that was used to separate a substance from a solution or mixture.""", json_schema_extra = { "linkml_meta": {'domain_of': ['FiltrationProcess']} })
    volume: Optional[QuantityValue] = Field(default=None, description="""The volume of sample filtered.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'mL|uL'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['Extraction',
                       'SubSamplingProcess',
                       'FiltrationProcess',
                       'MobilePhaseSegment',
                       'PortionOfSubstance']} })
    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    has_input: Optional[list[str]] = Field(default=None, description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:procsm-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:filtpr-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/FiltrationProcess","nmdc:FiltrationProcess"] = Field(default="nmdc:FiltrationProcess", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):procsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):filtpr-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class ChromatographicSeparationProcess(MaterialProcessing):
    """
    The process of using a selective partitioning of the analyte or interferent between two immiscible phases.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:ChromatographicSeparationProcess',
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-1368-8217'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'has_input': {'name': 'has_input',
                                      'pattern': '^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'range': 'Sample',
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'name': 'has_output',
                                       'pattern': '^(nmdc):procsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'range': 'ProcessedSample',
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:procsm-{id_shoulder}-{id_blade}$'}},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):cspro-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'syntax': '{id_nmdc_prefix}:cspro-{id_shoulder}-{id_blade}$'}}}})

    chromatographic_category: Optional[ChromatographicCategoryEnum] = Field(default=None, description="""The type of chromatography used in a process.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ChromatographyConfiguration',
                       'ChromatographicSeparationProcess']} })
    ordered_mobile_phases: Optional[list[MobilePhaseSegment]] = Field(default=None, description="""The solution(s) that moves through a chromatography column.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ChromatographyConfiguration',
                       'ChromatographicSeparationProcess'],
         'list_elements_ordered': True} })
    stationary_phase: Optional[StationaryPhaseEnum] = Field(default=None, description="""The material the stationary phase is comprised of used in chromatography.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ChromatographyConfiguration',
                       'ChromatographicSeparationProcess']} })
    temperature: Optional[QuantityValue] = Field(default=None, description="""The value of a temperature measurement or temperature used in a process.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['ChromatographyConfiguration',
                       'Extraction',
                       'SubSamplingProcess',
                       'StorageProcess',
                       'ChromatographicSeparationProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess'],
         'notes': ['Not to be confused with the MIXS:0000113']} })
    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    has_input: Optional[list[str]] = Field(default=None, description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:procsm-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'syntax': '{id_nmdc_prefix}:cspro-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/ChromatographicSeparationProcess","nmdc:ChromatographicSeparationProcess"] = Field(default="nmdc:ChromatographicSeparationProcess", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):procsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):cspro-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class DissolvingProcess(MaterialProcessing):
    """
    A mixing step where a soluble component is mixed with a liquid component.

    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'aliases': ['Solubilization'],
         'class_uri': 'nmdc:DissolvingProcess',
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-1368-8217'],
         'exact_mappings': ['CHMO:0002773'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):dispro-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:dispro-{id_shoulder}-{id_blade}$'}}}})

    duration: Optional[QuantityValue] = Field(default=None, description="""The elapsed time of an activity.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'h|min'}},
         'domain_of': ['MixingProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess',
                       'MobilePhaseSegment'],
         'examples': [{'object': {'has_numeric_value': 2, 'has_unit': 'h'}}]} })
    temperature: Optional[QuantityValue] = Field(default=None, description="""The value of a temperature measurement or temperature used in a process.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['ChromatographyConfiguration',
                       'Extraction',
                       'SubSamplingProcess',
                       'StorageProcess',
                       'ChromatographicSeparationProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess'],
         'notes': ['Not to be confused with the MIXS:0000113']} })
    substances_used: Optional[list[PortionOfSubstance]] = Field(default=None, description="""The substances that are combined to enable a ChemicalConversionProcess.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Extraction',
                       'StorageProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess',
                       'MobilePhaseSegment']} })
    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    has_input: Optional[list[str]] = Field(default=None, description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(procsm)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:dispro-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/DissolvingProcess","nmdc:DissolvingProcess"] = Field(default="nmdc:DissolvingProcess", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):dispro-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class ChemicalConversionProcess(MaterialProcessing):
    """
    A process that results in the interconversion of chemical species by a reaction to transform the reagents into products.

    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'aliases': ['chemical reaction'],
         'class_uri': 'nmdc:ChemicalConversionProcess',
         'comments': ['The values of both has_reagents slot and has_input slot are '
                      'considered the reagents of a chemical process.'],
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-1368-8217'],
         'exact_mappings': ['MISO:0000001'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):chcpr-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:chcpr-{id_shoulder}-{id_blade}$'}}}})

    chemical_conversion_category: Optional[ChemicalConversionCategoryEnum] = Field(default=None, description="""The type of chemical conversion process.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ChemicalConversionProcess']} })
    duration: Optional[QuantityValue] = Field(default=None, description="""The elapsed time of an activity.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'h|min'}},
         'domain_of': ['MixingProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess',
                       'MobilePhaseSegment'],
         'examples': [{'object': {'has_numeric_value': 2, 'has_unit': 'h'}}]} })
    temperature: Optional[QuantityValue] = Field(default=None, description="""The value of a temperature measurement or temperature used in a process.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'Cel'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['ChromatographyConfiguration',
                       'Extraction',
                       'SubSamplingProcess',
                       'StorageProcess',
                       'ChromatographicSeparationProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess'],
         'notes': ['Not to be confused with the MIXS:0000113']} })
    substances_used: Optional[list[PortionOfSubstance]] = Field(default=None, description="""The substances that are combined to enable a ChemicalConversionProcess.""", json_schema_extra = { "linkml_meta": {'domain_of': ['Extraction',
                       'StorageProcess',
                       'DissolvingProcess',
                       'ChemicalConversionProcess',
                       'MobilePhaseSegment']} })
    substances_volume: Optional[QuantityValue] = Field(default=None, description="""The volume of the combined substances that was included in a ChemicalConversionProcess.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'mL'}},
         'domain_of': ['ChemicalConversionProcess']} })
    instrument_used: Optional[list[str]] = Field(default=None, description="""What instrument was used during DataGeneration or MaterialProcessing.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataGeneration', 'MaterialProcessing'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:inst-{id_shoulder}-{id_blade}$'}} })
    has_input: Optional[list[str]] = Field(default=None, description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(bsm|procsm)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(procsm)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: Optional[ProcessingInstitutionEnum] = Field(default=None, description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:chcpr-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/ChemicalConversionProcess","nmdc:ChemicalConversionProcess"] = Field(default="nmdc:ChemicalConversionProcess", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('instrument_used')
    def pattern_instrument_used(cls, v):
        pattern=re.compile(r"^(nmdc):inst-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid instrument_used format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid instrument_used format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(bsm|procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(procsm)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):chcpr-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class PortionOfSubstance(ConfiguredBaseModel):
    """
    A portion of any matter of defined composition that has discrete existence, whose origin may be biological, mineral or chemical.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:PortionOfSubstance',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'mappings': ['schema:Substance'],
         'title': 'Portion of a Substance'})

    final_concentration: Optional[QuantityValue] = Field(default=None, description="""When solutions A (containing substance X) and B are combined together, this slot captures the concentration of X in the combination""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units',
                                           'value': '%|mmol/L|umol/L|mg/L|g/L'}},
         'domain_of': ['PortionOfSubstance'],
         'is_a': 'concentration'} })
    mass: Optional[QuantityValue] = Field(default=None, title="mass", description="""A physical quality that inheres in a bearer by virtue of the proportion of the bearer's amount of matter.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'g'}},
         'domain_of': ['SubSamplingProcess', 'PortionOfSubstance'],
         'exact_mappings': ['PATO:0000125']} })
    source_concentration: Optional[QuantityValue] = Field(default=None, description="""When solutions A (containing substance X) and B are combined together, this slot captures the concentration of X in solution A""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units',
                                           'value': '%|mmol/L'}},
         'domain_of': ['PortionOfSubstance'],
         'is_a': 'concentration'} })
    known_as: Optional[ChemicalEntityEnum] = Field(default=None, description="""The substance from which a portion was taken.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PortionOfSubstance']} })
    substance_role: Optional[SubstanceRoleEnum] = Field(default=None, description="""The role of a substance in a process""", json_schema_extra = { "linkml_meta": {'domain_of': ['PortionOfSubstance']} })
    type: Literal["https://w3id.org/nmdc/PortionOfSubstance","nmdc:PortionOfSubstance"] = Field(default="nmdc:PortionOfSubstance", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    volume: Optional[QuantityValue] = Field(default=None, description="""The volume of a substance.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': 'mL|uL'}},
         'contributors': ['ORCID:0009-0001-1555-1601', 'ORCID:0000-0002-8683-0050'],
         'domain_of': ['Extraction',
                       'SubSamplingProcess',
                       'FiltrationProcess',
                       'MobilePhaseSegment',
                       'PortionOfSubstance']} })


class ProcessedSample(Sample):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:ProcessedSample',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):procsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:procsm-{id_shoulder}-{id_blade}$'}}},
         'title': 'Processed Sample'})

    biomaterial_purity: Optional[QuantityValue] = Field(default=None, description="""A measure of the purity of a biomaterial sample""", json_schema_extra = { "linkml_meta": {'abstract': True, 'domain_of': ['ProcessedSample']} })
    dna_absorb1: Optional[float] = Field(default=None, title="DNA absorbance 260/280", description="""260/280 measurement of DNA sample purity""", json_schema_extra = { "linkml_meta": {'comments': ['Recommended value is between 1 and 3.'],
         'domain_of': ['ProcessedSample'],
         'examples': [{'value': '2.02'}],
         'is_a': 'biomaterial_purity',
         'rank': 7,
         'recommended': True,
         'slot_group': 'JGI-Metagenomics'} })
    dna_concentration: Optional[float] = Field(default=None, title="DNA concentration in ng/ul", ge=0, le=2000, json_schema_extra = { "linkml_meta": {'comments': ['Units must be in ng/uL. Enter the numerical part only. Must be '
                      'calculated using a fluorometric method. Acceptable values are '
                      '0-2000.'],
         'domain_of': ['ProcessedSample'],
         'examples': [{'value': '100'}],
         'rank': 5,
         'recommended': True,
         'see_also': ['nmdc:nucleic_acid_concentration'],
         'slot_group': 'JGI-Metagenomics'} })
    external_database_identifiers: Optional[list[str]] = Field(default=None, description="""Link to corresponding identifier in external database""", json_schema_extra = { "linkml_meta": {'abstract': True,
         'close_mappings': ['skos:closeMatch'],
         'comments': ['The value of this field is always a registered CURIE'],
         'domain_of': ['ProcessedSample'],
         'is_a': 'alternative_identifiers'} })
    sampled_portion: Optional[list[SamplePortionEnum]] = Field(default=None, description="""The portion of the sample that is taken for downstream activity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['SubSamplingProcess', 'ProcessedSample']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:procsm-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/ProcessedSample","nmdc:ProcessedSample"] = Field(default="nmdc:ProcessedSample", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('external_database_identifiers')
    def pattern_external_database_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid external_database_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid external_database_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):procsm-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class Site(MaterialEntity):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'abstract': True,
         'class_uri': 'nmdc:Site',
         'comments': ['BCO sample collection site ?'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'title': 'Site'})

    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/Site","nmdc:Site"] = Field(default="nmdc:Site", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class FieldResearchSite(Site):
    """
    A site, outside of a laboratory, from which biosamples may be collected.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'aliases': ['research plot'],
         'class_uri': 'nmdc:FieldResearchSite',
         'comments': ["Provides grouping of biosamples at level that's more specific "
                      'than belonging to the same study',
                      'be very clear that this could be part of a larger site',
                      'In Bioscales, one might say that rhizosphere soil and bulk soil '
                      'from around the same plant were obtained at the same site. In '
                      'this case, the site would correspond to one tree.',
                      "might correspond to GOLD's identifier on a page like "
                      'https://gold.jgi.doe.gov/biosample?id=Gb0305833'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):frsite-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:frsite-{id_shoulder}-{id_blade}$'}},
                        'part_of': {'name': 'part_of',
                                    'pattern': '^(nmdc):frsite-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                    'range': 'FieldResearchSite',
                                    'structured_pattern': {'interpolated': True,
                                                           'syntax': '{id_nmdc_prefix}:frsite-{id_shoulder}-{id_blade}$'}}},
         'title': 'Field Research Site'})

    cur_vegetation: Optional[TextValue] = Field(default=None, title="current vegetation", description="""Vegetation classification from one or more standard classification systems, or agricultural crop""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'current vegetation type'}},
         'domain_of': ['FieldResearchSite', 'Biosample'],
         'keywords': ['vegetation'],
         'slot_uri': 'MIXS:0000312'} })
    elev: Optional[float] = Field(default=None, title="elevation", description="""Elevation of the sampling site is its height above a fixed reference point, most commonly the mean sea level. Elevation is mainly used when referring to points on the earth's surface, while altitude is used for points above the surface, such as an aircraft in flight or a spacecraft in orbit""", json_schema_extra = { "linkml_meta": {'annotations': {'Preferred_unit': {'tag': 'Preferred_unit', 'value': 'meter'}},
         'domain_of': ['FieldResearchSite', 'Biosample'],
         'examples': [{'value': '100 meter'}],
         'keywords': ['elevation'],
         'slot_uri': 'MIXS:0000093',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{scientific_float}( *- '
                                          '*{scientific_float})? *{text}$'}} })
    geo_loc_name: Optional[TextValue] = Field(default=None, title="geographic location (country and/or sea,region)", description="""The geographical origin of the sample as defined by the country or sea name followed by specific region name. Country or sea names should be chosen from the INSDC country list (http://insdc.org/country.html), or the GAZ ontology (http://purl.bioontology.org/ontology/GAZ)""", json_schema_extra = { "linkml_meta": {'domain_of': ['FieldResearchSite', 'Biosample'],
         'examples': [{'value': 'USA: Maryland, Bethesda'}],
         'keywords': ['geographic', 'location'],
         'slot_uri': 'MIXS:0000010',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{country}: {region}, {specific_location}$'}} })
    habitat: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['FieldResearchSite', 'Biosample']} })
    lat_lon: Optional[GeolocationValue] = Field(default=None, title="geographic location (latitude and longitude)", description="""The geographical origin of the sample as defined by latitude and longitude. The values should be reported in decimal degrees, limited to 8 decimal points, and in WGS84 system""", json_schema_extra = { "linkml_meta": {'domain_of': ['FieldResearchSite', 'Biosample'],
         'examples': [{'value': '50.586825 6.408977'}],
         'keywords': ['geographic', 'location'],
         'slot_uri': 'MIXS:0000009',
         'structured_pattern': {'interpolated': True,
                                'partial_match': True,
                                'syntax': '^{lat} {lon}$'}} })
    local_class: Optional[TextValue] = Field(default=None, title="soil_taxonomic/local classification", description="""Soil classification based on local soil classification system""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'local classification name'}},
         'domain_of': ['FieldResearchSite', 'Biosample'],
         'keywords': ['classification'],
         'slot_uri': 'MIXS:0000330'} })
    part_of: Optional[list[str]] = Field(default=None, description="""Links a resource to another resource that either logically or physically includes it.""", json_schema_extra = { "linkml_meta": {'aliases': ['is part of'],
         'domain_of': ['Study', 'FieldResearchSite'],
         'slot_uri': 'dcterms:isPartOf',
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:frsite-{id_shoulder}-{id_blade}$'}} })
    soil_type: Optional[TextValue] = Field(default=None, title="soil type", description="""Description of the soil type or classification. This field accepts terms under soil (http://purl.obolibrary.org/obo/ENVO_00001998).  Multiple terms can be separated by pipes""", json_schema_extra = { "linkml_meta": {'annotations': {'Expected_value': {'tag': 'Expected_value',
                                            'value': 'ENVO:00001998'}},
         'domain_of': ['FieldResearchSite', 'Biosample'],
         'examples': [{'value': 'plinthosol [ENVO:00002250]'}],
         'keywords': ['soil', 'type'],
         'slot_uri': 'MIXS:0000332'} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:frsite-{id_shoulder}-{id_blade}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/FieldResearchSite","nmdc:FieldResearchSite"] = Field(default="nmdc:FieldResearchSite", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('elev')
    def pattern_elev(cls, v):
        pattern=re.compile(r"^[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?( *- *[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)? *.*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid elev format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid elev format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('geo_loc_name')
    def pattern_geo_loc_name(cls, v):
        pattern=re.compile(r"^([^\s-]{1,2}|[^\s-]+.+[^\s-]+): ([^\s-]{1,2}|[^\s-]+.+[^\s-]+), ([^\s-]{1,2}|[^\s-]+.+[^\s-]+)$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid geo_loc_name format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid geo_loc_name format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('lat_lon')
    def pattern_lat_lon(cls, v):
        pattern=re.compile(r"^(-?((?:[0-8]?[0-9](?:\.\d{0,8})?)|90)) -?[0-9]+(?:\.[0-9]{0,8})?$|^-?(1[0-7]{1,2})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid lat_lon format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid lat_lon format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('part_of')
    def pattern_part_of(cls, v):
        pattern=re.compile(r"^(nmdc):frsite-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid part_of format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid part_of format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):frsite-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MagBin(ConfiguredBaseModel):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MagBin', 'from_schema': 'https://w3id.org/nmdc/nmdc'})

    bin_name: str = Field(default=..., description="""Name of the metagenome-assembled genome.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin']} })
    bin_quality: Optional[BinQualityEnum] = Field(default=None, description="""The quality of the metagenome-assembled genome based on MIMAG standards (https://doi.org/10.1038/nbt.3893).""", json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin']} })
    completeness: Optional[float] = Field(default=None, description="""Estimate of the completeness of the metagenome-assembled genome, estimated by a tool like CheckM.""", ge=0, json_schema_extra = { "linkml_meta": {'domain_of': ['EukEval', 'MagBin']} })
    contamination: Optional[float] = Field(default=None, description="""Estimate of the completeness of the metagenome-assembled genome, estimated by a tool like CheckM.""", ge=0, json_schema_extra = { "linkml_meta": {'domain_of': ['EukEval', 'MagBin']} })
    gene_count: Optional[int] = Field(default=None, description="""Number of genes.""", ge=0, json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin']} })
    gtdbtk_class: Optional[str] = Field(default=None, description="""Taxonomic class assigned by GTDB-Tk.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin'],
         'exact_mappings': ['TAXRANK:0000002'],
         'see_also': ['doi:10.1093/bioinformatics/btz848']} })
    gtdbtk_domain: Optional[str] = Field(default=None, description="""Taxonomic domain assigned by GTDB-Tk.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin'],
         'exact_mappings': ['TAXRANK:0000022'],
         'see_also': ['doi:10.1093/bioinformatics/btz848']} })
    gtdbtk_family: Optional[str] = Field(default=None, description="""Taxonomic family assigned by GTDB-Tk.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin'],
         'exact_mappings': ['TAXRANK:0000004'],
         'see_also': ['doi:10.1093/bioinformatics/btz848']} })
    gtdbtk_genus: Optional[str] = Field(default=None, description="""Taxonomic genus assigned by GTDB-Tk.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin'],
         'exact_mappings': ['TAXRANK:0000005'],
         'see_also': ['doi:10.1093/bioinformatics/btz848']} })
    gtdbtk_order: Optional[str] = Field(default=None, description="""Taxonomic order assigned by GTDB-Tk.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin'],
         'exact_mappings': ['TAXRANK:0000003'],
         'see_also': ['doi:10.1093/bioinformatics/btz848']} })
    gtdbtk_phylum: Optional[str] = Field(default=None, description="""Taxonomic phylum assigned by GTDB-Tk.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin'],
         'exact_mappings': ['TAXRANK:0000001'],
         'see_also': ['doi:10.1093/bioinformatics/btz848']} })
    gtdbtk_species: Optional[str] = Field(default=None, description="""Taxonomic genus assigned by GTDB-Tk.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin'],
         'exact_mappings': ['TAXRANK:0000006'],
         'see_also': ['doi:10.1093/bioinformatics/btz848']} })
    members_id: Optional[list[str]] = Field(default=None, description="""Names of the contigs that make up a metagenome-assembled genome.""", json_schema_extra = { "linkml_meta": {'close_mappings': ['GENEPIO:0100596'], 'domain_of': ['MagBin']} })
    num_16s: Optional[int] = Field(default=None, description="""Number of 16s sequences detected, a subunit of prokaryotic ribosomes.""", ge=0, json_schema_extra = { "linkml_meta": {'broad_mappings': ['OMIT:0013243'], 'domain_of': ['MagBin']} })
    num_23s: Optional[int] = Field(default=None, description="""Number of 23 seqeuences detected, a subunit of ribosomes.""", ge=0, json_schema_extra = { "linkml_meta": {'broad_mappings': ['OMIT:0013245'], 'domain_of': ['MagBin']} })
    num_5s: Optional[int] = Field(default=None, description="""Number of 5s seqeuences detected, a subunit of ribosomes.""", ge=0, json_schema_extra = { "linkml_meta": {'broad_mappings': ['OMIT:0013248'], 'domain_of': ['MagBin']} })
    num_t_rna: Optional[int] = Field(default=None, description="""Number of transfer transfer RNAs.""", ge=0, json_schema_extra = { "linkml_meta": {'broad_mappings': ['OMIT:0013250'], 'domain_of': ['MagBin']} })
    number_of_contig: Optional[int] = Field(default=None, description="""Number of contigs""", ge=0, json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin'], 'exact_mappings': ['GENEPIO:0000093']} })
    total_bases: Optional[int] = Field(default=None, description="""Total number of basepairs.""", ge=0, json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin']} })
    type: Literal["https://w3id.org/nmdc/MagBin","nmdc:MagBin"] = Field(default="nmdc:MagBin", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    eukaryotic_evaluation: Optional[EukEval] = Field(default=None, description="""Contains results from evaluating if a Metagenome-Assembled Genome is of eukaryotic lineage.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MagBin']} })


class MetaboliteIdentification(ConfiguredBaseModel):
    """
    This is used to link a metabolomics analysis workflow to a specific metabolite
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MetaboliteIdentification',
         'from_schema': 'https://w3id.org/nmdc/nmdc'})

    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    highest_similarity_score: Optional[float] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['MetaboliteIdentification'],
         'todos': ['Yuri to fill in description']} })
    metabolite_identified: Optional[str] = Field(default=None, description="""the specific metabolite identifier""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MetaboliteIdentification","nmdc:MetaboliteIdentification"] = Field(default="nmdc:MetaboliteIdentification", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class GeneProduct(NamedThing):
    """
    A molecule encoded by a gene that has an evolved function
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:GeneProduct',
         'exact_mappings': ['biolink:GeneProduct'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'id_prefixes': ['PR', 'UniProtKB', 'gtpo'],
         'notes': ['we may include a more general gene product class in future to '
                   'allow for ncRNA annotation']})

    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}]} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/GeneProduct","nmdc:GeneProduct"] = Field(default="nmdc:GeneProduct", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MetagenomeAssembly(WorkflowExecution):
    """
    A workflow execution activity that converts sequencing reads into an assembled metagenome.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MetagenomeAssembly',
         'comments': ['instances of this class may use a de novo assembly strategy in '
                      'most or all cases relevant to NMDC'],
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):wfmgas-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:wfmgas-{id_shoulder}-{id_blade}{id_version}$'}},
                        'superseded_by': {'name': 'superseded_by',
                                          'pattern': '^(nmdc):wfmgas-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                                          'range': 'MetagenomeAssembly',
                                          'structured_pattern': {'interpolated': True,
                                                                 'syntax': '{id_nmdc_prefix}:wfmgas-{id_shoulder}-{id_blade}{id_version}$'}},
                        'was_informed_by': {'name': 'was_informed_by',
                                            'pattern': '^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                            'range': 'NucleotideSequencing',
                                            'structured_pattern': {'interpolated': True,
                                                                   'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}}}})

    asm_score: Optional[float] = Field(default=None, description="""A score for comparing metagenomic assembly quality from same sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaffolds: Optional[float] = Field(default=None, description="""Total sequence count of all scaffolds.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_logsum: Optional[float] = Field(default=None, description="""The sum of the (length*log(length)) of all scaffolds, times some constant.  Increase the contiguity, the score will increase""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_powsum: Optional[float] = Field(default=None, description="""Powersum of all scaffolds is the same as logsum except that it uses the sum of (length*(length^P)) for some power P (default P=0.25).""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_max: Optional[float] = Field(default=None, description="""Maximum scaffold length.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_bp: Optional[float] = Field(default=None, description="""Total size in bp of all scaffolds.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_n50: Optional[float] = Field(default=None, description="""Given a set of scaffolds, each with its own length, the N50 count is defined as the smallest number of scaffolds whose length sum makes up half of genome size.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_n90: Optional[float] = Field(default=None, description="""Given a set of scaffolds, each with its own length, the N90 count is defined as the smallest number of scaffolds whose length sum makes up 90% of genome size.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_l50: Optional[float] = Field(default=None, description="""Given a set of scaffolds, the L50 is defined as the sequence length of the shortest scaffold at 50% of the total genome length.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_l90: Optional[float] = Field(default=None, description="""The L90 statistic is less than or equal to the L50 statistic; it is the length for which the collection of all scaffolds of that length or longer contains at least 90% of the sum of the lengths of all scaffolds.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_n_gt50k: Optional[float] = Field(default=None, description="""Total sequence count of scaffolds greater than 50 KB.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_l_gt50k: Optional[float] = Field(default=None, description="""Total size in bp of all scaffolds greater than 50 KB.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_pct_gt50k: Optional[float] = Field(default=None, description="""Total sequence size percentage of scaffolds greater than 50 KB.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    contigs: Optional[float] = Field(default=None, description="""The sum of the (length*log(length)) of all contigs, times some constant.  Increase the contiguity, the score will increase""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    contig_bp: Optional[float] = Field(default=None, description="""Total size in bp of all contigs.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_n50: Optional[float] = Field(default=None, description="""Given a set of contigs, each with its own length, the N50 count is defined as the smallest number_of_contigs whose length sum makes up half of genome size.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_l50: Optional[float] = Field(default=None, description="""Given a set of contigs, the L50 is defined as the sequence length of the shortest contig at 50% of the total genome length.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_n90: Optional[float] = Field(default=None, description="""Given a set of contigs, each with its own length, the N90 count is defined as the smallest number of contigs whose length sum makes up 90% of genome size.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_l90: Optional[float] = Field(default=None, description="""The L90 statistic is less than or equal to the L50 statistic; it is the length for which the collection of all contigs of that length or longer contains at least 90% of the sum of the lengths of all contigs.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_logsum: Optional[float] = Field(default=None, description="""Maximum contig length.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_powsum: Optional[float] = Field(default=None, description="""Powersum of all contigs is the same as logsum except that it uses the sum of (length*(length^P)) for some power P (default P=0.25).""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_max: Optional[float] = Field(default=None, description="""Maximum contig length.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    gap_pct: Optional[float] = Field(default=None, description="""The gap size percentage of all scaffolds.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    gc_std: Optional[float] = Field(default=None, description="""Standard deviation of GC content of all contigs.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    gc_avg: Optional[float] = Field(default=None, description="""Average of GC content of all contigs.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    num_input_reads: Optional[float] = Field(default=None, description="""The sequence count number of input reads for assembly.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    num_aligned_reads: Optional[float] = Field(default=None, description="""The sequence count number of input reads aligned to assembled contigs.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    insdc_assembly_identifiers: Optional[list[str]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'assembly_identifiers',
         'mixins': ['insdc_identifiers']} })
    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmgas-{id_shoulder}-{id_blade}{id_version}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmgas-{id_shoulder}-{id_blade}{id_version}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MetagenomeAssembly","nmdc:MetagenomeAssembly"] = Field(default="nmdc:MetagenomeAssembly", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('insdc_assembly_identifiers')
    def pattern_insdc_assembly_identifiers(cls, v):
        pattern=re.compile(r"^insdc.sra:[A-Z]+[0-9]+(\.[0-9]+)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid insdc_assembly_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid insdc_assembly_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_informed_by')
    def pattern_was_informed_by(cls, v):
        pattern=re.compile(r"^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_informed_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_informed_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('superseded_by')
    def pattern_superseded_by(cls, v):
        pattern=re.compile(r"^(nmdc):wfmgas-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid superseded_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid superseded_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):wfmgas-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MetatranscriptomeAssembly(WorkflowExecution):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MetatranscriptomeAssembly',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):wfmtas-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:wfmtas-{id_shoulder}-{id_blade}{id_version}$'}},
                        'superseded_by': {'name': 'superseded_by',
                                          'pattern': '^(nmdc):wfmtas-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                                          'range': 'MetatranscriptomeAssembly',
                                          'structured_pattern': {'interpolated': True,
                                                                 'syntax': '{id_nmdc_prefix}:wfmtas-{id_shoulder}-{id_blade}{id_version}$'}},
                        'was_informed_by': {'name': 'was_informed_by',
                                            'pattern': '^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                            'range': 'NucleotideSequencing',
                                            'structured_pattern': {'interpolated': True,
                                                                   'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}}}})

    asm_score: Optional[float] = Field(default=None, description="""A score for comparing metagenomic assembly quality from same sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaffolds: Optional[float] = Field(default=None, description="""Total sequence count of all scaffolds.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_logsum: Optional[float] = Field(default=None, description="""The sum of the (length*log(length)) of all scaffolds, times some constant.  Increase the contiguity, the score will increase""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_powsum: Optional[float] = Field(default=None, description="""Powersum of all scaffolds is the same as logsum except that it uses the sum of (length*(length^P)) for some power P (default P=0.25).""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_max: Optional[float] = Field(default=None, description="""Maximum scaffold length.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_bp: Optional[float] = Field(default=None, description="""Total size in bp of all scaffolds.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_n50: Optional[float] = Field(default=None, description="""Given a set of scaffolds, each with its own length, the N50 count is defined as the smallest number of scaffolds whose length sum makes up half of genome size.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_n90: Optional[float] = Field(default=None, description="""Given a set of scaffolds, each with its own length, the N90 count is defined as the smallest number of scaffolds whose length sum makes up 90% of genome size.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_l50: Optional[float] = Field(default=None, description="""Given a set of scaffolds, the L50 is defined as the sequence length of the shortest scaffold at 50% of the total genome length.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_l90: Optional[float] = Field(default=None, description="""The L90 statistic is less than or equal to the L50 statistic; it is the length for which the collection of all scaffolds of that length or longer contains at least 90% of the sum of the lengths of all scaffolds.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_n_gt50k: Optional[float] = Field(default=None, description="""Total sequence count of scaffolds greater than 50 KB.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_l_gt50k: Optional[float] = Field(default=None, description="""Total size in bp of all scaffolds greater than 50 KB.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    scaf_pct_gt50k: Optional[float] = Field(default=None, description="""Total sequence size percentage of scaffolds greater than 50 KB.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    contigs: Optional[float] = Field(default=None, description="""The sum of the (length*log(length)) of all contigs, times some constant.  Increase the contiguity, the score will increase""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    contig_bp: Optional[float] = Field(default=None, description="""Total size in bp of all contigs.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_n50: Optional[float] = Field(default=None, description="""Given a set of contigs, each with its own length, the N50 count is defined as the smallest number_of_contigs whose length sum makes up half of genome size.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_l50: Optional[float] = Field(default=None, description="""Given a set of contigs, the L50 is defined as the sequence length of the shortest contig at 50% of the total genome length.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_n90: Optional[float] = Field(default=None, description="""Given a set of contigs, each with its own length, the N90 count is defined as the smallest number of contigs whose length sum makes up 90% of genome size.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_l90: Optional[float] = Field(default=None, description="""The L90 statistic is less than or equal to the L50 statistic; it is the length for which the collection of all contigs of that length or longer contains at least 90% of the sum of the lengths of all contigs.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_logsum: Optional[float] = Field(default=None, description="""Maximum contig length.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_powsum: Optional[float] = Field(default=None, description="""Powersum of all contigs is the same as logsum except that it uses the sum of (length*(length^P)) for some power P (default P=0.25).""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    ctg_max: Optional[float] = Field(default=None, description="""Maximum contig length.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    gap_pct: Optional[float] = Field(default=None, description="""The gap size percentage of all scaffolds.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    gc_std: Optional[float] = Field(default=None, description="""Standard deviation of GC content of all contigs.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    gc_avg: Optional[float] = Field(default=None, description="""Average of GC content of all contigs.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    num_input_reads: Optional[float] = Field(default=None, description="""The sequence count number of input reads for assembly.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    num_aligned_reads: Optional[float] = Field(default=None, description="""The sequence count number of input reads aligned to assembled contigs.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'metagenome_assembly_parameter'} })
    insdc_assembly_identifiers: Optional[list[str]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAssembly', 'MetatranscriptomeAssembly'],
         'is_a': 'assembly_identifiers',
         'mixins': ['insdc_identifiers']} })
    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmtas-{id_shoulder}-{id_blade}{id_version}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmtas-{id_shoulder}-{id_blade}{id_version}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MetatranscriptomeAssembly","nmdc:MetatranscriptomeAssembly"] = Field(default="nmdc:MetatranscriptomeAssembly", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('insdc_assembly_identifiers')
    def pattern_insdc_assembly_identifiers(cls, v):
        pattern=re.compile(r"^insdc.sra:[A-Z]+[0-9]+(\.[0-9]+)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid insdc_assembly_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid insdc_assembly_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_informed_by')
    def pattern_was_informed_by(cls, v):
        pattern=re.compile(r"^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_informed_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_informed_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('superseded_by')
    def pattern_superseded_by(cls, v):
        pattern=re.compile(r"^(nmdc):wfmtas-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid superseded_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid superseded_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):wfmtas-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MetatranscriptomeAnnotation(AnnotatingWorkflow):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MetatranscriptomeAnnotation',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'gold_analysis_project_identifiers': {'name': 'gold_analysis_project_identifiers',
                                                              'pattern': '^gold:Ga[0-9]+$',
                                                              'structured_pattern': {'interpolated': True,
                                                                                     'syntax': '^gold:Ga[0-9]+$'}},
                        'has_input': {'name': 'has_input',
                                      'pattern': '^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                      'structured_pattern': {'interpolated': True,
                                                             'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}},
                        'has_output': {'name': 'has_output',
                                       'pattern': '^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                       'structured_pattern': {'interpolated': True,
                                                              'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}},
                        'id': {'name': 'id',
                               'pattern': '^(nmdc):wfmtan-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:wfmtan-{id_shoulder}-{id_blade}{id_version}$'}},
                        'img_identifiers': {'maximum_cardinality': 1,
                                            'name': 'img_identifiers'},
                        'superseded_by': {'name': 'superseded_by',
                                          'pattern': '^(nmdc):wfmtan-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                                          'range': 'MetatranscriptomeAnnotation',
                                          'structured_pattern': {'interpolated': True,
                                                                 'syntax': '{id_nmdc_prefix}:wfmtan-{id_shoulder}-{id_blade}{id_version}$'}},
                        'was_informed_by': {'name': 'was_informed_by',
                                            'pattern': '^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                            'range': 'NucleotideSequencing',
                                            'structured_pattern': {'interpolated': True,
                                                                   'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}}}})

    img_identifiers: Optional[list[str]] = Field(default=None, title="IMG Identifiers", description="""A list of identifiers that relate the biosample to records in the IMG database.""", max_length=1, json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAnnotation',
                       'Biosample',
                       'MetatranscriptomeAnnotation',
                       'MetatranscriptomeExpressionAnalysis',
                       'MagsAnalysis'],
         'is_a': 'external_database_identifiers',
         'todos': ['add is_a or mixin modeling, like other '
                   'external_database_identifiers',
                   'what class would IMG records belong to?! Are they Studies, '
                   'Biosamples, or something else?']} })
    gold_analysis_project_identifiers: Optional[list[str]] = Field(default=None, description="""identifiers for corresponding analysis projects in GOLD""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAnnotation', 'MetatranscriptomeAnnotation'],
         'examples': [{'value': 'gold:Ga0526289'}],
         'is_a': 'analysis_identifiers',
         'mixins': ['gold_identifiers'],
         'structured_pattern': {'interpolated': True, 'syntax': '^gold:Ga[0-9]+$'}} })
    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmtan-{id_shoulder}-{id_blade}{id_version}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmtan-{id_shoulder}-{id_blade}{id_version}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MetatranscriptomeAnnotation","nmdc:MetatranscriptomeAnnotation"] = Field(default="nmdc:MetatranscriptomeAnnotation", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('img_identifiers')
    def pattern_img_identifiers(cls, v):
        pattern=re.compile(r"^img\.taxon:[a-zA-Z0-9_][a-zA-Z0-9_\/\.]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid img_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid img_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('gold_analysis_project_identifiers')
    def pattern_gold_analysis_project_identifiers(cls, v):
        pattern=re.compile(r"^gold:Ga[0-9]+$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid gold_analysis_project_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid gold_analysis_project_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_informed_by')
    def pattern_was_informed_by(cls, v):
        pattern=re.compile(r"^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_informed_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_informed_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('superseded_by')
    def pattern_superseded_by(cls, v):
        pattern=re.compile(r"^(nmdc):wfmtan-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid superseded_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid superseded_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):wfmtan-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MetatranscriptomeExpressionAnalysis(WorkflowExecution):
    """
    A workflow process that provides expression values and read counts for gene features predicted on the contigs.
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MetatranscriptomeExpressionAnalysis',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):wfmtex-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:wfmtex-{id_shoulder}-{id_blade}{id_version}$'}},
                        'img_identifiers': {'maximum_cardinality': 1,
                                            'name': 'img_identifiers'},
                        'superseded_by': {'name': 'superseded_by',
                                          'pattern': '^(nmdc):wfmtex-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                                          'range': 'MetatranscriptomeExpressionAnalysis',
                                          'structured_pattern': {'interpolated': True,
                                                                 'syntax': '{id_nmdc_prefix}:wfmtex-{id_shoulder}-{id_blade}{id_version}$'}},
                        'was_informed_by': {'name': 'was_informed_by',
                                            'pattern': '^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                            'range': 'NucleotideSequencing',
                                            'structured_pattern': {'interpolated': True,
                                                                   'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}}}})

    img_identifiers: Optional[list[str]] = Field(default=None, title="IMG Identifiers", description="""A list of identifiers that relate the biosample to records in the IMG database.""", max_length=1, json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAnnotation',
                       'Biosample',
                       'MetatranscriptomeAnnotation',
                       'MetatranscriptomeExpressionAnalysis',
                       'MagsAnalysis'],
         'is_a': 'external_database_identifiers',
         'todos': ['add is_a or mixin modeling, like other '
                   'external_database_identifiers',
                   'what class would IMG records belong to?! Are they Studies, '
                   'Biosamples, or something else?']} })
    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmtex-{id_shoulder}-{id_blade}{id_version}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmtex-{id_shoulder}-{id_blade}{id_version}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MetatranscriptomeExpressionAnalysis","nmdc:MetatranscriptomeExpressionAnalysis"] = Field(default="nmdc:MetatranscriptomeExpressionAnalysis", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('img_identifiers')
    def pattern_img_identifiers(cls, v):
        pattern=re.compile(r"^img\.taxon:[a-zA-Z0-9_][a-zA-Z0-9_\/\.]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid img_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid img_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_informed_by')
    def pattern_was_informed_by(cls, v):
        pattern=re.compile(r"^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_informed_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_informed_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('superseded_by')
    def pattern_superseded_by(cls, v):
        pattern=re.compile(r"^(nmdc):wfmtex-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid superseded_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid superseded_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):wfmtex-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MagsAnalysis(WorkflowExecution):
    """
    A workflow execution activity that uses computational binning tools to group assembled contigs into genomes
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MagsAnalysis',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):wfmag-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:wfmag-{id_shoulder}-{id_blade}{id_version}$'}},
                        'img_identifiers': {'maximum_cardinality': 1,
                                            'name': 'img_identifiers'},
                        'superseded_by': {'name': 'superseded_by',
                                          'pattern': '^(nmdc):wfmag-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                                          'range': 'MagsAnalysis',
                                          'structured_pattern': {'interpolated': True,
                                                                 'syntax': '{id_nmdc_prefix}:wfmag-{id_shoulder}-{id_blade}{id_version}$'}},
                        'was_informed_by': {'name': 'was_informed_by',
                                            'pattern': '^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                            'range': 'NucleotideSequencing',
                                            'structured_pattern': {'interpolated': True,
                                                                   'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}}},
         'title': 'Metagenome-Assembled Genome analysis activity'})

    binned_contig_num: Optional[int] = Field(default=None, description="""Number of contigs that ended up in a medium or high quality bin.""", ge=0, json_schema_extra = { "linkml_meta": {'domain_of': ['MagsAnalysis']} })
    input_contig_num: Optional[int] = Field(default=None, description="""Total number of input contigs.""", ge=0, json_schema_extra = { "linkml_meta": {'domain_of': ['MagsAnalysis']} })
    low_depth_contig_num: Optional[int] = Field(default=None, description="""Number of contigs which were excluded from binning for depth of coverage.""", ge=0, json_schema_extra = { "linkml_meta": {'domain_of': ['MagsAnalysis']} })
    mags_list: Optional[list[MagBin]] = Field(default=None, description="""Contains detailed information about each metagenome-assembled genome.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MagsAnalysis']} })
    too_short_contig_num: Optional[int] = Field(default=None, description="""Number of contigs which were excluded from binning for length.""", ge=0, json_schema_extra = { "linkml_meta": {'domain_of': ['MagsAnalysis']} })
    unbinned_contig_num: Optional[int] = Field(default=None, description="""Number of contigs which did not end up in a medium or high quality bin.""", ge=0, json_schema_extra = { "linkml_meta": {'domain_of': ['MagsAnalysis']} })
    img_identifiers: Optional[list[str]] = Field(default=None, title="IMG Identifiers", description="""A list of identifiers that relate the biosample to records in the IMG database.""", max_length=1, json_schema_extra = { "linkml_meta": {'domain_of': ['MetagenomeAnnotation',
                       'Biosample',
                       'MetatranscriptomeAnnotation',
                       'MetatranscriptomeExpressionAnalysis',
                       'MagsAnalysis'],
         'is_a': 'external_database_identifiers',
         'todos': ['add is_a or mixin modeling, like other '
                   'external_database_identifiers',
                   'what class would IMG records belong to?! Are they Studies, '
                   'Biosamples, or something else?']} })
    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmag-{id_shoulder}-{id_blade}{id_version}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmag-{id_shoulder}-{id_blade}{id_version}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MagsAnalysis","nmdc:MagsAnalysis"] = Field(default="nmdc:MagsAnalysis", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('img_identifiers')
    def pattern_img_identifiers(cls, v):
        pattern=re.compile(r"^img\.taxon:[a-zA-Z0-9_][a-zA-Z0-9_\/\.]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid img_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid img_identifiers format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_informed_by')
    def pattern_was_informed_by(cls, v):
        pattern=re.compile(r"^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_informed_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_informed_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('superseded_by')
    def pattern_superseded_by(cls, v):
        pattern=re.compile(r"^(nmdc):wfmag-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid superseded_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid superseded_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):wfmag-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class ReadQcAnalysis(WorkflowExecution):
    """
    A workflow execution activity that performs quality control on raw Illumina reads including quality trimming, artifact removal, linker trimming, adapter trimming, spike-in removal, and human/cat/dog/mouse/microbe contaminant removal
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:ReadQcAnalysis',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):wfrqc-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:wfrqc-{id_shoulder}-{id_blade}{id_version}$'}},
                        'superseded_by': {'name': 'superseded_by',
                                          'pattern': '^(nmdc):wfrqc-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                                          'range': 'ReadQcAnalysis',
                                          'structured_pattern': {'interpolated': True,
                                                                 'syntax': '{id_nmdc_prefix}:wfrqc-{id_shoulder}-{id_blade}{id_version}$'}},
                        'was_informed_by': {'name': 'was_informed_by',
                                            'pattern': '^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                            'range': 'NucleotideSequencing',
                                            'structured_pattern': {'interpolated': True,
                                                                   'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}}},
         'title': 'Read quality control analysis activity'})

    input_base_count: Optional[float] = Field(default=None, description="""The nucleotide base count number of input reads for QC analysis.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ReadQcAnalysis'], 'is_a': 'read_qc_analysis_statistic'} })
    input_read_bases: Optional[float] = Field(default=None, description="""TODO      """, json_schema_extra = { "linkml_meta": {'domain_of': ['ReadQcAnalysis']} })
    input_read_count: Optional[float] = Field(default=None, description="""The sequence count number of input reads for QC analysis.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ReadQcAnalysis'], 'is_a': 'read_qc_analysis_statistic'} })
    output_base_count: Optional[float] = Field(default=None, description="""After QC analysis nucleotide base count number.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ReadQcAnalysis'], 'is_a': 'read_qc_analysis_statistic'} })
    output_read_bases: Optional[float] = Field(default=None, description="""TODO""", json_schema_extra = { "linkml_meta": {'domain_of': ['ReadQcAnalysis']} })
    output_read_count: Optional[float] = Field(default=None, description="""After QC analysis sequence count number.""", json_schema_extra = { "linkml_meta": {'domain_of': ['ReadQcAnalysis'], 'is_a': 'read_qc_analysis_statistic'} })
    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfrqc-{id_shoulder}-{id_blade}{id_version}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfrqc-{id_shoulder}-{id_blade}{id_version}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/ReadQcAnalysis","nmdc:ReadQcAnalysis"] = Field(default="nmdc:ReadQcAnalysis", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_informed_by')
    def pattern_was_informed_by(cls, v):
        pattern=re.compile(r"^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_informed_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_informed_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('superseded_by')
    def pattern_superseded_by(cls, v):
        pattern=re.compile(r"^(nmdc):wfrqc-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid superseded_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid superseded_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):wfrqc-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class ReadBasedTaxonomyAnalysis(WorkflowExecution):
    """
    A workflow execution activity that performs taxonomy classification using sequencing reads
    """
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:ReadBasedTaxonomyAnalysis',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):wfrbt-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:wfrbt-{id_shoulder}-{id_blade}{id_version}$'}},
                        'superseded_by': {'name': 'superseded_by',
                                          'pattern': '^(nmdc):wfrbt-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                                          'range': 'ReadBasedTaxonomyAnalysis',
                                          'structured_pattern': {'interpolated': True,
                                                                 'syntax': '{id_nmdc_prefix}:wfrbt-{id_shoulder}-{id_blade}{id_version}$'}},
                        'was_informed_by': {'name': 'was_informed_by',
                                            'pattern': '^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                            'range': 'NucleotideSequencing',
                                            'structured_pattern': {'interpolated': True,
                                                                   'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}}},
         'title': 'Read based analysis activity'})

    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(omprc|dgns)-{id_shoulder}-{id_blade}$'}} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfrbt-{id_shoulder}-{id_blade}{id_version}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfrbt-{id_shoulder}-{id_blade}{id_version}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/ReadBasedTaxonomyAnalysis","nmdc:ReadBasedTaxonomyAnalysis"] = Field(default="nmdc:ReadBasedTaxonomyAnalysis", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_informed_by')
    def pattern_was_informed_by(cls, v):
        pattern=re.compile(r"^(nmdc):(omprc|dgns)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_informed_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_informed_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('superseded_by')
    def pattern_superseded_by(cls, v):
        pattern=re.compile(r"^(nmdc):wfrbt-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid superseded_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid superseded_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):wfrbt-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MetabolomicsAnalysis(WorkflowExecution):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MetabolomicsAnalysis',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):wfmb-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:wfmb-{id_shoulder}-{id_blade}{id_version}$'}},
                        'peak_assignment_count': {'description': 'The total number of '
                                                                 'two dimensional mass '
                                                                 'to charge (m/z) : '
                                                                 'retention time '
                                                                 'features with '
                                                                 'associated '
                                                                 'metabolite '
                                                                 'identification in '
                                                                 'the metabolomics or '
                                                                 'lipidomics analysis.',
                                                  'name': 'peak_assignment_count'},
                        'peak_count': {'description': 'The total number of two '
                                                      'dimensional mass to charge '
                                                      '(m/z) : retention time features '
                                                      'detected in the metabolomics '
                                                      'analysis.',
                                       'name': 'peak_count'},
                        'superseded_by': {'name': 'superseded_by',
                                          'pattern': '^(nmdc):wfmb-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                                          'range': 'MetabolomicsAnalysis',
                                          'structured_pattern': {'interpolated': True,
                                                                 'syntax': '{id_nmdc_prefix}:wfmb-{id_shoulder}-{id_blade}{id_version}$'}},
                        'was_informed_by': {'name': 'was_informed_by',
                                            'pattern': '^(nmdc):(omprc|dgms)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                            'range': 'MassSpectrometry',
                                            'structured_pattern': {'interpolated': True,
                                                                   'syntax': '{id_nmdc_prefix}:(omprc|dgms)-{id_shoulder}-{id_blade}$'}}}})

    has_metabolite_identifications: Optional[list[MetaboliteIdentification]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['MetabolomicsAnalysis']} })
    uses_calibration: Optional[list[str]] = Field(default=None, description="""calibration information is used by a process""", json_schema_extra = { "linkml_meta": {'comments': ['Retenion index calibration data generated by a gas '
                      'chromatography mass spectromery run is used when analyzing '
                      'metabolomics data'],
         'domain_of': ['MetabolomicsAnalysis', 'NomAnalysis'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:calib-{id_shoulder}-{id_blade}$'}} })
    metabolomics_analysis_category: MetabolomicsAnalysisCategoryEnum = Field(default=..., description="""The category of metabolomics analysis being performed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetabolomicsAnalysis']} })
    peak_count: Optional[int] = Field(default=None, description="""The total number of two dimensional mass to charge (m/z) : retention time features detected in the metabolomics analysis.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetabolomicsAnalysis', 'NomAnalysis'],
         'is_a': 'ms_analysis_qc_metric'} })
    peak_assignment_count: Optional[int] = Field(default=None, description="""The total number of two dimensional mass to charge (m/z) : retention time features with associated metabolite identification in the metabolomics or lipidomics analysis.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetabolomicsAnalysis', 'NomAnalysis'],
         'is_a': 'ms_analysis_qc_metric'} })
    c13_isotopologue_count: Optional[int] = Field(default=None, description="""The number of two-dimensional mass-to-charge (m/z) versus retention time features that have been isotopically characterized as either 13C-containing isotopologues or monoisotopic (12C-only) features.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetabolomicsAnalysis'], 'is_a': 'ms_analysis_qc_metric'} })
    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(omprc|dgms)-{id_shoulder}-{id_blade}$'}} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmb-{id_shoulder}-{id_blade}{id_version}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmb-{id_shoulder}-{id_blade}{id_version}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MetabolomicsAnalysis","nmdc:MetabolomicsAnalysis"] = Field(default="nmdc:MetabolomicsAnalysis", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('uses_calibration')
    def pattern_uses_calibration(cls, v):
        pattern=re.compile(r"^(nmdc):calib-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid uses_calibration format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid uses_calibration format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_informed_by')
    def pattern_was_informed_by(cls, v):
        pattern=re.compile(r"^(nmdc):(omprc|dgms)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_informed_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_informed_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('superseded_by')
    def pattern_superseded_by(cls, v):
        pattern=re.compile(r"^(nmdc):wfmb-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid superseded_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid superseded_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):wfmb-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class MetaproteomicsAnalysis(AnnotatingWorkflow):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:MetaproteomicsAnalysis',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):wfmp-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:wfmp-{id_shoulder}-{id_blade}{id_version}$'}},
                        'superseded_by': {'name': 'superseded_by',
                                          'pattern': '^(nmdc):wfmp-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                                          'range': 'MetaproteomicsAnalysis',
                                          'structured_pattern': {'interpolated': True,
                                                                 'syntax': '{id_nmdc_prefix}:wfmp-{id_shoulder}-{id_blade}{id_version}$'}},
                        'was_informed_by': {'name': 'was_informed_by',
                                            'pattern': '^(nmdc):(omprc|dgms)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                            'range': 'MassSpectrometry',
                                            'structured_pattern': {'interpolated': True,
                                                                   'syntax': '{id_nmdc_prefix}:(omprc|dgms)-{id_shoulder}-{id_blade}$'}}}})

    metaproteomics_analysis_category: MetaproteomicsAnalysisCategoryEnum = Field(default=..., description="""The category of metaproteomics analysis being performed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetaproteomicsAnalysis']} })
    peptide_to_spectrum_match_count: Optional[int] = Field(default=None, description="""Total number of MS2 spectra with a false discovery rate passing peptide match.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetaproteomicsAnalysis'], 'is_a': 'ms_analysis_qc_metric'} })
    peptide_to_spectrum_match_rate: Optional[QuantityValue] = Field(default=None, description="""The percentage of peptide-to-spectrum matches relative to the total number of spectra analyzed.""", json_schema_extra = { "linkml_meta": {'annotations': {'storage_units': {'tag': 'storage_units', 'value': '%'}},
         'domain_of': ['MetaproteomicsAnalysis'],
         'is_a': 'ms_analysis_qc_metric'} })
    unique_peptide_seq_count: Optional[int] = Field(default=None, description="""The number of distinct peptide sequences identified in the LC-MS/MS file.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetaproteomicsAnalysis'], 'is_a': 'ms_analysis_qc_metric'} })
    razor_protein_count: Optional[int] = Field(default=None, description="""The minimal protein set that describes the unique peptide sequences identified after applying Razor Protein parsimony.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetaproteomicsAnalysis'], 'is_a': 'ms_analysis_qc_metric'} })
    mean_peptide_count: Optional[float] = Field(default=None, description="""The average number of peptides per protein identified in the metaproteomics analysis.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetaproteomicsAnalysis'], 'is_a': 'ms_analysis_qc_metric'} })
    total_protein_count: Optional[int] = Field(default=None, description="""The total number of distinct proteins identified in the metaproteomics analysis.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetaproteomicsAnalysis'], 'is_a': 'ms_analysis_qc_metric'} })
    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(omprc|dgms)-{id_shoulder}-{id_blade}$'}} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmp-{id_shoulder}-{id_blade}{id_version}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfmp-{id_shoulder}-{id_blade}{id_version}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/MetaproteomicsAnalysis","nmdc:MetaproteomicsAnalysis"] = Field(default="nmdc:MetaproteomicsAnalysis", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_informed_by')
    def pattern_was_informed_by(cls, v):
        pattern=re.compile(r"^(nmdc):(omprc|dgms)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_informed_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_informed_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('superseded_by')
    def pattern_superseded_by(cls, v):
        pattern=re.compile(r"^(nmdc):wfmp-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid superseded_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid superseded_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):wfmp-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


class NomAnalysis(WorkflowExecution):
    linkml_meta: ClassVar[LinkMLMeta] = LinkMLMeta({'class_uri': 'nmdc:NomAnalysis',
         'from_schema': 'https://w3id.org/nmdc/nmdc',
         'slot_usage': {'id': {'name': 'id',
                               'pattern': '^(nmdc):wfnom-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                               'required': True,
                               'structured_pattern': {'interpolated': True,
                                                      'syntax': '{id_nmdc_prefix}:wfnom-{id_shoulder}-{id_blade}{id_version}$'}},
                        'peak_assignment_count': {'description': 'The number of m/z '
                                                                 'peaks with assigned '
                                                                 'molecular formulas '
                                                                 'in the analysis.',
                                                  'name': 'peak_assignment_count'},
                        'superseded_by': {'name': 'superseded_by',
                                          'pattern': '^(nmdc):wfnom-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\\.[0-9]{1,})$',
                                          'range': 'NomAnalysis',
                                          'structured_pattern': {'interpolated': True,
                                                                 'syntax': '{id_nmdc_prefix}:wfnom-{id_shoulder}-{id_blade}{id_version}$'}},
                        'was_informed_by': {'name': 'was_informed_by',
                                            'pattern': '^(nmdc):(omprc|dgms)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$',
                                            'range': 'MassSpectrometry',
                                            'structured_pattern': {'interpolated': True,
                                                                   'syntax': '{id_nmdc_prefix}:(omprc|dgms)-{id_shoulder}-{id_blade}$'}}}})

    uses_calibration: Optional[list[str]] = Field(default=None, description="""calibration information is used by a process""", json_schema_extra = { "linkml_meta": {'comments': ['Retenion index calibration data generated by a gas '
                      'chromatography mass spectromery run is used when analyzing '
                      'metabolomics data'],
         'domain_of': ['MetabolomicsAnalysis', 'NomAnalysis'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:calib-{id_shoulder}-{id_blade}$'}} })
    peak_count: Optional[int] = Field(default=None, description="""The total number of peaks detected in the analysis.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetabolomicsAnalysis', 'NomAnalysis'],
         'is_a': 'ms_analysis_qc_metric'} })
    peak_assignment_count: Optional[int] = Field(default=None, description="""The number of m/z peaks with assigned molecular formulas in the analysis.""", json_schema_extra = { "linkml_meta": {'domain_of': ['MetabolomicsAnalysis', 'NomAnalysis'],
         'is_a': 'ms_analysis_qc_metric'} })
    ended_at_time: Optional[str] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:endedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    execution_resource: Optional[ExecutionResourceEnum] = Field(default=None, description="""The computing resource or facility where the workflow was executed.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'], 'examples': [{'value': 'NERSC-Cori'}]} })
    git_url: str = Field(default=..., description="""The url that points to the exact software repository location used to run a workflow""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'examples': [{'value': 'https://github.com/microbiomedata/mg_annotation/releases/tag/0.1'},
                      {'value': 'https://github.com/microbiomedata/metaMS/blob/master/metaMS/gcmsWorkflow.py'}]} })
    started_at_time: str = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'mappings': ['prov:startedAtTime'],
         'notes': ['The regex for ISO-8601 format was taken from here: '
                   'https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ '
                   'It may not be complete, but it is good enough for now.']} })
    version: Optional[str] = Field(default=None, description="""The NMDC release tag for a given workflow release used for data processing. If workflows are processed externally, as denoted by processing_institution, this value represents the best mapping between a processing institution's (e.g., JGI) workflow metadata and a NMDC tagged release.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution', 'ProvenanceMetadata'],
         'exact_mappings': ['schema:version'],
         'examples': [{'value': 'v1.2.0'}]} })
    was_informed_by: list[str] = Field(default=..., description="""The primary DataGeneration subclass that the WorkflowExecution subclass depends on.""", json_schema_extra = { "linkml_meta": {'comments': ['For version 1 of the proteomics workflow there are input files '
                      'both from the NucleotideSequencing and MassSpectrometry, the '
                      'MassSpectrometry record is considered the primary class to '
                      'reference.'],
         'domain_of': ['WorkflowExecution'],
         'narrow_mappings': ['prov:wasInformedBy'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'was_informed_by',
                                 'predicate': 'EXACT_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(omprc|dgms)-{id_shoulder}-{id_blade}$'}} })
    processing_institution_workflow_metadata: Optional[str] = Field(default=None, description="""Information about how workflow results were generated when the processing is done by an external organziation (e.g., JGI) such as software tool name and version or pipeline name and version.""", json_schema_extra = { "linkml_meta": {'domain_of': ['WorkflowExecution'],
         'examples': [{'value': 'metaspades v. 3.15.2'},
                      {'value': 'IMG Annotation Pipeline v.5.0.25'}],
         'mappings': ['NCIT:C165211']} })
    superseded_by: Optional[str] = Field(default=None, description="""Links a DataObject or WorkflowExecution record to a newer WorkflowExecution that  supersedes it, marking this record as outdated. The linked WorkflowExecution or resultant DataObjects should be used in favor of this record.""", json_schema_extra = { "linkml_meta": {'domain_of': ['DataObject', 'WorkflowExecution'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfnom-{id_shoulder}-{id_blade}{id_version}$'}} })
    has_input: list[str] = Field(default=..., description="""An input to a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['input'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    has_output: Optional[list[str]] = Field(default=None, description="""An output from a process.""", json_schema_extra = { "linkml_meta": {'aliases': ['output'],
         'domain_of': ['PlannedProcess'],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:(dobj)-{id_shoulder}-{id_blade}$'}} })
    processing_institution: ProcessingInstitutionEnum = Field(default=..., description="""The organization that processed the sample.""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    protocol_link: Optional[Protocol] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['Configuration', 'PlannedProcess', 'Study']} })
    start_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was started""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    end_date: Optional[str] = Field(default=None, description="""The date on which any process or activity was ended""", json_schema_extra = { "linkml_meta": {'comments': ['We are using string representations of dates until all '
                      'components of our ecosystem can handle ISO 8610 dates',
                      'The date should be formatted as YYYY-MM-DD'],
         'domain_of': ['PlannedProcess'],
         'todos': ['add date string validation pattern']} })
    qc_status: Optional[StatusEnum] = Field(default=None, description="""Stores information about the result of a process (ie the process of sequencing a library may have for qc_status of 'fail' if not enough data was generated)""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    qc_comment: Optional[str] = Field(default=None, description="""Slot to store additional comments about laboratory or workflow output. For workflow output it may describe the particular workflow stage that failed. (ie Failed at call-stage due to a malformed fastq file).""", json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    has_failure_categorization: Optional[list[FailureCategorization]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['PlannedProcess']} })
    id: str = Field(default=..., description="""A unique identifier for a thing. Must be either a CURIE shorthand for a URI or a complete URI""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing'],
         'examples': [{'description': 'https://github.com/microbiomedata/nmdc-schema/pull/499#discussion_r1018499248',
                       'value': 'nmdc:mgmag-00-x012.1_7_c1'}],
         'notes': ['abstracted pattern: '
                   'prefix:typecode-authshoulder-blade(.version)?(_seqsuffix)?',
                   'a minimum length of 3 characters is suggested for typecodes, but 1 '
                   'or 2 characters will be accepted',
                   'typecodes must correspond 1:1 to a class in the NMDC schema. this '
                   'will be checked via per-class id slot usage assertions',
                   'minting authority shoulders should probably be enumerated and '
                   'checked in the pattern'],
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_id',
                                 'predicate': 'NARROW_SYNONYM'},
                                {'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'data_object_id',
                                 'predicate': 'NARROW_SYNONYM'}],
         'structured_pattern': {'interpolated': True,
                                'syntax': '{id_nmdc_prefix}:wfnom-{id_shoulder}-{id_blade}{id_version}$'}} })
    name: Optional[str] = Field(default=None, description="""A human readable label for an entity""", json_schema_extra = { "linkml_meta": {'domain_of': ['PersonValue', 'NamedThing', 'Protocol']} })
    description: Optional[str] = Field(default=None, description="""a human-readable description of a thing""", json_schema_extra = { "linkml_meta": {'domain_of': ['ImageValue', 'NamedThing', 'Protocol'],
         'slot_uri': 'dcterms:description'} })
    alternative_identifiers: Optional[list[str]] = Field(default=None, description="""A list of alternative identifiers for the entity.""", json_schema_extra = { "linkml_meta": {'domain_of': ['NamedThing', 'MetaboliteIdentification']} })
    type: Literal["https://w3id.org/nmdc/NomAnalysis","nmdc:NomAnalysis"] = Field(default="nmdc:NomAnalysis", description="""the class_uri of the class that has been instantiated""", json_schema_extra = { "linkml_meta": {'designates_type': True,
         'domain_of': ['EukEval',
                       'FunctionalAnnotationAggMember',
                       'GenomeFeature',
                       'FunctionalAnnotation',
                       'AttributeValue',
                       'NamedThing',
                       'OntologyRelation',
                       'FailureCategorization',
                       'Protocol',
                       'CreditAssociation',
                       'Doi',
                       'ProvenanceMetadata',
                       'MobilePhaseSegment',
                       'PortionOfSubstance',
                       'MagBin',
                       'MetaboliteIdentification'],
         'examples': [{'value': 'nmdc:Biosample'}, {'value': 'nmdc:Study'}],
         'notes': ['makes it easier to read example data files',
                   'required for polymorphic MongoDB collections'],
         'see_also': ['https://github.com/microbiomedata/nmdc-schema/issues/1048',
                      'https://github.com/microbiomedata/nmdc-schema/issues/1233',
                      'https://github.com/microbiomedata/nmdc-schema/issues/248'],
         'slot_uri': 'rdf:type',
         'structured_aliases': [{'contexts': ['https://bitbucket.org/berkeleylab/jgi-jat/macros/nmdc_metadata.yaml'],
                                 'literal_form': 'workflow_execution_class',
                                 'predicate': 'NARROW_SYNONYM'}]} })

    @field_validator('uses_calibration')
    def pattern_uses_calibration(cls, v):
        pattern=re.compile(r"^(nmdc):calib-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid uses_calibration format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid uses_calibration format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('ended_at_time')
    def pattern_ended_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid ended_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid ended_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('started_at_time')
    def pattern_started_at_time(cls, v):
        pattern=re.compile(r"^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid started_at_time format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid started_at_time format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('was_informed_by')
    def pattern_was_informed_by(cls, v):
        pattern=re.compile(r"^(nmdc):(omprc|dgms)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid was_informed_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid was_informed_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('superseded_by')
    def pattern_superseded_by(cls, v):
        pattern=re.compile(r"^(nmdc):wfnom-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid superseded_by format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid superseded_by format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_input')
    def pattern_has_input(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_input format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_input format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('has_output')
    def pattern_has_output(cls, v):
        pattern=re.compile(r"^(nmdc):(dobj)-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid has_output format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid has_output format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('id')
    def pattern_id(cls, v):
        pattern=re.compile(r"^(nmdc):wfnom-([0-9][a-z]{0,6}[0-9])-([A-Za-z0-9]{1,})(\.[0-9]{1,})$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid id format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid id format: {v}"
            raise ValueError(err_msg)
        return v

    @field_validator('alternative_identifiers')
    def pattern_alternative_identifiers(cls, v):
        pattern=re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9_\.]+:[a-zA-Z0-9_][a-zA-Z0-9_\-\/\.,\(\)\=\#]*$")
        if isinstance(v, list):
            for element in v:
                if isinstance(element, str) and not pattern.match(element):
                    err_msg = f"Invalid alternative_identifiers format: {element}"
                    raise ValueError(err_msg)
        elif isinstance(v, str) and not pattern.match(v):
            err_msg = f"Invalid alternative_identifiers format: {v}"
            raise ValueError(err_msg)
        return v


# Model rebuild
# see https://pydantic-docs.helpmanual.io/usage/models/#rebuilding-a-model
EukEval.model_rebuild()
FunctionalAnnotationAggMember.model_rebuild()
Database.model_rebuild()
GenomeFeature.model_rebuild()
FunctionalAnnotation.model_rebuild()
AttributeValue.model_rebuild()
QuantityValue.model_rebuild()
ImageValue.model_rebuild()
PersonValue.model_rebuild()
TextValue.model_rebuild()
TimestampValue.model_rebuild()
ControlledTermValue.model_rebuild()
ControlledIdentifiedTermValue.model_rebuild()
GeolocationValue.model_rebuild()
PropertyAssertion.model_rebuild()
NamedThing.model_rebuild()
OntologyClass.model_rebuild()
FunctionalAnnotationTerm.model_rebuild()
OrthologyGroup.model_rebuild()
OntologyRelation.model_rebuild()
FailureCategorization.model_rebuild()
MaterialEntity.model_rebuild()
Instrument.model_rebuild()
PlannedProcess.model_rebuild()
CollectingBiosamplesFromSite.model_rebuild()
StorageProcess.model_rebuild()
Protocol.model_rebuild()
CreditAssociation.model_rebuild()
Doi.model_rebuild()
Study.model_rebuild()
InformationObject.model_rebuild()
Configuration.model_rebuild()
MassSpectrometryConfiguration.model_rebuild()
ChromatographyConfiguration.model_rebuild()
Manifest.model_rebuild()
CalibrationInformation.model_rebuild()
DataObject.model_rebuild()
DataEmitterProcess.model_rebuild()
DataGeneration.model_rebuild()
NucleotideSequencing.model_rebuild()
MassSpectrometry.model_rebuild()
WorkflowExecution.model_rebuild()
ProvenanceMetadata.model_rebuild()
AnnotatingWorkflow.model_rebuild()
MetagenomeAnnotation.model_rebuild()
Sample.model_rebuild()
Biosample.model_rebuild()
MobilePhaseSegment.model_rebuild()
MaterialProcessing.model_rebuild()
Pooling.model_rebuild()
Extraction.model_rebuild()
LibraryPreparation.model_rebuild()
SubSamplingProcess.model_rebuild()
MixingProcess.model_rebuild()
FiltrationProcess.model_rebuild()
ChromatographicSeparationProcess.model_rebuild()
DissolvingProcess.model_rebuild()
ChemicalConversionProcess.model_rebuild()
PortionOfSubstance.model_rebuild()
ProcessedSample.model_rebuild()
Site.model_rebuild()
FieldResearchSite.model_rebuild()
MagBin.model_rebuild()
MetaboliteIdentification.model_rebuild()
GeneProduct.model_rebuild()
MetagenomeAssembly.model_rebuild()
MetatranscriptomeAssembly.model_rebuild()
MetatranscriptomeAnnotation.model_rebuild()
MetatranscriptomeExpressionAnalysis.model_rebuild()
MagsAnalysis.model_rebuild()
ReadQcAnalysis.model_rebuild()
ReadBasedTaxonomyAnalysis.model_rebuild()
MetabolomicsAnalysis.model_rebuild()
MetaproteomicsAnalysis.model_rebuild()
NomAnalysis.model_rebuild()
