Skip to content

Sub Classes#

address #

Address #

Bases: BaseModel

Address object comparable to schema.org PostalAddress

Parameters:

Name Type Description Default
addressCountry CountryAlpha2 | None
None
addressLocality str | None
None
addressRegion str | None
None
postOfficeBoxNumber str | None
None
postalCode str | None
None
streetAddress 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,
    )

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

    _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
required
classification str | None
None
url HttpUrl | None
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")
    classification: str | None = Field(default=None, title="Classification")
    url: HttpUrl | None = Field(default=None, title="URL")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

cellshape #

CellShape #

Bases: BaseModel

Cell shape of the strain

Parameters:

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

List of JSON paths 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,
    )

    cellShape: str = Field(title="Cell Shape")
    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
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]

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 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
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]

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")
    identifier: list[Identifier] = Field(default_factory=list, title="Identifier")
    alternateName: list[str] = Field(default_factory=list, title="Alternate Name")

    _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>
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>
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: 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>
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>
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 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(Growth[ConcentrationUnit], ChemicalSubstance):
    """Halophily abilities of a Strain"""

    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"
    )

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>
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>
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 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")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths 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 list[Annotated[str, StringConstraints]]

List of JSON paths 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")
    color: ColonyColor | None = Field(default=None, title="Color of Colony")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths 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>
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 (ISO 2 Letter Code)"
    )
    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"

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"

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"

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 like defined by the Enzyme Commission

required
url HttpUrl | None

URL

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>
active bool | 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/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 like defined by the Enzyme Commission",
    )
    url: HttpUrl | None = Field(default=None, title="URL", description="URL")
    alternateName: list[str] = Field(default_factory=list, title="Alternate Name")
    active: bool | None = Field(default=None, title="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]

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>
library str | None
None
software 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/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")
    library: str | None = Field(default=None, title="Library")
    software: str | None = Field(default=None, title="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 str | None
None
value float
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: str | None = Field(default=None, title="Method")
    value: Annotated[float, Field(ge=0, le=100)] = Field(title="Percent Value")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

growthrange #

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 TypeVar
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 list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/growthrange.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")
    minimal: float | None = Field(default=None, title="Minimal")
    maximal: float | None = Field(default=None, title="Maximal")
    unit: T
    tests: list[GrowthRange[T]] = Field(default_factory=list, title="Tests")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths 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 TypeVar
required
growth bool
required
relatedData list[Annotated[str, StringConstraints]]

JSON paths to relation object

<dynamic>
Source code in src/microbial_strain_data_model/classes/growthrange.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")
    maximal: float | None = Field(default=None, title="Maximal")
    unit: T
    growth: bool = Field(title="Growth")
    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
required
hemolysisType HemolysisType
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")
    hemolysisType: HemolysisType = Field(title="Hemolysis Type")
    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
required
value str
required
propertyID 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")
    value: str = Field(title="Value")
    propertyID: str | None = Field(default=None, title="Property ID")
    url: HttpUrl | None = Field(default=None, title="URL")

IdentifierStrain #

Bases: Identifier

Parameters:

Name Type Description Default
name str
required
value str
required
propertyID str | None
None
url HttpUrl | None
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"
    )

isolation #

Isolation #

Bases: BaseModel

Isolation event information

Parameters:

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

List of JSON paths 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")
    isolatedAt: Organization | Person | None = Field(default=None, title="Isolated At")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

legal #

Legal #

Bases: BaseModel

Legal information of the strain

Parameters:

Name Type Description Default
dualUse bool | None
None
quarantineEU bool | None
None
nagoyaRestrictions NagoyaRestrictions
required
qps bool | None
None
gras bool | None
None
gmo bool | None
None
gmoInformation str | None
None
otherRestrictions list[Restriction]

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/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")
    qps: bool | None = Field(default=None, title="QPS")
    gras: bool | None = Field(default=None, title="GRAS")
    gmo: bool | None = Field(default=None, title="GMO")
    gmoInformation: str | None = Field(default=None, title="GMO Information")
    otherRestrictions: list[Restriction] = Field(
        default_factory=list, title="Other Restrictions"
    )
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

Restriction #

Bases: BaseModel

Description

Parameters:

Name Type Description Default
name str

Name of the restriction

required
country Country | None
None
authority str | None

The responsible authority

None
value str
required
Source code in src/microbial_strain_data_model/classes/legal.py
class Restriction(BaseModel):
    """Description"""

    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")
    authority: str | None = Field(
        default=None, title="Authority", description="The responsible authority"
    )
    value: str = Field(title="Value")

literature #

Literature #

Bases: BaseModel

Connected Literature information

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(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")
    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")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths 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")
    longitude: Longitude = Field(title="Longitude")
    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
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")
    description: str | None = Field(default=None, title="Description")
    geo: GeoPoint | None = Field(default=None, title="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
kindOfUtilization str | None
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")
    active: bool | None = Field(default=None, title="Active")
    protocol: str | None = Field(default=None, title="Protocol")
    kindOfUtilization: str | None = Field(default=None, title="Kind Of Utilization")
    relatedData: list[RelationLink] = Field(
        default_factory=list,
        title="Related Data",
        description="JSON paths to relation object",
    )

motility #

Motility #

Bases: BaseModel

Information on motility of a Strain

Parameters:

Name Type Description Default
motile bool | None
None
flagellum bool | None
None
flagellumArrangement FlagellumArrangement | None
None
gliding bool | None
None
source list[Annotated[str, StringConstraints]]

List of JSON paths 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")
    flagellum: bool | None = Field(default=None, title="Flagellum")
    flagellumArrangement: FlagellumArrangement | None = Field(
        default=None, title="Flagellum Arrangement"
    )
    gliding: bool | None = Field(default=None, title="Gliding")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

multicell #

MultiCell #

Bases: BaseModel

MultiCell ability of the strain

Parameters:

Name Type Description Default
multiCellComplexForming bool
required
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/multicell.py
class MultiCell(BaseModel):
    """MultiCell ability of the strain"""

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

    multiCellComplexForming: bool = Field(title="Multi Cell Complex Forming")
    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"
    )

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 at this collection

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 at this collection",
    )
    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")

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
usageInfo str | None
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")
    name: str | None = Field(default=None, title="Name")
    description: str | None = Field(default=None, title="Description")
    usageInfo: str | None = Field(default=None, title="Usage Information")
    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)

