riverine.components#

Classes#

AbstractComponent

Abstract class for a component in a mix. Custom components that don't inherit from

Component

A single named component, potentially with a concentration and location.

Strand

A single named strand, potentially with a concentration, location and sequence.

Module Contents#

class riverine.components.AbstractComponent[source]#

Bases: abc.ABC

Abstract class for a component in a mix. Custom components that don’t inherit from a concrete class should inherit from this class and implement the methods here.

property name: str[source]#
Abstractmethod:

Name of the component.

property location: tuple[str, riverine.locations.WellPos | None][source]#
property plate: str | None[source]#
property is_mix: bool[source]#
property well: riverine.locations.WellPos | None[source]#
property _well_list: list[riverine.locations.WellPos][source]#
property volume: riverine.units.DecimalQuantity[source]#
property concentration: riverine.units.DecimalQuantity[source]#
Abstractmethod:

(Source) concentration of the component as a pint Quantity. NaN if undefined.

abstractmethod all_components() pandas.DataFrame[source]#

A dataframe of all components.

abstractmethod with_reference(reference: riverine.references.Reference, *, inplace: bool = False) T[source]#
abstractmethod with_experiment(experiment: riverine.experiments.Experiment, *, inplace: bool = True) AbstractComponent[source]#
classmethod _structure(d: dict[str, Any], experiment: riverine.experiments.Experiment | None = None) AbstractComponent[source]#
Abstractmethod:

abstractmethod _unstructure(experiment: riverine.experiments.Experiment | None = None) dict[str, Any][source]#
printed_name(tablefmt: str | riverine.printing.TableFormat) str[source]#
_update_volumes(consumed_volumes: dict[str, riverine.units.DecimalQuantity] | None = None, made_volumes: dict[str, riverine.units.DecimalQuantity] | None = None, _cache_key=None) Tuple[dict[str, riverine.units.DecimalQuantity], dict[str, riverine.units.DecimalQuantity]][source]#

Given a

class riverine.components.Component[source]#

Bases: AbstractComponent

A single named component, potentially with a concentration and location.

Location is stored as a plate and well property. plate is

name: str[source]#

Name of the component.

_get_name(_cache_key=None) str[source]#
concentration: riverine.units.DecimalQuantity[source]#

(Source) concentration of the component as a pint Quantity. NaN if undefined.

_get_concentration(_cache_key=None) riverine.units.DecimalQuantity[source]#
plate: str | None[source]#
well: riverine.locations.WellPos | None[source]#
volume: riverine.units.DecimalQuantity[source]#
property location: tuple[str | None, riverine.locations.WellPos | None][source]#
all_components_polars(_cache_key=None) polars.DataFrame[source]#
all_components() pandas.DataFrame[source]#

A dataframe of all components.

_unstructure(experiment: riverine.experiments.Experiment | None = None) dict[str, Any][source]#
classmethod _structure(d: dict[str, Any], experiment: riverine.experiments.Experiment | None = None) Component[source]#
with_experiment(experiment: riverine.experiments.Experiment, inplace: bool = True) AbstractComponent[source]#
with_reference(reference: riverine.references.Reference, inplace: bool = False) Component[source]#
class riverine.components.Strand[source]#

Bases: Component

A single named strand, potentially with a concentration, location and sequence.

sequence: str | None = None[source]#
with_reference(reference: riverine.references.Reference, inplace: bool = False) Strand[source]#