Skip to content

Sub Classes#

address #

Address #

Bases: BaseModel

Address object comparable to schema.org PostalAddress

Parameters:

Name Type Description Default
addressCountry CountryAlpha2 | None

Country code, see ISO 3166-1 alpha-2

None
addressRegion str | None

Region within the country

None
addressLocality str | None

Locality within the region

None
postOfficeBoxNumber str | None
None
postalCode str | None
None
streetAddress str | None

Name of the street and number within street

None
Source code in src/microbial_strain_data_model/classes/address.py
class Address(BaseModel):
    """
    Address object comparable to schema.org PostalAddress
    """

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    addressCountry: CountryAlpha2 | None = Field(
        default=None, title="Country", description="Country code, see ISO 3166-1 alpha-2"
    )
    addressRegion: str | None = Field(
        default=None, title="Region", description="Region within the country"
    )
    addressLocality: str | None = Field(
        default=None, title="Locality", description="Locality within the region"
    )
    postOfficeBoxNumber: str | None = Field(default=None, title="Post Office Box Number")
    postalCode: str | None = Field(default=None, title="Postal Code")
    streetAddress: str | None = Field(
        default=None,
        title="Street Address",
        description="Name of the street and number within street",
    )

    _check_values = model_validator(mode="after")(check_not_completely_empty)

application #

Application #

Bases: BaseModel

Application of the strain

Parameters:

Name Type Description Default
application str

Name of the application or patent

required
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/application.py
class Application(BaseModel):
    """Application of the strain"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    application: str = Field(
        title="Application", description="Name of the application or patent"
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

biosafety #

BioSafety #

Bases: BaseModel

Biosafety classification

Parameters:

Name Type Description Default
riskgroup str

In most cases a number system 1-4

required
classification str | None

Classification Agency or Country, e.g. 'WHO' or 'German classification'

None
url HttpUrl | None

Uniform Resource Locator of a resource on the Internet

None
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/biosafety.py
class BioSafety(BaseModel):
    """Biosafety classification"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    riskgroup: str = Field(
        title="Riskgroup", description="In most cases a number system 1-4"
    )
    classification: str | None = Field(
        default=None,
        title="Classification",
        description="Classification Agency or Country, e.g. 'WHO' or "
        "'German classification'",
    )
    url: HttpUrl | None = Field(
        default=None,
        title="URL",
        description="Uniform Resource Locator of a resource on the Internet",
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

chemicalsubstance #

CellWall #

Bases: ChemicalSubstance

Cell Wall constituent - ChemSubstance + percent of CellWall

Parameters:

Name Type Description Default
name str | None

Valid scientific name

None
identifier list[Identifier]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
alternateName list[str]

List of alternative names for this substance

<dynamic>
percent Annotated[float, FieldInfo] | None
None
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/chemicalsubstance.py
class CellWall(ChemicalSubstance):
    """Cell Wall constituent - ChemSubstance + percent of CellWall"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    percent: Annotated[float, Field(ge=0, le=100)] | None = Field(
        default=None, title="Percent"
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

ChemicalSubstance #

Bases: BaseModel

Chemical Substance base class

Parameters:

Name Type Description Default
name str | None

Valid scientific name

None
identifier list[Identifier]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
alternateName list[str]

List of alternative names for this substance

<dynamic>
Source code in src/microbial_strain_data_model/classes/chemicalsubstance.py
class ChemicalSubstance(BaseModel):
    """Chemical Substance base class"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    name: str | None = Field(
        default=None,
        title="Name of Chemical Substance",
        description="Valid scientific name",
    )
    identifier: list[Identifier] = Field(default_factory=list, title="Identifier")
    alternateName: list[str] = Field(
        default_factory=list,
        title="Alternate Name",
        description="List of alternative names for this substance",
    )

    _check_values = model_validator(mode="after")(check_not_completely_empty)

FattyAcid #

Bases: ChemicalSubstance

Single Fatty Acid - used in Fatty Acid Profile

Parameters:

Name Type Description Default
name str | None

Valid scientific name

None
identifier list[Identifier]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
alternateName list[str]

List of alternative names for this substance

<dynamic>
percent Annotated[float, FieldInfo] | None
None
ecl str | None
None
Source code in src/microbial_strain_data_model/classes/chemicalsubstance.py
class FattyAcid(ChemicalSubstance):
    """Single Fatty Acid - used in Fatty Acid Profile"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    percent: Annotated[float, Field(ge=0, le=100)] | None = Field(
        default=None, title="Percent"
    )
    ecl: str | None = Field(default=None, title="ECL")

Halophil #

Bases: ChemicalSubstance

Halophily abilities of a Strain

Parameters:

Name Type Description Default
name str | None

Valid scientific name

None
identifier list[Identifier]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
alternateName list[str]

List of alternative names for this substance

<dynamic>
minimal float | None

Single optimal growth value

None
maximal float | None

Single optimal growth value

None
optimal float | None

Single optimal growth value

None
unit ConcentrationUnit
required
tests list[GrowthRange]

List of tests and if the strain grows in tested ranges

<dynamic>
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/chemicalsubstance.py
class Halophil(ChemicalSubstance):
    """Halophily abilities of a Strain"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )
    minimal: float | None = Field(
        default=None, title="Optimal", description="Single optimal growth value"
    )
    maximal: float | None = Field(
        default=None, title="Optimal", description="Single optimal growth value"
    )
    optimal: float | None = Field(
        default=None, title="Optimal", description="Single optimal growth value"
    )
    unit: ConcentrationUnit = Field(title="Unit", description="")

    tests: list[GrowthRange] = Field(
        default_factory=list,
        title="Tests",
        description="List of tests and if the strain grows in tested ranges",
    )

    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

Metabolite #

Bases: ChemicalSubstance

Information about tested Metabolites

Parameters:

Name Type Description Default
name str | None

Valid scientific name

None
identifier list[Identifier]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
alternateName list[str]

List of alternative names for this substance

<dynamic>
tests list[MetaboliteTest]

List of performed tests on this metabolite

<dynamic>
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/chemicalsubstance.py
class Metabolite(ChemicalSubstance):
    """Information about tested Metabolites"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    tests: list[MetaboliteTest] = Field(
        default_factory=list,
        title="Tests",
        description="List of performed tests on this metabolite",
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

country #

Country #

Bases: BaseModel

Country information, mostly on nagoya protocol

Parameters:

Name Type Description Default
name CountryAlpha2 | CountryHistoricalAlpha2 | CountryOtherCodes

Country code, see ISO 3166-1 alpha-2

required
identifier list[Identifier]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
conventionOfBiologicalDiversityParty bool | None
None
cartagenaProtocolParty bool | None
None
nagoyaProtocolParty bool | None
None
nagoyaKualaLumpurParty bool | None
None
Source code in src/microbial_strain_data_model/classes/country.py
class Country(BaseModel):
    """Country information, mostly on nagoya protocol"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    name: CountryAlpha2 | CountryHistoricalAlpha2 | CountryOtherCodes = Field(
        title="Country name", description="Country code, see ISO 3166-1 alpha-2"
    )
    identifier: list[Identifier] = Field(default_factory=list, title="Identifier")
    conventionOfBiologicalDiversityParty: bool | None = Field(
        default=None, title="Is Convention Of Biological Diversity Party"
    )
    cartagenaProtocolParty: bool | None = Field(
        default=None, title="Is Cartagena Protocol Party"
    )
    nagoyaProtocolParty: bool | None = Field(
        default=None, title="Is Nagoya Protocol Party"
    )
    nagoyaKualaLumpurParty: bool | None = Field(
        default=None, title="Is Nagoya Kuala Lumpur Party"
    )

cultivationmedia #

CultivationMedia #

Bases: BaseModel

Cultivation media, use links to Media Dive or other resources

Parameters:

Name Type Description Default
name str
required
url HttpUrl | None
None
reagentUsed list[str]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
relatedData list[Annotated[str, StringConstraints]]

JSON paths to relation object

