Skip to content

Sub Classes#

actors #

Collection #

Bases: Organization

Information about one culture collection

Parameters:

Name Type Description Default
name str
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>
legal_name str | None
None
address Address | None
None
url HttpUrl | None
None
email EmailStr | None
None
resource_num str
required
available bool | None
None
catalog_link HttpUrl | None
None
restrictions Restriction | None
None
axenic bool | None
None
supply_forms list[SupplyForm]

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>
history str | None
None
date Annotated[str, StringConstraints] | None
None
depositor Person | None
None
source str

JSON path to source object

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

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

    resource_num: str = Field(title="Resource Number", alias="resourceNumber")
    available: bool | None = Field(
        default=None, title="Availability", alias="availability"
    )
    catalog_link: HttpUrl | None = Field(
        default=None, title="Catalog URL", alias="catalogUrl"
    )
    restrictions: Restriction | None = Field(
        default=None, title="Restrictions On Use", alias="restrictionsOnUse"
    )
    axenic: bool | None = Field(
        default=None, title="Axenic Culture", alias="axenicCulture"
    )
    supply_forms: list[SupplyForm] = Field(
        default_factory=list, title="Supply Forms", alias="supplyForms"
    )
    history: str | None = Field(default=None, title="History", alias="history")
    date: (
        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", alias="depositionDate")
    depositor: Person | None = Field(default=None, title="Depositor", alias="depositor")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

ConnectedPerson #

Bases: Person

Connected Person = Person + Role

Parameters:

Name Type Description Default
name str
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>
role PersonRole | None
None
source str

JSON path to source object

required
Source code in src/microbial_strain_data_model/classes/actors.py
class ConnectedPerson(Person):
    """Connected Person = Person + Role"""

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

    role: PersonRole | None = Field(default=None, title="Role", alias="role")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

Organization #

Bases: BaseModel

Individual Entity of a Organization

Parameters:

Name Type Description Default
name str
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>
legal_name str | None
None
address Address | None
None
url HttpUrl | None
None
email EmailStr | None
None
Source code in src/microbial_strain_data_model/classes/actors.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", alias="name")
    identifier: list[Identifier] = Field(
        default_factory=list, title="Identifier", alias="identifier"
    )
    legal_name: str | None = Field(default=None, title="Legal Name", alias="legalName")
    address: Address | None = Field(default=None, title="Address", alias="address")
    url: HttpUrl | None = Field(default=None, title="URL", alias="url")
    email: EmailStr | None = Field(default=None, title="Email", alias="email")

Person #

Bases: BaseModel

Person - also Basis for every Individual Entity (e.g. Organization)

Parameters:

Name Type Description Default
name str
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>
Source code in src/microbial_strain_data_model/classes/actors.py
class Person(BaseModel):
    """Person - also Basis for every Individual Entity (e.g. Organization)"""

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

    name: str = Field(title="Name", alias="name")
    identifier: list[Identifier] = Field(
        default_factory=list, title="Identifier", alias="identifier"
    )

address #

Address #

Bases: BaseModel

Address object comparable to schema.org PostalAddress

Parameters:

Name Type Description Default
country CountryAlpha2 | None
required
locality str | None
None
region str | None
None
post_office_box_number str | None
None
postal_code str | None
None
street_address str | None
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,
    )

    country: CountryAlpha2 | None = Field(title="Country", alias="addressCountry")
    locality: str | None = Field(default=None, title="Locality", alias="addressLocality")
    region: str | None = Field(default=None, title="Region", alias="addressRegion")
    post_office_box_number: str | None = Field(
        default=None, title="Post Office Box Number", alias="postOfficeBoxNumber"
    )
    postal_code: str | None = Field(default=None, title="Post Code", alias="postalCode")
    street_address: str | None = Field(
        default=None, title="Street Address", alias="streetAddress"
    )

    _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
required
source str

JSON path 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", alias="application")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

biosafety #

BioSafety #

Bases: BaseModel

Biosafety classification

Parameters:

Name Type Description Default
group str
required
classification str | None
None
url HttpUrl | None
None
source str

