627 Sequence Without an Alphabet— Part 2

The genomic claims of the preceding section rest on files containing strings in four letters. This section begins below the letters, at the raw current recorded by a nanopore instrument, and asks which parts of the passage from current to sequence are fixed by the signal and which are supplied.

627.1 What the instrument records

A nanopore sequencer records ionic current through a membrane pore, sampled at \(4\) or \(5\) kHz, as a molecule translocates. The file format stores this current in picoamperes. It contains no symbols.

Sixty-five reads were taken from the pod5 test data distributed with the reference implementations pod5-file-format, remora and dorado: \(8.9\) million samples in total, spanning \(-37.4\) to \(211.6\) pA. The run metadata recorded in each file identify eight distinct combinations of sequencing kit, flow cell and sample rate, including one read from a kit designated for direct RNA sequencing (sqk-rna002).

The standard route from current to letters passes through four stages: normalisation of the current, segmentation into events, a neural network trained on reads of known sequence, and a softmax output layer with four symbol classes and a blank. The last two stages are where both the alphabet and the reference sequences enter. Removing them and proceeding without labels leaves only the first two, and a clustering step whose number of classes is not fixed in advance.

627.2 Normalisation and segmentation fix the length

Before any symbol is assigned, the current is divided into events at change-points. The division depends on the normalisation applied, the threshold of the change-point statistic, and the width of its window. Varying these over four normalisations, nine thresholds and six window widths — \(216\) settings on the same \(65\) reads — gives the following median number of events per read.

\[ \begin {array}{lrrrrrrrrr} & \multicolumn {9}{c}{\text {threshold}} \\ \text {normalisation} & 1.0 & 1.5 & 2.0 & 2.5 & 3.0 & 4.0 & 5.0 & 6.0 & 8.0 \\ \hline \text {median/MAD} & 9526 & 8736 & 7947 & 7419 & 6569 & 5605 & 5069 & 4569 & 3659 \\ \text {mean/std} & 9518 & 8754 & 7954 & 7433 & 6567 & 5614 & 5057 & 4549 & 3643 \\ \text {quantile 5--95} & 9527 & 8742 & 7970 & 7449 & 6568 & 5622 & 5069 & 4557 & 3654 \\ \text {none (pA)} & 7632 & 7010 & 6458 & 5968 & 5542 & 4914 & 4369 & 3882 & 3041 \\ \end {array} \]
at window width \(6\), and
\[ \begin {array}{lrrrrrrrrr} & \multicolumn {9}{c}{\text {threshold}} \\ w & 1.0 & 1.5 & 2.0 & 2.5 & 3.0 & 4.0 & 5.0 & 6.0 & 8.0 \\ \hline 3 & 18118 & 16100 & 13878 & 12348 & 10890 & 8217 & 6857 & 5684 & 3620 \\ 4 & 13903 & 12448 & 11057 & 10001 & 8570 & 6966 & 6057 & 5329 & 3762 \\ 6 & 9526 & 8736 & 7947 & 7419 & 6569 & 5605 & 5069 & 4569 & 3659 \\ 8 & 7278 & 6832 & 6331 & 5979 & 5520 & 4755 & 4282 & 3959 & 3314 \\ 10 & 5883 & 5567 & 5258 & 4982 & 4727 & 4290 & 3889 & 3518 & 2833 \\ 15 & 4104 & 3872 & 3730 & 3547 & 3407 & 3125 & 2849 & 2594 & 2094 \\ \end {array} \]
under median/MAD normalisation.

Across the \(216\) settings the median length per read runs from \(1939\) to \(18\,204\) events, a factor of \(9.4\), and the total over all reads from \(136\,910\) to \(1\,734\,346\). The three normalisations that rescale the current agree closely with one another; leaving the current unscaled shortens every read by roughly a fifth. The window width dominates: halving it from \(6\) to \(3\) roughly doubles the length at every threshold.

The length of a sequence is therefore a function of the segmentation settings before it is a property of the molecule. A further dependence is recorded in the metadata itself: twenty of the reads were sampled at \(5\) kHz and forty-five at \(4\) kHz, so that the same translocation yields different sample counts, and different event counts, according to the instrument configuration.

627.3 The number of symbol classes

Pooling \(200\,000\) event levels from all reads and fitting Gaussian mixtures with \(k = 1,\dots ,10\) components, the Bayesian information criterion falls monotonically:

\[ \begin {array}{rrr} k & \mathrm {BIC} & \Delta \mathrm {BIC} \\ \hline 1 & 454\,755 & 33\,876 \\ 2 & 423\,150 & 2\,271 \\ 3 & 423\,009 & 2\,131 \\ 4 & 422\,426 & 1\,548 \\ 5 & 421\,749 & 870 \\ 6 & 421\,672 & 793 \\ 8 & 421\,227 & 348 \\ 10 & 420\,879 & 0 \\ \end {array} \]
The minimum is at \(k=10\), the largest value tested, and the Akaike criterion agrees. Using two features per event, level and change of level, the minimum is at \(k = 8\). At no point does \(k = 4\) stand out: it lies \(1548\) units above the minimum and is not a local minimum.