<dynamic>
Source code in src/microbial_strain_data_model/classes/cultivationmedia.py
class CultivationMedia(BaseModel):
    """Cultivation media, use links to Media Dive or other resources"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    name: str = Field(title="Name")
    url: HttpUrl | None = Field(default=None, title="URL")
    reagentUsed: list[str] = Field(default_factory=list, title="Reagent Used")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )
    relatedData: list[RelationLink] = Field(
        default_factory=list,
        title="Related Data",
        description="JSON paths to relation object",
    )

enums #

ColonyColor #

Bases: str, Enum

Valid colors for colonies

Attributes:

Name Type Description
white

white

cream

cream

yellowish

yellowish

orange

orange

pink

pink

red

red

buff

buff

darkbrown

darkbrown

reyish

reyish

tannish

tannish

beige

beige

brownish

brownish

Source code in src/microbial_strain_data_model/classes/enums.py
class ColonyColor(str, Enum):
    """
    Valid colors for colonies

    Attributes:
        white: white
        cream: cream
        yellowish: yellowish
        orange: orange
        pink: pink
        red: red
        buff: buff
        darkbrown: darkbrown
        reyish: reyish
        tannish: tannish
        beige: beige
        brownish: brownish
    """

    white = "white"
    cream = "cream"
    yellowish = "yellowish"
    orange = "orange"
    pink = "pink"
    red = "red"
    buff = "buff"
    darkbrown = "darkbrown"
    reyish = "reyish"
    tannish = "tannish"
    beige = "beige"
    brownish = "brownish"

ConcentrationUnit #

Bases: str, Enum

Valid concentration units for solutions

Attributes:

Name Type Description
gram_per_liter

g/L

mol_per_liter

mol/L

mass_percent

g/g%

volume_percent

v/v%

Source code in src/microbial_strain_data_model/classes/enums.py
class ConcentrationUnit(str, Enum):
    """
    Valid concentration units for solutions

    Attributes:
        gram_per_liter: g/L
        mol_per_liter: mol/L
        mass_percent: g/g%
        volume_percent: v/v%
    """

    gram_per_liter = "g/L"
    mol_per_liter = "mol/L"
    mass_percent = "g/g%"
    volume_percent = "v/v%"
    unknown = "unknown"

CountryHistoricalAlpha2 #

Bases: str, Enum

WARNING: This list was generated by ChatGPT no human verification has been done so far

Attributes:

Name Type Description
CS

Czechoslovakia

DD

German Democratic Republic (East Germany)

DY

Dahomey

FQ

French Southern and Antarctic Territories

GE

Gilbert and Ellice Islands

HV

Upper Volta

JT

Johnston Island

MI

Midway Islands

NH

New Hebrides

RH

Southern Rhodesia

SU

Soviet Union

TP

East Timor

UK

United Kingdom

VD

North Vietnam

YU

Yugoslavia

ZR

Zaire

BU

Burma

AN

Netherlands Antilles

Source code in src/microbial_strain_data_model/classes/enums.py
class CountryHistoricalAlpha2(str, Enum):
    """
    WARNING: This list was generated by ChatGPT no human verification has been done so far

    Attributes:
        CS: Czechoslovakia
        DD: German Democratic Republic (East Germany)
        DY: Dahomey
        FQ: French Southern and Antarctic Territories
        GE: Gilbert and Ellice Islands
        HV: Upper Volta
        JT: Johnston Island
        MI: Midway Islands
        NH: New Hebrides
        RH: Southern Rhodesia
        SU: Soviet Union
        TP: East Timor
        UK: United Kingdom
        VD: North Vietnam
        YU: Yugoslavia
        ZR: Zaire
        BU: Burma
        AN: Netherlands Antilles
    """

    CS = "Czechoslovakia"
    DD = "German Democratic Republic (East Germany)"
    DY = "Dahomey"  # Now Benin
    FQ = "French Southern and Antarctic Territories"  # Now part of TF
    GE = "Gilbert and Ellice Islands"  # Split into Kiribati (KI) and Tuvalu (TV)
    HV = "Upper Volta"  # Now Burkina Faso (BF)
    JT = "Johnston Island"  # Now part of UM (United States Minor Outlying Islands)
    MI = "Midway Islands"  # Now part of UM (United States Minor Outlying Islands)
    NH = "New Hebrides"  # Now Vanuatu (VU)
    RH = "Southern Rhodesia"  # Now Zimbabwe (ZW)
    SU = "Soviet Union"
    TP = "East Timor"  # Now Timor-Leste (TL)
    UK = "United Kingdom"  # Historical usage for GB
    VD = "North Vietnam"  # Now part of Vietnam (VN)
    YU = "Yugoslavia"
    ZR = "Zaire"  # Now Democratic Republic of the Congo (CD)
    BU = "Burma"  # Now Myanmar (MM)
    AN = "Netherlands Antilles"  # Dissolved, now CW (Curaçao), SX (Sint Maarten), etc.

CountryOtherCodes #

Bases: str, Enum

Other allowed Values in case of non-country origin

Attributes:

Name Type Description
international

International Region

other

Other

unknown

Unknown

Source code in src/microbial_strain_data_model/classes/enums.py
class CountryOtherCodes(str, Enum):
    """
    Other allowed Values in case of non-country origin

    Attributes:
        international: International Region
        other: Other
        unknown: Unknown
    """

    international = "International Region"
    other = "Other"

CurationMode #

Bases: str, Enum

Curation mode options

Attributes:

Name Type Description
manual

manual

automated

automated

unknown

unknown

Source code in src/microbial_strain_data_model/classes/enums.py
class CurationMode(str, Enum):
    """
    Curation mode options

    Attributes:
        manual: manual
        automated: automated
        unknown: unknown
    """

    manual = "manual"
    automated = "automated"
    unknown = "unknown"

FlagellumArrangement #

Bases: str, Enum

Valid flagellum arrangement options

Attributes:

Name Type Description
polar

Polar

peritrichous

Peritrichous

monotrichous_polar

Monotrichous polar

Source code in src/microbial_strain_data_model/classes/enums.py
class FlagellumArrangement(str, Enum):
    """
    Valid flagellum arrangement options

    Attributes:
        polar: Polar
        peritrichous: Peritrichous
        monotrichous_polar: Monotrichous polar
    """

    polar = "Polar"
    peritrichous = "Peritrichous"
    monotrichous_polar = "Monotrichous polar"

GCMethod #

Bases: str, Enum

Methods for GC measurement

Attributes:

Name Type Description
experimental

experimental

genomeSequence

genome sequence

Source code in src/microbial_strain_data_model/classes/enums.py
class GCMethod(str, Enum):
    """
    Methods for GC measurement

    Attributes:
        experimental: experimental
        genomeSequence: genome sequence
    """

    experimental = "experimental"
    genomeSequence = "genome sequence"

HemolysisBlood #

Bases: str, Enum

Valid blood types

Attributes:

Name Type Description
sheep

sheep

horse

horse

unknown

unknown

Source code in src/microbial_strain_data_model/classes/enums.py
class HemolysisBlood(str, Enum):
    """
    Valid blood types

    Attributes:
        sheep: sheep
        horse: horse
        unknown: unknown
    """

    sheep = "sheep"
    horse = "horse"
    unknown = "unknown"

HemolysisType #

Bases: str, Enum

Valid hemolysis types

Attributes:

Name Type Description
alpha

alpha

beta

beta

gamma

gamma

Source code in src/microbial_strain_data_model/classes/enums.py
class HemolysisType(str, Enum):
    """
    Valid hemolysis types

    Attributes:
        alpha: alpha
        beta: beta
        gamma: gamma
    """

    alpha = "alpha"
    beta = "beta"
    gamma = "gamma"

Host #

Bases: str, Enum

Valid host types

Attributes:

Name Type Description
plant

plant

animal

animal

invertebrates

invertebrates

vertebrates

vertebrates

mammals

mammals

primates

non-human primates

human

human

fungi

fungi

Source code in src/microbial_strain_data_model/classes/enums.py
class Host(str, Enum):
    """
    Valid host types

    Attributes:
        plant: plant
        animal: animal
        invertebrates: invertebrates
        vertebrates: vertebrates
        mammals: mammals
        primates: non-human primates
        human: human
        fungi: fungi
    """

    plant = "plant"
    animal = "animal"
    invertebrates = "invertebrates"
    vertebrates = "vertebrates"
    mammals = "mammals"
    primates = "non-human primates"
    human = "human"
    fungi = "fungi"

KindOfUtilization #

Bases: str, Enum

Types of utilization

Attributes:

Name Type Description
assimilation

assimilation

buildsAcidFrom

builds acid from

degradation

degradation

energySource

energy source

fermentation

fermentation

hydrolysis

hydrolysis

reduction

reduction

Source code in src/microbial_strain_data_model/classes/enums.py
class KindOfUtilization(str, Enum):
    """
    Types of utilization

    Attributes:
        assimilation: assimilation
        buildsAcidFrom: builds acid from
        degradation: degradation
        energySource: energy source
        fermentation: fermentation
        hydrolysis:  hydrolysis
        reduction:  reduction
    """

    assimilation = "assimilation"
    buildsAcidFrom = "builds acid from"
    degradation = "degradation"
    energySource = "energy source"
    fermentation = "fermentation"
    hydrolysis = "hydrolysis"
    reduction = "reduction"

MetaboliteTestType #

Bases: str, Enum

Valid metabolite test types

Attributes:

Name Type Description
utilization

Utilization

production

Production

Source code in src/microbial_strain_data_model/classes/enums.py
class MetaboliteTestType(str, Enum):
    """
    Valid metabolite test types

    Attributes:
        utilization: Utilization
        production: Production
    """

    util = "utilization"
    prod = "production"

Morph #

Bases: str, Enum

Valid morph types for fungi

Attributes:

Name Type Description
yeast

yeast

filamentous

filamentous

Source code in src/microbial_strain_data_model/classes/enums.py
class Morph(str, Enum):
    """
    Valid morph types for fungi

    Attributes:
        yeast: yeast
        filamentous: filamentous
    """

    yeast = "yeast"
    filamentous = "filamentous"

NagoyaRestrictions #

Bases: str, Enum

Valid values of Nagoya protocol information

Attributes:

Name Type Description
no_restrictions

No known restrictions under the Nagoya protocol

documents_available

Documents providing proof of legal access and terms of use available at the collection

contact_collection

Strain probably in scope, please contact the culture collection

Source code in src/microbial_strain_data_model/classes/enums.py
class NagoyaRestrictions(str, Enum):
    """
    Valid values of Nagoya protocol information

    Attributes:
        no_restrictions: No known restrictions under the Nagoya protocol
        documents_available: Documents providing proof of legal access and terms of use available at the collection
        contact_collection: Strain probably in scope, please contact the culture collection
    """

    no_restrictions = "No known restrictions under the Nagoya protocol"
    documents_available = (
        "Documents providing proof of legal access and terms of use "
        "available at the collection"
    )
    contact_collection = "Strain probably in scope, please contact the culture collection"

OrganismType #

Bases: str, Enum

Valid organism types

Attributes:

Name Type Description
algae

Algae

archaea

Archaea

bacteria

Bacteria

fungi

Fungi

protist

Protist

Source code in src/microbial_strain_data_model/classes/enums.py
class OrganismType(str, Enum):
    """
    Valid organism types

    Attributes:
        algae: Algae
        archaea: Archaea
        bacteria: Bacteria
        fungi: Fungi
        protist: Protist
    """

    algae = "Algae"
    archaea = "Archaea"
    bacteria = "Bacteria"
    fungi = "Fungi"
    protist = "Protist"

OxygenTolerance #

Bases: str, Enum

How does the strain tolerate Oxygen

Attributes:

Name Type Description
aerobe

aerobe

aerotolerant

aerotolerant

anaerobe

anaerobe

facultativeAerobe

facultative aerobe

facultativeAnaerobe

facultative anaerobe

microaerophile

microaerophile

microaerotolerant

microaerotolerant

obligateAerobe

obligate aerobe

obligateAnaerobe

obligate anaerobe

Source code in src/microbial_strain_data_model/classes/enums.py
class OxygenTolerance(str, Enum):
    """
    How does the strain tolerate Oxygen

    Attributes:
        aerobe: aerobe
        aerotolerant: aerotolerant
        anaerobe: anaerobe
        facultativeAerobe: facultative aerobe
        facultativeAnaerobe: facultative anaerobe
        microaerophile: microaerophile
        microaerotolerant: microaerotolerant
        obligateAerobe: obligate aerobe
        obligateAnaerobe: obligate anaerobe
    """

    aerobe = "aerobe"
    aerotolerant = "aerotolerant"
    anaerobe = "anaerobe"
    facultativeAerobe = "facultative aerobe"
    facultativeAnaerobe = "facultative anaerobe"
    microaerophile = "microaerophile"
    microaerotolerant = "microaerotolerant"
    obligateAerobe = "obligate aerobe"
    obligateAnaerobe = "obligate anaerobe"

PathogenLevel #

Bases: str, Enum

Valid pathogen levels

Attributes:

Name Type Description
no

no pathogen

opportunistic

opportunistic

obligate

obligate

Source code in src/microbial_strain_data_model/classes/enums.py
class PathogenLevel(str, Enum):
    """
    Valid pathogen levels

    Attributes:
        no: no pathogen
        opportunistic: opportunistic
        obligate: obligate
    """

    no = "no pathogen"
    opportunistic = "opportunistic"
    obligate = "obligate"

Restriction #

Bases: str, Enum

Valid supply forms

Attributes:

Name Type Description
no_restrictions

No known restrictions apply

no_commercial

Only for non-commercial purposes

agreement

For commercial development a special agreement is requested

Source code in src/microbial_strain_data_model/classes/enums.py
class Restriction(str, Enum):
    """
    Valid supply forms

    Attributes:
        no_restrictions: No known restrictions apply
        no_commercial: Only for non-commercial purposes
        agreement: For commercial development a special agreement is requested
    """

    no_restrictions = "No known restrictions apply"
    no_commercial = "Only for non-commercial purposes"
    agreement = "For commercial development a special agreement is requested"

SequenceLevel #

Bases: str, Enum

Valid sequence level categories

Attributes:

Name Type Description
genome

genome

id_sequence

identifier sequence

gene

gene

artificial

artificial

other

other

Source code in src/microbial_strain_data_model/classes/enums.py
class SequenceLevel(str, Enum):
    """
    Valid sequence level categories

    Attributes:
        genome: genome
        id_sequence: identifier sequence
        gene: gene
        artificial: artificial
        other: other
    """

    genome = "genome"
    id_sequence = "identifier sequence"
    gene = "gene"
    artificial = "artificial"
    other = "other"

SequenceType #

Bases: str, Enum

Valid sequence types

Attributes:

Name Type Description
nucleotide

Nucleotide

protein

Protein

Source code in src/microbial_strain_data_model/classes/enums.py
class SequenceType(str, Enum):
    """
    Valid sequence types

    Attributes:
        nucleotide: Nucleotide
        protein: Protein
    """

    nuc = "nucleotide"
    pro = "protein"

SizeUnit #

Bases: str, Enum

Valid size options for microbes

Attributes:

Name Type Description
µm

µm

mm

mm

Source code in src/microbial_strain_data_model/classes/enums.py
class SizeUnit(str, Enum):
    """
    Valid size options for microbes

    Attributes:
        µm: µm
        mm: mm
    """

    µm = "µm"
    mm = "mm"

SourceType #

Bases: str, Enum

Source type options

Attributes:

Name Type Description
literature

literature

website

website

dataset

dataset

Source code in src/microbial_strain_data_model/classes/enums.py
class SourceType(str, Enum):
    """
    Source type options

    Attributes:
        literature: literature
        website: website
        dataset: dataset
    """

    literature = "literature"
    website = "website"
    dataset = "dataset"

SporeType #

Bases: str, Enum

Valid spore types

Attributes:

Name Type Description
spore

spore

endospore

endospore

Source code in src/microbial_strain_data_model/classes/enums.py
class SporeType(str, Enum):
    """
    Valid spore types

    Attributes:
        spore: spore
        endospore: endospore
    """

    spore = "spore"
    endospore = "endospore"

StainingValue #

Bases: str, Enum

Valid staining test results

Attributes:

Name Type Description
pos

positive

neg

negative

var

variable

Source code in src/microbial_strain_data_model/classes/enums.py
class StainingValue(str, Enum):
    """
    Valid staining test results

    Attributes:
        pos: positive
        neg: negative
        var: variable
    """

    pos = "positive"
    neg = "negative"
    var = "variable"

SupplyForm #

Bases: str, Enum

Valid supply forms

Attributes:

Name Type Description
agar

Agar

cryo

Cryo

dry

Dry ice

liquid

Liquid medium

lyo

Lyophilization

oil

Oil

water

Water

dna

DNA

Source code in src/microbial_strain_data_model/classes/enums.py
class SupplyForm(str, Enum):
    """
    Valid supply forms

    Attributes:
        agar: Agar
        cryo: Cryo
        dry: Dry ice
        liquid: Liquid medium
        lyo: Lyophilization
        oil: Oil
        water: Water
        dna: DNA
    """

    agar = "Agar"
    cryo = "Cryo"
    dry = "Dry ice"
    liquid = "Liquid medium"
    lyo = "Lyo"
    oil = "Oil"
    water = "Water"
    dna = "DNA"

TaxonRank #

Bases: str, Enum

Valid ranks of taxonomy

Attributes:

Name Type Description
subspecies

subspecies

species

species

section

section

genus

genus

family

family

order

order

tax_class

class

phylum

phylum

domain

domain

Source code in src/microbial_strain_data_model/classes/enums.py
class TaxonRank(str, Enum):
    """
    Valid ranks of taxonomy

    Attributes:
        subspecies: subspecies
        species: species
        section: section
        genus: genus
        family: family
        order: order
        tax_class: class
        phylum: phylum
        domain: domain
    """

    subspecies = "subspecies"
    species = "species"
    section = "section"
    genus = "genus"
    family = "family"
    order = "order"
    tax_class = "class"
    phylum = "phylum"
    domain = "domain"

TaxonStatus #

Bases: str, Enum

Valid taxon status

Attributes:

Name Type Description
proposed

Proposed

valid

Validly published

valid_synonym

Validly published synonym

Source code in src/microbial_strain_data_model/classes/enums.py
class TaxonStatus(str, Enum):
    """
    Valid taxon status

    Attributes:
        proposed: Proposed
        valid: Validly published
        valid_synonym: Validly published synonym
    """

    proposed = "proposed"
    valid = "validly published"
    synonym = "validly published synonym"

ToleranceReaction #

Bases: str, Enum

Valid tolerance reactions

Attributes:

Name Type Description
Sensitive

No tolerance

Resistant

High tolerance

Intermediate

Not assignable

Source code in src/microbial_strain_data_model/classes/enums.py
class ToleranceReaction(str, Enum):
    """
    Valid tolerance reactions

    Attributes:
        Sensitive: No tolerance
        Resistant: High tolerance
        Intermediate: Not assignable
    """

    sensitive = "sensitive"
    resistant = "resistant"
    intermediate = "intermediate"

enzyme #

Enzyme #

Bases: BaseModel

Information about one enzyme

Parameters:

Name Type Description Default
name str | None
None
hasECNumber str

An EC number defined by the Enzyme Commission

required
identifier list[Identifier]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
alternateName list[str]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
active bool | None

Is this enzyme active

None
relatedData list[Annotated[str, StringConstraints]]

JSON paths to relation object

<dynamic>
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/enzyme.py
class Enzyme(BaseModel):
    """Information about one enzyme"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    name: str | None = Field(default=None, title="Name")
    hasECNumber: Annotated[
        str,
        StringConstraints(
            strip_whitespace=True, to_upper=True, pattern=r"(?:EC)? ?\d+\.\d+\.\d+\.n?\d+"
        ),
    ] = Field(
        title="EC Number",
        description="An EC number defined by the Enzyme Commission",
    )
    identifier: list[Identifier] = Field(default_factory=list, title="Identifier")
    alternateName: list[str] = Field(default_factory=list, title="Alternate Name")
    active: bool | None = Field(
        default=None, title="Active", description="Is this enzyme active"
    )
    relatedData: list[RelationLink] = Field(
        default_factory=list,
        title="Related Data",
        description="JSON paths to relation object",
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

fattyacidprofile #

FattyAcidProfile #

Bases: BaseModel

Full Fatty Acid Profile

Parameters:

Name Type Description Default
profile list[FattyAcid]

List of fatty acids and their percentages

<dynamic>
library str | None

The used library

None
software str | None

The used software

None
relatedData list[Annotated[str, StringConstraints]]

JSON paths to relation object

<dynamic>
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/fattyacidprofile.py
class FattyAcidProfile(BaseModel):
    """Full Fatty Acid Profile"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    profile: list[FattyAcid] = Field(
        default_factory=list,
        title="Profile",
        description="List of fatty acids and their percentages",
    )
    library: str | None = Field(
        default=None, title="Library", description="The used library"
    )
    software: str | None = Field(
        default=None, title="Software", description="The used software"
    )
    relatedData: list[RelationLink] = Field(
        default_factory=list,
        title="Related Data",
        description="JSON paths to relation object",
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

    @model_validator(mode="after")
    def ensure_list_not_empty(self) -> Self:
        if len(self.profile) < 1:
            raise ValueError("Fatty Acis Profile must contain at least one Fatty Acid")
        return self

gccontent #

GCContent #

Bases: BaseModel

GC content of the microorganism

Parameters:

Name Type Description Default
method GCMethod | None

Name of the method used to measure the GC content

None
noteMethod str | None

Note about the used method

None
value float

Percent value of how much percent of the DNA is GC pairs

required
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/gccontent.py
class GCContent(BaseModel):
    """GC content of the microorganism"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    method: GCMethod | None = Field(
        default=None,
        title="Method",
        description="Name of the method used to measure the GC content",
    )
    noteMethod: str | None = Field(
        default=None, title="Note Method", description="Note about the used method"
    )
    value: Annotated[float, Field(ge=0, le=100)] = Field(
        title="Percent Value",
        description="Percent value of how much percent of the DNA is GC pairs",
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

growthcondition #

GrowthCondition #

Bases: BaseModel

Optimal and tested information about growing a Strain

Parameters:

Name Type Description Default
optimalTemperature float | None

Single optimal growth temperature value in celsius

None
minimalTemperature float | None

Known minimal growth temperature value in celsius

None
maximalTemperature float | None

Known maximal growth temperature value in celsius

None
testsTemperature list[GrowthRange]

List of tests and if the strain grows in tested ranges

<dynamic>
optimalPh float | None

Single optimal growth pH value

None
minimalPh float | None

Known minimal growth pH value

None
maximalPh float | None

Known maximal growth pH value

None
testsPh list[GrowthRange]

List of tests and if the strain grows in tested ranges

<dynamic>
oxygenRelation OxygenTolerance | None

Aerobic, anaerobic etc.

None
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/growthcondition.py
class GrowthCondition(BaseModel):
    """Optimal and tested information about growing a Strain"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    optimalTemperature: float | None = Field(
        default=None,
        title="Optimal",
        description="Single optimal growth temperature value in celsius",
    )
    minimalTemperature: float | None = Field(
        default=None,
        title="Minimal",
        description="Known minimal growth temperature value in celsius",
    )
    maximalTemperature: float | None = Field(
        default=None,
        title="Maximal",
        description="Known maximal growth temperature value in celsius",
    )
    testsTemperature: list[GrowthRange] = Field(
        default_factory=list,
        title="Tests",
        description="List of tests and if the strain grows in tested ranges",
    )

    optimalPh: float | None = Field(
        default=None, title="Optimal", description="Single optimal growth pH value"
    )
    minimalPh: float | None = Field(
        default=None, title="Minimal", description="Known minimal growth pH value"
    )
    maximalPh: float | None = Field(
        default=None, title="Maximal", description="Known maximal growth pH value"
    )
    testsPh: list[GrowthRange] = Field(
        default_factory=list,
        title="Tests",
        description="List of tests and if the strain grows in tested ranges",
    )

    oxygenRelation: OxygenTolerance | None = Field(
        default=None, title="Oxygen Relation", description="Aerobic, anaerobic etc."
    )

    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

GrowthRange #

Bases: BaseModel

Single grow condition test

Parameters:

Name Type Description Default
minimal float | None

Minimal value of tested range

None
maximal float | None

Maximal value of tested range

None
growth bool

Does the strain grow within this range?

required
relatedData list[Annotated[str, StringConstraints]]

JSON paths to relation object

<dynamic>
Source code in src/microbial_strain_data_model/classes/growthcondition.py
class GrowthRange(BaseModel):
    """Single grow condition test"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    minimal: float | None = Field(
        default=None, title="Minimal", description="Minimal value of tested range"
    )
    maximal: float | None = Field(
        default=None, title="Maximal", description="Maximal value of tested range"
    )
    growth: bool = Field(
        title="Growth", description="Does the strain grow within this range?"
    )
    relatedData: list[RelationLink] = Field(
        default_factory=list,
        title="Related Data",
        description="JSON paths to relation object",
    )