oxygenrelation #

OxygenRelation #

Bases: BaseModel

OxygenRelation of the strain

Parameters:

Name Type Description Default
oxygenRelation str
required
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/oxygenrelation.py
class OxygenRelation(BaseModel):
    """OxygenRelation of the strain"""

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

    oxygenRelation: str = Field(title="Oxygen Relation")
    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"
    )

pathogen #

Pathogen #

Bases: BaseModel

Pathogen, defining Host, pathogenicity and under what classification

Parameters:

Name Type Description Default
host Host

Host organism or group

required
pathogen PathogenLevel

Frequency of pathogenicity

required
classification str | None

Type of 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="Host organism or group")
    pathogen: PathogenLevel = Field(
        title="Pathogen", description="Frequency of pathogenicity"
    )
    classification: str | None = Field(
        default=None, title="Classification", description="Type of 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 #

ConnectedPerson #

Bases: Person

Connected Person = Person + Role

Parameters:

Name Type Description Default
name str

Name of the person

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 list[Annotated[str, StringConstraints]]

List of JSON paths to source object

required
Source code in src/microbial_strain_data_model/classes/person.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")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

Person #

Bases: BaseModel

Person

Parameters:

Name Type Description Default
name str

Name of the person

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/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")
    identifier: list[Identifier] = Field(default_factory=list, title="Identifier")

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"
    )

sample #

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/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,
    )

    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

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
locationCreated 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 list[Annotated[str, StringConstraints]]

List of JSON paths 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")
    country: Country | None = Field(default=None, title="Country")
    description: str | None = Field(default=None, title="Description")
    locationCreated: Location | None = Field(default=None, title="Location Created")
    tags: list[IsolationTag] = Field(default_factory=list, title="Isolation Source Tags")
    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 #

CellSize #

Bases: BaseModel

object to hold cell size information

Parameters:

Name Type Description Default
cellLength Size
required
cellWidth Size
required
source list[Annotated[str, StringConstraints]]

List of JSON paths 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,
    )

    cellLength: Size = Field(title="Cell Length", description="")
    cellWidth: Size = Field(title="Cell Width", description="")
    source: list[SourceLink] = Field(
        title="Source", description="List of JSON paths to source object"
    )

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")

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
required
taxonStatus 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>
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 = Field(title="Taxon Rank")
    taxonStatus: TaxonStatus = Field(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
required
taxonStatus 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>
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
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]

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 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: str | None = Field(default=None, title="Reaction")
    mic: str | None = Field(default=None, title="MIC")
    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 str | None
None
unit ConcentrationUnit
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: str | None = Field(default=None, title="Concentration")
    unit: ConcentrationUnit = Field(title="Unit")
    relatedData: list[RelationLink] = Field(
        default_factory=list,
        title="Related Data",
        description="JSON paths to relation object",
    )