Skip to content

Containers and Content

Containers and content are separate concepts.

A Minimal Container

text
let target = tube(label = "Target", capacity = 100uL);

This creates a logical tube container. The label is human-readable metadata. The capacity is a volume bound.

Container Families

Culsma includes these constructor families:

ConstructorMeaning
container(...)Generic container constructor.
tube(...)Tube-like container.
well(...)Plate-well container.
chamber(...)Chamber-like container.
surface(...)Surface-like target; volume capacity is not allowed.

Common container arguments:

ArgumentMeaning
specContainer specification text.
carrier_kindCarrier type, such as plate context.
carrier_idCarrier identifier.
carrier_positionPosition inside a carrier.
capacityVolume capacity, except for surface(...).
openOpen/closed state flag.
labelHuman-readable label.
barcodeBarcode or stable external identifier.
loadInitial content load list.

tube(...), well(...), chamber(...), and surface(...) inject their container kind implicitly. Authors normally do not write kind when using those sugar forms.

Initial Load

text
let source = tube(
    label = "Source",
    capacity = 100uL,
    load = [buffer(code = "BUF01", type = "water"):10uL]
);

The load list belongs to the constructor/init boundary. Each item must be a content spec paired with a quantity:

text
load = [content_spec:quantity]

The quantity must carry a physical unit. Load quantities use volume or mass.

Content Specs

Content describes material identity. It is not the container holding the material.

Content constructors:

ConstructorInjected or required kind
content(kind = ..., ...)Generic content; kind is explicit.
blood(...)Injects kind = biosample; default type = whole_blood.
reagent(...)Injects kind = reagent.
buffer(...)Injects kind = buffer.

Common content arguments:

ArgumentMeaning
kindBroad material family; required only for content(...).
typeDomain-specific canonical type token or custom_... extension.
codeStable content identifier.
nameHuman-readable content name.
attrsStructured metadata record.

Kind and Type

kind is a small category. The minimal set is:

text
biosample | reagent | buffer | control | fraction | waste | other

type is the domain-specific refinement.

Examples:

text
buffer(code = "BUF01", type = "water")
reagent(code = "POL01", type = "taq_polymerase")
content(kind = biosample, type = dna_solution, code = "DNA01")

Standard concepts use canonical tokens. Non-standard extensions use a custom_ prefix, for example:

text
content(kind = biosample, type = custom_patient_matched_plasma_pool)

Authoring Rule

Content specs appear inside a container load=[...] initializer.

Recommended:

text
let source = tube(load = [buffer(code = "BUF01", type = "water"):10uL]);

Not recommended as public source authoring:

text
let b = buffer(code = "BUF01", type = "water");
buffer(code = "BUF01", type = "water");

Constructor/init lowering targets such as DefineContent(...) and LoadContent(...) are not normal source authoring forms.

After Initialization

After the protocol starts executing, content moves through containers with operations such as transfer:

text
target << [source:5uL];

Released under the Apache-2.0 license.