hemolysis #

Hemolysis #

Bases: BaseModel

Hemolysis of bloods

Parameters:

Name Type Description Default
blood HemolysisBlood

Type of blood used for the test

required
hemolysisType HemolysisType

Type of hemolysis that the strain is capable of

required
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/hemolysis.py
class Hemolysis(BaseModel):
    """Hemolysis of bloods"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    blood: HemolysisBlood = Field(
        title="Blood", description="Type of blood used for the test"
    )
    hemolysisType: HemolysisType = Field(
        title="Hemolysis Type",
        description="Type of hemolysis that the strain is capable of",
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

identifier #

Identifier #

Bases: BaseModel

Identifier of every Kind, compare to schema.org PropertyValue class

Parameters:

Name Type Description Default
name str

Name of the identifier

required
value str

Value of the identifier (can also be a URL)

required
propertyID str | None

See schema.org/propertyID

None
url HttpUrl | None

Uniform Resource Locator of a resource on the Internet

None
logo HttpUrl | None

Logo of the Identifier Organization (e.g. DOI, ORCID, ROR, ...)

None
Source code in src/microbial_strain_data_model/classes/identifier.py
class Identifier(BaseModel):
    """Identifier of every Kind, compare to schema.org PropertyValue class"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    name: str = Field(title="Name", description="Name of the identifier")
    value: str = Field(
        title="Value", description="Value of the identifier (can also be a URL)"
    )
    propertyID: str | None = Field(
        default=None, title="Property ID", description="See schema.org/propertyID"
    )
    url: HttpUrl | None = Field(
        default=None,
        title="URL",
        description="Uniform Resource Locator of a resource on the Internet",
    )
    logo: HttpUrl | None = Field(
        default=None,
        title="Logo",
        description="Logo of the Identifier Organization (e.g. DOI, ORCID, ROR, ...)",
    )

