title: Efficient detection of unusual words.
abstract: Words that are, by some measure, over- or underrepresented in the context of larger sequences have been variously implicated in biological functions and mechanisms. In most approaches to such anomaly detections, the words (up to a certain length) are enumerated more or less exhaustively and are individually checked in terms of observed and expected frequencies, variances, and scores of discrepancy and significance thereof. Here we take the global approach of annotating the suffix tree of a sequence with some such values and scores, having in mind to use it as a collective detector of all unexpected behaviors, or perhaps just as a preliminary filter for words suspicious enough to undergo a more accurate scrutiny. We consider in depth the simple probabilistic model in which sequences are produced by a random source emitting symbols from a known alphabet independently and according to a given distribution. Our main result consists of showing that, within this model, full tree annotations can be carried out in a time-and-space optimal fashion for the mean, variance and some of the adopted measures of significance. This result is achieved by an ad hoc embedding in statistical expressions of the combinatorial structure of the periods of a string. Specifically, we show that the expected value and variance of all substrings in a given sequence of n symbols can be computed and stored in (optimal) O(n2) overall worst-case, O (n log n) expected time and space. The O (n2) time bound constitutes an improvement by a linear factor over direct methods. Moreover, we show that under several accepted measures of deviation from expected frequency, the candidates over- or underrepresented words are restricted to the O(n) words that end at internal nodes of a compact suffix tree, as opposed to the theta(n2) possible substrings. This surprising fact is a consequence of properties in the form that if a word that ends in the middle of an arc is, say, overrepresented, then its extension to the nearest node of the tree is even more so. Based on this, we design global detectors of favored and unfavored words for our probabilistic framework in overall linear time and space, discuss related software implementations and display the results of preliminary experiments.
authors.affiliation: Department of Computer Sciences, Purdue University, West Lafayette, IN 47907, USA. axa@cs.purdue.edu
authors.forename: A
authors.initials: A
authors.lastname: Apostolico
authors.forename: M E
authors.initials: ME
authors.lastname: Bock
authors.forename: S
authors.initials: S
authors.lastname: Lonardi
authors.forename: X
authors.initials: X
authors.lastname: Xu
mesh_terms: D000465:Algorithms; D001483:Base Sequence; D001699:Biometry; D004271:DNA, Fungal / Q000235:genetics; D004279:DNA, Viral / Q000235:genetics; D016679:Genome, Viral; D018259:Herpesvirus 1, Human / Q000235:genetics; D015233:Models, Statistical; D010363:Pattern Recognition, Automated; D012441:Saccharomyces cerevisiae / Q000235:genetics; D017422:Sequence Analysis, DNA / Q000706:statistics & numerical data*
chemical_list: D004271:DNA, Fungal; D004279:DNA, Viral