Literature DB >> 27376057

Accurate Prediction of the Statistics of Repetitions in Random Sequences: A Case Study in Archaea Genomes.

Mireille Régnier1, Philippe Chassignet2.   

Abstract

Repetitive patterns in genomic sequences have a great biological significance and also algorithmic implications. Analytic combinatorics allow to derive formula for the expected length of repetitions in a random sequence. Asymptotic results, which generalize previous works on a binary alphabet, are easily computable. Simulations on random sequences show their accuracy. As an application, the sample case of Archaea genomes illustrates how biological sequences may differ from random sequences.

Entities:  

Keywords:  K-mers; combinatorics; probability

Year:  2016        PMID: 27376057      PMCID: PMC4896921          DOI: 10.3389/fbioe.2016.00035

Source DB:  PubMed          Journal:  Front Bioeng Biotechnol        ISSN: 2296-4185


Introduction

This paper provides combinatorial tools to distinguish biologically significant events from random repetitions in sequences. This is a key issue in several genomic problems as many repetitive structures can be found in genomes. One may cite microsatellites, retrotransposons, DNA transposons, long terminal repeats (LTR), long interspersed nuclear elements (LINE), ribosomal DNA, and short interspersed nuclear elements (SINE). In Treangen and Salzberg (2012), it is claimed that half of the genome consists of different types of repeats. Knowledge about the length of a maximal repeat is a key issue for assembly, notably the design of algorithms that rely upon de Bruijn graphs. In re-sequencing, it is a common assumption for aligners that any sequenced “read” should map to a single position in a genome: in the ideal case where no sequencing error occurs, this implies that the length of the reads is larger than the length of the maximal repetition. Average lengths of the repeats are given in Gu et al. (2000). Recently, heuristics have been proposed and implemented (Devillers and Schbath, 2012; Rizk et al., 2013; Chikhi and Medvedev, 2014). A similar problem has been extensively studied: the prediction of the length of maximal common prefixes for words in a random set. Typical parameters are the background probability model, the size V of the alphabet, the length n of the sequence, and so on. Deviation from uniformity was studied for a uniform model as early as 1988 (Flajolet et al., 1988). A complexity index that captures the richness of the language is addressed in Janson et al. (2004). A distribution model, valid for binary alphabets and biased distributions, was introduced in Park et al. (2009), the so-called trie profile and extended to Patricia tries in Magner et al. (2014). The authors pointed out different “regimes” of randomness and a phase transition, by means of analytic combinatorics (Sedgewick and Flajolet, 2009). It was observed in Jacquet and Szpankowski (1994) that the average length of maximal common prefixes in a random set of n words is asymptotically equivalent to the average length of maximal repetitions in a random sequence of length n. Sets of words are considered below in the theoretical analysis. A comparison with the distribution of maximal repetitions in random sequences or real Archaea genomic sequences is presented in Section 3. Our first goal is to extend results of Park et al. (2009) to the case of a general V-alphabet, including the special case {A, C, G, T} where V is 4. A second goal is to compare the results consistency with random data and real genomic data in the finite range. To achieve the first goal, we rely on an alternative, and simpler, probabilistic and combinatorial approach that is interesting per se. It avoids generating functions and the Poissonization–dePoissonization cycle that is used in Park et al. (2009) and it extends to non-binary alphabets. In that case, there is no closed formula for the asymptotic behavior. Nevertheless, the Lagrange multipliers allow to derive it as the solution of an equation that can be computed numerically. Explicit and computable bounds for the profile of a random set of n words are provided. Three domains can be observed. A first domain is defined by a threshold k for the length, called the completion length: any prefix with a length smaller than this threshold occurs at least twice. This threshold is extremely stable over the data sets and it is highly predictable. A similar phenomenon was observed for a uniform model in Fagin et al. (1979a) and a biased model (Mahmoud, 1992; Park et al., 2009). For larger lengths, some prefixes occur only once. In a second domain, called the transition phase, the number of maximal common prefixes is sublinear in the size n of the sequence: increasing first, then decreasing slowly, and, finally, dropping rapidly. In the third domain, for a length larger than some extinction length, almost no common prefix of that length occurs. Despite the fact that these bounds are asymptotic, a good convergence is shown in practice for random texts when a second-order term is known. Differences between the model and the observation are studied on the special case of Archaea genomes. A dependency to the GC-content, which is a characteristic of each genome, is exhibited. Regimes and transitions are studied on these genomic data and theoretical results are confirmed, with a drift in the values of transition thresholds. Notably, the length of the largest repetitions is much larger than expected. This difference between the model and the observation arises from the occurrences of long repeated regions. Section 2 is devoted to Main Results, to be proved in Section 4. First, some notations are introduced; then, an algebraic expression for the expectation of the number of maximal common prefixes in a sequence is derived in Theorem 2.1. Second, this expression is split between two sums that are computable in practical ranges. Then, it is shown that a Large Deviation principle applies. It yields first and second order asymptotic terms, and oscillations, that are provided in Theorem 2.2. A comparison between exact, approximate, and asymptotic expressions is presented in Section 3.