IdentifierStrain #

Bases: Identifier

Parameters:

Name Type Description Default
name str

Name of the identifier

required
value str

Value of the identifier (can also be a URL)

required
propertyID str | None

See schema.org/propertyID

None
url HttpUrl | None

Uniform Resource Locator of a resource on the Internet

None
logo HttpUrl | None

Logo of the Identifier Organization (e.g. DOI, ORCID, ROR, ...)

None
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/identifier.py
class IdentifierStrain(Identifier):

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

isolationtag #

IsolationTag #

Bases: BaseModel

Isolation tag system, original used by BacDive

Parameters:

Name Type Description Default
level1 str
required
level2 str | None
None
level3 str | None
None
Source code in src/microbial_strain_data_model/classes/isolationtag.py
class IsolationTag(BaseModel):
    """Isolation tag system, original used by BacDive"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    level1: str = Field(title="Level 1")
    level2: str | None = Field(default=None, title="Level 2")
    level3: str | None = Field(default=None, title="Level 3")

    @model_validator(mode="after")
    def check_isolation_tag(self) -> Self:
        resolver = Resolver("name")
        path = "" + self.level1
        for x in [self.level2, self.level3]:
            if isinstance(x, str):
                path += "/"
                path += x
        try:
            resolver.get(root, path)
        except ChildResolverError as e:
            raise ValueError from ValueError(
                f"Isolation Source Tags are not valid isolation tag path: {e}"
            )
        return self

legal #

Legal #

Bases: BaseModel

Legal information of the strain

Parameters:

Name Type Description Default
dualUse bool | None
None
quarantineEU bool | None
None
nagoyaRestrictions NagoyaRestrictions

Are there any known Nagoya restrictions in place for this strain

required
qps bool | None

Status of 'Qualified presumption of safety' by EFSA - European Union

None
gras bool | None

Status of 'Generally Recognized As Safe' by FDA - USA

None
gmo bool | None

Is this strain genetically modified

None
gmoInformation str | None

What was genetically modified

None
otherRestrictions list[Restriction]

List of restrictions in place for this strain

<dynamic>
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/legal.py
class Legal(BaseModel):
    """Legal information of the strain"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    dualUse: bool | None = Field(default=None, title="Dual Use")
    quarantineEU: bool | None = Field(default=None, title="Quarantine EU")
    nagoyaRestrictions: NagoyaRestrictions = Field(
        title="Nagoya Protocol Restrictions",
        description="Are there any known Nagoya restrictions in place for this strain",
    )
    qps: bool | None = Field(
        default=None,
        title="QPS",
        description="Status of 'Qualified presumption of safety' by EFSA - "
        "European Union",
    )
    gras: bool | None = Field(
        default=None,
        title="GRAS",
        description="Status of 'Generally Recognized As Safe' by FDA - USA",
    )
    gmo: bool | None = Field(
        default=None, title="GMO", description="Is this strain genetically modified"
    )
    gmoInformation: str | None = Field(
        default=None, title="GMO Information", description="What was genetically modified"
    )
    otherRestrictions: list[Restriction] = Field(
        default_factory=list,
        title="Other Restrictions",
        description="List of restrictions in place for this strain",
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

Restriction #

Bases: BaseModel

Restriction information

Parameters:

Name Type Description Default
name str

Name of the restriction

required
country Country | None

Country that put the restriction in place

None
authority str | None

The responsible authority

None
value str

What is the restriction

required
url HttpUrl | None

Link to the restriction documents

None
Source code in src/microbial_strain_data_model/classes/legal.py
class Restriction(BaseModel):
    """Restriction information"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    name: str = Field(title="Name", description="Name of the restriction")
    country: Country | None = Field(
        default=None,
        title="Country",
        description="Country that put the restriction in place",
    )
    authority: str | None = Field(
        default=None, title="Authority", description="The responsible authority"
    )
    value: str = Field(title="Value", description="What is the restriction")
    url: HttpUrl | None = Field(
        default=None, title="URL", description="Link to the restriction documents"
    )

literature #

Literature #

Bases: LiteratureSource

Connected Literature

Parameters:

Name Type Description Default
name str | None
None
url HttpUrl | None
None
datePublished Date | None
None
author list[Person]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
publisher list[Organization]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/literature.py
class Literature(LiteratureSource):
    """Connected Literature"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

LiteratureSource #

Bases: BaseModel

Literature used in Source

Parameters:

Name Type Description Default
name str | None
None
url HttpUrl | None
None
datePublished Date | None
None
author list[Person]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
publisher list[Organization]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
Source code in src/microbial_strain_data_model/classes/literature.py
class LiteratureSource(BaseModel):
    """Literature used in Source"""

    name: str | None = Field(default=None, title="Name")
    url: HttpUrl | None = Field(default=None, title="URL")
    datePublished: Date | None = Field(default=None, title="Date Published")
    author: list[Person] = Field(default_factory=list, title="Author")
    publisher: list[Organization] = Field(default_factory=list, title="Publisher")

    @model_validator(mode="after")
    def check_if_name_or_url_is_set(self) -> Self:
        if not self.name and not self.url:
            raise ValueError("name or url is needed")
        return self

location #

GeoPoint #

Bases: BaseModel

Geopoint / Coordinate object

Parameters:

Name Type Description Default
latitude Latitude

Should be a float value between -90 and 90

required
longitude Longitude

Should be a float value between -180 and 180

required
elevation float | None
None
precision float | None
None
Source code in src/microbial_strain_data_model/classes/location.py
class GeoPoint(BaseModel):
    """Geopoint / Coordinate object"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    latitude: Latitude = Field(
        title="Latitude", description="Should be a float value between -90 and 90"
    )
    longitude: Longitude = Field(
        title="Longitude", description="Should be a float value between -180 and 180"
    )
    elevation: float | None = Field(default=None, title="Elevation")
    precision: float | None = Field(default=None, title="Precision")

Location #

Bases: BaseModel

Location object

Parameters:

Name Type Description Default
name str | None

Name of the location, e.g. 'Lake Como'

None
description str | None

Description of the location

None
geo GeoPoint | None

Precise location coordinates

None
Source code in src/microbial_strain_data_model/classes/location.py
class Location(BaseModel):
    """Location object"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    name: str | None = Field(
        default=None, title="Name", description="Name of the location, e.g. 'Lake Como'"
    )
    description: str | None = Field(
        default=None, title="Description", description="Description of the location"
    )
    geo: GeoPoint | None = Field(
        default=None, title="Geo", description="Precise location coordinates"
    )

    _check_values = model_validator(mode="after")(check_not_completely_empty)