JSON path 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,
    )

    group: str = Field(title="Riskgroup", alias="riskgroup")
    classification: str | None = Field(
        default=None, title="Classification", alias="classification"
    )
    url: HttpUrl | None = Field(default=None, title="URL", alias="url")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

cellshape #

CellShape #

Bases: BaseModel

Cell shape of the strain

Parameters:

Name Type Description Default
cell_shape str
required
source str

JSON path to source object

required
Source code in src/microbial_strain_data_model/classes/cellshape.py
class CellShape(BaseModel):
    """Cell shape of the strain"""

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

    cell_shape: str = Field(title="Cell Shape", alias="cellShape")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

chemicalsubstance #

CellWall #

Bases: ChemicalSubstance

Cell Wall constituent - ChemSubstance + percent of CellWall

Parameters:

Name Type Description Default
name 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>
alternate_name 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>
percent Annotated[float, FieldInfo] | None
None
source str

JSON path 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", alias="percent"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

ChemicalSubstance #

Bases: BaseModel

Chemical Substance base class

Parameters:

Name Type Description Default
name 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>
alternate_name 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/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", alias="name"
    )
    identifier: list[Identifier] = Field(
        default_factory=list, title="Identifier", alias="identifier"
    )
    alternate_name: list[str] = Field(
        default_factory=list, title="Alternate Name", alias="alternateName"
    )

    _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
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>
alternate_name 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>
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", alias="percent"
    )
    ecl: str | None = Field(default=None, title="ECL", alias="ecl")

Halophil #

Bases: Growth[ConcentrationUnit], ChemicalSubstance

Halophily abilities of a Strain

Parameters:

Name Type Description Default
name 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>
alternate_name 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>
optimal float | None
None
minimal float | None
None
maximal float | None
None
unit ConcentrationUnit
required
tests list[GrowthRange[ConcentrationUnit]]

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 str

JSON path to source object

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

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

    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

Metabolite #

Bases: ChemicalSubstance

Information about tested Metabolites

Parameters:

Name Type Description Default
name 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>
alternate_name 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>
tests list[MetaboliteTest]

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 str

JSON path 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", alias="tests"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

colony #

Colony #

Bases: BaseModel

Colony information of a microorganism/strain

Parameters:

Name Type Description Default
size Size | None
None
color ColonyColor | None
None
source str

JSON path to source object

required
Source code in src/microbial_strain_data_model/classes/colony.py
class Colony(BaseModel):
    """Colony information of a microorganism/strain"""

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

    size: Size | None = Field(default=None, title="Size of Colony", alias="size")
    color: ColonyColor | None = Field(
        default=None, title="Color of Colony", alias="color"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

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

country #

Country #

Bases: BaseModel

Country information, mostly on nagoya protocol

Parameters:

Name Type Description Default
name CountryAlpha2 | CountryHistoricalAlpha2 | CountryOtherCodes
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>
cbd_party bool | None
None
cartagena_party bool | None
None
nagoya_party bool | None
None
kuala_lumpur_party 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 (ISO 2 Letter Code)", alias="name"
    )
    identifier: list[Identifier] = Field(
        default_factory=list, title="Identifier", alias="identifier"
    )
    cbd_party: bool | None = Field(
        default=None,
        title="Is Convention Of Biological Diversity Party",
        alias="conventionOfBiologicalDiversityParty",
    )
    cartagena_party: bool | None = Field(
        default=None, title="Is Cartagena Protocol Party", alias="cartagenaProtocolParty"
    )
    nagoya_party: bool | None = Field(
        default=None, title="Is Nagoya Protocol Party", alias="nagoyaProtocolParty"
    )
    kuala_lumpur_party: bool | None = Field(
        default=None, title="Is Nagoya Kuala Lumpur Party", alias="nagoyaKualaLumpurParty"
    )

cultivationmedia #

CultivationMedia #

Bases: BaseModel

Cultivation media, use links to Media Dive or other resources

Parameters:

Name Type Description Default
name str | None
None
url HttpUrl | None
required
reagents 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 str

JSON path to source object

