619 Sequence from the Ion Current

619.1 Scope

The genetic sequence is the closest thing biology has to a directly readable quantity: a string over a four-letter alphabet, reported without error bars, and treated throughout molecular biology as the datum from which everything else follows. This section traces the string back to the detector output and asks what fixes each of its properties — its length, the size of its alphabet, the correspondence between symbol and signal, and the identity of each position.

619.2 Data

A nanopore sequencing run, distributed as raw signal. Ten reads, \(1\,548\,931\) ADC samples in total, sampled at \(4\) kHz. The values are \(16\)-bit signed integers spanning \(-4096\) to \(4095\) with median \(378\); they are the digitised ionic current through a protein pore as a nucleic acid strand translocates. No basecalling, alignment or filtering has been applied. The first read alone contains \(123\,627\) samples.

619.3 What the instrument measures

A nanopore does not report bases. It reports a current, and the current is modulated by whatever occupies the pore constriction — in practice five to six nucleotides simultaneously. A single current value therefore corresponds to a \(k\)-mer, of which there are \(4^6 = 4096\), not to a nucleotide. The step from current to sequence is performed by a neural network whose output layer has four states and whose training targets are sequences already written in ACGT by earlier instruments.

619.4 How many categories the current supports

Segmenting the smoothed signal at changepoints above the \(97\)th percentile of the first difference gives \(42\,015\) level segments across the ten reads, spanning \(152\) to \(668\) ADC units. Fitting Gaussian mixtures and selecting by Bayesian information criterion:

\[ \begin {array}{rrr} k & \mathrm {BIC} & \mathrm {AIC} \\ \hline 2 & 482\,495 & 482\,451 \\ 3 & \mathbf {482\,279} & \mathbf {482\,210} \\ 4 & 482\,530 & 482\,435 \\ 6 & 482\,550 & 482\,403 \\ 16 & 482\,732 & 482\,326 \\ 64 & 484\,172 & 482\,520 \\ 256 & 489\,852 & 483\,221 \\ \end {array} \]

The minimum is at \(k=3\). The four-component model is worse than the three-component model by \(251\) and worse than the two-component model by \(35\). The \(4096\)-component \(k\)-mer model is rejected by a wide margin.

Proposition 619.1 (The number of categories is set by the segmentation). Varying only the changepoint threshold:

\[ \begin {array}{rrrr} \text {percentile} & \text {segments} & \text {selected } k & \Delta \mathrm {BIC}(k{=}4) \\ \hline 90.0 & 98\,590 & 4 & 0 \\ 93.0 & 81\,553 & 4 & 0 \\ 95.0 & 63\,794 & 3 & 183 \\ 97.0 & 42\,015 & 3 & 251 \\ 99.0 & 15\,004 & 2 & 69 \\ 99.5 & 7\,636 & 5 & 24 \\ \end {array} \]
The same current supports two, three, four or five categories depending on a threshold that is not a property of the pore. Varying the minimum segment length from \(2\) to \(20\) samples leaves the selection at \(k=3\) throughout, so the dependence is on the amplitude criterion specifically.

619.5 No criterion selects four

Restricting to the first read (\(3341\) segments, range \(169\)–\(565\)) and reading off three standard selection criteria:

\[ \begin {array}{rrrrr} k & \mathrm {BIC} & \text {RMSE [ADC]} & R^2 & \text {bits/symbol} \\ \hline 2 & \mathbf {36\,287} & 33.13 & 0.6363 & 0.999 \\ 3 & 36\,324 & 24.33 & 0.8039 & 1.533 \\ 4 & 36\,345 & 19.47 & 0.8745 & 1.894 \\ 5 & 36\,361 & 15.88 & 0.9165 & 2.182 \\ 6 & 36\,385 & 13.36 & 0.9408 & 2.426 \\ 8 & 36\,433 & 10.07 & 0.9664 & 2.857 \\ 16 & 36\,613 & 5.35 & 0.9905 & 3.820 \\ 32 & 36\,922 & \mathbf {2.69} & \mathbf {0.9976} & 4.747 \\ \end {array} \]

The penalised likelihood selects \(k=2\). Reconstruction error and explained variance are monotone in \(k\) and select the largest model tried. No criterion has an interior optimum at four.

The two-symbol encoding carries \(3337\) bits against \(6328\) for the four-symbol encoding, or \(52.7\%\). The four-letter alphabet is not the most economical description of the current; it costs roughly twice what the data require.

Written out, the same read under six alphabets:

\[ \begin {array}{ll} k=2 & \texttt {1110010101001110011010101101001110111000101010...} \\ k=3 & \texttt {YZZXXYXYXYXXYYYYXYZXYXYXYZXZYYZYYXYYYXXXZXYXZY...} \\ k=4 & \texttt {CTTACGAGAGCCGGGCAGGCGAGCCGCTCCGGGCGGCCCATAGCGC...} \\ k=5 & \texttt {CEEABCADACBBCDCCACDBCACBCDBEBCDCDBCDCBBBEBCBDC...} \\ k=6 & \texttt {DFFBCDAEBDBBDDDCBDECDBDCDECFCCEDEBDDDCCBFBDBED...} \\ k=8 & \texttt {DHHBCEAFBDCCEEEDBEFCEBECDFCGCDFEFCDEDCCBHBECGD...} \\ \end {array} \]
all of the same current, all of the same length \(3341\).

619.6 Separation of the four components

Forcing \(k=4\) on the \(42\,015\) segments gives:

\[ \begin {array}{rrrr} \text {component} & \text {centre} & \text {width} & \text {weight} \\ \hline 0 & 301.7 & 36.8 & 0.255 \\ 1 & 368.5 & 29.2 & 0.319 \\ 2 & 429.7 & 29.5 & 0.283 \\ 3 & 508.5 & 45.6 & 0.143 \\ \end {array} \]
with adjacent separations of \(2.02\), \(2.08\) and \(2.10\) standard deviations and pairwise overlap integrals of \(0.312\), \(0.298\) and \(0.295\).

Roughly thirty per cent of the probability mass of each adjacent pair lies on the wrong side of the optimal boundary. The four components are separable in the sense that their means differ; they are not separable in the sense that a given segment can be assigned without ambiguity.

619.7 The correspondence between component and letter

Two distinct choices are made in going from components to characters: how many characters, and which component receives which character. The second is fixed neither by the current nor by the clustering.

Proposition 619.2 (The letter assignment is free). Holding the clustering of the first read fixed at \(k=4\) with boundaries \((302.0, 347.6, 393.0)\), and permuting only the map from ordered component to letter:

\[ \begin {array}{ll} \text {map} & \text {identity with the reference call} \\ \hline \mathtt {ACGT} & 1.000 \\ \mathtt {ACTG} & 0.525 \\ \mathtt {ATGC} & 0.518 \\ \mathtt {AGCT} & 0.430 \\ \mathtt {AGTC} & 0.236 \\ \mathtt {ATCG} & 0.236 \\ \end {array} \]
There are \(24\) such maps. Twenty-three produce a different sequence from identical current, with agreement as low as \(23.6\%\). The current does not distinguish among them: the clustering, the reconstruction error and the likelihood are unchanged, since only the labels differ.

The map that is used is the one the basecaller was trained to produce, and the training targets already carried the letters.

619.8 The boundaries are not located by the current either

With the correspondence fixed, displacing all three decision boundaries by a common offset:

\[ \begin {array}{rrr} \text {offset [ADC]} & \text {identity} & \text {bases changed} \\ \hline -15 & 0.7381 & 874 \\ -10 & 0.8273 & 577 \\ -5 & 0.9105 & 299 \\ -2 & 0.9659 & 113 \\ +5 & 0.9087 & 305 \\ +10 & 0.8258 & 582 \\ +15 & 0.7417 & 862 \\ \end {array} \]
out of \(3341\) called positions. A displacement of \(15\) ADC units — less than half a component width — changes a quarter of the sequence.

Proposition 619.3 (Equally good boundaries, disjoint sequences). Combining the \(24\) letter correspondences with five common boundary offsets (\(-12\), \(-6\), \(0\), \(+6\), \(+12\) ADC) gives \(120\) sequences, all distinct. Their agreement with the reference call has median \(0.236\) and minimum \(0.000\): at least one shares no position with it.

The reconstruction error of the shifted boundaries is \(19.34\) ADC against \(19.47\) for the fitted optimum. The alternative that agrees with the reference call at no position describes the current marginally better than the call that is used.

Drawing three boundaries uniformly at random over the observed range \(169\)–\(565\) gives RMSE between \(27.8\) and \(54.5\) — a factor of \(1.4\) to \(2.8\) above the fitted value, the same order of magnitude rather than a different one.

619.9 Length and composition

Proposition 619.4 (Segmentation sets the length and the composition). Varying the changepoint threshold and minimum segment length on the first read, with \(k=4\) and the standard correspondence throughout:

\[ \begin {array}{rrrrr} \text {pct} & \text {minlen} & \text {length} & \text {GC fraction} & \text {identity} \\ \hline 90 & 4 & 8262 & 0.5779 & 0.3868 \\ 93 & 4 & 6823 & 0.6392 & 0.4505 \\ 95 & 4 & 5247 & 0.6947 & 0.5496 \\ 97 & 4 & 3341 & 0.6860 & 1.0000 \\ 99 & 4 & 1180 & 0.8068 & 0.3457 \\ 97 & 2 & 3426 & 0.6888 & 0.8558 \\ 97 & 8 & 2886 & 0.7024 & 0.7157 \\ 97 & 20 & 1875 & 0.8027 & 0.4942 \\ \end {array} \]
The read is between \(1180\) and \(8262\) bases long, a factor of seven, and its GC fraction lies between \(0.578\) and \(0.807\). GC content enters directly into statements about genome composition, melting temperature and codon usage.