Main Results

It is assumed throughout this study that sequences and words are randomly generated according to a biased Bernoulli model on an alphabet of size V. Let p1, ⋯, p denote the probabilities of the V characters χ1, ⋯ ,χ. Definition 2.1. For any i in {1, ⋯ ,V }, one notes Additionally, The two values min(β) and max(β) are different when the Bernoulli model is non-uniform.

Enumeration

Definition 2.2. Given U a set of words and an integer k, k ≥ 2, a unique k-mer in U is a word wχ of length k such that w is a prefix of at least two words in U; and wχ is a prefix of a single word. By convention, a unique 1-mer is a character χ that is a prefix of a single word. Definition 2.3. Let U be a set of n words. For k ≥ 1, one denotes B(n, k) the number of unique k-mers in U. One denotes μ(n, k − 1) the expectation of B(n, k) over all sets of n words. Remark: It follows from Definition 2.2 that quantity B(n, k) is upper bounded by n. Observe that, for each random set U, it is the sum of a large number – V – of correlated random variables. Expectation μ(n, k) is studied below and compared in Section 3 with B(n, k + 1). Profiles of repetitions can be expressed as a combinatorial sum. Theorem 2.1. Given a length k, the expectation μ(n, k) satisfies: where Proof. A word wχ is a unique (k + 1)-mer iff (i) w has length k and is the prefix of at least two words, including wχ; (ii) wχ is not repeated. Event (i) has probability Event (ii), which is a sub-event of (i), has probability

A Combinatorial Expression

Definition 2.4. Given a k-mer w, let α denote and k denote the number of occurrences of character χ in w. The objective function is The character distribution (k1, ⋯ , k) of a k-mer may be viewed as barycentric coordinates for a point that lies in . The order of β points on that interval allows for a classification of k-mers that is a key to this study. Definition 2.5. A k-mer w is said a common k-mer if ρ(k1,…, k) < 0; a transition k-mer if ρ(k1, ⋯ , k) ≥ 0 and its ancestor is a common k-mer; a rare k-mer, otherwise. Remark: If ρ(k1, ⋯ , k) = 0, the condition on the ancestor is trivially satisfied. Definition 2.6. Given a set U of n words and an integer k, let D denote the set of character distributions (k1, ⋯ , k) for rare and transition k-mers. Let E(n) denote the set of character distributions for common k-mers. The set D(n) is the empty set if k < α log n and is the set of character distributions (k1, ⋯ , k) if k > α log n. Computation of (3) is split among the two sets D(n) and E(n). Computations show that the main contribution arises from transition k-mers. A probabilistic interpretation will be discussed in 2.4. Notation: Let S(k) and T(k) be So μ(n, k) rewrites These sums S(k) and T(k) can be efficiently computed for moderate k, up to a few hundred, approximately. In practice, α log n is below this threshold for the sizes of actual genomes and for their ordinary GC content value. The simulations in Section 3 show that this estimation is rather tight. Behavior and asymptotic estimates are derived and discussed in the next section.

Asymptotic Estimates

