MINFLUX dual colour

Analysis › MINFLUX · version 2

Two-colour MINFLUX: the offset between the colours (beads, or the

What it does

A two-colour MINFLUX measurement localizes each dye with its own laser, the two interleaved in time: a kinesin with one head labelled for 640 nm and the other for 560 nm is seen in both. Two things are not in the file. Which trace of one colour belongs with which of the other – the instrument numbers each colour's traces on its own. And how far apart the colours are: the two lasers do not meet in exactly one place, by some 10 nm, which matters when the heads themselves are 8 nm apart.

This plugin does both, in this order:

The colour is the laser, channel (0 the longer wavelength) as the .msr reader writes it, so the bead and the tracking measurement agree even when their threads ran in opposite order; a table without it uses the thread, thi.

Regions of pair_id – Segment regions' from an id attribute, with its MINFLUX kinesin preset – are then one molecule each, which is what Find steps' pairs and the trace inspector need. The MINFLUX kinesin chain runs it with the steps before and after.

It reads the localizations the layer's filter keeps, of the measurements the selection holds; a bead measurement is read whole. On a table of one colour it says so and changes nothing, so that a chain made for two colours runs on one as well.

How it works

1. The offset from a bead measurement. A bead in the sample measured in both colours, in a measurement of its own: its traces are paired by time, each colour-1 localization matched with the colour-0 one nearest in time, and the offset is the median of their differences – over the emitters, the median of each one's median. On auto the open measurement that is not being paired and was taken last before the tracking is used, and one taken after it, if any, too. A measurement read together with the tracking (one .msr, merged) is taken for beads when its typical localization is in a trace of 1000 or more: a bead is followed for thousands, a motor for tens to hundreds.

2. Before and after. With a bead measurement before and one after, the offset at any time between is the first one, plus the MBM colour drift since (step 4), plus whatever of the difference between the two the drift does not explain, spread evenly over the time between. That part is reported: a large one says the drift does not follow the colours.

3. The offset from the molecules. Without a bead measurement – or when offset from says so – each molecule seen in both colours gives an offset, and the offset is fitted to them all. A molecule that walks adds its own part: the two colours label different places of it (for a kinesin, the two heads, half a step apart along the track), so its offset is the registration c plus a lead a along the direction it walks in. With molecules walking in many directions the two are told apart: d = c + a u, u the direction. A still molecule tells only c. The fit is robust, so the few traces of two different molecules that pass as one count for nothing.

Simulated molecules, 40 walking in random directions and 10 still, colour 1 offset by (−1.5, 11.5) nm and 6 nm behind colour 0 along the motion: each molecule's offset (dots) spreads round the registration along the direction it walks; the fit finds the registration (cross) and, from the spread, the lead.

4. The colours' drift from the MBM beads. Where the measurement recorded its MBM beads in both colours, each bead's colour-1 position less its colour-0 one is followed over time. Each bead has a bias of its own – in the measurement looked at, tens of nanometres and different for every bead – so its absolute value says nothing; how it changes does. Each bead's difference is fitted with an offset of its own and one smooth curve through them all, the beads that disagree left out, as MBM drift correction does with positions. The curve, zero at the beads' first point and held flat after their last, is added to the offset.

5. Colour 1 moved. Colour 1's localizations of the measurements being paired are moved by the offset at their time, x_nm and y_nm, and x_nc_nm, y_nc_nm where Imspector kept them. The shift is recorded with the table: a second run takes it off first and moves from the positions as read.

6. Molecules. A trace of colour 0 and one of colour 1 that overlap in time are candidates. Each colour-1 localization is matched with the colour-0 one nearest in time (within match within); the two traces are one molecule when enough localizations match (matched at least) and enough of the matches – for a share of – are no further apart than apart at most. The share, not the median distance: two molecules whose paths cross are close for a while either side of the crossing, and a median can pass where a share does not. The accepted candidates are joined greedily, the most close matches first, so that a 560 nm trace that stopped and started again on the same kinesin joins its 638 nm trace (and the other way round), as long as no two traces of one colour in a molecule overlap in time: two at once are two molecules.

7. Is one offset enough? The offset applied is one shift (plus the MBM drift). What each molecule in both colours has left of its offset once that is taken off is checked for what one shift would miss: a gradient across the field – a plane fitted to the leftovers against x and y – and a drift in time – a line against time. The text says, for each, whether a slope stands out of its error, and the fifth panel draws each molecule's leftover as an arrow at its place. A slope there says the bead or the molecules' average does not hold everywhere in the field or all through the measurement. With few molecules – the kinesin measurement has a dozen in both colours – two at the edge of the field decide a plane, so a gradient is fitted only from 20 molecules, a drift in time from 8. The molecules' own spread (the dyes' places on each molecule, a few nm) is what a slope has to stand out of.

Simulated: 40 molecules over 4 x 3.5 um whose offset left over grows by 1.5 nm per um along x, 2 nm of scatter (left), and 12 of them (right): with 40 the arrows turn from left to right across the field and the gradient is found; with 12 none is offered.

In detail

Matching in time. Within two traces, for each colour-1 localization the colour-0 one before and the one after it in time, the nearer taken; further apart than match within, it is left out.

Direction and displacement. A molecule's direction is the long axis of its colour-0 localizations (their first principal component), turned forward in time; how far it moves, the median position along that axis of its last fifth less that of its first, so that the ends' noise is averaged rather than its extremes taken. It is still below moving from.