metabolitetest #

MetaboliteTest #

Bases: BaseModel

Parameters:

Name Type Description Default
type MetaboliteTestType

The type of metabolic test, can be utilization or production

required
active bool | None

Is the metabolite utilization or production active

None
protocol str | None

What test was used

None
kindOfUtilization KindOfUtilization | None

Only relevant if the type is utilization, as there are multiple kinds of utilization

None
relatedData list[Annotated[str, StringConstraints]]

JSON paths to relation object

<dynamic>
Source code in src/microbial_strain_data_model/classes/metabolitetest.py
class MetaboliteTest(BaseModel):

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    type: MetaboliteTestType = Field(
        title="Type",
        description="The type of metabolic test, can be utilization or production",
    )
    active: bool | None = Field(
        default=None,
        title="Active",
        description="Is the metabolite utilization or production active",
    )
    protocol: str | None = Field(
        default=None, title="Protocol", description="What test was used"
    )
    kindOfUtilization: KindOfUtilization | None = Field(
        default=None,
        title="Kind Of Utilization",
        description="Only relevant if the type is utilization, "
        "as there are multiple kinds of utilization",
    )
    relatedData: list[RelationLink] = Field(
        default_factory=list,
        title="Related Data",
        description="JSON paths to relation object",
    )

morphology #