In this section, asymptotic estimates for (3) are derived. First, some characteristic functions are introduced. Then, it is observed that a Large Deviation Principle applies for the combinatorial sums to be computed and asymptotics for the dominating term follow. Amortized terms are also computed. It is shown in Section 3 that this second-order term cannot be neglected in the finite range.

Notations

For general alphabets, asymptotic behavior is a function of the solution of an equation and depends on domains whose bounds are defined below. Definition 2.7. Let (p)1≤≤ be a Bernoulli probability distribution. Let σ2 denote . The fundamental ratio, noted , is . The transition ratio, noted , is . The extinction ratio, noted α, is . Definition 2.8. Let α be a real value in [α, α]. Let τ be the unique real root of the equation Let ψ be the function defined in [α, α] as Proposition 2.1. The following property holds Function ψ increases on and decreases on . It satisfies Remark: Uniqueness of τ is shown in Section 4.2. As , ψ is continuous at α = , with .

Asymptotic Results

Theorem 2.2. Given a length α log n, when n tends to ∞ the ratio satisfies: Moreover, let ξ be the function defined in [α, α] as . It satisfies Proof. The key to the proof when α ranges in [α, α] is that ψ(k1, ⋯ k) is maximal when ρ(k1, ⋯ k) is close to 0. Sum T(k) satisfies a Large Deviation Principle. The maximization problem rewrites as The maximum value is that is reached for the V-tuple . S(k) satisfies again a Large Deviation Principle when α < , which yields the asymptotic result in this range. For larger α, S(k) is approximately that dominates T(k). Details for the proof, including the short and long lengths, are provided in Section 4. Remark: The discussion will depend of the ratio . Possible values for α range over a discrete set as they are constrained to be the ratio of an integer by the log of an integer. An interesting property is that, for any real α, the set T = {n ∈ N; α log n ∈ N} is either empty or infinite. Indeed, when T is non-empty, it contains all values n(α) where n(α) denotes the minimum value of T. It is beyond the scope of this paper to establish the number of other possible solutions.

Domains

Different domains arise from this Theorem, which were observed in Park et al. (2009). Equalities ψ(α) = 0 and show that there is a continuity between domains. When α lies inside the domain [α, α], the ratio is positive and parameters μ(n, α log n) are sub-linear in the size n of the text: some k-mers – mostly transition k-mers – are unique k-mers. Observe that the maximum value for ψ(α) is 1. When the Bernoulli model is uniform, this central domain is empty. When the length is smaller than the completion length log n or greater than the extinction length log n, the ratio is negative.

Oscillations

Parameters (k1, ⋯ , k) in the combinatorial sums are integers. As the optimum values (kθ)1≤≤ may not be integers, the practical maximum is a close point on the lattice (k1, ⋯ , k). The difference introduces a multiplicative factor that ranges in . This leads to a small oscillation of log μ(n, k). For large n, this contribution to becomes negligible. As mentioned above, the set of lengths n that are admissible for a given α is very sparse. Nevertheless, an approximate value may be used: for instance, for an integer k′, is very close to α. This oscillation phenomenon was first observed in Nicodème (2005).

Binary Alphabets

Results for binary alphabets in Park et al. (2009) steadily follow from Theorem 2.2. A rewriting of ψ leads to alternative expression (18). This explicit expression points out the dependency to the distances to α and α, and the behavior around these points. Corollary 2.1. Assume that the alphabet is binary. Then where A similar result holds for DNA sequences when the alphabet is 4-ary and the probability distribution satisfies p = p and p = p. Such a distribution is defined by its GC-content p + p.

A Probabilistic Interpretation