required
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 | None = Field(default=None, title="Name", alias="name")
    url: HttpUrl | None = Field(title="URL", alias="url")
    reagents: list[str] = Field(
        default_factory=list, title="Reagent Used", alias="reagentUsed"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source 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"

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"

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"

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"

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"

PersonRole #

Bases: str, Enum

Valid roles for persons related to strain

Attributes:

Name Type Description
sampler

sampler

isolator

isolator

other

other

Source code in src/microbial_strain_data_model/classes/enums.py
class PersonRole(str, Enum):
    """
    Valid roles for persons related to strain

    Attributes:
        sampler: sampler
        isolator: isolator
        other: other
    """

    sampler = "sampler"
    isolator = "isolator"
    other = "other"

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"

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"

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
ec_num str

An EC number like defined by the Enzyme Commission

required
url HttpUrl | None

URL

None
alternate_name 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
None
source str

JSON path 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", alias="name")
    ec_num: Annotated[
        str,
        StringConstraints(
            strip_whitespace=True, to_upper=True, pattern=r"(?:EC)? ?\d+\.\d+\.\d+\.n?\d+"
        ),
    ] = Field(
        title="EC Number",
        alias="hasECNumber",
        description="An EC number like defined by the Enzyme Commission",
    )
    url: HttpUrl | None = Field(default=None, title="URL", alias="url", description="URL")
    alternate_name: list[str] = Field(
        default_factory=list, title="Alternate Name", alias="alternateName"
    )
    active: bool | None = Field(default=None, title="Active", alias="active")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

fattyacidprofile #

FattyAcidProfile #

Bases: BaseModel

Full Fatty Acid Profile

Parameters:

Name Type Description Default
profile list[FattyAcid]

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>
temperature int | None
None
medium str | None
None
library str | None
None
software str | None
None
source str

JSON path 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", alias="profile"
    )
    temperature: int | None = Field(
        default=None, title="Temperature", alias="temperature"
    )
    medium: str | None = Field(default=None, title="Medium", alias="medium")
    library: str | None = Field(default=None, title="Library", alias="library")
    software: str | None = Field(default=None, title="Software", alias="software")

    @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

    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

gccontent #

GCContent #

Bases: BaseModel

GC content of the microorganism

Parameters:

Name Type Description Default
method str | None
None
value float
required
source str

