A basecaller and its reference are built from each other: reads are turned into letters by a network, the letters are aligned to a reference, the reference is assembled and polished from such letters, and the network is trained to emit the reference letters at the place each read was aligned. The agreement of a new read with the reference therefore measures how tightly this loop has been closed, not agreement with anything outside it. Two questions follow. Does the high agreement depend on the four letters, and how closed is the loop we build without them?
Their loop on our records. Two of the five E. coli ER2925 FAST5 files used throughout (Zenodo 7995806; 8,000 records) were basecalled with Bonito 0.9.0 and its released R9.4.1 model [email protected], and aligned by Bonito to the Ecoli_K12_MG1655 record of the same deposit. Identity is \(1 - \mathrm {NM}/(\mathrm {M}+\mathrm {I}+\mathrm {D})\) from each primary alignment. These letters, the reference and the alignment are used only in this subsection, to measure their loop; none of them enters any other step of this work.
Rewriting their loop in our symbols. Each position of a sequence was replaced by one of nine symbols, chosen by a fixed random table from the \(K\) letters around it (\(K=3\): \(4^3=64\) neighbourhoods; \(K=5\): \(4^5=1{,}024\) neighbourhoods; table drawn once with seed 42). A symbol therefore stands for a neighbourhood, not for a letter, and the map from letters to symbols is many-to-one and not reversible. The same table was applied to each basecalled read and to the reference stretch it was aligned to, and the two symbol strings were compared by global edit distance, identity \(= 1 - d/\max (\ell _1, \ell _2)\). Random strings of nine symbols with the same length give the floor.
| Symbols compared | Reads | Median identity | Mean identity | Share \(\geq 0.90\) |
| Their four letters (basecall vs. reference) | 7,573 | 0.966 | 0.951 | 0.74 |
| Our nine symbols from 3-letter neighbourhoods | 3,000 | 0.915 | 0.823 | 0.55 |
| Our nine symbols from 5-letter neighbourhoods | 3,000 | 0.886 | 0.799 | 0.44 |
| Random nine-symbol strings (floor) | 300 | 0.274–0.280 | – | – |
Rewritten in nine symbols that do not correspond one-to-one to any letter, the loop keeps its agreement: a median of 0.915 with 3-letter neighbourhoods, against 0.966 in letters and a floor of 0.27. The loss is the size expected from the rewriting itself: one wrong letter changes every symbol whose neighbourhood contains it, three symbols for \(K=3\) and five for \(K=5\), so a read at 0.966 in letters falls to roughly 0.90 and 0.84. The agreement is a property of how closely the loop’s parts were fitted to each other. It does not come from there being four letters, and it survives being written in any number of symbols.
Eight letters are still four. The eight-letter system of Hoshika and colleagues (Science, 2019) adds four synthetic letters to the four natural ones. Each letter still stands for one position of one strand, and each still has a fixed partner. The nine symbols above are of a different kind: a symbol stands for the shape of a neighbourhood, there are no partners, and the number nine is arbitrary. That the same loop agrees just as well in these symbols shows that the unit of the alphabet, not only its size, can be changed without changing what the loop achieves.
Our loop. The loop built here without letters, reference or basecaller (Sections 506 to 506.2) is far less closed. With nine symbols from the quantile rule, a record is placed on the right stretch of \(\Omega \) by its thousands of symbols taken together, but within that stretch the symbols of two records passing the same place agree little more than chance, so targets cut from \(\Omega \) carry almost nothing for a network to learn. The two loops therefore differ in one respect: how tightly their parts have been made to agree. Theirs was closed over decades and billions of reads, starting from letters read by another chemistry; ours is closed from the current alone and has run a few rounds.
Every step below starts at the raw current. The number of symbols was never fixed in advance — it was the output of a selection made on the current values alone.
when | method | what it showed |
chain [1], alphabet audit | the Dorado models opened; the current allowed to select a symbol count | the current can learn any count from 2 to 64; 4 is selected on its own in only 2 of 32 cases |
symbol information | a three-symbol HMM | about 2.1 bits per base, independent of the symbol count |
arbitrary rules | 24 rules written without regard to the data | counts from 5 to 14 all count the same way |
rule search | 60 rules across four datasets | the winner is 9, 5 or 6 depending on the dataset; where it is not 4, the excess is \(4.7\times \) the previous rule |
this round | their loop carried over to 9 symbols | \(91\%\)— the same interlock holds when the unit of the letter itself is changed |
Measured inside their system or inside ours, the number four does not determine the outcome. It is a setting that was selected, and other selections close the loop just as well.
Sanger sequencing enters the chain twice: its chemistry, with four chain-terminating dyes and a polymerase that adds the partner of each template base, produced the reference genomes on which later base callers were trained; and its instrument separates four dye colours with a fixed matrix before any letter is called. We rebuilt the reading of Sanger traces with neither the four letters nor the pairing rule.
Data. Thirty-three capillary traces (.ab1) used in Section 670.2. Only the four raw detector channels recorded before colour separation (DATA1–DATA4) were used; the instrument’s separated channels and its base calls were not read. Peaks were taken in the summed raw signal (5,420 peaks), and the four-channel colour mixture at each peak was normalised.
Construction. The colour mixtures were divided into 2, 3, 4, 6, 8, 12, 20, or 40 symbols by \(k\)-means, with no name attached, so that each trace became a stream of symbols over an alphabet of chosen size. Two tasks were scored using the forward direction only, with no reversal, renaming, or partner: how well a symbol is predicted from the three before it (conditional entropy), and how many words of eight consecutive symbols in a trace also occur in another trace, the basis of assembly. Each was compared with the same streams with symbols shuffled within each trace. Separately, for each alphabet the renaming of symbols that makes the reversed stream most similar to the stream was found by quadratic assignment, as a test of whether a pairing rule appears without being given.
Results. At every alphabet size the next symbol was more predictable than in the shuffled streams: 1.41 against 1.65 bits with four symbols, 1.35 against 1.97 with eight, 0.82 against 1.54 with twenty, and 0.51 against 1.09 with forty. Words of eight symbols were shared with other traces in 0.832 of cases with four symbols (shuffled 0.322), 0.802 with eight (0.033), 0.797 with twenty (0.007), and 0.792 with forty (0.001); with two symbols, words were too simple to separate the streams from shuffled ones. The order in the traces grew clearer, not weaker, as the alphabet grew beyond four. The reversal test did not reveal a pairing: the best renaming matched the reversed stream to the stream at 0.978–1.000, and the shuffled streams matched at 0.992–1.000, because the counts of consecutive symbols are nearly symmetric; the best renaming mostly left symbols unpaired or paired with themselves.
Interpretation. Read from raw colour channels with an alphabet of any size, Sanger traces carry order that predicts the next symbol and links one trace to another, without four letters, a colour-separation matrix, a reversal, or a partner. Four is not where this order is clearest, and no pairing rule appears in the traces when none is supplied. The four letters and the complementarity that the reference genomes carry, and that base callers inherit, enter with the dye chemistry and the rule, not with the trace.
Limits. The thirty-three traces include instrument demonstration files that may share templates, which raises the fraction of words shared between traces; the comparison with shuffled streams, which share the same templates, controls for this only in part.
| symbols | next symbol, bits (shuffled) | 8-symbol words shared with other traces (shuffled) |
| 2 | 0.65 (0.77) | 0.982 (0.997) |
| 3 | 1.22 (1.40) | 0.863 (0.609) |
| 4 | 1.41 (1.65) | 0.832 (0.322) |
| 6 | 1.45 (1.96) | 0.808 (0.071) |
| 8 | 1.35 (1.97) | 0.802 (0.033) |
| 12 | 1.10 (1.81) | 0.804 (0.027) |
| 20 | 0.82 (1.54) | 0.797 (0.007) |
| 40 | 0.51 (1.09) | 0.792 (0.001) |
Remark 507.1 (Sanger and nanopore records). The two records studied here are not independent. The reference genomes against which nanopore base callers are trained and evaluated were first assembled from Sanger traces; the Escherichia coli K-12 reference, for instance, was determined in 1997 by Sanger sequencing of cloned fragments and later corrected with other instruments using the same four letters. Sanger chemistry supplies the reference with four letters, from four chain-terminating dyes separated by a fixed colour matrix, and with complementarity, from a polymerase that adds the partner of each template base. A base caller trained to reproduce such a reference reads nanopore current into the same four letters and the same pairing, although the current itself carries no dye, no colour, and no partner. The chain is
Section 507.2 fixed every choice but the alphabet size. Here every choice made in turning a raw Sanger trace into a stream of symbols was drawn at random, so that no value is privileged.
Data. The raw detector channels (DATA1–DATA4, before colour separation) of the Sanger traces of Section 507.2; 32 of the 33 traces could be read.
Pipelines. Each of 300 pipelines drew: the threshold for a peak (prominence at the 50th to 95th percentile of the summed raw signal) and the minimum spacing between peaks (3 to 14 samples); which raw channels to use (any two, three, or all four); how to scale the colour mixture at each peak (unit length, ranks, logarithm, or none); how to turn mixtures into symbols (\(k\)-means, quantiles along a random direction, or angle in a random two-dimensional projection); and the alphabet size (2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 30, 40, or 60). The word length for comparing traces was set for each alphabet so that the number of possible words was about \(10^5\) (at least three symbols). Two quantities were scored, forward only, with no reversal, renaming, or partner: the fraction of a trace’s words also found in another trace, and the uncertainty of each symbol given the two before it. Each pipeline was compared with the same streams with symbols shuffled within each trace.
Results. Traces shared more words with other traces than their shuffled versions did in 90.3% of the 300 pipelines (median 0.843 against 0.450), and the next symbol was more predictable than in the shuffled streams in 98.3% (median 1.48 against 1.83 bits). The pipelines in which words did not separate the record from its shuffled version were those whose words were too short for their alphabet, so that shuffled streams shared nearly every word as well; in the comparison of word lengths at a fixed number of possible words, every alphabet from 2 to 40 symbols separated the record from its shuffled version (0.822–0.839 against 0.283–0.556).
Interpretation. Whatever threshold, spacing, channels, scaling, method, and alphabet size are chosen, Sanger traces read without a colour-separation matrix, four letters, or a pairing rule carry order that predicts the next symbol and links one trace to another. The four letters are one choice among these, and not one the traces require.
A trained base caller reads nanopore current into four letters with high accuracy. We asked what that accuracy measures, and whether the current needs the base caller’s letters, its segmentation, or the reference at all.
Data. Raw current of Listeria monocytogenes EGD-e (R10.4.1; figshare 25495069), the four POD5 files called with Dorado (super-accuracy model) in Section 677.2, and the reference NC_003210.1.
Accuracy follows the reference. The 9,620 reads longer than 1,000 letters called by the base caller were aligned (minimap2) to the published reference and to altered copies of it, with the reads left unchanged. Identity was 0.9876 to the published reference, 0.9778, 0.9388, 0.8906, and 0.7957 to copies with 1, 5, 10, and 20% of letters changed, and no alignment was found to copies in which the four letter names were exchanged. The same reads are “accurate” to the extent that they agree with the reference they were trained to reproduce.
The base caller’s cuts favour its letters. When the current was cut into segments using the base caller’s own move table and segment features were used to learn labels, the base caller’s letters were learned better (fraction of label information recovered 0.393) than labels given by random tables over three-letter contexts (0.100–0.145). The comparison is not neutral: the segments are the units of a caller trained to emit one letter per segment. The current was therefore cut by procedures that use no base caller.
Pipelines with no base caller. From 800 raw reads, each of 120 pipelines drew: a signal scale (median-normalised, ranks within the read, or raw); a cutting rule (fixed windows of 4 to 20 samples, change points in running means, or extrema of the smoothed signal); a segment feature (mean, median, or mean and spread); an alphabet of 2 to 60 symbols and a way to assign them (\(k\)-means, quantiles along a random direction, or angle in a random projection); and whether to merge repeated symbols. Two quantities were scored, forward only and with no reversal, renaming, or partner: the fraction of a read’s words that also occur in another read, with word length chosen so that the number of possible words is a hundred times the total number of symbols; and the uncertainty of each symbol given the two before it. Each was compared with the same streams with symbols shuffled within each read. The base caller’s letters for the same number of reads were scored in the same way.
Results. Reads shared more words with other reads than their shuffled versions did in 97.5% of pipelines (median 0.353 against 0.009), and the next symbol was more predictable than in the shuffled streams in all of them (median 2.45 against 3.03 bits). The base caller’s letters shared words at 0.400 (shuffled 0.008), within the range of the pipelines, and their next letter was barely more predictable than in shuffled reads (1.94 against 1.96 bits). Part of the predictability of the pipelines’ symbols comes from cutting the same dwell into several segments; the sharing of words between reads, which arises only where reads cover the same part of the genome, does not.
Interpretation. Cut and named in any of the ways tried, with no base caller, move table, or reference, the current of one read links to the current of others, as reads of the same genome should. The four letters of the base caller do the same, about as well; they are one reading among many. What the high accuracy of a base caller measures is agreement with a reference built by Sanger chemistry: change the reference and the same reads become less accurate, exchange its letter names and they align to nothing.
| identity of the same 9,620 called reads to the reference
| |
| published reference | 0.9876 |
| 1% / 5% / 10% / 20% of letters changed | 0.9778 / 0.9388 / 0.8906 / 0.7957 |
| letter names exchanged | no alignment |
| 120 pipelines with no base caller (record, shuffled)
| |
| pipelines where reads share more words | 97.5% (median 0.353, 0.009) |
| pipelines where the next symbol is more predictable | 100% (median 2.45, 3.03 bits) |
| base caller’s letters, same measures | 0.400 (0.008); 1.94 (1.96) bits |