The main contribution to μ(n, k) arises from k-mers with an objective function close to 0, i.e., transition k-mers. Such k-mers exist in the transition phase [α log n, α log n] where they coexist with rare or common k-mers. Observe that this phase is shrinked when the Bernoulli model is uniform, as p = p and α = α. Therefore, most unique k-mers are concentrated on the two lengths ⌊α log n⌋ and ⌈α log n⌉, as observed initially in Fagin et al. (1979b). Let k be some integer in the transition phase. First, the relative contribution of S(k) and T(k) to μ(n, k) varies with the length k. For lengths close to α log n, most words are common and T(k) dominates S(k). When k increases, the proportion of common words decreases and the relative contribution of T(k) decreases. Second, the dominating term in μ(n, k) arises from transition k-mers. Let w be a word of length k, the character distribution in w be (k1, ⋯ , k) and χ be some character. The number of words that admit w or wχ as a prefix fluctuates around the expectations nϕ(k1, ⋯ , k) and nϕ(k1, ⋯ , k)p, respectively. On the one hand, when word wχ is a rare word, nϕ(k1, ⋯ , k) is less than 1. The smallest nϕ(k1, ⋯ , k) is, the less likely the actual number of occurrences of w is greater than 2 and the smallest the contribution of wχ to S(k), and μ(n, k), is. On the other hand, let wχ be a common k + 1-mer; w is a common k-mer and then nϕ(k1, ⋯ , k) is greater than 1. The largest nϕ(k1, ⋯ , k) is, the more likely the word wχ is repeated and the smallest the contribution to T(k), and μ(n, k), is. For a short length, i.e., k smaller than the completion length k, all words are common. In a given sequence, most k-mers are repeated at least twice and there is (almost) no unique k-mers. For a large length k, i.e., k greater than k, all words are rare. Nevertheless the number of unique k-mers remains sublinear in n in the range [α log n, α log n]: the sum of small contributions arising from a large number of possible words is significant. A folk theorem (Szpankowski, 2001; Jacquet and Szpankowski, 2015) claims that the objective function is concentrated around . Consequently, when α = , most k-mers are transition k-mers and the exponent, the ψ function, is maximal.

Experiments and Analysis

Simulations are presented for random and real data. For each simulation, a suffix tree (Ukkonen, 1995) is built, where each leaf represents a unique k-mer. For random cases, the Ukkonen’s insertion step is iterated until a tree with exactly n leaves is build. This requires n + k insertions of symbols, where k > 0 is relatively small (there is a value of a few dozen in practice for considered n). One can observe that the event of having n leaves after n + k − 1 insertions corresponds to the fact that the trailing k-mer is unique in the sequence of length n + k − 1. Even if a statistical bias exists, with respect to the case of a set of N random words analyzed in previous sections, this bias for respective values on k and n is below the numeric precision used for tables below. Then, one simulation that is related to the case of a set of n random words, requires the generation of the order of N random symbols from a small alphabet, following a Bernoulli scheme. For this range of n, and even in the case of a hundred consecutive simulations, this corresponds to a regular use of a common random number generator (Knuth, 1998). A first set of simulation deals with the case of random sequences over a binary alphabet, since the results can be compared with previous work. A second set addresses the case of random sequences over a quaternary alphabet {A, C, G, T} with a constrained distribution such that probabilities p ≈ p and p ≈ p as it is the case for DNA sequences (where the sum p + p is also known as the GC-content). Results on such random sequences are then compared with the sample biological sequence of an Archaea (Haloferax volcanii). An implementation with a suffix array (Manber and Myers, 1993) allows for a compact representation and an efficient counting (Beller et al., 2013).

Random data

A hundred binary sequences were randomly generated. The number of leaves in each tree was fixed to n = 5000000 and the Bernoulli parameter was p = 0.7000. Therefore, p = 0.3000, , and log n = 15.4249. The thresholds for α and the corresponding lengths α log n are:

Statistical Behavior on Random Sets

Throughout experiments, every sample profile for a given sequence fluctuates very little around the expectation. Table 1 provides experimental results averaged over a hundred binary sequences. Short length with no observed unique k-mer is removed. Column 2 gives the mean of B(k + 1), i.e., the mean number of observed leaves at depth k + 1, over the set of a hundred simulations. Columns 3 to 5 give the computed values for S(k), T(k), and μ(k), using the expressions, equations (7–9).
Table 1

Mean profile for 100 random binary sequences.