JSON path 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: str | None = Field(default=None, title="Method", alias="method")
    value: Annotated[float, Field(ge=0, le=100)] = Field(
        title="Percent Value", alias="value"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

growrange #

Growth #

Bases: BaseModel, Generic[T]

Optimal and tested information about growing a Strain

Parameters:

Name Type Description Default
optimal float | None
None
minimal float | None
None
maximal float | None
None
unit ~T
required
tests list[GrowthRange]

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 str

JSON path to source object

required
Source code in src/microbial_strain_data_model/classes/growrange.py
class Growth(BaseModel, Generic[T]):
    """Optimal and tested information about growing a Strain"""

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

    optimal: float | None = Field(default=None, title="Optimal", alias="optimal")
    minimal: float | None = Field(default=None, title="Minimal", alias="minimal")
    maximal: float | None = Field(default=None, title="Maximal", alias="maximal")
    unit: T
    tests: list[GrowthRange[T]] = Field(
        default_factory=list, title="Tests", alias="tested"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

GrowthRange #

Bases: BaseModel, Generic[T]

Single grow condition test

Parameters:

Name Type Description Default
minimal float | None
None
maximal float | None
None
unit ~T
required
growth bool
required
Source code in src/microbial_strain_data_model/classes/growrange.py
class GrowthRange(BaseModel, Generic[T]):
    """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", alias="minimal")
    maximal: float | None = Field(default=None, title="Maximal", alias="maximal")
    unit: T
    growth: bool = Field(title="Growth", alias="growth")

hemolysis #

Hemolysis #

Bases: BaseModel

Hemolysis of bloods

Parameters:

Name Type Description Default
blood HemolysisBlood
required
hemolysis HemolysisType
required
source str

JSON path 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", alias="blood")
    hemolysis: HemolysisType = Field(title="Hemolysis Type", alias="hemolysisType")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

identifier #

Identifier #

Bases: BaseModel

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

Parameters:

Name Type Description Default
name str
required
value str
required
property str | None
None
url HttpUrl | None
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", alias="name")
    value: str = Field(title="Value", alias="value")
    property: str | None = Field(default=None, title="Property ID", alias="propertyID")
    url: HttpUrl | None = Field(default=None, title="URL", alias="url")

IdentifierStrain #

Bases: Identifier

Parameters:

Name Type Description Default
name str
required
value str
required
property str | None
None
url HttpUrl | None
None
source str

JSON path 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: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

isolation #

Isolation #

Bases: BaseModel

Isolation event information

Parameters:

Name Type Description Default
date Annotated[str, StringConstraints] | None
None
isolator Organization | Person | None
None
source str

JSON path to source object

required
Source code in src/microbial_strain_data_model/classes/isolation.py
class Isolation(BaseModel):
    """Isolation event information"""

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

    date: (
        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", alias="date")
    isolator: Organization | Person | None = Field(
        default=None, title="Isolated At", alias="isolatedAt"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

legal #

Legal #

Bases: BaseModel

Legal information of the strain

Parameters:

Name Type Description Default
dual_use bool | None
None
quarantine bool | None
None
nagoya NagoyaRestrictions
required
QPS bool | None
None
GRAS bool | None
None
gmo bool | None
None
gmo_information str | None
None
source str

JSON path 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,
    )

    dual_use: bool | None = Field(default=None, title="Dual Use", alias="dualUse")
    quarantine: bool | None = Field(
        default=None, title="Quarantine EU", alias="quarantineEU"
    )
    nagoya: NagoyaRestrictions = Field(
        title="Nagoya Protocol Restrictions", alias="nagoyaRestrictions"
    )
    QPS: bool | None = Field(default=None, title="QPS", alias="qps")
    GRAS: bool | None = Field(default=None, title="GRAS", alias="gras")
    gmo: bool | None = Field(default=None, title="GMO", alias="gmo")
    gmo_information: str | None = Field(
        default=None, title="GMO Information", alias="gmoInformation"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

literature #

Literature #

Bases: BaseModel

Connected Literature information

Parameters:

Name Type Description Default
name str | None
None
url HttpUrl | None
None
date 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 str

JSON path to source object

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

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

    name: str | None = Field(default=None, title="Name", alias="name")
    url: HttpUrl | None = Field(default=None, title="URL", alias="url")
    date: Date | None = Field(default=None, title="Date Published", alias="datePublished")
    author: list[Person] = Field(default_factory=list, title="Author", alias="author")
    publisher: list[Organization] = Field(
        default_factory=list, title="Publisher", alias="publisher"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

    @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
required
longitude Longitude
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", alias="latitude")
    longitude: Longitude = Field(title="Longitude", alias="longitude")
    elevation: float | None = Field(default=None, title="Elevation", alias="elevation")
    precision: float | None = Field(default=None, title="Precision", alias="precision")

Location #

Bases: BaseModel

Location object

Parameters:

Name Type Description Default
name str | None
None
description str | None
None
geo GeoPoint | None
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", alias="name")
    description: str | None = Field(
        default=None, title="Description", alias="description"
    )
    geo: GeoPoint | None = Field(default=None, title="Geo", alias="geo")

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

metabolitetest #

MetaboliteTest #

Bases: BaseModel

Parameters:

Name Type Description Default
type MetaboliteTestType
required
active bool | None
None
protocol str | None
None
utilization str | None
None
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", alias="type")
    active: bool | None = Field(default=None, title="Active", alias="active")
    protocol: str | None = Field(default=None, title="Protocol", alias="protocol")
    utilization: str | None = Field(
        default=None, title="Kind Of Utilization", alias="kindOfUtilization"
    )

motility #

Motility #

Bases: BaseModel

Information on motility of a Strain

Parameters:

Name Type Description Default
motile bool | None
None
flagellum bool | None
None
flag_arr FlagellumArrangement | None
None
gliding bool | None
None
source str

JSON path to source object

required
Source code in src/microbial_strain_data_model/classes/motility.py
class Motility(BaseModel):
    """Information on motility of a Strain"""

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

    motile: bool | None = Field(default=None, title="Motile", alias="motile")
    flagellum: bool | None = Field(default=None, title="Flagellum", alias="flagellum")
    flag_arr: FlagellumArrangement | None = Field(
        default=None, title="Flagellum Arrangement", alias="flagellumArrangement"
    )
    gliding: bool | None = Field(default=None, title="Gliding", alias="gliding")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

multicell #

MultiCell #

Bases: BaseModel

MultiCell ability of the strain

Parameters:

Name Type Description Default
multi_cell bool
required
source str

JSON path to source object

required
Source code in src/microbial_strain_data_model/classes/multicell.py
class MultiCell(BaseModel):
    """MultiCell ability of the strain"""

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

    multi_cell: bool = Field(
        title="Multi Cell Complex Forming", alias="multiCellComplexForming"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

othermedia #

OtherMedia #

Bases: BaseModel

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

Parameters:

Name Type Description Default
url HttpUrl | None
None
name str | None
None
description str | None
None
usage str | None
None
additional_type str | None
None
source str

JSON path 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", alias="url")
    name: str | None = Field(default=None, title="Name", alias="name")
    description: str | None = Field(
        default=None, title="Description", alias="description"
    )
    usage: str | None = Field(default=None, title="Usage Information", alias="usageInfo")
    additional_type: str | None = Field(
        default=None, title="Additional Type", alias="additionalType"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

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

oxygenrelation #

OxygenRelation #

Bases: BaseModel

OxygenRelation of the strain

Parameters:

Name Type Description Default
relation str
required
source str

JSON path to source object

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

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

    relation: str = Field(title="Oxygen Relation", alias="oxygenRelation")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

pathogen #

Pathogen #

Bases: BaseModel

Pathogen, defining Host, pathogenicity and under what classification

Parameters:

Name Type Description Default
host Host
required
pathogen PathogenLevel
required
classification str | None
None
source str

JSON path 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", alias="host")
    pathogen: PathogenLevel = Field(title="Pathogen", alias="pathogen")
    classification: str | None = Field(
        default=None, title="Classification", alias="classification"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

sample #

IsolationTag #

Bases: BaseModel

Isolation tag system, original used by BacDive

Parameters:

Name Type Description Default
level_1 str
required
level_2 str | None
None
level_3 str | None
None
Source code in src/microbial_strain_data_model/classes/sample.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,
    )

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

    @model_validator(mode="after")
    def check_isolation_tag(self) -> Self:
        resolver = Resolver("name")
        path = "" + self.level_1
        for x in [self.level_2, self.level_3]:
            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

Sample #

Bases: BaseModel

Information on the Sampling event of that Strain

Parameters:

Name Type Description Default
date Annotated[str, StringConstraints] | None
None
country Country | None
None
description str | None
None
location Location | None
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>
source str

JSON path to source object

required
Source code in src/microbial_strain_data_model/classes/sample.py
class Sample(BaseModel):
    """Information on the Sampling event of that Strain"""

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

    date: (
        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", alias="date")
    country: Country | None = Field(default=None, title="Country", alias="country")
    description: str | None = Field(
        default=None, title="Description", alias="description"
    )
    location: Location | None = Field(
        default=None, title="Location Created", alias="locationCreated"
    )
    tags: list[IsolationTag] = Field(
        default_factory=list, title="Isolation Source Tags", alias="tags"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

sequence #

Sequence #

Bases: BaseModel

Information on a Sequence

Parameters:

Name Type Description Default
type SequenceType
required
level SequenceLevel
required
accession str
required
description str | None
None
length str | None
None
url list[HttpUrl]

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 str

JSON path 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", alias="type")
    level: SequenceLevel = Field(title="Level", alias="level")
    accession: str = Field(title="Accession Number", alias="accessionNumber")
    description: str | None = Field(
        default=None, title="Description", alias="description"
    )
    length: str | None = Field(default=None, title="Length", alias="length")
    url: list[HttpUrl] = Field(default_factory=list, title="URL", alias="url")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

size #

CellSize #

Bases: BaseModel

object to hold cell size information

Parameters:

Name Type Description Default
cell_length Size
required
cell_width Size
required
source str

JSON path to source object

required
Source code in src/microbial_strain_data_model/classes/size.py
class CellSize(BaseModel):
    """object to hold cell size information"""

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

    cell_length: Size = Field(title="Cell Length", alias="cellLength", description="")
    cell_width: Size = Field(title="Cell Width", alias="cellWidth", description="")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

Size #

Bases: BaseModel

size object, use only for micro and millimeter

Parameters:

Name Type Description Default
min float
required
max 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,
    )

    min: PositiveFloat = Field(title="Minimal", alias="minimal")
    max: PositiveFloat = Field(title="Maximal", alias="maximal")
    unit: SizeUnit = Field(title="Unit", alias="unit")

spore #

Spore #

Bases: BaseModel

Spore information about one Strain

Parameters:

Name Type Description Default
building bool | None
None
type SporeType
required
ejection str | None
None
source str

JSON path 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,
    )

    building: bool | None = Field(
        default=None, title="sporeBuilding", alias="sporeBuilding"
    )
    type: SporeType = Field(title="Type Of Spore", alias="typeOfSpore")
    ejection: str | None = Field(
        default=None, title="Spore Ejection", alias="sporeEjection"
    )
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

stainings #

Staining #

Bases: BaseModel

Stainings tested on the strain

Parameters:

Name Type Description Default
name str
required
value StainingValue
required
source str

JSON path to source object

required
Source code in src/microbial_strain_data_model/classes/stainings.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", alias="name")
    value: StainingValue = Field(title="Value", alias="value")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path 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", alias="name")
    author: str = Field(title="Author", alias="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
rank TaxonRank
required
status TaxonStatus
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>
scientific ScientificName | None
None
alternate_name 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>
parent Self | None
None
same_as 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", alias="name")
    rank: TaxonRank = Field(title="Taxon Rank", alias="taxonRank")
    status: TaxonStatus = Field(title="Taxon Status", alias="taxonStatus")
    identifier: list[Identifier] = Field(
        default_factory=list, title="Identifier", alias="identifier"
    )
    scientific: ScientificName | None = Field(
        default=None, title="Scientific Name", alias="scientificName"
    )
    alternate_name: list[str] = Field(
        default_factory=list, title="Alternate Name", alias="alternateName"
    )
    parent: Self | None = Field(default=None, title="Parent Taxon", alias="parentTaxon")
    same_as: list[str] = Field(default_factory=list, title="Same As", alias="sameAs")

TaxonWithSource #

Bases: Taxon

Taxon class with source information

Parameters:

Name Type Description Default
name str
required
rank TaxonRank
required
status TaxonStatus
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>
scientific ScientificName | None
None
alternate_name 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>
parent Self | None
None
same_as 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 str

JSON path 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,
    )

    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

TypeStrain #

Bases: BaseModel

Information if a strain is the type strain of its species

Parameters:

Name Type Description Default
type_strain bool
required
source str

JSON path 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,
    )

    type_strain: bool = Field(title="Type Strain", alias="typeStrain")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

tolerance #

Tolerance #

Bases: ChemicalSubstance

Tolerance information - e.g. antibiotic resistance

Parameters:

Name Type Description Default
name 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>
alternate_name 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>
reaction str | None
None
mic str | None
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 str

JSON path 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: str | None = Field(default=None, title="Reaction", alias="reaction")
    mic: str | None = Field(default=None, title="MIC", alias="mic")
    unit: ConcentrationUnit | None = Field(default=None, title="Unit", alias="unit")
    tests: list[ToleranceTest] = Field(default_factory=list, title="Tests", alias="tests")
    source: Annotated[str, StringConstraints(pattern=r"^\/sources\/\d+$")] = Field(
        title="Source", alias="source", description="JSON path to source object"
    )

ToleranceTest #

Bases: BaseModel

Tested tolerance of compound

Parameters:

Name Type Description Default
reaction ToleranceReaction
required
concentration str | None
None
unit ConcentrationUnit
required
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", alias="reaction")
    concentration: str | None = Field(
        default=None, title="Concentration", alias="concentration"
    )
    unit: ConcentrationUnit = Field(title="Unit", alias="unit")