The fit. Least squares of d = c + a u over the molecules (two equations each, one per axis), reweighted with Tukey's biweight on the length of each molecule's residual, tuning constant 4.685 robust standard deviations, the spread 1.4826 times the median residual and never under 1 nm. a is fitted only with three or more moving molecules whose directions are not all one: with every track parallel, a lead and a registration cannot be told apart, and the plugin says so. When the offset comes from the molecules, a first pass joins them with apart at most widened to 100 nm (or three times it), the fit is made on that pass's molecules, each less the MBM drift at its time, and the molecules are joined again with the offset taken off.

The MBM drift. A bead's two colours are the two entries of its slot (gri) in the bead table; each colour-1 point is matched with the colour-0 point of the same bead nearest in time, within 2 s. The curve is beads.select_beads' spline, a coefficient every drift knot spacing, with its rules for leaving a bead out.

Times across measurements. A bead measurement's time is put on the tracking's clock through the two acquisition dates (to the second), so that a bead measurement six minutes before the tracking sits six minutes before it. Where the bead measurement has no MBM beads of its own, the drift between it and the tracking's first MBM point is not measured, and the plugin warns.

pair_id is written as a recipe with the rule max, so a merged trace keeps its molecule; -1 outside the measurements paired, outside the layer's filter, or without a trace. Molecules are numbered by when they start.

What is left (offset_trends). For each molecule in both colours, its median offset as measured less the offset curve at its time. Two fits, each on its own: dx and dy against x and y (a plane, slopes in nm per um), and against time (a line, nm per 100 s). Each molecule counts once. Both are robust as the offset fit is – Tukey's biweight on the length of each molecule's residual, constant 4.685, the spread 1.4826 times the median residual and never under 1 nm – and their errors come from the kept molecules' scatter. A slope "changes" when it is more than three times its error: four slopes across the field are tested, and at twice the error one would stand out by chance one time in five. Fewer than 20 molecules: no plane; fewer than 8: no line. It is a diagnostic: nothing it finds is applied.

Parameters

settingdefaultwhat it does
offset
   offset from
   offset.source
autoAuto: the bead measurements if one is open, else the molecules themselves.

auto takes the bead measurements where one is open beside the tracking, else the molecules. the molecules is worth comparing with the beads: the two should agree within the fit's error, and when they do not, the bead measurement does not describe the tracking – other detectors, laser power or sequence, or drift between the two.

Choices: auto; bead measurements; the molecules (fit); a named transformation; typed; none
   beads before
   offset.before
autoThe bead measurement taken before the tracking; auto: the last one.
   beads after
   offset.after
autoOne taken after it, interpolated between the two; auto: the first one after, if any.
   MBM colour drift
   offset.mbm_drift
onThe colours' drift against each other over time, from MBM beads recorded in both colours.
   drift knot spacing (more)
   offset.knot_s
120 sThe colour drift's spline, a coefficient this often.

The colours drift slowly (1 to 2 nm per 100 s in the measurement looked at) and the MBM beads are measured every 15 to 20 s with a few nanometres of noise: a short spacing follows the noise.

5 to 10000 s
   moving from (more)
   offset.still_nm
30 nmA molecule moving less is still: it tells the offset, not the lead along the track.
   dx
   offset.dx_nm
0 nmColour 1 - colour 0, typed.
   dy
   offset.dy_nm
0 nmColour 1 - colour 0, typed.
   transformation
   offset.named
-A named transformation that puts colour 1 onto colour 0.
pairing
   match within
   pairing.max_dt_ms
5 msA colour-1 localization is matched with the colour-0 one nearest in time, if this close. at least 0.01 ms
   apart at most
   pairing.max_distance_nm
30 nmHow far apart a match may be, the offset taken off.

The two labels' distance in the molecule, plus twice the localization precision, plus what is left of the registration: for kinesin heads (at most about 16 nm apart) at 5 nm precision, 30 nm. Wider joins more chance neighbours; for a share of keeps most of those out.

at least 1 nm
   for a share of
   pairing.min_fraction
0.5The share of the matches that must be that close.

0.5 by default. Raise it where molecules are dense, lower it for a molecule whose colours separate for a while (a cargo that swings).

0 to 1
   matched at least
   pairing.min_matched
10 locsTwo traces with fewer matches are not one molecule. at least 1 locs
   overlap at least (more)
   pairing.min_overlap_s
0 sTwo traces measured together for less are not one.
move colour 1 onto colour 0
apply
onOff: only measure and pair, the positions as they are.
keep as
name
–The name the constant offset is kept under for Transform; empty: by the colours.

Output

pair_id on the localizations; colour 1 moved; a region table of pair_id, "per pair_id: MINFLUX dual colour", per molecule: whether it is in both colours (both), the traces joined (n_traces), localizations per colour (n_0, n_1), the matches (n_matched), their share within the distance (within) and median distance (separation_nm), the offset left after the move (dx_nm, dy_nm), and how far and fast colour 0 moved (displacement_nm, velocity_nm_per_s). The constant offset is kept as a named transformation ("560 nm onto 638 nm") for Transform.

The text adds a line on what is left after the offset: the slopes across the field and over time with their errors, or that there were too few molecules to tell.

Five panels: each molecule's offset as measured, with the offset used; the same over time with the offset curve – the molecules should scatter round it, with no trend away from it; the MBM colour drift, each bead about its own offset and the curve; and how far colour 1 is ahead of colour 0 along the motion, with the fitted lead; and what each molecule has left of its offset, as an arrow at its place in the field – arrows that turn or grow across the field are a gradient one shift misses, arrows pointing every way are the molecules' own spread.

Differences from SMAP

Ported in idea from SMAP's MINFLUX plugins Segment_cotracks, DCoffset_Beads_ROIs and StepsMINFLUX_dc (Ries 2020).

References