This is the expected result. The current at any instant is determined by a run of several consecutive positions in the pore, not by one, so the distribution of levels reflects the number of distinct runs rather than the number of distinct units. What the signal supplies is a continuum of levels with no preferred partition. Four classes are imposed by the output layer of the trained network, which recovers them by fitting a table of run-dependent levels to reads whose sequence was already known.

627.4 The same current, different sequences

Assigning each event of one read (\(252\,068\) samples, \(26\,300\) events) to one of \(k\) unlabelled classes, ordered only by current level:

\[ \begin {array}{rrrl} k & \text {entropy [bits]} & \text {compression ratio} & \text {first seventy symbols} \\ \hline 2 & 0.97 & 0.148 & \texttt {BBBBBBBBBBBBBBBBBBBBBBBBBBBBBABBBBBBBAABBABBAB…} \\ 3 & 1.56 & 0.221 & \texttt {CCCCCCCCCCCCCCCCCCCCCCCCCCCCBBCBCCBBCBBCBACCBC…} \\ 4 & 1.97 & 0.275 & \texttt {CDDDDDDDDDDDDDDDDDDCDDDDDDDDCBDBDCCCDBBDCACCBC…} \\ 5 & 2.23 & 0.307 & \texttt {DDDDDDDEDEDEDEEEDEDDEDDDEEEDCCDCDDCDDBCDCBDDCD…} \\ 6 & 2.44 & 0.337 & \texttt {EEEEEEEEEEEEEEEEEEEDEEEEFFEEDCECEDDDECCEDBDECD…} \\ 8 & 2.83 & 0.389 & \texttt {FFGFFFFGGGGGGGGGGGFFGGFFHHGFEDFDFFDEFCDFEBEFDF…} \\ \end {array} \]
Each row is a valid encoding of the same current. Entropy and compressibility rise smoothly with \(k\); nothing in either marks \(k = 4\) as the natural alphabet.

Within any fixed \(k\) the assignment of names to classes is also free. For \(k = 4\) there are \(24\) permutations mapping the four unlabelled classes onto four letters, all equally consistent with the current. Which class is to be called by which name is not present in the signal; in a trained basecaller it is fixed by the reference reads on which the network was trained.

627.5 Is there a separate class of signal for the molecule called RNA

The distinction between RNA and DNA is, in sequencing practice, a distinction between library protocols. Characterising each of \(58\) reads by eight features of its current alone — level, spread, event dwell time and its spread, event rate, skewness and kurtosis of levels, and spectral centroid — and clustering without labels, the information criterion selects six groups. Cross-tabulating the groups against the protocol metadata recorded in each file:

\[ \begin {array}{lrrrrrrr} & \multicolumn {2}{c}{\text {lsk114}} & & & & & \\ \text {group} & 4\,\mathrm {kHz} & 5\,\mathrm {kHz} & \text {lsk112} & \text {pcs114} & \text {q20ea} & \text {rbk114} & \text {rna002} \\ \hline 0 & 1 & 0 & 0 & 0 & 0 & 1 & 1 \\ 1 & 0 & 0 & 2 & 0 & 0 & 0 & 0 \\ 2 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 3 & 7 & 8 & 0 & 2 & 3 & 0 & 0 \\ 4 & 1 & 1 & 0 & 0 & 0 & 0 & 0 \\ 5 & 21 & 0 & 0 & 0 & 9 & 0 & 0 \\ \end {array} \]

The read from the direct-RNA kit does not form a group of its own. It falls into group \(0\) together with a read from a ligation kit and a read from a rapid barcoding kit. Overall the groups coincide with the combination of kit and sample rate for \(58.6\%\) of reads. Removing the median current level, the event dwell statistics, or the spectral centroid from the feature set raises that agreement to between \(69\%\) and \(71\%\); removing the higher moments of the level distribution leaves it unchanged. The features that separate reads are those governed by translocation speed and sampling — that is, by the protocol — rather than by any property that would distinguish one kind of molecule from another.

627.6 Absorbance ratios

Outside the sequencer, the judgement that an extract contains nucleic acid, and which kind, rests routinely on ultraviolet absorbance: the ratio of absorbance at \(260\) and \(280\) nm, and at \(260\) and \(230\) nm. Taking five absorbing components, identified only by their molar absorptivities at the three wavelengths and not by name, and forming random compositions from two different subsets of four components each:

\[ \begin {array}{lrrrrr} \text {subset} & \text {mean} & \text {5\%} & \text {median} & \text {95\%} & \text {range} \\ \hline \{1,2,3,4\} & 1.968 & 1.376 & 1.782 & 3.194 & 1.240\text {--}5.278 \\ \{1,2,3,5\} & 2.334 & 1.518 & 2.175 & 3.736 & 1.252\text {--}5.481 \\ \end {array} \]
in \(A_{260}/A_{280}\). The two ranges overlap from \(1.252\) to \(5.278\), and \(99.9\%\) of compositions from both subsets fall inside the overlap. The ratio does not separate the two subsets.

Adding an absorbing contaminant of the kind that the \(280\) nm reading is meant to detect, at increasing mass fraction:

\[ \begin {array}{rrr} \text {mass fraction} & A_{260}/A_{280} & A_{260}/A_{230} \\ \hline 0.00 & 1.894 & 2.183 \\ 0.10 & 1.893 & 2.166 \\ 0.25 & 1.890 & 2.142 \\ 0.50 & 1.887 & 2.103 \\ 0.75 & 1.883 & 2.065 \\ \end {array} \]
A contaminant at three quarters of the mass moves the ratio used to detect it by \(0.011\). This reproduces in form the observation of Glasel (1995) that the ratio is insensitive to substantial contamination.

627.7 Summary

\[ \begin {array}{lll} \text {quantity} & \text {set by} & \text {spread} \\ \hline \text {sequence length} & \text {normalisation, threshold, window} & 1939\text {--}18\,204,\ \text {factor } 9.4 \\ \text {number of symbol classes} & \text {choice of } k & \text {BIC falls to } k=10;\ k=4\ \text {not preferred} \\ \text {names of classes} & \text {training on known reads} & 24\ \text {equivalent assignments at } k=4 \\ \text {RNA versus DNA} & \text {library protocol} & \text {RNA read not a separate group} \\ A_{260}/A_{280} & \text {composition} & 99.9\%\ \text {overlap between subsets} \\ \text {contamination} & A_{260}/A_{280} & 0.011\ \text {shift at } 75\%\ \text {mass} \\ \end {array} \]

The signal is a current. Its division into units, the number of kinds of unit, the names of the kinds, and the class of molecule to which the whole belongs are each supplied at a separate stage, and at the two stages where letters and reference sequences enter, what is supplied is a table fitted to sequences already known.

PIC

PIC

pict

Figure 825: From nanopore current to the category “RNA”, without an alphabet. (a) Raw current with change-points; the file contains no symbols. (b) Pooled event levels form a continuum. (c) The Bayesian information criterion decreases to \(k=10\) in one dimension and \(k=8\) in two; \(k=4\) is not preferred. (d) Entropy and compressibility of one read rise smoothly with alphabet size. (e,f) Symbols per read across \(216\) normalisation, threshold and window settings, ranging over a factor of \(9.4\). (g) Groups found from the current alone, against protocol metadata; the direct-RNA read does not form a separate group. (h) The \(260/280\) absorbance ratio of two unnamed four-component subsets.

PIC

pict

PIC

On what grounds is it called “RNA”?

This layer does not appear in any code; it lives in protocol reasoning.

WHAT THE SEQUENCE FILE CONTAINS
  four letters: A, C, G, T
    ^ T, not U -- what was read was cDNA, not RNA
    ^ each base call is a learned model classifying
      a fluorescence / current signal into four categories
    ^ that model was trained on control samples
      whose sequence was already known              <- CIRCULAR

"THE ORIGINAL WAS RNA"
  signal survives DNase treatment
    -> inference by elimination: it was not DNA
  amplification requires reverse transcriptase
    -> inference: it was RNA
      ^ but RT also works on DNA templates (at lower efficiency)
  260/280 absorbance
    -> nucleic acid in general; cannot separate RNA from DNA
  Bioanalyzer RIN
    -> ratio of the 28S / 18S peaks
      ^ presupposes that rRNA is RNA                 <- CIRCULAR

"FOUR KINDS OF BASE"
  hydrolysis products separated by chromatography
    -> four peaks
      ^ mobility is a function of column, solvent, temperature
  structural assignment by X-ray crystallography
    -> the phase problem (previous section)

The most direct loop

The base-calling model is trained on samples whose sequence is already known. Nanopore does this openly. Illumina does it every run: a PhiX control library is spiked in, and the PhiX sequence is fixed in advance. The instrument is calibrated against the answer it is supposed to produce.

\[ \boxed {\text {``RNA''} = \text {survives DNase} \;\wedge \; \text {needs RT} \;\wedge \; \text {RIN from rRNA assumed to be RNA}} \]

None of the three is a direct observation of ribose or uracil. Each is an inference from a protocol outcome, and the third presupposes its conclusion.