Skip to content

Separation and Fractionation

Culsma separates material with sep(...) and creates ordered fractions with frac(...).

Both forms take a sample and a program.

sep(...)

sep(...) splits one container into a fixed two-slot group.

text
let g = sep(sample = lysate, program = centrifuge_program(drive = 12000g));

The result is a sep_container_group. Access its slots with group[0] and group[1].

text
output << [g[0]:40uL];

Separation Programs

sep(...) accepts mechanism-specific programs.

ProgramRequired fieldsOptional fieldsMeaning
centrifuge_program(...)drivekeep_sourceCentrifuge separation.
magnetic_program(...)noneduration, deviceMagnetic separation.
disrupt_program(...)nonedurationDisruption or lysis-oriented separation.
field_program(...)fielddurationField-driven separation.
filtration_program(...)membrane, drivenoneFiltration separation.
phase_partition_program(...)solventnonePhase partition.
precipitation_program(...)reagentdurationPrecipitation.

Slot Meaning

The two slots have stable meanings determined by the program.

Programgroup[0]group[1]
centrifuge_programsupernatantpellet
magnetic_programboundflowthrough
disrupt_programlysatedebris_or_residue
field_programtarget_band_fractionnon_target_fraction
filtration_programfiltrateretentate
phase_partition_programtarget_phaseother_phase
precipitation_programprecipitatesupernatant

keep_source

keep_source is only for centrifuge_program(...).

text
let g = sep(
    sample = lysate,
    program = centrifuge_program(drive = 12000g, keep_source = pellet)
);

keep_source = supernatant reuses the input container for group[0]. keep_source = pellet reuses the input container for group[1].

If keep_source is omitted, both slots are new containers.

frac(...)

frac(...) creates an ordered fraction group.

text
let fg = frac(
    sample = tube,
    program = density_gradient_program(axis = "density", order = "top_to_bottom", bins = 8)
);

The result is a fraction_group. Access slots with fg[0], fg[1], and so on.

Fractionation Programs

ProgramRequired fieldsMeaning
density_gradient_program(...)axis, order, binsDensity or layer-based fractionation.
chromatography_program(...)axis, order, binsRetention-order fractionation.

Index Rules

Group indexes are zero-based.

  • sep_container_group supports only group[0] and group[1].
  • fraction_group[i] must be within 0 <= i < bins when bins is known.
  • Slices, multidimensional indexes, and dynamic index semantics are not part of this authoring surface.

Released under the Apache-2.0 license.