ObservedPredicted
ObservedAsymptotic
kB(k+ 1)S(k)T(k)μ(n, k)logB(k+1)lognψ(α)ψ(α) +ξ(α)
110.2900.30.3−0.0803
127.9108.38.30.1341

kmin
1387.870.186.987.10.29020.08430.0012
14552.881.2550.3551.50.40940.33400.2485
152456.7786.62366.42453.00.50610.49620.4085
168269.20209.48069.18278.50.58480.61810.5282
1722516.20406.122097.722503.80.64970.71360.6218
1851085.154823.846267.251091.00.70280.78970.6960
1999387.016636.192717.699353.70.74600.85040.7549
20169303.0337415.5131882.6169298.10.78050.89840.8013
21256358.1042003.9214454.4256458.30.80740.93570.8370
22349801.23137615.9212264.2349880.10.82760.96350.8634
23434625.83134807.6299824.7434632.40.84160.98300.8814
24495572.93122283.1373279.8495562.80.85010.99490.8919
25522788.19255284.4267476.3522760.70.85360.99980.8955

k˜
26513374.76211204.2302252.5513456.70.85240.99820.8926
27472126.51315154.7157087.0472241.60.84700.99060.8838
28408946.76242583.4166360.3408943.70.83770.97720.8692
29335080.05273441.061579.7335020.70.82480.95820.8491
30260999.29198163.462712.5260875.90.80860.93390.8236
31194100.36137502.056463.1193965.10.78940.90430.7930

k¯
32138437.13122218.316090.9138309.20.76750.86990.8136
3395017.3380937.114067.895004.90.74310.83460.7783
3463082.6760397.12744.663141.70.71650.79930.7430
3540742.9738411.92368.940780.80.68820.76390.7077
3625679.2123888.21817.425705.60.65820.72860.6724
3715860.5915622.9255.815878.70.62700.69330.6371
389645.849455.0194.29649.20.59480.65800.6018
395791.325772.715.95788.60.56170.62270.5664
403433.873426.412.13438.50.52780.58740.5311
412032.572027.20.42027.60.49380.55200.4958
421188.841189.00.31189.30.45900.51670.4605
43692.28694.80.2695.00.42400.48140.4252

kmax
44402.75405.10405.10.38890.44610.3899
45233.35235.70235.70.35350.41080.3545
46135.42137.00137.00.31820.37550.3192
4778.3979.6079.60.28280.34010.2839
4844.6946.2046.20.24630.30480.2486
4925.3526.8026.80.20960.26950.2133
5014.5715.6015.60.17370.23420.1780
518.449.009.00.13830.19890.1426
524.765.205.20.10120.16360.1073
532.763.003.00.06580.12820.0720
541.741.801.80.03590.09290.0367
551.021.001.00.00130.05760.0014
560.640.600.6−0.02890.02230.0339

kext
570.320.300.3−0.0739−0.0130
580.180.200.2−0.1112−0.0483
590.160.100.1−0.1188−0.0836
600.120.0700.07−0.1375−0.1190
610.080.0400.04−0.1637−0.1543
620.060.0200.02−0.1824−0.1896
630.040.0100.01−0.2087−0.2249
640.040.00800.008−0.2087−0.2602