Morphology #

Bases: BaseModel

Morphology of a cell

Parameters:

Name Type Description Default
cellShape str

The shape type the cells

required
cellLength Size

Length of a cell

required
cellWidth Size

Width of a cell

required
motile bool | None

Are the cells of this strain are motile

None
flagellum bool | None

Do the cells have flagella

None
flagellumArrangement FlagellumArrangement | None

How are the flagella arranged

None
gliding bool | None

Cells can be motile by gliding instead of having flagella

None
colonySize Size | None
None
colonyColor ColonyColor | None

Color of the colony on the

None
multiCellComplexForming bool | None

Do the cells form complexes

None
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/morphology.py
class Morphology(BaseModel):
    """Morphology of a cell"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    cellShape: str = Field(title="Cell Shape", description="The shape type the cells")
    cellLength: Size = Field(title="Cell Length", description="Length of a cell")
    cellWidth: Size = Field(title="Cell Width", description="Width of a cell")
    motile: bool | None = Field(
        default=None,
        title="Motile",
        description="Are the cells of this strain are motile",
    )
    flagellum: bool | None = Field(
        default=None, title="Flagellum", description="Do the cells have flagella"
    )
    flagellumArrangement: FlagellumArrangement | None = Field(
        default=None,
        title="Flagellum Arrangement",
        description="How are the flagella arranged",
    )
    gliding: bool | None = Field(
        default=None,
        title="Gliding",
        description="Cells can be motile by gliding instead of having flagella",
    )
    colonySize: Size | None = Field(default=None, title="Size of Colony")
    colonyColor: ColonyColor | None = Field(
        default=None, title="Color of Colony", description="Color of the colony on the"
    )
    multiCellComplexForming: bool | None = Field(
        default=None,
        title="Multi Cell Complex Forming",
        description="Do the cells form complexes",
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

organization #

Collection #

Bases: Organization

Information about one culture collection

Parameters:

Name Type Description Default
name str

Short name of the organization

required
identifier list[Identifier]

Identifiers of the organization, e.g. ROR

<dynamic>
legalName str | None

Full legal name of the organization

None
address Address | None

Address of the organization

None
url HttpUrl | None

Link to homepage

None
email EmailStr | None

Contact email

None
logo HttpUrl | None

Link to logo

None
resourceNumber str

The CCNO of the strain at this collection

required
available bool | None

Is the strain in the current catalog

None
catalogUrl HttpUrl | None

Link to catalog

None
restrictionsOnUse Restriction | None

Restrictions of use by the collection

None
policyUrl HttpUrl | None

Link to collections policy

None
axenicCulture bool | None

Is the culture pure or mixed with other microbes

None
supplyForms list[SupplyForm]

How the strain are available

<dynamic>
history str | None

Exchange history of the strain

None
depositionDate Annotated[str, StringConstraints] | None

Date of Deposition, using date range format of dublin core: 'YYYY-MM-DD/YYYY-MM-DD' ether side can be empty defining an open ended range, only the year is mandatory, e.g. '/1978' means before 1978

None
depositor Person | None

Person who deposited the strain at this collection

None
depositedAs str | None

The CCNO or designation before deposition

None
registeredCollection bool | None

Registered collection status of this collection

None
mtaFile HttpUrl | None

Link to MTA file

None
absFile HttpUrl | None

Link to ABS file

None
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/organization.py
class Collection(Organization):
    """Information about one culture collection"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    resourceNumber: str = Field(
        title="Resource Number", description="The CCNO of the strain at this collection"
    )
    available: bool | None = Field(
        default=None,
        title="Availability",
        description="Is the strain in the current catalog",
    )
    catalogUrl: HttpUrl | None = Field(
        default=None, title="Catalog URL", description="Link to catalog"
    )
    restrictionsOnUse: Restriction | None = Field(
        default=None,
        title="Restrictions On Use",
        description="Restrictions of use by the collection",
    )
    policyUrl: HttpUrl | None = Field(
        default=None, title="Policy URL", description="Link to collections policy"
    )
    axenicCulture: bool | None = Field(
        default=None,
        title="Axenic Culture",
        description="Is the culture pure or mixed with other microbes",
    )
    supplyForms: list[SupplyForm] = Field(
        default_factory=list,
        title="Supply Forms",
        description="How the strain are available",
    )
    history: str | None = Field(
        default=None, title="History", description="Exchange history of the strain"
    )
    depositionDate: (
        Annotated[
            str,
            StringConstraints(
                strip_whitespace=True,
                to_upper=True,
                pattern=r"^(?:\d{4}[-\._]?\d{0,2}[-\._]?\d{0,2})?/?(?:\d{4}[-\._]?\d{0,2}[-\._]?\d{0,2})?$",
            ),
        ]
        | None
    ) = Field(
        default=None,
        title="Deposition Date",
        description="Date of Deposition, using date range format of dublin core: "
        "'YYYY-MM-DD/YYYY-MM-DD' ether side can be empty defining an open "
        "ended range, only the year is mandatory, e.g. '/1978' means before "
        "1978",
    )
    depositor: Person | None = Field(
        default=None,
        title="Depositor",
        description="Person who deposited the strain at this collection",
    )
    depositedAs: str | None = Field(
        default=None,
        title="Deposited as",
        description="The CCNO or designation before deposition",
    )
    registeredCollection: bool | None = Field(
        default=None,
        title="Registered Collection",
        description="Registered collection status of this collection",
    )
    mtaFile: HttpUrl | None = Field(
        default=None, title="MTA file", description="Link to MTA file"
    )
    absFile: HttpUrl | None = Field(
        default=None, title="ABS related file", description="Link to ABS file"
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

Organization #

Bases: BaseModel

Individual Entity of a Organization

Parameters:

Name Type Description Default
name str

Short name of the organization

required
identifier list[Identifier]

Identifiers of the organization, e.g. ROR

<dynamic>
legalName str | None

Full legal name of the organization

None
address Address | None

Address of the organization

None
url HttpUrl | None

Link to homepage

None
email EmailStr | None

Contact email

None
logo HttpUrl | None

Link to logo

None
Source code in src/microbial_strain_data_model/classes/organization.py
class Organization(BaseModel):
    """Individual Entity of a Organization"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    name: str = Field(title="Name", description="Short name of the organization")
    identifier: list[Identifier] = Field(
        default_factory=list,
        title="Identifier",
        description="Identifiers of the organization, e.g. ROR",
    )
    legalName: str | None = Field(
        default=None,
        title="Legal Name",
        description="Full legal name of the organization",
    )
    address: Address | None = Field(
        default=None, title="Address", description="Address of the organization"
    )
    url: HttpUrl | None = Field(default=None, title="URL", description="Link to homepage")
    email: EmailStr | None = Field(
        default=None, title="Email", description="Contact email"
    )
    logo: HttpUrl | None = Field(default=None, title="Logo", description="Link to logo")

origin #

Origin #

Bases: BaseModel

Isolation event information Sample = The material probe in which the strain was found Isolation = Isolation of the strain from the sample

Parameters:

Name Type Description Default
sampleDate Annotated[str, StringConstraints] | None

Date of sampling, using date range format of dublin core: 'YYYY-MM-DD/YYYY-MM-DD' ether side can be empty defining an open ended range, only the year is mandatory, e.g. '/1978' means before 1978

None
country Country | None

Country where the sample material originated from

None
description str | None

Description of the sample

None
locationCreated Location | None

Location where the sample was taken

None
tags list[IsolationTag]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
sampler Person | None

Person that sampled the material

None
isolationDate Annotated[str, StringConstraints] | None

Date of isolation from the sample material, using date range format of dublin core:'YYYY-MM-DD/YYYY-MM-DD' ether side can be empty defining an open ended range, only the year is mandatory, e.g. '/1978' means before 1978

None
isolatedAt Organization | None

Institute where the strain was isolated from the sample

None
isolator Person | None

Person that isolated the strain from the sample

None
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/origin.py
class Origin(BaseModel):
    """
    Isolation event information
        Sample = The material probe in which the strain was found
        Isolation = Isolation of the strain from the sample
    """

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    sampleDate: (
        Annotated[
            str,
            StringConstraints(
                strip_whitespace=True,
                to_upper=True,
                pattern=r"^(?:\d{4}[-\._]?\d{0,2}[-\._]?\d{0,2})?/?(?:\d{4}[-\._]?\d{0,2}[-\._]?\d{0,2})?$",
            ),
        ]
        | None
    ) = Field(
        default=None,
        title="Date",
        description="Date of sampling, using date range format of dublin core: "
        "'YYYY-MM-DD/YYYY-MM-DD' ether side can be empty defining an open ended "
        "range, only the year is mandatory, e.g. '/1978' means before 1978",
    )
    country: Country | None = Field(
        default=None,
        title="Country",
        description="Country where the sample material originated from",
    )
    description: str | None = Field(
        default=None, title="Description", description="Description of the sample"
    )
    locationCreated: Location | None = Field(
        default=None,
        title="Location Created",
        description="Location where the sample was taken",
    )
    tags: list[IsolationTag] = Field(default_factory=list, title="Isolation Source Tags")
    sampler: Person | None = Field(
        default=None, title="Sampler", description="Person that sampled the material"
    )
    isolationDate: (
        Annotated[
            str,
            StringConstraints(
                strip_whitespace=True,
                to_upper=True,
                pattern=r"^(?:\d{4}[-\._]?\d{0,2}[-\._]?\d{0,2})?/?(?:\d{4}[-\._]?\d{0,2}[-\._]?\d{0,2})?$",
            ),
        ]
        | None
    ) = Field(
        default=None,
        title="Date",
        description="Date of isolation from the sample material, using date range format"
        " of dublin core:'YYYY-MM-DD/YYYY-MM-DD' ether side can be empty defining an open"
        " ended range, only the year is mandatory, e.g. '/1978' means before 1978",
    )
    isolatedAt: Organization | None = Field(
        default=None,
        title="Isolated At",
        description="Institute where the strain was isolated from the sample",
    )
    isolator: Person | None = Field(
        default=None,
        title="Isolator",
        description="Person that isolated the strain from the sample",
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

othermedia #

OtherMedia #

Bases: BaseModel

A Media object e.g. Photo, Video, Document, etc

Parameters:

Name Type Description Default
url HttpUrl | None

Link to medium

None
name str | None
None
description str | None

Description of the medium and the content in the medium

None
usageInfo str | None

License or other information on usage

None
additionalType str | None
None
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/othermedia.py
class OtherMedia(BaseModel):
    """A Media object e.g. Photo, Video, Document, etc"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    url: HttpUrl | None = Field(default=None, title="URL", description="Link to medium")
    name: str | None = Field(default=None, title="Name")
    description: str | None = Field(
        default=None,
        title="Description",
        description="Description of the medium and the content in the medium",
    )
    usageInfo: str | None = Field(
        default=None,
        title="Usage Information",
        description="License or other information on usage",
    )
    additionalType: str | None = Field(default=None, title="Additional Type")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

    _check_values = model_validator(mode="after")(check_not_completely_empty)

pathogen #

Pathogen #

Bases: BaseModel

Pathogen, defining Host, pathogenicity and under what classification

Parameters:

Name Type Description Default
host Host

Organism or group of organisms that can be infected

required
pathogen PathogenLevel

Frequency of pathogenicity: no pathogen, opportunistic or obligate

required
classification str | None

Type of classification, e.g. German classification or WHO classification

None
url HttpUrl | None

Link to classification document

None
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/pathogen.py
class Pathogen(BaseModel):
    """Pathogen, defining Host, pathogenicity and under what classification"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    host: Host = Field(
        title="Host",
        description="Organism or group of organisms that can be infected",
    )
    pathogen: PathogenLevel = Field(
        title="Pathogen",
        description="Frequency of pathogenicity: no pathogen, opportunistic or obligate",
    )
    classification: str | None = Field(
        default=None,
        title="Classification",
        description="Type of classification, e.g. German classification "
        "or WHO classification",
    )
    url: HttpUrl | None = Field(
        default=None, title="URL", description="Link to classification document"
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

person #

Person #

Bases: BaseModel

Person

Parameters:

Name Type Description Default
name str

Name of the person, preferable: [Last], [First]

required
identifier list[Identifier]

Person identifiers like ORCID

<dynamic>
Source code in src/microbial_strain_data_model/classes/person.py
class Person(BaseModel):
    """Person"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    name: str = Field(
        title="Name", description="Name of the person, preferable: [Last], [First]"
    )
    identifier: list[Identifier] = Field(
        default_factory=list,
        title="Identifier",
        description="Person identifiers like ORCID",
    )

