A Rank-Based Sequence Aligner with Applications in Phylogenetic Analysis
Paper · 2014 · Liviu P. Dinu, Radu Tudor Ionescu and Alexandru Ioan Tomescu
Summary
A short DNA read can resemble several places in a reference genome, especially when it contains sequencing errors or when the reference comes from a related species. Liviu P. Dinu, Radu Tudor Ionescu and Alexandru I. Tomescu propose an aligner that judges these possible placements by how far short, identical stretches of DNA have moved relative to one another. Their method uses Local Rank Distance, or LRD. It breaks a read and a candidate reference segment into overlapping pieces and looks for nearby matches to each piece. A close match contributes a small positional cost. A piece with no match nearby incurs a fixed penalty. The aligner searches for the reference position with the lowest total cost and accepts the read if that cost clears a threshold.
The paper develops a faster version that indexes the positions of pieces in the read and uses their presence in the reference to decide which locations deserve a full comparison. This shortcut can miss the best position under the distance rule. The authors compare the resulting aligner with BWA, BOWTIE2 and BLAST on simulated reads. In a mixture of human and orangutan mitochondrial reads, the indexed LRD aligner recovered 24:79% of the human reads at 100:0% precision, meaning that every accepted read at that setting came from the human source. At a more permissive threshold it recovered 100% of the human reads at 90:18% precision. BOWTIE2 end-to-end achieved the highest best F₁ score in that mixture, while the indexed LRD aligner achieved the highest best F₂ score, which gives recall more weight.
The paper also asks whether read alignments can identify the taxonomic order of a mammal whose genome has been withheld from a reference collection. With 20,000 simulated reads per mammal, the indexed LRD aligner, both BOWTIE2 settings and BLAST each assigned all 20 mammals to the correct order. With 200 reads per mammal and higher simulated error and mutation rates, LRD still assigned all 20 correctly. BLAST, the closest comparator in that setting, assigned 17 correctly. In a separate comparison of Vibrio genomes, the LRD scores agreed with earlier work on which reference species was closer to the source species.
The results make a case for using local positional evidence when the biological conclusion must come from few reads or from reads that are hard to align. They also show a substantial cost. The indexed version improved the running time of the rank-based search, yet it remained slower than the comparison tools on the same mammalian workload. The strongest evidence concerns recovery of reads from a known source and assignment to an existing taxonomic order. Those outcomes answer different questions from whether every accepted read landed at its true genomic coordinate.
Deep dive: A Rank-Based Sequence Aligner with Applications in Phylogenetic Analysis
A rank-based DNA read aligner uses local sequence offsets to place short reads and compare genomes, with a trade-off between accuracy and speed. · about 38 minutes to read
The problem and its context
From a short read to a reference location
High-throughput sequencing yields many short stretches of DNA sampled from different locations. The paper describes reads between 30 and 400 nucleotides long. Each read gives a sequence of bases, and a reference genome gives a much longer sequence against which to compare it. Read alignment asks where in that reference the read belongs. A method needs a way to score a possible location and a search procedure that can apply the score across many locations and reads.
Exact agreement would make a simple placement rule, but changes can intervene between the reference sequence and the observed read. A base in the read may differ from the base at the corresponding reference location. A stretch may contain an insertion or deletion, frequently abbreviated as an indel. An insertion can shift the apparent positions of the bases that follow it, even where those bases agree in sequence. A useful score has to retain that downstream evidence while accounting for the shift. It also has to distinguish a plausible location from a coincidental match between short strings.
The same computational problem takes on a different meaning when the read and reference come from different organisms. An alignment can now supply evidence that portions of their genomes resemble each other. A collection of reads can support a comparison among reference species even when the source genome has yet to be assembled. The authors use that possibility to ask whether a read collection can locate an organism within a set of already classified relatives. The quality of the answer depends on which reads the aligner accepts as well as how it scores their best locations.
This distinction also matters when a sample contains reads from more than one organism. If the intended reference is human mitochondrial DNA, a read from another mammal can share enough sequence with it to look plausible. The measurement then has two competing goals. The aligner should retain human reads that contain differences, and it should exclude related reads whose similarity is insufficient evidence of human origin. The threshold for accepting a placement connects these goals. A stricter threshold can reject both kinds of reads, while a more permissive one can recover additional human reads along with additional contaminants.
Distance measures and search strategies
The paper describes edit distance as a standard choice when the expected changes are substitutions and small insertions or deletions. Edit distance scores the cheapest sequence of allowed edits that would transform one string into the other. The paper relates this way of measuring similarity to tasks including genomic variation detection and assembly. It also notes that comparisons between species can involve larger changes, such as inversions and movements of whole blocks. The earlier work it discusses includes distances designed around these rearrangements and edit distances that allow operations on blocks of sequence.
Hamming distance takes a different approach. It counts disagreements at corresponding positions in equal-length strings. Its direct position-by-position comparison makes it easy to interpret when substitutions are the main difference. It becomes harder to interpret after an insertion or deletion. A run of mismatches may reflect a shift in the relative positions of otherwise similar material. The paper uses this behavior to motivate a comparison in which identical material can be credited at nearby positions.
The predecessor most directly relevant to LRD is rank distance. It matches occurrences of each character by their order within the string. The earliest occurrence of a character in one string is associated with its earliest occurrence in the other, and later occurrences are treated in the same way. Their positional differences contribute to the cost, and surplus occurrences receive a penalty. The authors describe earlier applications of rank distance to DNA comparisons and to finding common sequence patterns. They also cite earlier uses of Local Rank Distance itself in phylogenetic analysis and native language identification. The contribution here is a read aligner that uses the distance to search a reference, along with an evaluation of that search in several biological comparison tasks.
Distance is only part of the design. A tool that evaluates every plausible location with a costly score can become slow when many reads must be placed. The authors describe BLAST as reducing the search space relative to earlier methods based on dynamic programming, which build alignments by combining solutions to smaller alignment problems. They also note that BLAST assesses the statistical significance of individual alignments. BWA and BOWTIE use the Burrows–Wheeler transform to support efficient reference searches and permit mismatches and gaps. BOWTIE2 couples an index with dynamic programming for extending alignments.
The authors also discuss tools designed to tolerate more differences, including BFAST and rNA. These examples establish the context for the paper’s choice of emphasis. An aligner built to examine more possibilities can retain reads that a faster search would discard, and the extra work can be substantial. LRD changes what counts as a good local comparison and introduces its own ways of cutting down the search. Its intended use is a situation where the reliability of the biological comparison can justify a higher cost per read.
From sequence similarity to a taxonomic decision
The authors formulate their taxonomic task around a fixed reference collection. For a source represented only by short reads, the aligner compares those reads with each candidate genome. The candidate with the lowest aggregate score supplies the predicted taxonomic group. This is a nearest-neighbor decision. The unknown organism inherits the label of the most similar available organism according to the chosen scoring rule.
The paper describes other uses of read alignments in which the assignment rule is more elaborate. In the metagenomic tools it mentions, several significant hits can lead to a report at their lowest common ancestor, the most specific node in a taxonomy that contains all those hits. The rule tested in this paper places responsibility on the best-scoring individual reference. That makes the comparison among aligners easier to follow and makes the composition of the candidate collection consequential. A method can recover an order when a suitable relative is present, and the position of that relative in the reference ranking determines the decision.
The method, step by step
Compare short pieces by where they occur
A k-mer is a contiguous piece of a sequence with a fixed length. In DNA, its elements are bases. The paper takes overlapping pieces, so a piece can start at each position where there are enough bases left to complete it. That gives the distance evidence from adjacent parts of a read even when they share some bases. A changed base can disrupt the pieces that include it, while pieces outside that span can still match.
The alignment begins with a read and a reference sequence. Imagine laying the read alongside a segment of the reference of the same length and measuring positions from the start of each string. For each piece in the read, the basic version looks for an identical piece in the reference segment. If it finds several, it uses the one whose starting position is closest to the read piece’s starting position. A shared piece beginning at the same relative position costs nothing. A shared piece that appears a short distance away contributes that distance. A piece that cannot be found within the allowed offset contributes the maximum cost.
The search for a match is independent for each piece. This has a practical consequence when the same piece recurs. Once an occurrence in the reference has been used, it remains available to other pieces. The score therefore summarizes nearest positional matches. It does not record a complete chain of mutually consistent matches or an edit history connecting the two strings. Its treatment of a shift follows directly from that choice. Several matching pieces can each contribute small offsets without requiring the algorithm to decide which particular edit caused them.
The full definition measures nearest matches in both directions. The read aligners use a directional part of that definition to save work. The original implementation starts from pieces in the read. The indexed implementation starts from pieces in the candidate reference segment and finds their nearest positions in the read. The direction matters because a repeated piece can have a different distribution in the two strings. Similar performance at the level of a classification experiment is compatible with different costs for specific placements.
How the indexed Local Rank Distance aligner places a read
The steps in order.
From rank distance to Local Rank Distance
The paper starts with strings indexed from 1. Its substring convention includes the character at the starting index and ends just before the stopping index. This convention lets a piece of length k beginning at i be written as x[i : i + k]. Here x is a string, i is the starting position and k is the piece length. Bars around a string denote its length. In the expression below, position lists make the paper’s algorithmic definition of ordinary rank distance explicit.
Dᵣᴅ(x, y) = Σₐ∈Σ [ Σⱼ₌₁^min(|x|ₐ, |y|ₐ) |pₓ(a, j) − pᵧ(a, j)| + ||x|ₐ − |y|ₐ| × (|x| + |y|)/2 ]
Dᵣᴅ(x, y) is the rank distance between strings x and y. The outer sum runs over the characters a in their alphabet Σ. The counts |x|ₐ and |y|ₐ are the numbers of occurrences of a, and pₓ(a, j) and pᵧ(a, j) give the starting positions of its jth occurrence in each string. The inner sum ends at the smaller of the occurrence counts, so it includes only ranks that both strings have. Bars around a numerical difference take its absolute value. The second term multiplies the number of unpaired occurrences by the arithmetic mean of the string lengths |x| and |y|.
Ordinary rank distance can pair the same character across quite different parts of the strings, because the order in which the character recurs determines the pairing. Local Rank Distance replaces that rule with a question about each particular starting position. Does an identical piece appear nearby in the other string? The shift from characters to overlapping pieces adds context to what constitutes a match. The shift from ordinal pairing to nearest-position pairing means that a match can be selected without tracking how many prior occurrences of that piece have already appeared.
The paper gives the forward directional sum as follows.
D_left(x, y) = Σᵢ₌₁^(|x|−k+1) min({|i − j| : 1 ≤ j ≤ |y| − k + 1 and x[i : i + k] = y[j : j + k]} ∪ {m})
D_left(x, y) sums the costs of pieces starting in x as they are compared with y. The index i runs through the valid starts of all overlapping pieces in x, ending at |x| − k + 1. For each such start, j ranges over the valid starts in y, ending at |y| − k + 1. The equality inside the braces restricts the offsets |i − j| to positions with identical pieces. The union symbol ∪ adds the maximum offset m to the set of possible costs. Taking min caps the contribution at m and supplies that same cost when the matching set is empty. The paper takes both k and m to be positive integers.
The reverse directional sum changes which string supplies the pieces to be matched.
D_right(x, y) = Σⱼ₌₁^(|y|−k+1) min({|j − i| : 1 ≤ i ≤ |x| − k + 1 and y[j : j + k] = x[i : i + k]} ∪ {m})
D_right(x, y) accumulates a cost for each start j in y. Candidate starts i now belong to x. The substring equality, the absolute offset and the cap m play the same roles as in the other direction. Exchanging the strings therefore exchanges the roles of the directional sums.
D_LRD(x, y) = D_left(x, y) + D_right(x, y)
D_LRD(x, y) is the full Local Rank Distance between x and y. It adds the left and right costs, so the full result is unchanged by exchanging the strings. Symmetry is the property established by this construction. The directional scores used in placement need only rank candidate reference segments for a fixed read.
A worked comparison
The authors illustrate the definition with abcaa and cabca, using pieces of length 2 and a maximum offset of 3. In abcaa, the pieces in reading order are ab, bc, ca and aa. In cabca, the order is ca, ab, bc and ca. The list already shows why the directional sums can differ. The first string has aa, which cannot be found in the second, and the second has an extra occurrence of ca that can use the same match in the first string as its other occurrence.
D_left(x, y) = |1 − 2| + |2 − 3| + |3 − 4| + 3 = 6
In this example, x is abcaa and y is cabca. Each absolute difference compares a piece’s start in x with the start of its nearest equal piece in y. The first contribution comes from ab, the next from bc, and the third from ca. The final 3 is the cap for the absent aa. The reported forward sum is 6.
D_right(x, y) = |1 − 3| + |2 − 1| + |3 − 2| + |4 − 3| = 5
In the reverse comparison, each first position in a pair belongs to y, and each second position belongs to x. Both occurrences of ca in y can use the occurrence at position 3 in x. All pieces from y have a match, and the reported reverse sum is 5. The full distance is 11, as reported in the paper. Neither directional total needs a decision about which symbol was inserted, deleted or moved to turn one string into the other.
The authors use DNA examples to motivate the same idea. A point change can destroy some exact piece matches. An insertion or deletion can leave exact pieces intact while moving their apparent starts. An inversion can disrupt matches in its affected region. LRD accumulates the consequences as a mixture of displacements and capped contributions. Two strings can consequently receive a graded score even when the differences are difficult to describe through a single proposed sequence of edits.
Find a placement in a long reference
For a read of length l and a reference of length n, the basic aligner examines read-length segments beginning at positions from 1 through n − l + 1. It obtains the first directional distance and keeps track of the offsets for the current placement. As the segment moves along the reference, the implementation updates those offsets for the new segment. The best start is the one with the smallest left directional distance. The read is accepted only when the minimum is below the specified maximum distance.
The offset cap and the acceptance threshold serve different purposes. The cap m limits what a single piece can contribute. It defines what counts as a local match within one candidate segment. The threshold for accepting a read acts on the accumulated score. It lets the aligner discard a read even when some candidate is best among all those examined. Every read that can be compared with the reference has a relative best result, but that result may still offer weak evidence for a placement.
DNA can be presented in the opposite orientation. The reverse complement is formed by reversing the order of the bases and replacing each base with its complement. The basic procedure also applies its search to this form of a read. The indexed version adds a shortcut that can skip this second search when the original orientation already looks sufficiently good. That shortcut makes it important to distinguish a read’s best examined position from a guarantee about all positions in both orientations.
Use the read as a positional index
The indexed aligner builds an entry for each distinct piece in a read. Its value is an array containing every position where that piece starts. The authors describe this structure as a positional inverted index, implemented with a hash table. A lookup begins with a piece and retrieves its positions, which reverses the usual operation of beginning at a position and reading the characters there. The read can be scanned from left to right when constructing the arrays, leaving the positions in order.
Now take a piece from a candidate reference segment. If it is absent from the table, it incurs the maximum cost m. If it is present, the aligner searches its ordered position list for the nearest start in the read. It uses binary search, which narrows the ordered list by discarding a part of it at each step. An offset below the cap is added directly. Larger offsets contribute m. This computes the right directional sum, since the candidate reference segment supplies the pieces and the read supplies their possible matches.
The index changes where the search work takes place. The basic comparison seeks equal pieces within a positional window. The indexed comparison first jumps to the occurrences known to have the right content and then looks for the nearest position in their array. As the authors note, that removes the need to scan a window whose size is determined by the offset cap. The cap still changes the score. It no longer dictates how wide a window has to be searched for each individual piece.
The method also avoids repeatedly discovering that a reference piece is absent from the read. It builds a Boolean array f, with an entry at each valid reference piece start. An entry is true if the corresponding piece exists anywhere in the read’s index. As successive candidate segments overlap, the same reference piece can be encountered many times. A lookup of f reuses the result of the original membership test. The actual offset still depends on the segment’s start, because the same reference piece occupies a different relative position in each segment.
Decide which candidates deserve a full distance
The indexed method maintains a count c[i] for each candidate reference start i. This count records how many piece occurrences in that segment are also present in the read’s table. It counts occurrences in the segment. A piece that occurs repeatedly in the segment can contribute repeatedly even when the read contains it at only one position. The counts can be maintained as the segment slides by removing the contribution at the departing end and adding the contribution at the entering end.
c[i] ≥ max{c} − d
c[i] is the membership count for the segment beginning at reference position i. max{c} is the largest such count anywhere in the reference for that read, and d is the allowed shortfall from that maximum. A candidate that fails the inequality is skipped. At d = 0, only candidates with the highest count pass this rule. At d = max{c}, every candidate passes the count rule because the counts are non-negative. The experiments use d = 5.
This is the principal approximation in the positional search. A high count identifies a segment with many pieces that could match, regardless of how far those pieces sit from their matching read positions. The distance also cares about the offsets. A segment with fewer pieces in common can outperform a segment with more shared pieces when the pieces it does share are better positioned. The count is a way of prioritizing candidates, so dropping some candidates on its basis trades a guarantee about the optimum for less work.
The next rule uses the same count in a more conservative way. Every reference piece that is absent from the read contributes the cap, whatever the offsets of the other pieces may be. The paper prints this quantity in the candidate test.
(|r| − k − c[i]) × m
r is the read, |r| is its length, k is the piece length, c[i] is the count of pieces present in the read index for candidate i, and m is the price of an absent piece. The paper describes the expression as the cost forced by absent pieces. Its own indexing convention gives a read-length segment |r| − k + 1 valid piece starts, however. As printed, the expression is therefore a conservative bound instead of the exact absent-piece cost. The pruning idea follows from the guaranteed cost. If the lower bound is already at least the best distance being sought, a full comparison cannot deliver a strictly better candidate.
A similar bound emerges during scoring. All terms added to the distance are non-negative. Once a partial sum exceeds the current best, the remaining terms cannot rescue that candidate. The aligner can stop scoring it. The distinction between this rule and the shared-piece cutoff is important. A bound on a sum can establish that a candidate cannot improve on the current result. The shared-piece count by itself can only suggest where a good result is more likely to occur.
The indexed search begins with the user’s acceptance threshold as its incumbent distance, so any improvement must also be an acceptable placement. As better candidates are found, the incumbent becomes tighter. The best reference position and its distance are the outputs of the search. The published pseudocode uses a strict improvement test, which means that a candidate at the same distance does not displace one already recorded. This comparison rule does not establish that the retained position is the unique plausible origin of the read.
Decide whether to search the opposite orientation
The indexed implementation uses an internal threshold to decide whether to test the reverse complement after testing the original sequence.
t = min{th, min{k, m} × (|r| − k + 1)}
t is the internal cutoff for a sufficiently good match in the original orientation. th is the user’s maximum accepted alignment distance. The inner minimum selects the smaller of the piece length k and the offset cap m. That value is multiplied by the number of piece starts in the read r. The outer minimum keeps t at or below th. If the forward result falls below t, the shortcut can accept that orientation without a second search.
The authors expect this rule to save more work when read and reference come from the same species, since a strong match is more likely to be found in the original search. When scoring reads against references from other species, the original orientation may fail to clear the internal cutoff more often. Skipping the reverse complement is a heuristic based on the strength of the first result. It cannot certify that the other orientation would have produced a weaker result.
Turn accepted reads into a reference score
The taxonomic experiment repeats the alignment for each candidate genome. The reads accepted for a given reference can differ from those accepted for another. The authors combine the average of the accepted reads’ best distances with the number accepted. The following expression writes their verbal scoring rule for distance-based alignments.
score(G) = mean{D_min(r, G) : r ∈ S_G} / |S_G|
G is a candidate reference genome, S_G is the subset of input reads accepted against it, and r is a read in that subset. D_min(r, G) is the distance at the best position found for that read in G. The mean is over the accepted reads, and |S_G| is the size of that subset. A smaller score indicates a closer reference. The expression requires accepted reads. In the reported experiments a method could fail to name a neighbor when it found no usable alignments.
The denominator gives the number of accepted reads a role beyond determining which distances appear in the average. Two references can have similar average distances, yet the one supported by more reads receives a lower score. This matters because a reference can agree very well with a small subset of reads and offer little support for the remainder. Conversely, adding weak matches can change both the mean distance and the size of the accepted set. The acceptance threshold therefore influences the final reference ranking as well as individual read decisions. The paper notes that the underlying alignment quantity depends on the tool, with BLAST supplying its own score.
There is no fitted predictor in this procedure. The data are reference sequences and collections of reads simulated from known sources. The principal LRD experiments use 3-mers, an offset cap of 36 and the stated shared-piece cutoff for the approximate search. The mammalian and Vibrio reference comparisons use a maximum LRD of 1000. The authors set a permissive threshold for those comparisons to admit reads from more distant relatives, whose agreement with the source can be weaker. They recommend choosing piece length and offset on validation data for a particular application. The paper also reports the release of source code and UNIX binaries, with implementations in C++ and Java.
Experiments and results
Datasets and the questions they support
The mammalian collection contains mitochondrial DNA sequences from 20 mammals drawn from the EMBL database. Mitochondrial DNA is the genetic material in mitochondria. The mammalian mitochondrial sequences described in the paper are circular and have lengths in the range from 15,000 to 17,000 base pairs. The collection covers primates, odd-toed ungulates, the order containing whales and cattle, rodents and carnivores. The paper uses a single mitochondrial sequence for each entry, reasoning that within-species mitochondrial differences are small for the purpose of these tests.
The mammalian collection supports two kinds of evaluation. In the contamination tests, the reference is always the human mitochondrial sequence and the known source of each simulated read tells the researchers whether it belongs in the accepted set. In the taxonomic tests, each mammal supplies reads in turn while the remaining mammals supply the candidate genomes. The read origin again gives an answer against which to score the decision, but the decision concerns the order of the nearest reference rather than the origin of each accepted read.
A separate dataset contains the chromosomes of Vibrio vulnificus, V. parahaemolyticus and V. cholerae from the NCBI database. The paper describes each genome as having two circular chromosomes. The Vibrio comparison asks how the LRD-based ranking relates to earlier comparative studies. Its outcome is a relative score for candidate references, so the experimental evidence differs from the tally of correct mammalian orders.
Recognizing human reads in a contaminated mixture
The contamination experiments use wgsim to simulate reads of length 100. The simulator settings are an error rate of 0:02 and a mutation rate of 0:001, with 0:15 of mutations assigned to indels and an indel extension probability of 0:30. Every mixture includes 10,000 human reads. The first adds 10,000 orangutan reads, producing a contamination rate of 50%. The second adds 10,000 reads from each of the orangutan, blue whale, harbor seal, donkey and house mouse, for 50,000 contaminant reads and a reported contamination rate of 83:33%. These tests omit reverse-complement reads.
The paper compares the basic and approximate LRD searches with BWA, BOWTIE2 and BLAST. BOWTIE2 appears in both local and end-to-end configurations. The former can use a portion of the read for an alignment, while the latter is configured to align across the read. The authors use the corresponding very-sensitive options for both configurations. BLAST runs in its megablast configuration. The LRD versions use the same piece length and offset cap, so the comparison includes the change in directional score and the approximate search strategy together.
Precision asks what proportion of accepted reads actually came from the human reference. Recall asks what proportion of the simulated human reads were accepted. An acceptance threshold determines where each method sits on that tradeoff. The paper varies edit-distance limits from 0 to 30 for BWA and BOWTIE, BLAST scores from 185 to 100 and LRD thresholds from 50 to 600. A larger permitted distance makes a distance-based method more permissive. For BLAST, a lower required score makes acceptance more permissive.
The receiver operating characteristic, or ROC curve, instead relates the fraction of true positives accepted to the fraction of contaminating reads accepted at different thresholds. Its area, AUC, summarizes the separation across the sweep. The paper also reports the best F₁ and F₂ values obtained along each precision–recall curve. In standard notation, the described relationship between precision, recall and the weighting parameter is as follows.
Fᵦ = (1 + β²) × (P × R) / (β² × P + R)
Fᵦ is the F-score with weighting parameter β, P is precision and R is recall at the same acceptance threshold. The superscript ² denotes squaring, and the numerator and denominator combine the two rates into a weighted harmonic mean. Setting β to 1 gives F₁, which weights the rates equally. Setting β to 2 gives F₂, which gives recall greater weight. Reporting the best value of each score can select a different threshold for each metric and method.
What changes when the contaminants change
In the human–orangutan mixture, BOWTIE2 end-to-end and the indexed LRD aligner share the highest reported AUC at 99:63%. The best F₁ belongs to BOWTIE2 end-to-end at 98:13%, compared with 97:58% for the indexed LRD variant. The best F₂ belongs to indexed LRD at 98:61%. Basic LRD reaches 98:48% on that metric, while BOWTIE2 local reaches 98:30%. These results put several methods close together on the threshold summaries, with the lead depending on the value assigned to missed human reads.
The ordering looks clearer when the requirement is to admit no orangutan reads. At 100:0% precision, the indexed LRD aligner attains 24:79% recall and the basic LRD aligner attains 22:36%. BOWTIE2 local attains 13:87%, and both BWA and BOWTIE2 end-to-end attain 12:84%. BLAST attains 12:83%. Under this requirement, the rank-based variants can accept more of the human reads before the first false positive appears in the measured threshold sweep. The result still leaves much of the human set unaccepted at the strict operating point.
The other end of the tradeoff answers a different question. At the indexed aligner’s reported threshold of 539, it attains 100% recall and 90:18% precision in the orangutan mixture. An intermediate row of the detailed threshold table gives 97:02% precision at 98:16% recall. The paper’s prose gives 98:6% recall alongside that same precision, so the intermediate result is best read directly from the detailed table. The full-recall endpoint and the no-false-positive endpoint are separate operating points.
In the mixture with 50,000 contaminant reads, indexed LRD records the highest AUC, 99:92%. Basic LRD records 99:86% and BOWTIE2 end-to-end records 99:84%. BOWTIE2 end-to-end again leads on best F₁ at 97:93%, with indexed LRD at 97:25%. Indexed LRD leads on best F₂ at 98:29%, followed by BOWTIE2 end-to-end at 98:16%. The local and end-to-end BOWTIE2 results also illustrate how much the chosen metric can matter. The local configuration records 99:55% AUC and 95:41% best F₁ in this mixture.
The paper reports that the largest recall reached in the contamination comparisons is 100% for LRD, 99:91% for either BOWTIE2 configuration, 98:63% for BLAST and 97:57% for BWA. These maxima show which tools eventually recover the largest portion of the positive set across the tested thresholds. The accompanying precision is necessary to judge whether a particular maximum is suitable for retaining a clean set of reads.
The authors also evaluate a mixture that excludes the orangutan, leaving 40,000 contaminant reads from the other mammals. Under this condition, indexed LRD reaches 81:43% recall at 100:0% precision. BLAST reaches 68:95% recall at 100% precision, while BWA and BOWTIE2 end-to-end each reach 66:84% recall at 100% precision. Basic LRD reaches 52:25% recall at 100:0% precision. The BOWTIE2 local row has a best precision of 98:58%, with 13:87% recall at that point. Because that row has a different precision, its recall does not describe the same strict target. The easier separation for several methods once the orangutan is excluded shows how strongly the contaminants’ relationship to the target can affect the usefulness of a threshold.
Predicting the order of a held-out mammal
In the mammalian experiment, every genome is withheld in turn. Its simulated reads are aligned against the remaining 19 genomes, and the order of the best-scoring neighbor is the prediction. The paper describes this as leave-one-out cross-validation. Across the 20 held-out cases, a correct answer requires a reference from the same order as the source. Half of the reads are reverse complements in both settings.
The more abundant setting uses 20,000 reads of length 100 for each source genome, with a reported average base coverage of 100. Coverage expresses how much read sequence is available relative to the source genome’s length. The reads use the same wgsim error, mutation and indel parameters as in the contamination test. Indexed LRD, both BOWTIE2 configurations and BLAST all give the correct order for the 20 sources. BWA with its edit threshold of 5 gives 17 correct orders, and BWA with a threshold of 10 gives 14.
An order-level success leaves room for differences among reference neighbors within that order. The paper notes that the horse consistently finds the donkey closer than the rhinoceroses. The gray seal likewise finds the harbor seal closer than the cat. These examples illustrate how the chosen neighbor can make biological sense at a finer level than the scored label. The formal tally still gives credit for any neighbor from the correct order.
The harder setting provides 200 reads of length 100 per source. It changes the simulation error rate to 0:08 and the mutation rate to 0:008, while using the same indel settings. With both fewer reads and more differences per read, an aligner has fewer opportunities to accumulate evidence and can struggle to accept any reads for some cases. The chart shows the order predictions under this joint stress test.
Correct order assignments for held-out mammals in the hard setting
Indexed Local Rank Distance recovers every order, with BLAST closest among the comparison tools.
The numbers
| System or setting | correctly assigned mammals |
|---|---|
| BWA edit 5 | 10 |
| BWA edit 10 | 16 |
| BOWTIE2 local | 13 |
| BOWTIE2 end-to-end | 15 |
| BLAST | 17 |
| Indexed LRD (this paper) | 20 |
This time BWA with the larger edit allowance fares better than its stricter counterpart. Still, the paper reports that it found no similar mammal for the cat or rat because it had no aligned reads to support a choice. BWA with the stricter threshold failed to find a neighbor for 10 mammals for the same reason. BLAST assigned the wrong order to the cat, house mouse and rat. The authors observe that rodents were difficult for the comparison tools in this setting, whereas the primates were generally easier to place. Such cases reveal two routes to a wrong outcome. An aligner can find an incorrect best reference, or it can leave the reference-scoring procedure without sufficient accepted reads to name one.
Running time on the same workload
The mammalian timing test combines the reads from both settings. The paper reports 20,200 reads per source and a total workload of 7,676,000 alignments of reads of length 100 to the candidate mitochondrial references. The tools ran on a single core of an Intel Core i7 computer, with a processor specification of 2:3 GHz and 8 GB of memory. This fixes the machine and workload for the reported comparison.
The timing table gives BWA edit 5 a running time of 3 minutes 14 seconds and BWA edit 10 a running time of 3 minutes 50 seconds. It gives BOWTIE2 local 9 minutes 43 seconds and BOWTIE2 end-to-end 7 minutes 14 seconds. The prose reverses the ordering of the BOWTIE2 modes, so the mode-specific times given here follow the table. Megablast takes 30 minutes. The basic LRD implementation takes 285 hours, and the indexed C++ version takes 16 hours 33 minutes. The indexed Java implementation takes 326 minutes. The authors attribute the Java version’s advantage over their C++ version to the hash-table implementation it uses.
The authors also compare the time needed to obtain an order prediction when each method processes a different amount of data. They give a running time of approximately 3 minutes for LRD with the small, harder read collection and compare it with BWA edit 5 on the much larger, cleaner read collection. The LRD run assigns all 20 mammals to their orders, while the BWA run assigns 17 correctly. That is a comparison of the cost of obtaining useful predictions under different inputs. The fixed-workload timing remains the direct evidence about throughput.
Comparing the Vibrio references
The Vibrio experiment uses 30,000 simulated reads per source chromosome, described as an average base coverage of 1. The reads have length 100 and follow the default simulation settings used in the cleaner mammalian case. Half are reverse complements. The source is V. vulnificus. Its reads are compared with V. parahaemolyticus and V. cholerae, using 3-mers, an offset cap of 36 and an acceptance threshold of 1000.
The authors compare corresponding chromosomes separately and then compare the references with the chromosomes combined. For chromosome I reads, the score is 606:2 against V. parahaemolyticus and 643:9 against V. cholerae. For chromosome II reads, the scores are 773:0 and 849:9, respectively. With the chromosomes combined, they are 641:7 and 697:7. Each is a read-collection score derived from the accepted alignments. Under the rule that a lower score indicates a closer reference, all the comparisons favor V. parahaemolyticus.
The studies cited by the authors had approached this relationship through conservation of gene organization and through a distance based on exchanging blocks of genomic material. They likewise favored the relationship between V. vulnificus and V. parahaemolyticus. The agreement shows that a ranking based on sampled reads can recover that particular comparison. The read-based score and the earlier measures summarize different kinds of evidence.
What the ablations show
Changing the search and the direction together
The closest comparison to an ablation is between basic LRD and approximate indexed LRD. The basic aligner scores pieces from the read against each reference segment. The indexed aligner scores pieces from the reference segment against the read. It also uses membership counts to skip candidates, distance bounds to stop work and a shortcut for the reverse complement. Comparing the implementations tests whether the resulting package preserves the outcomes of interest. The comparison cannot assign a separate accuracy effect to each change.
In the orangutan contamination test, the indexed version improves on basic LRD in the reported AUC, best F₁ and best F₂. It also accepts more human reads at the zero-false-positive operating point. In the mixture with 50,000 contaminants, the indexed result again exceeds the basic result on those three aggregate metrics. The experiment without orangutan contaminants shows a larger separation in recall at best precision between the variants. The results establish that the approximate version can be competitive with the basic version for source discrimination. They cannot establish that it returns the same minimum for each read, especially since the underlying directional objectives can themselves select different minima.
For the mammalian order task, the authors report that the indexed search with the chosen shared-piece tolerance gives the same classification results as basic LRD. That is evidence about the downstream decision. Different read placements, accepted subsets or distances can still lead to the same nearest reference order. This distinction helps explain how an approximate aligner can be satisfactory for this experiment even when its placement-level agreement with the exhaustive search has not been measured.
The running-time comparison shows the benefit of the combined changes. It measures the basic implementation against versions that introduce indexing and approximate search, with a language and hash-table implementation change in the Java comparison. The paper gives a reason to expect the individual shortcuts to save time. Membership is reused across overlapping segments, some segments never reach distance scoring and some partial sums end early. It does not time the contribution of each shortcut in isolation. The total speedup therefore applies to the reported implementations as a whole.
Distances from reads to their original source segments
The contamination analysis goes beyond counting which human reads were accepted. The simulator supplies the source location of each human read. The researchers can return to that location and compare the simulated read with its original human reference substring. They compute average Hamming distance and average edit distance separately for accepted human reads and rejected human reads. These distances concern the source substrings supplied by the simulator. The comparison can therefore describe how much the read differs from known source material regardless of the location returned by LRD.
At the listed cutoffs where both groups exist, the rejected human reads have higher average Hamming and edit distances than the accepted group. For example, at 98:87% precision and 90:36% recall, the accepted reads have average Hamming distance 40:56 and average edit distance 30:81. The rejected reads have average Hamming distance 43:82 and average edit distance 33:26. The direction of the difference is consistent with the aligner having more difficulty with reads that have diverged further from their source substrings.
The authors caution that wgsim did not give them a direct count of the errors and mutations introduced into each read. A distance from the source substring is a proxy for the amount of change. Hamming distance can record a run of positional disagreements after a shift, and edit distance counts the shortest edit explanation available under its rules. Neither number is the recorded history of the simulation. The analysis supports a difference in average string disagreement between the accepted and rejected groups. It does not identify which particular simulated events cause the aligner to reject a read.
Changing the input and the acceptance rules
The contaminant comparison tests whether discrimination depends on which organisms supply negative reads. With only orangutan contaminants, full observed precision comes at relatively low recall for every tested tool. Without the orangutan in the contaminant set, several of the tools retain substantially more human reads at full precision. The authors interpret this in terms of closer relationship between human and orangutan. The evidence comes from these particular reference sequences and contaminant mixtures, which differ in composition and size.
The two settings in the order experiment create another comparison. In the abundant setting, several methods reach the ceiling of the order tally. The harder setting distinguishes them and shows that LRD can retain the correct orders under the combined changes in coverage and read quality. Because the authors change both the number of reads and the error and mutation rates, the experiment cannot tell how much of each tool’s change comes from fewer reads alone. An aligner that needs many clean reads and an aligner that is especially sensitive to corruption could both lose ground in this design.
BWA’s edit-threshold comparison gives a narrower view of one setting. The larger allowance accompanies lower order accuracy in the abundant case and higher order accuracy in the harder case. This is consistent with a threshold having different effects depending on how much useful evidence the aligner is otherwise able to retain. The paper identifies reads exceeding the stricter allowance as a plausible explanation for the hard-setting result. The experiment does not track the identity and quality of every additional placement, so it cannot establish a full causal account of the change in the nearest neighbors.
Ordinary rank distance and illustrative sequence changes
The authors also report trying an aligner based on ordinary rank distance. They describe its speed as twice that of BLAST in their tests and say that it had difficulty distinguishing contaminated reads when high recall was required. They describe its order predictions as comparable to those of the established aligners. The reported contrast supplies some evidence for using Local Rank Distance rather than ordinary occurrence-rank matching when contaminant rejection matters. The paper gives no accompanying breakdown that would isolate the effect of using longer pieces from the effect of matching nearest positions.
The paper’s illustrated sequence comparisons impose point mutations, indels and inversions, then show how the score responds when these kinds of changes are combined. They keep the first string fixed and use 1-mers. These comparisons expose the mechanism directly. Moving matching material can increase offsets, while disrupting its identity can remove nearby matches. The examples help explain what the score measures. The mammalian experiments use 3-mers, so the illustrations establish the behavior of the distance rule more directly than they establish the contribution of each kind of change to the reported order results.
Limitations
Limits identified by the authors
The authors identify speed as the primary cost. For the same workload, even the faster indexed aligner takes much longer than the comparison tools. They argue that low coverage can make LRD competitive when a smaller collection of reads suffices for the downstream decision. They also propose parallel or GPU execution as a way to improve throughput. The reported experiments measure single-core execution, so the expected benefit of further parallelization remains a proposal.
Parameter choice is another limit the authors make explicit. The offset cap should suit the read length, and the piece length affects both the chance of an exact match and the amount of contextual evidence a match carries. The authors regard 3-mers as reasonable for reads of length 100. They also discuss 4-mers and 5-mers as possibilities, especially when the source and reference are from the same species. A longer piece can provide more specific evidence. It is also more likely to contain a changed base and lose an exact match when errors or mutations are common. The recommended validation step reflects that dependence on the task.
The paper explicitly calls the count-based positional filter approximate. The best shared-piece count and the best distance are related quantities with different definitions. Tightening the allowed count shortfall can increase speed while discarding strong positional matches. The reverse-complement shortcut creates another way in which a favorable result in the searched candidates can end the search before all possible arrangements have been compared. The paper supports these shortcuts through downstream outcomes under the reported settings. It supplies no general bound on how much the accepted distance or the selected position can change.
The authors also raise the effect of chromosome length in the Vibrio comparison. They are particularly concerned about the difference between the chromosome II candidates. The longer reference provides more possible read placements, including opportunities for accidental matches. The authors argue that the acceptance threshold should remove most chance matches. That reasoning gives a purpose for the threshold, while the experiment does not directly measure the chance-match rate under length-matched conditions.
Limits visible in the evaluation
The paper assesses biological usefulness at the level of source recognition and reference ranking. In the contamination test a true positive is an accepted human read. Its designation depends on the source of the read, so it can count as a true positive even if the returned location differs from the simulated origin. The source locations appear in the analysis of read-to-source distances, but the paper does not use them to report a general placement-accuracy comparison. High precision and recall in that experiment therefore establish what the aligner accepted and rejected, with genomic coordinate accuracy left open.
The reads throughout the experiments are simulated from the selected references. The simulation makes the answers available and lets the authors control error and mutation rates. It also sets the scope of the result. The abundant mammalian setting is described as resembling the availability of reads in a real sequencing experiment. It still uses simulated reads. The hard setting demonstrates robustness to the particular combined changes imposed by the simulator, with performance on independently collected sequencing data remaining unmeasured.
The mammalian result is an order-level decision in a known collection. Withholding a mammal leaves a finite set of possible reference neighbors, and a correct order can be obtained from any suitable neighbor within it. This supports assignment when the collection contains useful representatives. It gives less direct evidence about the family or species questions that motivate the work, because the reported mammalian tally does not require the exact species or family to be recovered. The same setup leaves open how the procedure behaves if the appropriate group is absent from the reference collection or represented very differently.
Thresholds also affect the interpretation of the comparisons. A best F-score from a test sweep describes the best observed tradeoff under that sweep. Using the value in advance on a new mixture would require evidence that its threshold transfers. In the order experiments, the set of accepted reads can differ across aligners and references, and the aggregate score rewards the number accepted. An order prediction therefore reflects the distance or scoring rule, its acceptance settings and the reference-scoring procedure together.
The Vibrio experiment is a focused check against an existing comparison. It asks which of the candidate species has the lower score for one source and reports agreement for the corresponding chromosomes and for the combined comparison. It does not estimate a rate of successful phylogenetic inference across many source organisms. It also presents LRD results for this check instead of a head-to-head comparison of all the aligners. The consistency across chromosome choices gives the finding more context, while its scope remains the relative ranking examined in the paper.
What came after
The later citing work listed here follows a direction in text classification. The connection is easiest to see through the original paper’s distinction between matching short pieces and deciding how much their positions matter. A string kernel supplies a way to compare strings for a classification task. The titles of the later papers establish their use of kernels and their dialect-identification targets. They give less evidence about whether a particular kernel uses the directional offsets, candidate search or taxonomic scoring rule of the DNA aligner.
UnibucKernel: An Approach for Arabic Dialect Identification Based on Multiple String Kernels (2016) presents an approach to identifying Arabic dialects using multiple string kernels. Its classification target is a dialect label for text. The citing relationship places the alignment paper in the background of that work on comparing strings. The title identifies the use of several comparison functions as part of the approach. It does not specify which one, if any, implements Local Rank Distance.
Learning to Identify Arabic and German Dialects using Multiple Kernels (2017) takes multiple kernels into dialect identification for Arabic and German. The named task concerns learning to identify dialects across those language settings. This broadens the stated classification scope of the citing work. The classification target also makes the relationship to the alignment paper indirect. The DNA study evaluates a best reference placement and then uses accepted read distances to choose a taxonomic neighbor. The later title establishes the use of kernels for dialect identification, with the way the individual comparisons enter the classifier unspecified.
UnibucKernel Reloaded: First Place in Arabic Dialect Identification for the Second Year in a Row (2018) returns to Arabic dialect identification under the UnibucKernel name. Its title identifies it as a continuation and reports first place in the task. That result belongs to dialect identification. It supplies no new measurement of alignment precision, tolerance to sequencing errors or the running time of the rank-based aligner.
Taken together, the citing papers show that interest in comparing sequences extended from read alignment to the classification of text. The relationship that can be traced with confidence is the citation of a sequence-comparison study by work that uses kernel comparisons for dialect labels. How much of the alignment paper’s specific local-offset rule those later systems use remains unspecified.
Cite
Cite as Liviu P. Dinu, Radu Tudor Ionescu and Alexandru Ioan Tomescu. 2014. A Rank-Based Sequence Aligner with Applications in Phylogenetic Analysis. PLoS ONE.
@inproceedings{dinu2014rank,
title = {{A Rank-Based Sequence Aligner with Applications in Phylogenetic Analysis}},
author = {Liviu P. Dinu, Radu Tudor Ionescu and Alexandru Ioan Tomescu},
booktitle = {PLoS ONE},
year = {2014},
doi = {10.1371/journal.pone.0104006},
url = {https://doi.org/10.1371/journal.pone.0104006}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/dinu-2014-rank-based-sequence-aligner-applications/