(.

Mean profile for 100 random binary sequences. (. The actual number of leaves B(n, k + 1) is very close to the average value μ(n, k), and simulations show that this is the general case when (only) a hundred simulations are performed: μ(n, k) is a very good prediction. Observed lengths of extinction also show very little variations. In array below, each column gives n, the number of sequences out of the one hundred sample set for which the longest repetition had length k. Distribution of the extinction level for 100 random binary sequences.. In the binary case, the predicted extinction length is between 56 and 57. It is noticeable that, in most cases, the observed depth is slightly smaller than this value. In Table 1, value 0.04 for μ(n, 61) means that one expects a total of four leaves at depth 60 over one hundred sequences. In that run, exists a total amount of 8. Tightness of the asymptotic estimates. Asymptotic estimates (13) given in Column 7 significantly overestimate the observed values in Column 6 that is computed directly from Column 2 and n. A first conclusion is that first-order asymptotics provide a poor prediction: next term is O that goes slowly to 0. Tightness of the second-order asymptotics. Second term for the asymptotic ξ(α) ensures a much better approximation in Column 8. Growth of asymptotic estimates. Observed values increase with length until and then decrease. This is consistent with the variation of asymptotic values ψ(α).

Dependency to Probability Bias

Thresholds were computed for a given sequence length n and various probabilities. The more p departs from 0.5, the value for the uniform model, the largest the extinction length is. The completion length, k, slightly decreases, while the extinction length significantly increases. Nevertheless, this effect is limited when the largest probability p remains in the range [0.5;0.7]. Dependency of thresholds to .

Long Repetitions in Archaea Genomes

The experimental data set is the sequence from Haloferax volcanii DS2 chromosome, complete genome (Hartman et al., 2010). The alphabet is quaternary. Profile results are shown in Table 2.
Table 2

Profile for the sequence from .

ObservedPredicted
kB(k+ 1)S(k)T(k)μ(n, k)
6400.050.05
7197504e + 024e + 02
84134902e + 042e + 04

kmin
9178523781.2213568.8214350.1
1038203266858.4617279.6684137.9
11542386171711.2742379.1914090.3

k˜
12570499407976.5215942.2623918.7

k¯
13459330259860.76512.5266373.2

kmax
1430500287488.6087488.6
1516931725704.4025704.4
16863797264.707264.7
17403912028.202028.2
1817432564.10564.1
197866156.70156.7
20383043.5043.5
21195712.1012.1
2212293.403.4
239100.900.9

kext
247330.300.3
256170.0700.07
265610.0200.02
274920.00600.006
284460.00200.002
294360.000500.0005
303970.000100.0001
313741e−0501e−05
323592e−0602e−06
333222e−0802e−08
truncatedtruncated
Profile for the sequence from . Sequence length is n = 2847757. The observed symbol frequencies are p = 0.1655; p = 0.3334; p = 0.3330; p = 0.1681. Therefore, observed GC-content is 0.6664. Parameters for an approximate degenerated quaternary model are p = p = p = 0.1668; p = p = p = 0.3332; ; and log n = 14.8620. The thresholds for the domain are Statistics on one hundred random sequences with same parameters are shown in Table 3. GC-content is 0.6664. Extinction level is provided in Table 4. Observe first a good match between the observed values, the predicted values for μ(n, k), and the asymptotic values for random data. As shown for binary alphabets, the observed extinction level for random sequences departs very little from the predicted k level.
Table 3

Mean profile for 100 random degenerated quaternary sequences.

ObservedPredicted
Observedasymptotic
kB(k+ 1)S(k)T(k)μ(n, k)logB(k+1)lognψ(α)ψ(α) +ξ(α)
60.0300.00.0−0.2359
7363.290363.9363.90.3967
821236.17021252.221252.20.6704

kmin
9214371.12781.6213574.7214356.30.82600.72420.5024
10684344.6866877.4617315.1684192.50.90410.92800.6956
11914013.67171742.8742383.0914125.80.92350.99850.7564

k˜
12623870.12407973.4215914.6623888.00.89780.96550.7147

k¯
13266366.73259826.16510.8266336.90.84060.87920.8574

kmax
1487424.5887471.6087471.60.76560.79300.7711
1525704.9525698.5025698.50.68320.70680.6849
167253.727262.907262.90.59810.62060.5987
172025.992027.602027.60.51230.53440.5125
18565.97563.90563.90.42650.44820.4263
19155.90156.70156.70.33970.36200.3401
2043.5243.5043.50.25390.27580.2539
2112.2812.1012.10.16880.18950.1677
223.063.403.40.07530.10330.0814
230.800.900.9−0.01500.01710.0048

kext
240.280.300.3−0.0857−0.06910.0910
250.140.100.1−0.1323−0.15530.1772

GC-content is 0.6664.

Table 4

Distribution of the extinction level for 100 random degenerated quaternary sequences.

k2122232425
nk26421877

GC-content is 0.6664.

Mean profile for 100 random degenerated quaternary sequences. GC-content is 0.6664. Distribution of the extinction level for 100 random degenerated quaternary sequences. GC-content is 0.6664. Numerous differences with random data can be observed on real genomes. Interestingly, the behavior for short lengths and in the transition phase is similar to the random behavior. Observation and prediction have the same order of magnitude. In particular, the number of unique k-mers is maximum for length where observation and prediction coincide. For a real genome and a length k smaller than k, observed B(n, k + 1) is larger than predicted μ(n, k). This indicates, at a level k + 1 where completion is expected, more leaves in the real trie, more missing words at level k + 2. Simultaneously, less internal nodes occur at level k + 1 because the total sum is constant and equal to V+1. The effect of (non-random) repetitions is more sensible in the decreasing domain. First, the number of unique k-mers decreases much more slowly than expected for lengths larger than k. A significant gap can be observed around extinction level k. The decrease rate, which was around 0.02–0.04 drops to 0.007 and then becomes even lower. Finally, the extinction level is much larger than the predicted value 23: the largest repetition is 1395 bp long. To evaluate the contribution of long repetitions, one may erase the longest ones. When a word w is repeated, any proper suffix of w is also repeated. Consequently, once the longest repeated word is erased, one unique k-mer (only) disappears for each length larger than the length of the second largest subsequence (here, 935). The profile remains far from the random profile. This observation is still true if the 10 longest subsequences are erased.

Combinatorial and Analytic Derivation

Lagrange Multipliers

Lagrange multipliers method allows to maximize an expression under constraints. To compute (17), one sets Two constraints are given: An intermediary function ϕ(τ1, ⋯ τ) is defined In order to maximize ϕ under these two constraints, ϕ function is derived with respect to each random variable τ. This yields V equations Two indices i and i are chosen that satisfy . For instance Solving equation (24) with indices i and i yields Remaining equations rewrite: Using the constraint that yields and an expression for follows. Therefore Equation 25 rewrites: Finally, Equation yields equation (10). For this V-tuple

Approximation Orders

Derivating the RHS of (10) yields that is positive. Therefore, for any α, the solution to (10) is unique. Moreover, τ increases with α. Let Notably, the solutions τ of (10) associated with the four increasing values of α: are (–∞, 1 + 2, + ∞). Computing ψ for these values yields (11) and Equality . Derivating both expressions yields Both derivatives are monotone functions of τ. In equation (30), derivative is 0 when . Therefore, ψ is the maximum of the two values ψ1 and ψ2 over the interval [α, α]. The former equation is 0 if α = . Therefore, ψ is maximum when α = .

Approximations

Short Lengths

Assume that k ≤ α log n. Each term ϕ(k1, ⋯ , k) is lower bounded by . Each term ψ(k1, ⋯ , k) is trivially bounded by that is upper bounded by 1 and nψ(k1, ⋯ , k) tends to 0 when n goes to ∞. As , the ratio is negative.

Moderate and Large Lengths

For a length k in the transition domain [α log n, α log n], the objective function may be either positive or negative. When k > α log n, set E(n) is empty and μ(n, k) reduces to S(k). The maximum M among the terms in T(k) is reached when ρ(k1,  ⋯ , k) is 0. Due to the exponential decrease of when nϕ(k1, ⋯ , k) ≥ 1, is upper bounded. Computation of log M is done with Lagrange multipliers, as explained above. Computation of S(k) relies on the local development of ψ(k1, ⋯ , k), that is n(1–σ2)ϕ (k1, ⋯ , k). S(k) rewrites where . This sum satisfies a Large Deviation Principle when , or α < . In this range, , which was shown to be ψ(α). When α > , sum S˜(k) rewrites where This sum satisfies a Large Deviation Principle and As , this maximum is that is negative.

Binary Case

Barycentric coordinates of α are unique. Indeed, equation (10) reduces to a linear equation on the variable where . Therefore, . Finally Function ψ rewrites, in the binary case: Observing that and changing variable τ into (β2 − β1) yields and .

Conclusion

This paper describes the behavior of the number of unique or repeated k-mers in a random sequence, on a general alphabet. Derivation relies on a combination of analytic combinatorics and on Lagrange multipliers. It simplifies an approach provided for binary alphabets and allows to address larger alphabets, including the quaternary alphabets, such as DNA alphabet. Precise asymptotic estimates are provided and a probabilistic interpretation is given. They are validated on random simulated data and shown to be valid in the finite range. Therefore, they provide a valuable tool to estimate a suitable read length for assembly purposes and tune parameters for assembly algorithms. Real genomes significantly depart from the random behavior for long repetitions. The general shape of the trie profile is observed, with a maximum of the number of unique k-mers at the expected length. However, for real genomes, a number of very short k-mers are missing and, on the contrary, one observes a number of very long repetitions. Besides these events, the behaviors are rather similar. In the future, it is worth extending the method to generalized Patricia tries, Markov models and approximate repetitions.

Author Contributions

Both authors contributed equally.

Conflict of Interest Statement

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
αmin = 0.8306α˜ = 1.6370α¯ = 2.0484αmax  = 2.8035αext = 3.6714
kmin = 12.81k˜ = 25.25k¯ = 31.60kmax = 43.24kext = 56.63
k5152535455565758596061626364
nk10161319141461121102
pmaxkmink˜k¯kmaxkext
0.5022.2522.2522.2522.2544.51
0.5519.3222.4222.7425.8045.16
0.6016.8322.9224.2730.2047.18
0.6514.6923.8227.0635.8150.83
0.7012.8125.2531.6043.2556.63
0.7511.1327.4338.8053.6265.64
0.809.5830.8350.6369.1379.99
0.858.1336.4971.7894.91104.80
0.906.7047.45116.72146.40155.45
0.955.1577.70259.56300.72309.05
αmin = 0.5584α˜ = 0.7520α¯ = 0.8079αmax = 0.9099αext = 1.5609
kmin =8.30k˜ = 11.18k¯ = 12.01kmax = 13.52kext = 23.20
  6 in total

1.  Densities, length proportions, and other distributional features of repetitive sequences in the human genome estimated from 430 megabases of genomic sequence.

Authors:  Z Gu; H Wang; A Nekrutenko; W H Li
Journal:  Gene       Date:  2000-12-23       Impact factor: 3.688

2.  Separating significant matches from spurious matches in DNA sequences.

Authors:  Hugo Devillers; Sophie Schbath
Journal:  J Comput Biol       Date:  2011-12-09       Impact factor: 1.479

3.  Informed and automated k-mer size selection for genome assembly.

Authors:  Rayan Chikhi; Paul Medvedev
Journal:  Bioinformatics       Date:  2013-06-03       Impact factor: 6.937

4.  DSK: k-mer counting with very low memory usage.

Authors:  Guillaume Rizk; Dominique Lavenier; Rayan Chikhi
Journal:  Bioinformatics       Date:  2013-01-16       Impact factor: 6.937

Review 5.  Repetitive DNA and next-generation sequencing: computational challenges and solutions.

Authors:  Todd J Treangen; Steven L Salzberg
Journal:  Nat Rev Genet       Date:  2011-11-29       Impact factor: 53.242

6.  The complete genome sequence of Haloferax volcanii DS2, a model archaeon.

Authors:  Amber L Hartman; Cédric Norais; Jonathan H Badger; Stéphane Delmas; Sam Haldenby; Ramana Madupu; Jeffrey Robinson; Hoda Khouri; Qinghu Ren; Todd M Lowe; Julie Maupin-Furlow; Mecky Pohlschroder; Charles Daniels; Friedhelm Pfeiffer; Thorsten Allers; Jonathan A Eisen
Journal:  PLoS One       Date:  2010-03-19       Impact factor: 3.240

  6 in total
  1 in total

1.  A new statistic for efficient detection of repetitive sequences.

Authors:  Sijie Chen; Yixin Chen; Fengzhu Sun; Michael S Waterman; Xuegong Zhang
Journal:  Bioinformatics       Date:  2019-11-01       Impact factor: 6.937

  1 in total

北京卡尤迪生物科技股份有限公司 © 2022-2023.