619.10 Production basecallers

The same ten reads passed through three released models:

\[ \begin {array}{lrrr} \text {model} & \text {bases} & \text {median length} & \text {GC} \\ \hline \texttt {[email protected]} & 148\,485 & 15\,268 & 0.4253 \\ \texttt {[email protected]} & 150\,832 & 15\,501 & 0.4230 \\ \texttt {[email protected]} & 151\,551 & 15\,546 & 0.4248 \\ \end {array} \]
The three disagree on how many bases the sample contains by \(3066\), or \(2.1\%\). They are three versions of one program, trained on overlapping data, applied to identical input.

619.11 Summary

\[ \begin {array}{ll} \text {layer} & \text {what it fixes} \\ \hline \text {changepoint threshold} & \text {length } 1180\text {--}8262;\ \text {GC } 0.578\text {--}0.807 \\ \text {selection criterion} & \mathrm {BIC}\Rightarrow k{=}2;\ \mathrm {RMSE},R^2\Rightarrow k\to \infty \\ \text {segmentation threshold} & k = 2,3,4,5 \\ \text {component overlap} & 30\% \text { between adjacent pairs} \\ \text {letter correspondence} & 24 \text { maps, } 23 \text { giving different sequences} \\ \text {boundary offset} & 15\ \mathrm {ADC} \Rightarrow 26\% \text { of positions change} \\ \text {combined} & 120 \text { distinct sequences, minimum agreement } 0.000 \\ \text {basecaller model} & 2.1\% \text { disagreement on total length} \\ \end {array} \]

The four-letter alphabet is not recovered from the current. Penalised likelihood selects two categories; reconstruction error selects as many as are offered; the segmentation threshold moves the answer between two and five. The correspondence between pore level and letter is a labelling, invariant under the likelihood, inherited from training data that already carried the labels. The boundaries admit displacement without loss of fit, and one displacement yields a sequence sharing no position with the one reported while fitting the current slightly better.

None of this establishes that nucleic acids do not have four bases. It establishes that the instrument does not say so, and that every reported property of a sequence — its length, its composition, and the identity of each position — is fixed by choices made downstream of the measurement.

619.12 Discarding the alphabet entirely

The preceding subsections vary the alphabet, the correspondence and the boundaries, and find each unconstrained by the current. A natural reply is that the alphabet is not claimed to be derived from the signal at all: it is the representation in which the downstream operations of molecular biology — alignment, comparison, search, variant calling, classification — are defined, and those operations require a discrete string.

This subsection tests that reply by performing all five operations on the current directly.

619.12.1 Cost of the symbolic representation

Taking the first read, standardised, and comparing descriptions under a common minimum-description-length accounting (residual entropy plus parameter cost):

\[ \begin {array}{lrr} \text {representation} & \text {RMSE} & \text {cost [bit]} \\ \hline \mathrm {AR}(5) & 0.4221 & \mathbf {48\,195} \\ \mathrm {AR}(20) & 0.4216 & 48\,225 \\ \mathrm {AR}(1) & 0.4226 & 48\,278 \\ \text {Haar, } 1024\ \text {coefficients} & 0.4554 & 70\,987 \\ \text {Fourier, } 2048\ \text {modes} & 0.4684 & 89\,688 \\ \text {symbolic } k=8 & 0.7687 & 102\,596 \\ \text {symbolic } k=4 & 0.7984 & 105\,014 \\ \text {symbolic } k=2 & 0.8579 & 110\,394 \\ \text {polynomial, degree } 50 & 0.9901 & 122\,370 \\ \end {array} \]

A fifth-order autoregressive model describes the current with \(46\%\) of the residual and \(46\%\) of the bits of the four-symbol encoding. The symbolic representation is neither the most accurate nor the most economical description available; it sits in the middle of the table.

619.12.2 The five operations without symbols

Working from decimated, robustly standardised current traces, with no clustering, no alphabet and no reference sequence:

Alignment. Dynamic time warping between two reads returns a normalised cost of \(0.0533\) over a path of \(1273\) steps, with warping-slope deviation \(\sigma = 15.1\) samples.

Comparison. The pairwise DTW distance matrix over six reads has zero diagonal and off-diagonal entries between \(0.0496\) and \(0.0600\), median \(0.0524\).

Search. Taking a \(60\)-sample segment of read 0 beginning at position \(200\) as a query and scanning by normalised cross-correlation:

\[ \begin {array}{lrrr} \text {target} & \text {peak} & \text {position} & \text {second/first} \\ \hline \text {read 0} & 0.992 & 200 & 0.486 \\ \text {read 1} & 0.645 & 218 & 0.726 \\ \text {read 2} & 0.502 & 1204 & 0.845 \\ \text {read 4} & 0.432 & 1359 & 0.922 \\ \end {array} \]
The query recovers its own position exactly, with peak correlation \(0.992\) and a second maximum at half the height. Against other reads the best correlation falls to \(0.43\)–\(0.65\) with the runner-up at \(0.73\)–\(0.92\) of the peak: the match is specific.

Variant calling. Introducing three artificial perturbations at positions \(200\), \(500\) and \(800\) — a level shift, an insertion of \(15\) samples, a deletion of \(15\) samples — and reading off local divergence of the warping residual recovers all three at \(215\), \(504\), \(786\), with no false positives.

Classification. Six continuous features (standard deviation, spectral centroid, spectral slope, autocorrelation decay, mean absolute increment, peak density) separate the ten reads with median pairwise distance \(0.304\).

Proposition 619.5 (The alphabet is not required by the operations). Alignment, comparison, search, variant calling and classification are all definable on the current. None requires an alphabet size, a decision boundary, a letter correspondence or a reference sequence. On the test case, search recovers its own position with correlation \(0.992\) and variant calling recovers three of three planted perturbations with zero false positives.

619.12.3 What survives the removal

Removing the alphabet does not remove the adjudication. It relocates it.

\[ \begin {array}{lll} \text {symbolic pipeline} & \longrightarrow & \text {symbol-free pipeline} \\ \hline \text {segmentation threshold} & \longrightarrow & \text {decimation factor} \\ \text {alphabet size } k & \longrightarrow & \text {DTW band width} \\ \text {decision boundaries} & \longrightarrow & \text {divergence threshold} \\ \text {letter correspondence} & \longrightarrow & \text {smoothing width} \\ \text {basecaller model} & \longrightarrow & \text {correlation threshold} \\ \end {array} \]

Each of the new parameters moves the result:

\[ \begin {array}{rrrr} \text {decimation} & \text {DTW cost} & \text {search peak} & \text {search position} \\ \hline 1 & 0.1159 & 1.134 & 354 \\ 2 & 0.0421 & 1.006 & 200 \\ 5 & 0.0496 & 0.955 & 200 \\ 10 & 0.0509 & 1.007 & 200 \\ 20 & 0.0445 & 0.983 & 100 \\ 50 & 0.0278 & 0.937 & 40 \\ \end {array} \]

At decimation \(1\) the query is located at \(354\) rather than \(200\); at \(20\) and \(50\) the reported position is \(100\) and \(40\), since the index is expressed in decimated units. The DTW cost varies by a factor of \(4.2\) across the range and by \(1.26\) across the band width.

For variant calling, the smoothing width and divergence percentile jointly fix how many events are reported:

\[ \begin {array}{rrrr} \text {smoothing} & \text {percentile} & \text {detected} & \text {true positives} \\ \hline 5 & 95 & 3 & 3 \\ 5 & 99 & 2 & 2 \\ 15 & 95 & 3 & 3 \\ 15 & 97 & 2 & 2 \\ 40 & 90 & 3 & 3 \\ 40 & 95 & 2 & 2 \\ 40 & 97 & 1 & 1 \\ 40 & 99 & 1 & 1 \\ \end {array} \]

The same three planted perturbations are reported as three, two or one depending on two numbers neither of which is a property of the pore. The detected positions also shift with the smoothing width: \(215\), \(504\), \(786\) at width \(5\); \(218\), \(501\), \(791\) at width \(15\).

For search, whether a motif is present is decided by a correlation threshold. At \(0.3\) the query matches at \(22\) to \(34\) positions in every read; at \(0.5\) it matches once in reads \(0\), \(1\) and \(2\) and three times in read \(5\); at \(0.7\) it matches only in read \(0\).

Proposition 619.6 (Adjudication is invariant under change of representation). The symbol-free pipeline performs every operation of the symbolic pipeline and admits no alphabet, no boundaries and no reference. It nonetheless carries five free parameters, and the outputs move under each: the location of a motif, the number of variants reported, the distance between two reads, and whether a motif is present at all.

The alphabet was therefore not the source of the indeterminacy. It was the form in which the indeterminacy was recorded.

619.12.4 Consequence

The argument shows that the four-letter string is one of many descriptions the current admits. The present subsection shows that eliminating the string does not eliminate the choice: a representation with no symbols at all reproduces every biological operation and carries the same number of adjudicating parameters.

What the instrument delivers is a current. What is reported — a sequence, an alignment, a variant, a classification — is in every case the output of a procedure with free settings, and the settings are not recoverable from the current. Changing the mathematics changes where the settings appear, not whether they appear.

pict

pict

pict

pict