relateddata #

RelatedData #

Bases: BaseModel

RelatedData

Parameters:

Name Type Description Default
relation str

The kind or type of relation of the data points, e.g. growthCondition, testCondition, API20

required
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/relateddata.py
class RelatedData(BaseModel):
    """RelatedData"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    relation: str = Field(
        title="Relation",
        description="The kind or type of relation of the data points, e.g. "
        "growthCondition, testCondition, API20",
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

sequence #

Sequence #

Bases: BaseModel

Information on a Sequence

Parameters:

Name Type Description Default
type SequenceType
required
level SequenceLevel
required
accessionNumber str
required
description str | None
None
length str | None
None
identifier list[Identifier]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/sequence.py
class Sequence(BaseModel):
    """Information on a Sequence"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    type: SequenceType = Field(title="Type")
    level: SequenceLevel = Field(title="Level")
    accessionNumber: str = Field(title="Accession Number")
    description: str | None = Field(default=None, title="Description")
    length: str | None = Field(default=None, title="Length")
    identifier: list[Identifier] = Field(default_factory=list, title="Identifier")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

size #

Size #

Bases: BaseModel

size object, use only for micro and millimeter

Parameters:

Name Type Description Default
minimal float
required
maximal float
required
unit SizeUnit
required
Source code in src/microbial_strain_data_model/classes/size.py
class Size(BaseModel):
    """size object, use only for micro and millimeter"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    minimal: PositiveFloat = Field(title="Minimal")
    maximal: PositiveFloat = Field(title="Maximal")
    unit: SizeUnit = Field(title="Unit")

source #

Source #

Bases: BaseModel

Parameters:

Name Type Description Default
sourceType SourceType

Source Type

required
mode CurationMode

Mode of curation

required
name str | None
None
url HttpUrl | None
None
identifier list[Identifier]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
datePublished Date | None
None
dateRecorded Date
Date(2025, 8, 29)
lastUpdate Date | None
None
author list[Person]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
publisher list[Organization]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
Source code in src/microbial_strain_data_model/classes/source.py
class Source(BaseModel):
    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    sourceType: SourceType = Field(
        title="SourceType", description="Source Type", strict=False
    )
    mode: CurationMode = Field(title="Mode", description="Mode of curation", strict=False)
    name: str | None = Field(default=None, title="Name")
    url: HttpUrl | None = Field(default=None, title="URL")
    identifier: list[Identifier] = Field(default_factory=list, title="Identifier")
    datePublished: Date | None = Field(default=None, title="Date Published", strict=False)
    dateRecorded: Date = Field(
        default_factory=Date.today, title="Date Recorded", strict=False
    )
    lastUpdate: Date | None = Field(
        default=None, title="Date of last update", strict=False
    )
    author: list[Person] = Field(default_factory=list, title="Author")
    publisher: list[Organization] = Field(default_factory=list, title="Publisher")

    @model_validator(mode="after")
    def check_if_name_or_url_is_set(self) -> Self:
        if not self.name and not self.url:
            raise ValueError("name or url is needed")
        return self

spore #

Spore #

Bases: BaseModel

Spore information about one Strain

Parameters:

Name Type Description Default
sporeBuilding bool | None
None
typeOfSpore SporeType
required
sporeEjection str | None
None
relatedData list[Annotated[str, StringConstraints]]

JSON paths to relation object

<dynamic>
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/spore.py
class Spore(BaseModel):
    """Spore information about one Strain"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    sporeBuilding: bool | None = Field(default=None, title="sporeBuilding")
    typeOfSpore: SporeType = Field(title="Type Of Spore")
    sporeEjection: str | None = Field(default=None, title="Spore Ejection")
    relatedData: list[RelationLink] = Field(
        default_factory=list,
        title="Related Data",
        description="JSON paths to relation object",
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

staining #

Staining #

Bases: BaseModel

Stainings tested on the strain

Parameters:

Name Type Description Default
name str
required
value StainingValue
required
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/staining.py
class Staining(BaseModel):
    """Stainings tested on the strain"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    name: str = Field(title="Name")
    value: StainingValue = Field(title="Value")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

taxon #

ScientificName #

Bases: BaseModel

Scientific name

Parameters:

Name Type Description Default
name str
required
author str
required
Source code in src/microbial_strain_data_model/classes/taxon.py
class ScientificName(BaseModel):
    """Scientific name"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    name: str = Field(title="Name")
    author: str = Field(title="Author")

Taxon #

Bases: BaseModel

A class to take all information about a taxon for the new microbial data standard.

Parameters:

Name Type Description Default
name str
required
taxonRank TaxonRank | None
None
taxonStatus TaxonStatus | None
None
identifier list[Identifier]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
scientificName ScientificName | None
None
alternateName list[str]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
parentTaxon Self | None
None
sameAs list[str]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
Source code in src/microbial_strain_data_model/classes/taxon.py
class Taxon(BaseModel):
    """
    A class to take all information about a taxon for the new microbial data standard.
    """

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    name: str = Field(title="Name")
    taxonRank: TaxonRank | None = Field(default=None, title="Taxon Rank")
    taxonStatus: TaxonStatus | None = Field(default=None, title="Taxon Status")
    identifier: list[Identifier] = Field(default_factory=list, title="Identifier")
    scientificName: ScientificName | None = Field(default=None, title="Scientific Name")
    alternateName: list[str] = Field(default_factory=list, title="Alternate Name")
    parentTaxon: Self | None = Field(default=None, title="Parent Taxon")
    sameAs: list[str] = Field(default_factory=list, title="Same As")

TaxonWithSource #

Bases: Taxon

Taxon class with source information

Parameters:

Name Type Description Default
name str
required
taxonRank TaxonRank | None
None
taxonStatus TaxonStatus | None
None
identifier list[Identifier]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
scientificName ScientificName | None
None
alternateName list[str]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
parentTaxon Taxon | None
None
sameAs list[str]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/taxon.py
class TaxonWithSource(Taxon):
    """Taxon class with source information"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )
    # overwriting the 'parent' field inherited by Taxon
    parentTaxon: Taxon | None = Field(default=None, title="Parent Taxon")  # type: ignore

    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

TypeStrain #

Bases: BaseModel

Information if a strain is the type strain of its species

Parameters:

Name Type Description Default
typeStrain bool
required
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/taxon.py
class TypeStrain(BaseModel):
    """Information if a strain is the type strain of its species"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    typeStrain: bool = Field(title="Type Strain")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

tolerance #

Tolerance #

Bases: ChemicalSubstance

Tolerance information - e.g. antibiotic resistance

Parameters:

Name Type Description Default
name str | None

Valid scientific name

None
identifier list[Identifier]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
alternateName list[str]

List of alternative names for this substance

<dynamic>
reaction ToleranceReaction | None
None
mic str | None

The minimal inhibitory concentration

None
unit ConcentrationUnit | None
None
tests list[ToleranceTest]

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

<dynamic>
source list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/tolerance.py
class Tolerance(ChemicalSubstance):
    """Tolerance information - e.g. antibiotic resistance"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    reaction: ToleranceReaction | None = Field(default=None, title="Reaction")
    mic: str | None = Field(
        default=None, title="MIC", description="The minimal inhibitory concentration"
    )
    unit: ConcentrationUnit | None = Field(default=None, title="Unit")
    tests: list[ToleranceTest] = Field(default_factory=list, title="Tests")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

ToleranceTest #

Bases: BaseModel

Tested tolerance of compound

Parameters:

Name Type Description Default
reaction ToleranceReaction
required
concentration float | None

Concentration value

None
unit ConcentrationUnit

Unit of concentration e.g. g/ml

required
relatedData list[Annotated[str, StringConstraints]]

JSON paths to relation object

<dynamic>
Source code in src/microbial_strain_data_model/classes/tolerance.py
class ToleranceTest(BaseModel):
    """Tested tolerance of compound"""

    model_config = ConfigDict(
        strict=True,
        extra="forbid",
        revalidate_instances="always",
        str_strip_whitespace=True,
    )

    reaction: ToleranceReaction = Field(title="Reaction")
    concentration: float | None = Field(
        default=None, title="Concentration", description="Concentration value"
    )
    unit: ConcentrationUnit = Field(
        title="Unit", description="Unit of concentration e.g. g/ml"
    )
    relatedData: list[RelationLink] = Field(
        default_factory=list,
        title="Related Data",
        description="JSON paths to relation object",
    )