The aliquot chain

The chain describes what happened to the material: a sample becomes a digest, which yields a fraction, which yields a measurement. Nodes are material and results, not files; files attach to nodes and to operations. This page describes the model, the templates that avoid entering everything by hand, and the grid view.

Why nodes are not files

A graph of files cannot say that an Sb(III) fraction comes from a given digest, because that fraction has no file of its own: it is one line in a workbook that holds forty. By taking material as the unit, the chain describes what happened at the bench, and files attach wherever they document something.

ElementWhat it is
NodeAn aliquot, a result or an output.
EdgeAn operation: digestion, purification, dilution, spiking, measurement...
Attached fileTo a node, or to an edge. A digestion protocol documents the operation.
SplitTwo edges leaving the same node. No dedicated type.
MixTwo edges arriving at the same node.

The operations

Fifteen operations ship, covering preparation and measurement, including dopage for isotope dilution. The vocabulary is bilingual and lives in a label table, like the inventory reasons: the chain stores the code, the display produces the sentence.

GuardBehaviour
CycleRefused on write, and the message names the cycle rather than announcing a general refusal.
Expected targetA measurement targets a result; a citation and a publication target an output.
OutputIs cited from results, and is not manufactured from material.
TraversalIterative, checked on three thousand nodes. A recursive traversal would fail on a deep chain.

Templates

The main risk in this model is not technical. An editor where three hundred nodes must be placed by hand produces a graph nobody fills in, which is the usual failure mode of laboratory information systems. Templates exist for that reason.

PointBehaviour
ShippedTen templates across seven domains: isotopes, elemental, waters, solids, organic, mineral, environment.
FormA list of steps, each naming the step it starts from. Describing a graph would have required an editor just to write the template.
DomainIt groups, it does not restrict: a template from another domain still applies.
Shipped templatesNot copied into the user file, so that a correction reaches existing installations. A user template with the same key replaces it; deleting it restores the shipped one.
ReapplyingIgnores names already present, so applying twice adds no duplicate.
A chain entered once turns into a template. You describe the procedure while doing it, then apply it to the next forty samples.

Template editor

The editor opens from the template picker, at the top to create and at the bottom to modify. Work is done on a copy, so that cancelling gives everything back; a copy starts from an empty key, otherwise duplicating a template would silently replace the original.

The preview goes through the same layout function as the chain view. A second representation, written for the occasion, would diverge from the first at the first correction.

In a template, depuis designates a rank, not an identity. Moving or removing a step therefore reindexes every reference. Without that reindexing, a branch would start from a different step than the one chosen, with no message, and the fault would only show after the template had been applied to forty samples.

The grid view

The chain is not drawn as a free graph. A force-based layout would produce an unreadable cloud where the real structure is a grid: a campaign is most often N repetitions of the same shape. Steps are therefore the columns and samples the rows.

Layout ruleReason
A node's rank is the longest path from a root.With the shortest, a node reachable by a shortcut would move up one column and an edge would point backwards.
The first branch continues the row, the following ones open a new one.A split reads as a doubling, while staying aligned with the other samples.
A node already placed keeps its place.A mix occupies a single row, and reads as a diamond.
A column carries the majority step, on a strict majority.On a tie, all leading steps are named: settling it by coin toss would announce one step while hiding another.
A node unreachable from any root is shown at the end of the grid, marked orphan.Hiding it would remove real data from the screen.

Edges are drawn in a single SVG layer, as curves: two identical right angles overlap on a split. The layout is computed by a pure function, tested without a DOM on bench cases, including forty parallel chains, a mix, a shortcut skipping a step, and a chain of three thousand nodes.

The chain view needs width: nine columns do not fit in a two-hundred-pixel dock. Its place is the central zone. The side panel keeps the indented tree, which suits scanning.

Opening the view on an already open campaign

A panel asks for the current state when it mounts rather than waiting for an event. That is the common case: the chain view is opened precisely because a campaign is already open, therefore after the load event has fired. Events only serve for later changes.

Related pages