Lecture Notes in Bioinformatics
4645
Edited by S. Istrail, P. Pevzner, and M. Waterman Editorial Board: A. Apostolico S. Brunak M. Gelfand T. Lengauer S. Miyano G. Myers M.-F. Sagot D. Sankoff R. Shamir T. Speed M. Vingron W. Wong
Subseries of Lecture Notes in Computer Science
Raffaele Giancarlo Sridhar Hannenhalli (Eds.)
Algorithms in Bioinformatics 7th International Workshop, WABI 2007 Philadelphia, PA, USA, September 8-9, 2007 Proceedings
13
Series Editors Sorin Istrail, Brown University, Providence, RI, USA Pavel Pevzner, University of California, San Diego, CA, USA Michael Waterman, University of Southern California, Los Angeles, CA, USA Volume Editors Raffaele Giancarlo Università degli Studi di Palermo Department of Mathematics via Archirafi 34, 90123 Palermo, Italy E-mail:
[email protected] Sridhar Hannenhalli University of Pennsylvania Penn Center for Bioinformatics and Department of Genetics 1409 Blockley Hall, 423 Guardian Drive, Philadelphia, PA 19104-6021, USA E-mail:
[email protected]
Library of Congress Control Number: 2007932232
CR Subject Classification (1998): F.1, F.2.2, E.1, G.1-3, J.3 LNCS Sublibrary: SL 8 – Bioinformatics ISSN ISBN-10 ISBN-13
0302-9743 3-540-74125-9 Springer Berlin Heidelberg New York 978-3-540-74125-1 Springer Berlin Heidelberg New York
This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting, reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer. Violations are liable to prosecution under the German Copyright Law. Springer is a part of Springer Science+Business Media springer.com © Springer-Verlag Berlin Heidelberg 2007 Printed in Germany Typesetting: Camera-ready by author, data conversion by Scientific Publishing Services, Chennai, India Printed on acid-free paper SPIN: 12103256 06/3180 543210
Preface
We are very pleased to present the proceedings of the Seventh Workshop on Algorithms in Bioinformatics (WABI 2007), which took place in Philadelphia, September 8–9, 2007, under the auspices of the International Society for Computational Biology (ISCB), the European Association for Theoretical Computer Science (EATCS), the Penn Genomics Institute and the Penn Center for Bioinformatics. The Workshop on Algorithms in Bioinformatics covers research in all aspects of algorithmic work in bioinformatics. The emphasis is on discrete algorithms that address important problems in molecular biology, that are founded on sound models, that are computationally efficient, and that have been implemented and tested in simulations and on real datasets. The goal is to present recent research results, including significant work-in-progress, and to identify and explore directions of future research. Specific topics of interest include, but are not limited to: – Exact, approximate, and machine-learning algorithms for genomics, sequence analysis, gene and signal recognition, alignment, molecular evolution, polymorphisms and population genetics, protein and RNA structure determination or prediction, gene expression and gene networks, proteomics, functional genomics, and drug design. – Methods, software and dataset repositories for development and testing of such algorithms and their underlying models. – High-performance approaches to computationally hard problems in bioinformatics, particularly optimization problems. A major goal of the workshop is to bring together researchers in areas spanning the range from abstract algorithm design to biological dataset analysis, so as to enable a dialogue between application specialists and algorithm designers, mediated by algorithm engineers and high-performance computing specialists. We believe that such a dialogue is necessary for the progress of computational biology, inasmuch as application specialists cannot analyze their datasets without fast and robust algorithms and, conversely, algorithm designers cannot produce useful algorithms without being conversant with the problems faced by biologists. Part of this mix has been achieved for all seven WABI events. For six of them, WABI was collocated with the European Symposium on Algorithms (ESA), along with other occasional conferences or workshops, so as to form the interdisciplinary scientific meeting known as ALGO. As agreed by the WABI and ALGO Steering Committees, starting this year WABI will be part of ALGO only every two years, alternating between Europe and other continents. We received 133 submissions in response to our call for WABI 2007 and were able to accept 37 of them, ranging from mathematical tools to experimental studies of approximation algorithms and reports on significant computational analyses. Numerous biological problems were dealt with, including genetic mapping,
VI
Preface
sequence alignment and sequence analysis, phylogeny, comparative genomics, and protein structure. Both machine-learning and combinatorial optimization approaches to algorithmic problems in bioinformatics were represented. We want to thank all authors for submitting their work to the workshop and all presenters and attendees for their participation. We were particularly fortunate in enlisting the help of a very distinguished panel of researchers for our Program Committee, which undoubtedly accounts for the large number of submissions and the high quality of the presentations. Our sincere thanks go to all: Piotr Berman, Penn. State U., USA Mathieu Blanchette, McGill U., Canada Paola Bonizzoni, U. Milano-Bicocca, Italy Philipp B¨ ucher, EPFL, Switzerland Rita Casadio, U. Bologna, Italy Maxime Crochemore, U. Marne-la-Vall´ee, France Nadia El-Mabrouk, U. Montr´eal, Canada Liliana Florea, George Washington U., USA Olivier Gascuel, LIRMM-CNRS, France David Gilbert, U. Glasgow, UK Concettina Guerra, U. Padova, Italy & Georgia Tech, USA Roderico Guigo, CRG, U. Barcelona, Spain Daniel Huson, U. T¨ ubingen, Germany Shane Jensen, U. Penn., USA Jens Lagergren, KTH Stokholm, Sweden Arthur Lesk, Penn. State U., USA Ming Li, U. Waterloo, Canada Stefano Lonardi, UC Riverside, USA Webb Miller, Penn. State U., USA Satoru Miyano, Tokyo U., Japan Bernard Moret, EPFL, Switzerland Burkhard Morgenstern, U. G¨ ottingen, Germany Gene Myers, HHMI Janelia Farms, USA Uwe Ohler, Duke U., USA Laxmi Parida, IBM T.J. Watson Research Center, USA Kunsoo Park, Seoul National U., S. Korea Graziano Pesole, U. Bari, Italy Ron Pinter, Technion, Israel Cinzia Pizzi, INRIA, France Knut Reinert, Freie U. Berlin, Germany Mikhail Roytberg, Russian Academy of Sciences, Russia Marie France Sagot, INRIA, France David Sankoff, U. Ottawa, Canada Roded Sharan, Tel-Aviv U., Israel
Preface
VII
Adam Siepel, Cornell U., USA Mona Singh, Princeton U., USA Saurabh Sinha, UIUC, USA Steven Skiena, SUNY Stony Brook, USA Peter Stadler, U. Leipzig, Germany Jens Stoye, U. Bielefeld, Germany Granger Sutton, J. Craig Venter Institute, USA Anna Tramontano, U. Roma “La Sapienza”, Italy Olga Troyanskaya, Princeton U., USA Alfonso Valencia, U. Autonoma, Spain Gabriel Valiente, Tech U. Catalonia, Spain Li-San Wang, U. Penn., USA Lusheng Wang, City U. Hong Kong, Hong Kong Haim Wolfson, Tel-Aviv U., Israel We would also like to thank Alessandra Gabriele, Giusu´e Lo Bosco and Cesare Valenti, all of University of Palermo, for providing assistance in assembling this volume. Last but not least, we thank Junhyong Kim and his colleagues Stephen Fisher and Li-San Wang, all at U. Penn, for doing a superb job of organizing the first edition of the conference in the USA and for the continuous technical support during all phases of the conference. We hope that you will consider contributing to future WABI events, through a submission or by participating in the workshop. September 2007
Raffaele Giancarlo Sridhar Hannenhalli
Organization
The WABI 2007 Program Committee gratefully acknowledges the valuable input received from the following external Reviewers: Edo Airoldi J. A. Amgarten Quitzau Lars Arvestad Marie-Pierre B´eal Vincent Berry Enrique Blanco Guillaume Blin Serdar Bozdag Kajia Cao Ildefonso Cases Robert Castelo Cedric Chauve Giovanni Ciriello Jordi Cortadella Gianluca Della Vedova Pietro Di Lena Riccardo Dondi Iakes Ezkurdia Piero Fariselli Alfredo Ferro Oxana Galzitskaia Claudio Garutti Stoyan Georgiev Robert Giegerich Osvaldo Gra˜ na Clemens Gr¨ opl Roderic Guigo i Serra Bjarni Halldorsson Michael Hallett Sylvie Hamel Elena Harris
Robert Harris M. Helmer-Citterich Matthew Hibbs Curtis Huttenhower Seiya Imoto Yuval Inbar Dmitry Ivankov Katharina Jahn Jieun Jeong Tao Jiang Raya Khanin Jong Kim Gunnar W. Klau Tobias Kloepper Arun Konagurthu Mathieu Lajoie Florian Leitner Gonzalo Lopez Antoni Lozano Bill Majoros Mohamed Manal Florian Markowetz Pier Luigi Martelli David Martin Efrat Mashiach Jon McAuliffe Julia Mixtacki Chad Myers Luay Nakhleh Heiko Neuweger Giulio Pavesi
Ernesto Picardi M. Sohel Rahman Sven Rahmann Vincent Ranwez Christian Rausch Antonio Rausell Daniel Richter Romeo Rizzi Jairo Rocha Allen Rodrigo Oleg Rokhlenko Ivan Rossi Bengt Sennblad Maria Serna Maxim Shatsky Tomer Shlomi Michael Shmoish A. Shulman-Peleg Jijun Tang Ali Tofigh Vladimir Vacic Marco Vassura Stphane Vialette Jordi Villa i Freixa Robert Warren Tobias Wittkop Stefan Wolfsheimer Yonghui Wu Joseph Wun-Tat Chan Nir Yosef
Table of Contents
Shotgun Protein Sequencing (Keynote) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pavel A. Pevzner
1
Locality Kernels for Protein Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . Evgeni Tsivtsivadze, Jorma Boberg, and Tapio Salakoski
2
When Less Is More: Improving Classification of Protein Families with a Minimal Set of Global Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Roy Varshavsky, Menachem Fromer, Amit Man, and Michal Linial
12
Fault Tolerance for Large Scale Protein 3D Reconstruction from Contact Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Marco Vassura, Luciano Margara, Pietro Di Lena, Filippo Medri, Piero Fariselli, and Rita Casadio Bringing Folding Pathways into Strand Pairing Prediction . . . . . . . . . . . . . Jieun K. Jeong, Piotr Berman, and Teresa M. Przytycka A Fast and Accurate Heuristic for the Single Individual SNP Haplotyping Problem with Many Gaps, High Reading Error Rate and Low Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Loredana M. Genovese, Filippo Geraci, and Marco Pellegrini
25
38
49
Two Birds, One Stone: Selecting Functionally Informative Tag SNPs for Disease Association Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Phil Hyoun Lee and Hagit Shatkay
61
Genotype Error Detection Using Hidden Markov Models of Haplotype Diversity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Justin Kennedy, Ion M˘ andoiu, and Bogdan Pa¸saniuc
73
Haplotype Inference Via Hierarchical Genotype Parsing . . . . . . . . . . . . . . . Pasi Rastas and Esko Ukkonen
85
Seeded Tree Alignment and Planar Tanglegram Layout . . . . . . . . . . . . . . . Antoni Lozano, Ron Y. Pinter, Oleg Rokhlenko, Gabriel Valiente, and Michal Ziv-Ukelson
98
Inferring Models of Rearrangements, Recombinations, and Horizontal Transfers by the Minimum Evolution Criterion (Extended Abstract) . . . . Hadas Birin, Zohar Gal-Or, Isaac Elias, and Tamir Tuller
111
An Ω(n2 / log n) Speed-Up of TBR Heuristics for the Gene-Duplication Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mukul S. Bansal and Oliver Eulenstein
124
XII
Table of Contents
Incremental Discovery of Irredundant Motif Bases in Time O(|Σ|n2 log n) (Extended Abstract) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Alberto Apostolico and Claudia Tagliacollo
136
A Graph Clustering Approach to Weak Motif Recognition . . . . . . . . . . . . . Christina Boucher, Daniel G. Brown, and Paul Church
149
Informative Motifs in Protein Family Alignments . . . . . . . . . . . . . . . . . . . . Hatice Gulcin Ozer and William C. Ray
161
Topology Independent Protein Structural Alignment . . . . . . . . . . . . . . . . Joe Dundas, T.A. Binkowski, Bhaskar DasGupta, and Jie Liang
171
Generalized Pattern Search and Mesh Adaptive Direct Search Algorithms for Protein Structure Prediction . . . . . . . . . . . . . . . . . . . . . . . . . Giuseppe Nicosia and Giovanni Stracquadanio
183
Alignment-Free Local Structural Search by Writhe Decomposition . . . . . . Degui Zhi, Maxim Shatsky, and Steven E. Brenner
194
Defining and Computing Optimum RMSD for Gapped Multiple Structure Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Xueyi Wang and Jack Snoeyink
196
Using Protein Domains to Improve the Accuracy of Ab Initio Gene Finding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mihaela Pertea and Steven L. Salzberg
208
Genomic Signatures in De Bruijn Chains . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lenwood S. Heath and Amrita Pati
216
Fast Kernel Methods for SVM Sequence Classifiers . . . . . . . . . . . . . . . . . . . Pavel Kuksa and Vladimir Pavlovic
228
On-Line Viterbi Algorithm for Analysis of Long Biological Sequences . . . ˇ amek, Broˇ Rastislav Sr´ na Brejov´ a, and Tom´ aˇs Vinaˇr
240
Predicting Protein Folding Kinetics Via Temporal Logic Model Checking (Extended Abstract) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Christopher James Langmead and Sumit Kumar Jha
252
Efficient Algorithms to Explore Conformation Spaces of Flexible Protein Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ankur Dhanik, Peggy Yao, Nathan Marz, Ryan Propper, Charles Kou, Guanfeng Liu, Henry van den Bedem, and Jean-Claude Latombe Algorithms for the Extraction of Synteny Blocks from Comparative Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Vicky Choi, Chunfang Zheng, Qian Zhu, and David Sankoff
265
277
Table of Contents
Computability of Models for Sequence Assembly . . . . . . . . . . . . . . . . . . . . . Paul Medvedev, Konstantinos Georgiou, Gene Myers, and Michael Brudno
XIII
289
Fast Algorithms for Selecting Specific siRNA in Complete mRNA Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jaime Davila, Sudha Balla, and Sanguthevar Rajasekaran
302
RNA Folding Including Pseudoknots: A New Parameterized Algorithm and Improved Upper Bound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chunmei Liu, Yinglei Song, and Louis Shapiro
310
HFold: RNA Pseudoknotted Secondary Structure Prediction Using Hierarchical Folding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hosna Jabbari, Anne Condon, Ana Pop, Cristina Pop, and Yinglei Zhao
323
Homology Search with Fragmented Nucleic Acid Sequence Patterns . . . . Axel Mosig, Julian J.-L. Chen, and Peter F. Stadler
335
Fast Computation of Good Multiple Spaced Seeds . . . . . . . . . . . . . . . . . . . . Lucian Ilie and Silvana Ilie
346
Inverse Sequence Alignment from Partial Examples . . . . . . . . . . . . . . . . . . . Eagu Kim and John Kececioglu
359
Novel Approaches in Psychiatric Genomics (Keynote) . . . . . . . . . . . . . . . . Maja Bucan
371
The Point Placement Problem on a Line – Improved Bounds for Pairwise Distance Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Francis Y.L. Chin, Henry C.M. Leung, W.K. Sung, and S.M. Yiu
372
Efficient Computational Design of Tiling Arrays Using a Shortest Path Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Alexander Schliep and Roland Krause
383
Efficient and Accurate Construction of Genetic Linkage Maps from Noisy and Missing Genotyping Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Yonghui Wu, Prasanna Bhat, Timothy J. Close, and Stefano Lonardi
395
A Novel Method for Signal Transduction Network Inference from Indirect Experimental Evidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . R´eka Albert, Bhaskar DasGupta, Riccardo Dondi, Sema Kachalo, Eduardo Sontag, Alexander Zelikovsky, and Kelly Westbrooks
407
Composing Globally Consistent Pathway Parameter Estimates Through Belief Propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Geoffrey Koh, Lisa Tucker-Kellogg, David Hsu, and P.S. Thiagarajan
420
Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
431
Shotgun Protein Sequencing Pavel A. Pevzner Ronald R. Taylor Professor of Computer Science, University of California, San Diego, La Jolla, CA 92093
Abstract. Despite significant advances in the identification of known proteins, the analysis of unknown proteins by tandem mass spectrometry (MS/MS) still remains a challenging open problem. Although Klaus Biemann recognized the potential of mass spectrometry for sequencing of unknown proteins in the 1980s, low-throughput Edman degradation followed by cloning still remains the main method to sequence unknown proteins. The automated spectral interpretation has been limited by a focus on individual spectra and has not capitalized on the information contained in spectra of overlapping peptides. Indeed, the powerful Shotgun DNA Sequencing strategies have not been extended to protein sequencing yet. We demonstrate, for the first time, the feasibility of Shotgun Protein Sequencing of protein mixtures and validate this approach by generating highly accurate de novo reconstructions of various proteins in western diamondback rattlesnake venom. We further argue that Shotgun Protein Sequencing has the potential to overcome the limitations of current protein sequencing approaches and thus catalyze the otherwise impractical applications of proteomics methodologies in studies of unknown proteins. We further describe applications of this technique to analyzing proteins that are not directly inscribed in DNA sequences (like antibodies and fusion proteins in cancer). This is a joint work with Nuno Bandeira (UCSD) and Karl Clauser (Broad).
R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, p. 1, 2007. c Springer-Verlag Berlin Heidelberg 2007
Locality Kernels for Protein Classification Evgeni Tsivtsivadze, Jorma Boberg, and Tapio Salakoski Turku Centre for Computer Science (TUCS) Department of Information Technology, University of Turku Joukahaisenkatu 3-5 B, FIN-20520 Turku, Finland
[email protected]
Abstract. We propose kernels that take advantage of local correlations in sequential data and present their application to the protein classification problem. Our locality kernels measure protein sequence similarities within a small window constructed around matching amino acids. The kernels incorporate positional information of the amino acids inside the window and allow a range of position dependent similarity evaluations. We use these kernels with regularized least-squares algorithm (RLS) for protein classification on the SCOP database. Our experiments demonstrate that the locality kernels perform significantly better than the spectrum and the mismatch kernels. When used together with RLS, performance of the locality kernels is comparable with some state-of-the-art methods of protein classification and remote homology detection.
1
Introduction
One important task in computational biology is inference of the structure and function of the protein encoded in the genome. The similarity of protein sequences may imply structural and functional similarity. The task of detecting these similarities can be formalized as a classification problem that treats proteins as a set of labeled examples which are in positive class if they belong to the same family and are in negative class otherwise. Recently, applicability of this discriminative approach for detecting remote protein homologies has been demonstrated by several studies. For example, Jaakkola et al. [1] show that by combining discriminative learning algorithm and Fisher kernel for extraction of the relevant features it is possible to achieve a good performance in protein family recognition. Liao and Noble [2] further improve results presented in [1] by proposing combination of pairwise sequence similarity feature vectors with Support Vector Machines (SVM) algorithm. Their algorithm called SVM-pairwise is performing significantly better than several other baseline methods such as SVM-Fisher, PSI-BLAST and profile HMMs. The methods described in [1] and [2] use an expensive step of generating vector valued features for protein discrimination problems, which increases computational time of the algorithm. The idea to use a simple kernel function that can be efficiently computed and does not depend on any generative model or separate preprocessing step is considered by Leslie et al. in [3]. They show that R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 2–11, 2007. c Springer-Verlag Berlin Heidelberg 2007
Locality Kernels for Protein Classification
3
simple sequence based kernel functions perform surprisingly well compared to other computationally expensive approaches. In this study, we address the problem of protein sequence classification using the RLS algorithm with locality kernels similar to the one we proposed in [4]. The features used by the locality kernels represent sequences contained in a small window constructed around matching amino acids in the compared proteins. The kernels make use of the range of similarity evaluations within the windows, namely position insensitive matching: amino acids that match are taken into account irrespective of their position, position sensitive matching: amino acids that match but have different positions are penalized, strict matching: only amino acids that match and have the same positions are taken into account. By incorporating information about relevance of local correlations and positions of amino acids in the sequence into the kernel function, we demonstrate significantly better performance in protein classification on Structural Classification of Proteins (SCOP) database [5] than that of the spectrum and the mismatch kernels [3,6,7]. Previously, we have shown that the locality-convolution kernel [4] can be successfully applied to parse ranking task in natural language processing. The similarity of the data representation in cases of biological sequence and text, as well as results obtained in this study, suggest that locality kernels can be applied to tasks where local correlations and positional information within the sequence might be important. The paper is organized as follows. In Section 2, we present overview of the RLS algorithm. In Section 3, we define notions of locality window, positional matching, and present locality kernels. In Section 5, we evaluate the applicability of the locality kernels for the task of protein classification and compare their performance with the spectrum and the mismatch kernels. We conclude this paper in Section 6.
2
Regularized Least-Squares Algorithm
Let {(x1 , y1 ), . . . , (xt , yt )}, where xi = (x1 , . . . , xn )T , xi ∈ S and yi ∈ {0, 1} be the set of training examples. The target output value yi is a label value which is either 0, indicating that xi does not belong to the class or 1 otherwise. The target output value is predicted by the regularized least-squares (RLS) algorithm T [8,9]. We denote a matrix whose rows are xT 1 , . . . , xt as X and a vector of output labels as y = (y1 , . . . yt )T . The RLS algorithm corresponds to solving following optimization problem: min w
t
(yi − f (xi ))2 + λw2 ,
(1)
i=1
where f : S → R, w ∈ Rn is a vector of parameters such that f (x) = w, x, and λ ∈ R+ is a regularization parameter that controls the trade-off between fitting the training set accurately and finding the smallest norm for the function f .
4
E. Tsivtsivadze, J. Boberg, and T. Salakoski
Rewriting (1) in matrix form and taking derivative with respect to w, we obtain w = (X T X + λI)−1 X T y,
(2)
where I denotes identity matrix of dimension n × n. In (2) we must perform matrix inverse in dimension of feature space, that is n × n. However, if the number of features is much larger than the number of training data points, a more efficient way is to perform inverse in the dimension of training examples. In that case, following [9], we present (2) as a linear combination of training data points: t w= ai xi , (3) i=1
where a = (K + λI)−1 y
(4)
and Kij = k(xi , xj ) is a kernel matrix that contains the pairwise similarities of data points computed by a kernel function k : S × S → R. Finally, we predict an output of new data point as follows: f (x) = w, x = yT (K + λI)−1 k,
(5)
where ki = k(xi , x). Kernel functions are similarity measures of data points in the input space S, and they correspond to the inner product in a feature space H to which the input space data points are mapped. The kernel functions are defined as k(xi , xj ) = Φ(xi ), Φ(xj ), where Φ : S → H. Next we formulate the locality kernel functions that are used with the RLS algorithm for protein classification task.
3
Locality Kernels
There are three key properties of the locality kernels that make them applicable to the task of remote homology detection in the proteins. Firstly, the features used by these kernels contain amino acids that are extracted in the order of their appearance in the protein sequence. Secondly, local correlations within the protein sequence are taken into account by constructing a small window around the matching amino acids. Finally, positional information of the amino acids contained within window is used for similarity evaluation. Let us consider proteins p, q and let p = (p1 , . . . , p|p| ) and q = (q1 , . . . , q|q| ) be their amino acid sequences. The similarity of p and q is obtained with kernel k(p, q) =
|p| |q| i=1 j=1
κ(i, j).
(6)
Locality Kernels for Protein Classification
5
By defining κ in the general formulation (6), we obtain different similarity functions between proteins. If we set κ(i, j) = δ(pi , qj ), where δ(x, y) =
0, if x = y 1, if x = y
then (6) equals to the number of matching amino acids irrespective of their position in two sequences. To take into account local correlations within a sequence, we construct small windows of length 2w + 1 around the matching amino acids. In addition we define real valued (2w + 1) × (2w + 1) matrix P that we use in the formulation of κ. The positional matrix P stores information about relevance of particular position in compared windows for the similarity evaluation task (see [10] for a related approach). Entries of P contain real valued coefficients that are defined for all possible position pairs within two windows. Below we propose several ways for selecting appropriate P for the task in question. Let us consider following kernel function: κ(i, j) = δ(pi , qj )
w
[P ]h,l δ(pi+h , qj+l ).
(7)
h,l=−w
Note that the rows and the columns of the positional matrix P are indexed from −w to w. Furthermore, we consider amino acids as mismatched when the indices i + h and j + l are not valid, e.g. i + h < 1 or i + h > |p|. When we set P = A, where A is a matrix whose all elements are ones, we get κ that counts the matching amino acids irrespective of their positions in the two windows. As another alternative, we can construct a function that requires the positions of matching amino acid to be exactly the same. This is obtained by P = I, where I denotes the identity matrix. Furthermore, when P is a diagonal matrix whose elements are weights increasing from the boundary to the center of the window, we obtain a kernel that is related to the locality improved kernel proposed in [11]. However, if we do not require strict position matching, but rather penalize matches that have a different position within the windows, we can use a positional similarity matrix whose off-diagonal elements are nonzero and smaller than the diagonal elements. We obtain such a matrix, for example, by [P ]h,l = e−
(h−l)2 2θ2
,
(8)
where θ ≥ 0 is a parameter. The choice of an appropriate κ is a matter closely related to the domain of the study. In Section 5 we show that positional information captured with (7) is useful and improves the classification performance. When using (7) with different positional matrices in (6), we obtain the kernels which we call the locality kernels. Due to the kernel closure properties and positive semidefiniteness of matrix P , the locality kernels are indeed valid kernel functions. Our kernels could be considered within more general convolution
6
E. Tsivtsivadze, J. Boberg, and T. Salakoski
framework described by Haussler [12]. From this point of view, we can distinguish between “structures” and “different decompositions” constructed by our kernels. Informally, we are enumerating all the substructures representing pairs of windows built around the matching amino acids in the proteins and calculating their similarity.
4
Spectrum and Mismatch Kernels
The spectrum kernel introduced in [3] (see also [9]) is very efficient kernel for sequence similarity estimation. It compares two sequences by counting the common contiguous subsequences of length v that are contained in both of them. Thus, the spectrum kernel can be considered as an inner product between vectors containing frequencies of the matching subsequences. For consistency, we present the spectrum and the mismatch kernels within already described framework for the locality kernels. For detailed feature map of these kernels, we refer to [7]. The spectrum kernel is obtained by using κ(i, j) =
v−1
δ(pi+l , qj+l ),
(9)
l=0
in (6). Leslie et al. [6] also proposed a more sensitive kernel function called the mismatch kernel. The intuition behind this approach is that similarity between two sequences is large if they share many similar subsequences. By restricting number of mismatches to m between the subsequences of length v, the (v, m)-mismatch kernel is obtained by using v−1 0, if l=0 δ(pi+l , qj+l ) < v − m κ(i, j) = (10) 1, otherwise in (6). The spectrum kernel (9) is a special case of the mismatch kernel where m = 0. Again, we consider amino acids as mismatched in (9) and (10), when the indices i + l and j + l are not valid, that is, i + l > |p| or j + l > |q|.
5
Experiments
The experiments to evaluate performance of RLS with the locality kernels, the spectrum kernel, and the (v, m)-mismatch kernel are conducted on the SCOP [5] database. The aim is to classify protein domains into SCOP-superfamilies. We follow the experimental setup and use the dataset described in [2]. For each family, the protein domains within the family are considered positive test examples, and protein domains outside the family but within the same superfamily are considered as positive training examples. Negative examples are taken from outside of the positive sequences’ fold and are randomly split into training and
Locality Kernels for Protein Classification
7
testing sets in the same ratio as positive examples. By this setup, we may simulate remote homology detection, because protein sequences belonging to different families but to the same superfamily are considered to be remote homologs in SCOP. To measure performance of the methods, we use receiver operating characteristics (ROC) scores. The ROC score is the normalized area under a curve (AUC) that represents true positives as a function of false positives for varying classification thresholds [13,14]. When obtaining perfect classification, the ROC score is 1, and the random classification yields score of 0.5. In Table 1, we present the best found parameters for the locality kernels with different positional matrices P , the spectrum and the (v, m)-mismatch kernels. The best found size of the window for the locality kernel is three (w = 1). The spectrum kernel has a parameter v corresponding to the size of subsequence and the mismatch kernel uses v and m, where m is the maximum number of allowed mismatches. The best found parameters for the spectrum and the mismatch kernels correspond to the ones reported in [3,6]. The RLS algorithm has the regularization parameter λ that controls the trade-off between the minimization of the training error and the complexity of the regression function. The results reported below are obtained with the best found combination of the parameters for every method. The main results of the experiments are summarized in Figure 1. Each curve corresponds to RLS with specific kernel function for remote homology detection. Higher curves reflect more accurate classification performance. Each plotted data point represents the number of the families that have ROC score higher than the corresponding value. We observe that RLS with the position sensitive locality kernel with positional matrix (8) performs significantly better (p < 0.05) than RLS with the spectrum or the mismatch kernels. We evaluate statistical significance of the performance differences using Wilcoxon signed-ranks test. The locality kernel using positional matrix P = I and a small window slightly looses to position sensitive locality kernel with matrix (8) in performance, whereas position insensitive locality kernel performs worst of all. Therefore, we do not present these results in Figure 1. We also observe that for the few families that are classified with high scores by all kernels the mismatch kernel is the best, however, for the rest of the families the locality kernel outperforms both the spectrum and the mismatch kernel. In Figures 2 and 3 we give more detailed performance comparison of the locality, the spectrum and the mismatch kernels. Clearly, the classification Table 1. The best found parameters used for conducting the experiments Kernel Positional matrix P =A (h−l)2 (7) − [P ]h,l = e 2θ2 P =I (9) (10)
Best parameters w=1
Figures
w = 1, θ = 0.9 1, 2 and 3 w=1 v=3 1 and 2 m = 1, v = 6 and m = 2, v = 8 1 and 3
8
E. Tsivtsivadze, J. Boberg, and T. Salakoski 60
Number of families
50
40
30
(3)-Spectrum kernel
20
Locality kernel (position sensitive) 10
(8,2)-Mismatch kernel (6,1)-Mismatch kernel
0 0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
ROC score
Fig. 1. Performance comparison of RLS with the locality (position sensitive), the spectrum (subsequences of length 3) and the mismatch (subsequences of length 6 and 8, and number of mismatches 1 and 2, respectively) kernels for remote homology detection using 54 families of the SCOP database. Each data point on the curve represents the number of the families having higher ROC score for the method. 1 0.9 0.8
(3)-Spectrum kernel
0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Locality kernel (position sensitive)
Fig. 2. Family-by-family performance comparison of RLS with the spectrum (subsequences of length 3) and the locality (position sensitive) kernels. The coordinates of each point are ROC scores obtained for one SCOP family.
Locality Kernels for Protein Classification
9
1 0.9 0.8
(8,2)-Mismatch kernel
0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Locality kernel (position sensitive)
Fig. 3. Family-by-family performance comparison of RLS with the mismatch (subsequences of length 8, number of mismatches 2) and the locality (position sensitive) kernels. The coordinates of each point are ROC scores obtained for one SCOP family.
performance when using the position sensitive locality kernel is better than that of the spectrum and the mismatch kernels. In addition to the conducted experiments, we evaluated performance of the blended spectrum kernel [9], that is all subsequences of sizes from one to v are simultaneously compared, when measuring similarities between the proteins. However, performance of the blended spectrum kernel is not notably better than that of the spectrum kernel and its computation requires more time.
6
Conclusions
In this study, we propose kernels that take advantage of local correlations and positional information in sequential data and present their application to the protein classification problem. The locality kernels measure the protein similarities within a small window constructed around matching amino acids in both sequences. These kernels make use of the range of similarity evaluations within the windows, namely position insensitive matching, position sensitive matching, and strict matching. We demonstrate that RLS with our locality kernels performs significantly better than RLS with the spectrum or the mismatch kernels in recognition of previously unseen families from the SCOP database. Throughout our experiments we observe that the locality kernels incorporating positional information
10
E. Tsivtsivadze, J. Boberg, and T. Salakoski
perform better than the locality kernels that are insensitive to the positions of the amino acids within the windows containing protein subsequences. Although, we do not conduct experiments to compare performance of RLS with the locality kernels to other algorithms, by examining the results reported in [2,3,15], we may suggest that our method performs comparably with some state-of-the-art algorithms used for remote homology detection and protein classification. Moreover, our simple method does not require expensive step of generating vector valued features used in algorithms such as SVM-pairwise or SVM-Fisher. In the future we plan to cast classification problem of protein sequences as a bipartite ranking task and we aim to obtain better classification performance by maximizing AUC instead of minimizing least squares error.
Acknowledgments We would like to thank CSC, Finnish IT center for science, for providing us computing resources.
References 1. Jaakkola, T., Diekhans, M., Haussler, D.: A discriminative framework for detecting remote protein homologies. Journal of Computational Biology 7, 95–114 (2000) 2. Liao, L., Noble, W.S.: Combining pairwise sequence similarity and support vector machines for detecting remote protein evolutionary and structural relationships. Journal of Computational Biology 10, 857–868 (2003) 3. Leslie, C., Eskin, E., Noble, W.S.: The spectrum kernel: A string kernel for svm protein classification. In: Pacific Symposium on Biocomputing, pp. 566–575 (2002) 4. Tsivtsivadze, E., Pahikkala, T., Boberg, J., Salakoski, T.: Locality-convolution kernel and its application to dependency parse ranking. In: Ali, M., Dapoigny, R. (eds.) IEA/AIE 2006. LNCS (LNAI), vol. 4031, pp. 610–618. Springer, Heidelberg (2006) 5. Hubbard, T.J.P., Murzin, A.G., Brenner, S.E., Chothia, C.: Scop: a structural classification of proteins database. Nucleic Acids Research 25, 236–239 (1997) 6. Leslie, C.S., Eskin, E., Cohen, A., Weston, J., Noble, W.S.: Mismatch string kernels for discriminative protein classification. Bioinformatics 20, 467–476 (2004) 7. Leslie, C., Kuang, R.: Fast string kernels using inexact matching for protein sequences. J. Mach. Learn. Res. 5, 1435–1455 (2004) 8. Poggio, T., Smale, S.: The mathematics of learning: Dealing with data. Amer. Math. Soc. Notice 50, 537–544 (2003) 9. Shawe-Taylor, J., Cristianini, N.: Kernel Methods for Pattern Analysis. Cambridge University Press, New York, USA (2004) 10. Pahikkala, T., Pyysalo, S., Ginter, F., Boberg, J., J¨ arvinen, J., Salakoski, T.: Kernels incorporating word positional information in natural language disambiguation tasks. In: Russell, I., Markov, Z. (eds.) Proceedings of the Eighteenth International Florida Artificial Intelligence Research Society Conference, Menlo Park, Ca., pp. 442–447. AAAI Press, Stanford, California, USA (2005) 11. Zien, A., Ratsch, G., Mika, S., Scholkopf, B., Lengauer, T., Muller, K.-R.: Engineering support vector machine kernels that recognize translation initiation sites. Bioinformatics 16, 799–807 (2000)
Locality Kernels for Protein Classification
11
12. Haussler, D.: Convolution kernels on discrete structures. Technical Report UCSCCRL-99-10, UC Santa Cruz (1999) 13. Gribskov, M., Robinson, N.L.: Use of receiver operating characteristic (roc) analysis to evaluate sequence matching. Computers & Chemistry 20, 25–33 (1996) 14. Fawcett, T.: Roc graphs: Notes and practical considerations for data mining researchers. Technical Report HPL-2003-4, HP Labs (2003) 15. Kuang, R., Ie, E., Wang, K., Wang, K., Siddiqi, M., Freund, Y., Leslie, C.: Profilebased string kernels for remote homology detection and motif extraction. J. Bioinform. Comput. Biol. 3, 527–550 (2005)
When Less Is More: Improving Classification of Protein Families with a Minimal Set of Global Features Roy Varshavsky1, , Menachem Fromer1 , Amit Man1 , and Michal Linial2 1
School of Computer Science and Engineering, The Hebrew University of Jerusalem 2 Department of Biological Chemistry, The Hebrew University of Jerusalem
[email protected]
Abstract. Sequence-derived structural and physicochemical features have been used to develop models for predicting protein families. Here, we test the hypothesis that high-level functional groups of proteins may be classified by a very small set of global features directly extracted from sequence alone. To test this, we represent each protein using a small number of normalized global sequence features and classify them into functional groups, using support vector machines (SVM). Furthermore, the contribution of specific subsets of features to the classification quality is thoroughly investigated. The representation of proteins using global features provides effective information for protein family classification, with comparable results to those obtained by representation using local sequence alignment scores. Furthermore, a combination of global and local sequence features significantly improves classification performance. Keywords and Abbreviations: Support Vector Machines (SVM), Feature Selection, Olfactory Receptor, Porins protein family.
1
Introduction
Protein classification is a central task in computational biology. A routinely-used principle in classification relies on a distance measure between protein sequences, as obtained by the Smith-Waterman local alignment algorithm or by one of a large number of heuristic search methods such as BLAST, PSI-BLAST [1], search by HMM [2, 3] models and by profile-profile search [4, 5]. These methods are typically based on matching subsequences, i.e. local sequence features. Despite the observed strength of these methods, many functional assignments for proteins fail to be detected by such local sequence-based methods [6], thus
Corresponding author. We thank David Horn for advising and guiding R.V, Nati Linial, Elon Portugaly and Yaniv Loewenstein for fruitful discussion. R.V and M.F are supported by the Sudarsky Center for Computational Biology of the Hebrew University of Jerusalem. This research was partially supported by a grant from the Israel Ministry of Defense. Supplementary Data and Code: www.protonet.cs.huji.ac.il/sequence_features.
R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 12–24, 2007. c Springer-Verlag Berlin Heidelberg 2007
When Less Is More: Improving Classification of Protein Families
13
yielding a larger than desired fraction of false negatives, especially at more coarse-grained (higher) levels of protein classification hierarchies. The shortcomings of the methods outlined above are partly derived from the fact that there exist many proteins that share very low sequence similarity and are thus considered to be in the ”twilight zone”, but nonetheless share strong structural similarity that reflects their homology [7]. Short proteins represent another set of proteins that often fail to be classified by their sequence similarity due to their low statistical significance scores [8]. Finally, for many proteins the sequence similarity methods fail in detecting related sequences and as a result, a large fraction of singletons are reported within the protein space [9]. An additional confounding factor is that, in practice, the large number of protein sequences currently available imposes a computational challenge for the protein family classification problem. Currently, > 4.5 million sequences are stored in the UniProt database, and this collection is expected to grow [10]. A reduction to 3 and to 1.5 million sequences is achieved by UniRef90 and UniRef50, respectively (i.e., no two sequences are permitted to share more than 90% or 50% identity, respectively). Since even such vast reductions in redundancy yield very large quantities of sequences, the power of the ubiquitously used local sequence similarity methods are severely strained. Similarly, each new multi-cellular eukaryotic genome sequenced introduces thousands of new sequences that wait for functional assignments, again burdening the local sequence similarity algorithms. To address the challenges in large-scale functional assignment, a complementary line of research has used a spectrum of sequence features ranging from amino acid (aa) composition to the appearance of short sequence motifs [11]. Besides perhaps improving upon the results of local-based methods, this research is expected to provide information for classification of more distantly related protein families, where local-based methods may often fail. One such attempt was presented by SVM-Prot [12]. The classification system was trained from representative proteins for ∼50 functional families extracted from Pfam [13]. Using a large number of features and an SVM classifier, high success in separating these protein families was reported. A different approach was carried out in [14], where a mixture of probabilistic decision trees for direct prediction of protein functions was applied. In [14], the proteins are represented by hundreds of features, including secondary structure assignment and structural-based information. Despite their success, these approaches do not always allow for interpretations and inferences based on the full interplay among features. In addition, the large set of features used could inadvertently conceal the fact that the prediction task is easier than it seems: it may be sufficient to consider only a small set of global features. While it may seem overly ambitious to expect the task of protein family classification to succeed based only on a small set of sequence features, similar features were successfully applied for restricted, but related, tasks. Successful examples include distinguishing membranous and globular proteins, separating sub-cellular localization, [15], determination of topology for multi-pass proteins [16], and even prediction of protein quaternary structure [17].
14
R. Varshavsky et al.
Herein we assume a minimalist feature-based approach, which for reductionismbased motivations does not take into account secondary or tertiary structure information, even when reliable predictions are available. Moreover, we ignore features derived from short motifs that are currently known to be associated with specific protein families, functions, or subcellular localizations. We thus address the following questions regarding a small set of easily extracted global sequence features: (i) Does there exist a small (minimal) set of features that provides high-quality protein family characterization? (ii) Is the information conveyed by global features redundant or, rather, complementary to that provided by the local features? (iii) And, more generally, are there some biological insights that predict the prototypical successes and failures of feature-based classifications? To define the minimal set of features sufficient for functional classification, we: (i) test the capacity of predetermined, small subsets of features, and (ii) incorporate machine learning tools (specifically, feature selection) to automatically determine those features. Feature selection is a fundamental component in large-scale data analysis as a preprocessing step. In general, preprocessing involves some operation on the feature-space intended to reduce the dimensionality. In feature selection, only a particular subset of features is chosen and used in subsequent computational tasks. There are two major classes of feature selection strategies: filters and wrappers. Filter methods rank and choose the features according to some criterion (e.g., data separation). Wrapper methods optimize an objective function, through the selection of features. For a comprehensive survey, see [18]. Herein, we apply one filter and two wrappers to the data.
2 2.1
Data and Methods Data
As a test case, we consider 10 large protein groups that represent the known diversity of cellular processes and functions. Protein sequences and annotationss were retrieved from the UniProt 8.1 database [10]. In order to avoid redundancy, we used the UniRef50 database [10]. Groups were selected based on Gene Ontology (GO) assignments [19], such that their sizes would range from 300–1000 proteins each. 5,471 proteins in total are included in the analysis (Table 1). 2.2
Preprocessing
We compare two alternative representations of these ∼5,500 proteins: either according to local sequence similarities, or according to global sequence features: 1. Local Sequence similarities All pairs of proteins were aligned using the Smith-Waterman (SW) local alignment algorithm [20]. Since the SW score is strongly dependent on protein length, the raw scores matrix was transformed to a matrix of normalized scaled scores, based on the percentile binning of scores in each column. As a result, the range of values in the scaled matrix is [0, 1]. Note that the column-by-column transformation yields an asymmetric matrix.
When Less Is More: Improving Classification of Protein Families
15
Table 1. Representative set of 10 groups derived from the GO systems: cellular component (CC), molecular function (MF) and biological process (BP) Group 1 2 3 4 5 6 7 8 9 10 Total
Type CC MF CC CC CC BP BP CC MF CC
CO Term name GO ID Group Size (UniRef50) Nucleosome 786 319 Olfactory receptor activity 4984 478 Vacuole 5773 533 Microtubule 5874 913 Plasma membrane 5886 781 Tricarboxylic acid cycle 6099 476 DNA unwinding duringreplication 6268 520 Thylakoid 9579 448 Porin activity 15288 644 Myosin complex 16459 359 5471
2. Global Sequence Features Extracting the features: Only features that are ”global” and can be applied to proteins with minimal biological pre-knowledge are included (e.g., the calculated isoelectric point of a protein). Biologically known signatures such as localization signals were not included. In summary, for each protein, 5 major attribute types (for a total of 70 features) are analyzed: Amino acid composition [AAC] (20 features). Amino acid grouped compositions [AAG] (11 features, see Table 3, Supplementary Data). Post-translational modifications [PTM] (14 features, see Table 4, Supplementary Data). The PTM signatures are treated as regular expressions. Such patterns have been extracted from the Prosite database [21]. Only PTMs that are highly abundant in the database are included. Biophysical properties of the full sequence [PHYS] (5 features): (a) (b) (c) (d)
Length - The number of amino acids in the sequence Molecular weight [22] predicted pI [22] Instability factor: based on the observation that the frequency of occurrence of certain dipeptides is significantly different in unstable proteins as compared to stable ones [23]. (e) ’Gravy’ hydrophobicity index [24] Amino acid enrichment [RICH] (20 features). We sampled an overlapping window of 20 aa in size, from the beginning of the sequence to the end. For each such window, the frequency of a certain aa was counted if it occurs at least 5 times its frequency in the UniProtKB database.
Scaling the features: Since the selected features represent properties that appear in vastly different representations (e.g., logarithmic scale for pI, percentage for AAC, frequency for RICH), we applied a scaling protocol by referring to a
16
R. Varshavsky et al.
background level of a randomly selected set of approximately 40K proteins from the UniProtKB database. For each of the 70 features the percentile bins of the background were computed. Each feature was transformed according to its percentile, yielding values in the range [0, 1]. We also applied the scaling using a background set of the 5,500 proteins in our set (Table 1) and the results were practically identical to that of the randomly selected background set. 2.3
Classification
Firstly, the 10 groups were randomly partitioned into 3 subsets (groups 1-4, 57, and 8-10), where it was attempted to separate each group of proteins from the other groups in its subset. The classification algorithm chosen for the task was SVM (linear kernel, one-against-all classification), which has been proven to be very efficient for this type of task (e.g. [12, 11]). For each dataset in every representation used, the following procedures were applied: 1. Random selection of the train (80%) and test (20%) sets. 2. Use the train set: train and validate SVM (5-fold Cross validation). 3. Apply the resulting classifier to the test set, for prediction and assessment. In order to reduce bias toward extreme train-test partitions, procedures 1-3 (which we refer to as the classification block ) were repeated 5 times (which we refer to as the classification compound ). 2.4
Feature Selection
We consider two strategies for selection of the global sequence features, applying the classification compound for each. Note that the selections and wrappings are applied only to the train set. – Selection based on a-priori knowledge. The original (scaled) dataset is partitioned according to the 5 different feature categories: AAC (20), AAG (11), PTM (14), PHYS (5) and RICH (20). – Supervised feature selection methods. Here, various approaches are applied: 1. Single-wise selection (GREEDY) – a filter method: the 70 features in the train set are ranked according to their t-test separability criterion – the first 10 features are selected. 2. Forward Filtering (FF) – a wrapper method, which starts out with 0 features and adds the most contributing feature to the predictive score (Jaccard, see below) of the train set. Feature addition is continued until no improvement in the score is achieved. 3. Backward Elimination (BE) – a wrapper method, which starts out with all features and removes the least contributing feature to the predictive score (Jaccard, see below) of the train set. Feature removal is continued until no improvement in the score is achieved.
When Less Is More: Improving Classification of Protein Families
2.5
17
Evaluation
For each classification block, TP, TN, FP, and FN counts are recorded (where TP, TN, FP, and FN denote the number of true positive, true negative, false positive, and false negative outcomes, respectively (detailed tables of all values appear in the Supplementary Data). We have applied the strict Jaccard score (J-score) that combines precision (specificity) and recall (sensitivity), but does not take into account the TN. The J-score is defined as: J = TP/(TP+FP+FN).
3
Results
In order to demonstrate both the strengths and limitations of the framework, we describe the results for two example groups. Detailing both computational and biological aspects, we demonstrate different scenarios that directly derive from the groups’ characterization (for the remaining 8 groups, see Supplementary Data); we then discuss the overall patterns, suggest a unique feature combination platform and draw some conclusions. We analyzed large sets of proteins based on their GO annotations. For representative sets, we ensured that their sizes (at a level of lower than 50% identity for any pair in the set) ranged from 300-1000 and that, overall, they represent a broad range of functionality of enzymes, membranous components (olfactory and transporters), cytoskeletal elements (myosin) and compartment-based annotations (i.e. vacuole). 3.1
Olfactory Receptor Activity Proteins
The first group we consider is the olfactory receptor activity proteins, consisting of ∼500 proteins (3,900 proteins in UniProtKB), which are cell surface receptors that recognize chemical compounds (odorants). Odorant binding to its cognate receptor leads to membrane depolarization, activating a signaling cascade. Could we gain any insight into the group, by revisiting the features selected to separate it from the other groups tested? Here, the FF approach performs almost as well as using all features (0.89 and 0.91, respectively, Fig. 1). Only 8 features are chosen by FF: AAG (hydrophilic), AAC (G), RICH (Y), PHYS (instability), AAC (T), AAG (sulfur-containing), AAC (V), and AAG (helix-redundant aa). The most powerful feature selected under the FF protocol marks the hydrophilic nature of this protein group. Even though the olfactory receptors are characterized by their seven membrane-transversing helices, the hydrophobic nature of these helices was not among the separating features. On the other hand, the leading feature chosen was the hydrophilic signal of the molecule, derived from the region of the protein facing the aqueous environment on either side of the membrane (protein loops and tails). In an effort to characterize motifs that specify the olfactory receptors, 10 short motifs were determined, and they were all found to reside in the loops and tails of the proteins [25]. Similarly, 5 short PSSM motifs were used to characterize this family by BLOCKS [26]. Again, four of them are indeed in the hydrophilic segments of the proteins.
18
R. Varshavsky et al.
Fig. 1. J-score results of SVM classification, for various protein representations, of the olfactory receptor activity group. Bars are of all 70 global features (All: black), the 5 different feature types (AAC, AAG, PTM, PHYS and RICH: gray), and the 3 automated feature selection schemes (GREEDY, FF and BE: blue). As a reference, a random classification of the dataset is shown (100 iterations, RAND: white).
Other features yielded by FF include the frequency of glycine (G) and threonine (T). Also, among the features that contributed to separation is the richness of tyrosine (Y). It has been noted that tyrosine is quite abundant, and specifically a short sequence of ’MAYDRY’ (tyrosine at positions 3 and 6) is conserved among most of the olfactory receptors in the group [27]. This short sequence has led to significant enrichment over the entire tested set. The rest of the selected features are cysteine (C) and methionine (M) (grouped as sulfur-containing aa), valine (V), and, the helix redundant amino acids group. The fact that this group of transmembrane proteins was distinguished from the other groups through the use of helix redundant amino acids is not completely surprising, since the proteins’ membrane-spanning segments are composed of alpha helices. This detailed example illustrates that the selection of the most informative features (8 features in this case) covers diverse but complementary properties of the proteins. 3.2
Porin Proteins
The other group we discuss is that of bacterial porin, consisting of about 650 proteins (3,500 proteins in UniProtKB) that are localized to the outer membrane of Gram-negative bacteria, but also found in plastidae and mitochondria [28]. As one of the major outer membrane proteins in bacteria, they form large channels that allow the diffusion of small hydrophilic molecules (< 1000 daltons). Classification results for the porin proteins group are displayed in Fig. 2. Classification quality reaches a J-score of ∼0.75. The global feature methods outperform the local feature method (J-score ∼0.66). Interestingly, FF requires only three features for successful classification (J-score 0.68): AAC (G), AAC (I), and AAG (aromatic). To evaluate the relative contribution of each of these features, we have applied the classification compound using either the first 1, 2 or 3 features. The results (Fig. 3) show that the first feature by itself has a strong
When Less Is More: Improving Classification of Protein Families
19
Fig. 2. Results of SVM classification, for various protein representations, of the porin activity proteins (notations, axes and colors are as in Fig. 1)
Fig. 3. The contribution of the first 3 features, selected by the FF method, to the classification quality of the porins group. The results are of random classification (white), classification using the single most, two most, and three most contributing features (AAC (G), AAC (I), and AAG (aromatic), gray), and all 70 features (black).
classification capability, with marginal contributions by the following two. The remaining 67 features have only a negligible contribution. 3.3
Group Size, Selection Method and Success
In order to estimate which protein families are best characterized by global features and which methods are preferred, we have applied several analyses. We computed the number of selected features in BE and FF. For the 10 groups of proteins presented here, the average number of features eliminated in the BE protocol is 5.4, and for FF an average of 5 features were selected. The extreme cases for the FF are the 3 features of the Porin group and 8 features for the olfactory protein group. These numbers and the average success in classification show no correlation with the number of proteins in the group (not shown). Next, we compare the various selection methods. The scores for the selection methods are displayed in Table 2. As shown, the selection method that yields
20
R. Varshavsky et al.
Table 2. Average and standard deviation of the classification scores, according to the various selection methods Selection Method Number of Features Average J-score J-score StDev All 70 0.67 0.126 AAC 20 0.63 0.149 AAG 11 0.57 0.188 PTM 14 0.45 0.171 PHYS 5 0.52 0.185 RICH 20 0.45 0.148 GREEDY 10 0.26 0.150 FF 5 0.56 0.163 BE 64.6 0.65 0.126
the highest scores is BE, followed by AAC (average J-scores 0.65 and 0.63, respectively). Not surprisingly, however, these are also the ones that retain high numbers of features (64.6 and 20, respectively). Nevertheless, it is noteworthy that the FF method yields a relatively high average score (J-score 0.56), although it uses as few as 5 features, on average. Another observation is that the more features selected, the lower the standard deviation of the J-score; this suggests that selection methods that use more features are more stable in their quality. For some of the groups classified, a large number of the original features are essential to reach maximal performance, while in other cases, only a few features are sufficient for good separability. For example, as observed above, very few features are required to separate the porin group (only 3 features). Finally, we are unable to find any specific subset of features that consistently dominates the entire set; the chosen ones range from AAC (e.g., in vacuole proteins) and AAG (the nucleosome group) to others, but only rarely includes the PTMs. The last observation seems to indicate that these signatures do not predict functional protein groupings, perhaps since identical modifications are often performed on differently functioning proteins [29]. The biophysical and enrichment features (25 features) are also rarely selected by the FF or BE protocols. 3.4
Global vs. Local Features
As can be discerned from Fig. 4 (top), a representation of proteins using global features compares to local comparison-based features (SW), as classification using the global features (all or partial) yields superior results in 6 of the 10 groups. Also shown is that classification using only a subset of features, as obtained by the BE and FF methods, yields good results. The quality in classification performance using global feature representations varies across the different groups tested. Some protein groups failed to classify with high precision (e.g., tricarboxylic acid cycle), while in other groups a very small set of features was found sufficient (e.g., porin activity). Nonetheless, using all 70 global features provided a very successful classification for all groups.
When Less Is More: Improving Classification of Protein Families
21
Fig. 4. Top: SVM results for the protein groups: local sequence similarities (SW: stripes), all 70 global features (All Features: black) and the best feature selection scheme (Best FS: gray). Bottom: Combination of both representations (SW + features: green), local sequence similarities (SW: stripes) and a random classification (RAND: white).
3.5
Combining Local with Global Features
Since both feature sets (SW and global) were transformed and scaled to a common representation (see Methods), it is possible to combine them into a unified dataset. This was performed in the following way: assuming that the N proteins are described by M global features, then the feature dataset matrix is [NxM] and the SW one is [NxN]. Combining the matrices is simply performed by appending them, resulting in a [Nx(M+N)] matrix. Fig. 4 (bottom) demonstrates that naive combination of global and local features significantly improves the classification quality, compared to relying on either of them alone (paired t-test < 0.001, and < 0.05, respectively). This suggests that the two representations contain complementary information. Thus it would seem that combining these features is an effective practice and should be adopted for large-scale functional protein classification.
4
Discussion
In this study we show that characterization of protein families can be obtained by relying on a small set of global features that, in some cases, can be further reduced. In previous studies, when much richer feature sets were used [11, 12], the comparison with local features (SW) showed lower success rates. We hypothesize that the high-quality results described here are due to the small number of features that describe the data. This small size may facilitate the training and predictive capabilities of the classifier and, as a result, improves the classification. We attempted to determine which global features and feature selection algorithms perform best in the task of protein function prediction. There is no one feature set that performed this task equally well for all groups, since only some
22
R. Varshavsky et al.
groups seem ”easy” to predict in that they require few features to characterize them well. Nevertheless, when a given group was found to be ”easy”, then it was usually discovered by the FF method (or by using one of the predefined classes of features). On the other hand, single-wise feature selection (GREEDY) was prone to over-fitting and inferior to methods that consider the interplay between features and attempt to separate the training set in a holistic fashion (FF and BE). Therefore, it would seem wise to avoid such greedy methods that independently select features. In summary, we have observed that the use of global sequence features compares with the use of local features in functional protein classification. Since the calculation of such global features is much faster (theoretically and in practice) than computation of local sequence alignments for all pairs of proteins to be compared, in future work we plan to assess the protein function classification problem using global features on a much larger scale (from the GO resource). In addition, since we have also shown that the combination of local and global sequence features succeed more than either method alone, it is certainly worthwhile for large-scale prediction algorithms to incorporate both protein representations. For computationally heavier methods that already use local sequence information (local alignment algorithms), the assimilation of global sequence properties as described here could be done at minimal overhead, yielding stronger prediction algorithms with little or no increase in computing time. The scheme presented here was also applied to protein sets of major biological importance and to a 10-fold larger set (not shown). Success in separating kinases (the serine-threonine, tyrosine and uncharacterized), as well as nuclear proteins of the DNA from RNA biosynthesis proteins, suggest that, at the coarse level of classification, protein groups may be characterized by a very minimal set of global features. On the other hand, substantial improvement was achieved for proteins that often fail by sequence similarity, such as snake toxins and cytokines.
References [1] Altschul, S.F., Madden, T.L., Schaffer, A.A., Zhang, J., Zhang, Z., Miller, W., Lipman, D.J.: Gapped blast and psi-blast: a new generation of protein database search programs. Nucleic Acids Res. 25(17), 3389–3402 (1997) [2] Scheeff, E.D., Bourne, P.E.: Application of protein structure alignments to iterated hidden markov model protocols for structure prediction. BMC Bioinformatics 7, 410 (2006) [3] Portugaly, E., Harel, A., Linial, N., Linial, M.: Everest: automatic identification and classification of protein domains in all protein sequences. BMC Bioinformatics 7, 277 (2006) [4] Gribskov, M., McLachlan, A.D., Eisenberg, D.: Profile analysis: detection of distantly related proteins. PNAS 84(13), 4355–4358 (1987) [5] Yona, G., Levitt, M.: Within the twilight zone: a sensitive profile-profile comparison tool based on information theory. J. Mol. Biol. 315(5), 1257–1275 (2002) [6] Levitt, M., Gerstein, M.: A unified statistical framework for sequence comparison and structure comparison. PNAS 95(11), 5913–5920 (1998)
When Less Is More: Improving Classification of Protein Families
23
[7] Rost, B.: Topits: threading one-dimensional predictions into three-dimensional structures. Proc. Int. Conf. Intell. Syst. Mol. Biol. 3, 314–321 (1995) [8] Frith, M.C., et al.: The abundance of short proteins in the mammalian proteome. PLoS Genet 2(4), e52 (2006) [9] Friedberg, I., Kaplan, T., Margalit, H.: Glimmers in the midnight zone: characterization of aligned identical residues in sequence-dissimilar proteins sharing a common fold. Proc. Int. Conf. Intell. Syst. Mol. Biol. 8, 162–170 (2000) [10] Wu, C.H., Apweiler, R., Bairoch, A., Natale, D.A., Barker, W.C., Boeckmann, B., Ferro, S., Gasteiger, E., Huang, H., Lopez, R., Magrane, M., Martin, M.J., Mazumder, R., O’Donovan, C., Redaschi, N., Suzek, B.: The universal protein resource (uniprot): an expanding universe of protein information. Nucleic Acids Res. 34(Database issue), D187–D191 (2006) [11] Kunik, V., Solan, Z., Edelman, S., Ruppin, E., Horn, D.: Motif Extraction and Protein Classification. In: IEEE Computational Systems Bioinformatics Conference (CSB’05), pp. 80–85. IEEE Computer Society Press, Los Alamitos (2005) [12] Cai, C.Z., Han, L.Y., Ji, Z.L., Chen, X., Chen, Y.Z.: Svm-prot: Web-based support vector machine software for functional classification of a protein from its primary sequence. Nucleic Acids Res. 31(13), 3692–3697 (2003) [13] Bateman, A., Birney, E., Cerruti, L., Durbin, R., Etwiller, L., Eddy, S.R., GriffithsJones, S., Howe, K.L., Marshall, M., Sonnhammer, E.L.: The pfam protein families database. Nucleic Acids Res. 30(1), 276–280 (2002) [14] Syed, U., Yona, G.: Using a mixture of probabilistic decision trees for direct prediction of protein function. In: Proceedings of RECOMB, pp. 224–234 (2003) [15] Chou, K.C.: Using amphiphilic pseudo amino acid composition to predict enzyme subfamily classes. Bioinformatics 21(1), 10–19 (2005) [16] Kahsay, R.Y., Gao, G., Liao, L.: An improved hidden markov model for transmembrane protein detection and topology prediction and its applications to complete genomes. Bioinformatics 21(9), 1853–1858 (2005) [17] Chou, K.C., Cai, Y.D.: Predicting protein quaternary structure by pseudo amino acid composition. Proteins 53(2), 282–289 (2003) [18] Guyon, I., Elisseeff, A.: An introduction to variable and feature selection. Journal of Machine Learning Research 3, 1157–1182 (2003) [19] Camon, E., Barrell, D., Lee, V., Dimmer, E., Apweiler, R.: The gene ontology annotation (goa) database–an integrated resource of go annotations to the uniprot knowledgebase. In Silico Biol. 4(1), 5–6 (2004) [20] Smith, T.F., Waterman, M.S.: Identification of common molecular subsequences. J. Mol. Biol. 147(1), 195–197 (1981) [21] Hulo, N., et al.: The prosite database. Nucleic Acids Res. 34(Database issue), D227–D230 (2006) [22] Gasteiger, E., Gattiker, A., Hoogland, C., Ivanyi, I., Appel, R.D., Bairoch, A.: Expasy: The proteomics server for in-depth protein knowledge and analysis. Nucleic Acids Res. 31(13), 3784–3788 (2003) [23] Jones, D.T.: Protein secondary structure prediction based on position-specific scoring matrices. J. Mol. Biol. 292(2), 195–202 (1999) [24] Eichacker, L.A., Granvogl, B., Mirus, O., Muller, B.C., Miess, C., Schleiff, E.: Hiding behind hydrophobicity. transmembrane segments in mass spectrometry. J. Biol. Chem. 279(49), 50915–50922 (2004) [25] Skoufos, E.: Conserved sequence motifs of olfactory receptor-like proteins may participate in upstream and downstream signal transduction. Receptors Channels 6(5), 401–413 (1999)
24
R. Varshavsky et al.
[26] Henikoff, J.G., et al.: Increased coverage of protein families with the blocks database servers. Nucl. Acids Res. 28(1), 228–230 (2000) [27] Conticello, S.G., Pilpel, Y., Glusman, G., Fainzilber, M.: Position-specific codon conservation in hypervariable gene families. Trends Genet 16(2), 57–59 (2000) [28] Paulsen, I.T., Park, J.H., Choi, P.S., Saier, M.H.: A family of gram-negative bacterial outer membrane factors that function in the export of proteins, carbohydrates, drugs and heavy metals from gram-negative bacteria. FEMS Microbiology Letters 156(1), 1–8 (1997) [29] Chakrabarti, S., Lanczycki, C.J.: Analysis and prediction of functionally important sites in proteins. Protein Sci. 16(1), 4–13 (2007)
Fault Tolerance for Large Scale Protein 3D Reconstruction from Contact Maps Marco Vassura1 , Luciano Margara1, Pietro Di Lena1 , Filippo Medri1 , Piero Fariselli2 , and Rita Casadio2 1
2
Computer Science Department, University of Bologna, Italy
[email protected] Biocomputing Group, Department of Biology, University of Bologna, Italy
[email protected] http://vassura.web.cs.unibo.it/cmap23derr/
Abstract. In this paper we describe FT-COMAR an algorithm that improves fault tolerance of our heuristic algorithm (COMAR) previously described for protein reconstruction [10]. The algorithm [COMAR-Contact Map Reconstruction] can reconstruct the three-dimensional (3D) structure of the real protein from its contact map with 100% efficiency when tested on 1760 proteins from different structural classes. Here we test the performances of COMAR on native contact maps when a perturbation with random errors is introduced. This is done in order to simulate possible scenarios of reconstruction from predicted (and therefore highly noised) contact maps. From our analysis we obtain that our algorithm performs better reconstructions on blurred contact maps when contacts are under predicted than over predicted. Moreover we modify the algorithm into FTCOMAR [Fault Tolerant-COMAR] in order to use it with incomplete contact maps. FT-COMAR can ignore up to 75% of the contact map and still recover from the remaining 25% entries a 3D structure whose root mean square deviation (RMSD) from the native one is less then 4 Å. Our results indicate that the quality more than the quantity of predicted contacts is relevant to the protein 3D reconstruction and that some hints about “unsafe” areas in the predicted contact maps can be useful to improve reconstruction quality. For this, we implement a very simple filtering procedure to detect unsafe areas in contact maps and we show that by this and in the presences of errors the performance of the algorithm can be significantly improved. Furthermore, we show that both COMAR and FT-COMAR overcome a previous state-of-the-art algorithm for the same task [13].
1
Introduction
One of the yet-unsolved problems in structural Bioinformatics is ab-initio Protein Structure Prediction (PSP), i.e. to determine the three-dimensional (3D) structure (tertiary structure) of proteins from their one-dimensional chain of amino acidic residues (primary structure) [9]. Predicting the tertiary structure of a protein directly from its primary structure is a complex problem. A typical alternative approach is to identify a set of sub-problems, such as the prediction R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 25–37, 2007. c Springer-Verlag Berlin Heidelberg 2007
26
M. Vassura et al.
of protein secondary structures, solvent accessibility and/or prediction of residue contacts and try to search specific solutions. Among different possibilities, the prediction of contact maps of proteins starting from the protein chain is particularly promising, since a partial solution of it can significantly help the prediction of the protein structure [6]. A contact map of a given protein 3D structure is a two-dimensional symmetric binary matrix M such that M i,j = 1 iff the Euclidean distance between amino acids i and j is less than or equal to a pre-assigned threshold t. The general problem to compute a set of 3D coordinates consistent with some given contact map has been shown to be NP-hard [5]. A series of heuristic algorithms have been developed to solve the problem. Galaktinov and Marshall [7] reconstructed the structures of five small proteins by adopting information relative to the residue coordination numbers. Other approaches rely on steepest descent with inequality distance constraints [4] and on an algorithm that minimizes a continuous cost function that embodies constraints associated with contact and angle maps [11], respectively. On average these methods reconstruct the protein structures without completely satisfying the contact map in the sense that the reconstructed proteins structures may have contact maps that slightly differ from the native ones. Vendruscolo et al. [12,13] described a method based on simulated annealing with the contact map as a target potential. They achieved an average RMSD of 2.5 Å on some 20 protein structures and it is considered the state-of-the-art solution. In [10] we proposed COMAR, a heuristic algorithm to find a set of 3D coordinates consistent with some native contact map. Our algorithm has been tested on a non-redundant data set consisting of 1760 proteins. It is always able to produce for the whole data set 3D coordinates consistent with the native contact maps (computed adopting contact thresholds ranging from 7 to 18 Å, [10]). Moreover, the algorithm shows good reconstruction performances in terms of RMSD and outperforms, to our knowledge, all other reconstruction techniques so far documented in literature [10]. Performance analysis of our algorithm shows that there exist native contact maps for which there are numerous different possible structures consistent with them. In general, the reconstruction quality is better for contact maps of threshold between 10 and 18 Å, suggesting that contact maps of higher threshold are more informative than those of lower threshold. However, despite the good performance, the algorithm cannot be directly used in the context of protein structure prediction. This is to some extent the consequence of the poor performance of contact maps predictors in predicting the physical contact map of proteins. Our previous version of the algorithm was tested on native contact maps [10]. However contact map predictions are highly blurred, typically noisy, and can produce non-physical contact maps, i.e. not consistent with any given set of 3D coordinates. In this paper we analyze and improve fault tolerance of COMAR for protein reconstruction. To the purpose of this investigation we introduce three different classes of random errors: general errors, errors on contacts (that is errors on 1-entries of contact maps) and errors on non-contacts (that is errors on 0-entries of contact maps). We perform extensive tests of the reconstruction quality of our algorithm on a set of 120 nonredundant protein chains and compare the reconstruction performances in terms
Fault Tolerance for Large Scale Protein 3D Reconstruction
27
of RMSD on the three classes of errors introduced. Our analysis shows that in general the reconstruction quality decreases with the length of the protein and that our algorithm largely tolerates errors on contacts. In particular, the experimental results show that the reconstruction quality of contact maps with 50% errors on contacts is comparable to the reconstruction quality of contact maps with 1% errors on non-contacts. That is, our algorithm is much more tolerant to under prediction than to over prediction of contacts. We further tested this hypothesis by performing an analysis on incomplete contact maps with an improved version of our algorithm, called FT-COMAR (Fault Tolerant COMAR). Experimental tests show that FT-COMAR can ignore up to 75% of the contact map and still obtain a protein 3D structure whose RMSD from the native one is less then 4 Å. Furthermore the reconstruction quality is independent from protein length. This suggests that, to improve protein reconstruction from contact maps, contact map prediction should put much more emphasis on prediction quality than quantity. A simple way to improve the quality of reconstruction is by a pre-processing of contact map in order to detect unsafe contact regions. This filtering pre-processing indicates to FT-COMAR which areas of the contact maps have to be ignored. In this paper we compare pre-processing computed according to a perfect filtering procedure (that eliminates all the wrong contacts and non contacts, and labels them as non-determined) with a simple basic real filter based on common neighbors information in the contact map. As expected, the perfect filter gives the upper limit of reconstruction efficiency. However from our analysis it appears that even with the simple basic filter the reconstruction quality is overall better than with COMAR and, furthermore, the results are independent of the length of the protein for errors less than 8%. To conclude, we compare the performances of our algorithms with results of the state-ofthe-art reconstruction algorithm [13] and we find here that both COMAR and FT-COMAR have better reconstruction quality.
2
Protein Structure Reconstruction from Contact Maps
In this paper we adopt the widely used Cα representation of the protein backbone, where residues are considered as unique entities. The contact map of a given protein is a binary symmetric matrix CM such that CM [i, j] = 1 iff the Euclidean distance between residues i and j is less than or equal to a pre-assigned threshold t (Fig. 1a, area above diagonal). Typical values of t considered in literature vary between 7 and 12 Å. As we showed in [10], higher threshold values allow better reconstruction, and in this work we adopt t = 12 Å. An introduction to reconstruction of protein structures from contact maps can be found in [3]. To measure the similarity between two 3D protein structures, described by some set of coordinates C, C ∈ R3×n , we use the Root Square Deviation Mean n 1 (RMSD); it is defined as the smallest distance Dk = n i=1 (C [i] − Ck [i])2 , where C k ∈ R3×n is obtained by rotating and translating the coordinates set C.
28
M. Vassura et al.
2.1
Description of COMAR and FT-COMAR
COMAR (Contact Map Reconstruction) finds a set of 3D coordinates consistent with some native contact maps [10]. COMAR consists of two phases (see the pseudo code below). In the first phase it generates an initial set of 3D coordinates C ∈ R3×n while in the second phase it refines iteratively the set of coordinates by applying a correction/perturbation procedure to C. The refinement applies until the set of coordinates is consistent with the given contact map or until a control parameter becomes 0. The control parameter has initially a positive value and it is decremented every some amount of refinement steps. If the parameter reaches 0 and a correct solution is still not found, a new initial random solution is generated and the refinement process starts over again. COMAR(CM ∈ {0,1}n×n, t ∈ N ) 1: while coordinates set C is not correct do 2:
//First phase: initial solution generation C ← RANDOM-PREDICT(CM, t )
//Second phase: refinement 3: C ← CORRECT(CM, C, t ) 4: set to a strictly positive value 5: while coordinates set C is not consistent with CM and > 0 do 6: C ← PERTURBATE(CM, C, t, ) 7: C ← CORRECT(CM, C, t ) 8: decrement slightly 9: return C Extended tests for native contact maps and detailed description of the algorithm can be found in [10]. To test the reliability of our reconstruction technique on faulty contact maps we need to modify the termination conditions of COMAR: in this paper the algorithm always stops after the first run of the main cycle, i.e. the while loop of the first line is executed just once. This modification is necessary since a faulty contact map can be not physical, i.e. there are no 3D structures consistent with it, and the termination condition of our original algorithm (COMAR line 1) imposes the procedure to run forever when applied on a not physical contact map. FT-COMAR(CM ∈ {-1,0,1}n×n, t ∈ N ) // Pre-processing phase: error filtering 1: CM’ ← FILTER(CM) //First phase: initial solution generation 2: C ← FT-RANDOM-PREDICT(CM’, t ) //Second phase: refinement 3: C ← FT-CORRECT(CM’, C, t ) 4: set to a strictly positive value 5: while coordinates set C is not consistent with CM’ and > 0 do
Fault Tolerance for Large Scale Protein 3D Reconstruction
29
6: C ← FT-PERTURBATE(CM’, C, t, ) 7: C ← FT-CORRECT(CM’, C, t ) 8: decrement slightly 9: return C To reconstruct partial and blurred contact maps we develop FT-COMAR (Fault Tolerant COMAR), a simple improvement of COMAR. FT-COMAR can work on incomplete contact maps, i.e. contact maps with some unknown entries, in the sense that FT-RANDOM-PREDICT, FT-CORRECT and FT-PERTURBATE are simple modifications of RANDOM-PREDICT, CORRECT and PERTURBATE which do not consider unknown entries during the processing. Moreover, to deal with blurred contact maps the reconstruction phase of FT-COMAR is preceded by preprocessing the contact map (FILTER) in order to detect (and then mark as unknown) unsafe entries of the contact map. FT-COMAR is general enough to accept any type of filtering procedure. In this work we analyze the performances of FT-COMAR adopting a perfect FILTER, i.e. enabling to detect and mark as unknown exactly all faulty entries of the contact map, and a basic real filtering algorithm (Sect. 3).
3
Experimental Results
Data Set. We selected the proteins from SCOP [2] release 1.67 with X-ray protein structures from the PDB, with resolution <2.5 Å, without missed internal residues. We removed sequence redundancies using BLAST [1], ending up with a datasets of 1760 protein chains with sequence similarity lower than 25%. Among these we selected 120 proteins, distributed (not uniformly) between lengths of 50 and 1100 residues. To avoid contact maps for which we know there are very different possible structures consistent with them [10] we choose proteins whose 3D structure can be reconstructed by COMAR up to a 1 Å RMSD distance from the native structure. Distribution of the resulting protein set according to the SCOP structural classes is: 8 all Alpha; 20 all Beta; 58 Alpha/Beta; 14 Alpha+Beta in the mono-domain; 3 Multi-{B,C,D} and 17 Other consist of multi-domain proteins, for a total of 100 proteins in the mono-domain and 20 proteins in the multi-domain1 . Error Generation and Tests Configuration. To study how protein 3D structure can be reconstructed with our algorithm from faulty contact maps we introduce three classes of random errors: • Err. Errors are generated by flipping the entry of randomly chosen rows and columns of the contact map (Fig. 1a, area below diagonal). To introduce x% x n(n−1) errors we generate x errors for each 100 couples of residues, that is 100 2 total errors. • Err-0 (designed to preserve contacts). Errors are generated as before but the entry of the contact map is flipped only if it is not a contact (Fig. 1b, below 1
The complete list is available at http://vassura.web.cs.unibo.it/protlist120.tgz
30
M. Vassura et al.
Fig. 1. Contact map of the Asn102 mutant of trypsin (PDB code: 1trmA). The contact map is computed with a threshold of 12 Å: gray areas are contacts, white areas are non-contact and black areas are errors. (a) Above diagonal: native map, 24753 pairs of residues, 3595 contacts, 21158 non-contacts, and no errors. (a) Below diagonal: Err 5%, so to say (5% of 24753 =) 1237 random errors. (b) Above diagonal: Err-1 5%, that is (5% of 3595 =) 179 random errors on contacts. (b) Below diagonal: Err-0 5%, that is (5% of 21158 =) 1057 random errors on non-contacts. The protein is also the test case shown in [13].
n(n−1) x diagonal). Here x% errors means a number of 100 − #contacts 2 total errors. • Err-1 (designed to preserve non-contacts). The entry of the contact map is flipped only if it is a contact (Fig. 1b, above diagonal). Here x% errors x means a number of 100 · #contacts total errors. In our testing, for each protein contact map and for each percentage of error considered, we generate 100 different faulty contacts maps. Thus, having 120 proteins in our set, we do 12000 tests for each percentage of error. By this, our test results have to be always considered as the average values obtained from the 100 different instances we generate. All test runs have been executed on personal computers equipped with the Intel Pentium 4 processor with clock rate of 2.8GHz and 1Gb of RAM memory. Times reported are Unix CPU times, and are measured using the time() C library function. The Heuristic is freely available for testing on the web2 . Structure Reconstruction from Faulty Contact Maps. We show now experimental results on the behavior of COMAR with faulty contact maps. We perform tests by introducing from 1% up to 10% random errors of class Err. The average RMSD of the reconstruction from those faulty contact maps is shown in Fig. 2. The results indicate that the quality of the protein 3D structure reconstruction depends on the protein size: proteins with less than 150 residues are 2
At the following URL: http://vassura.web.cs.unibo.it/cmap23derr/
Fault Tolerance for Large Scale Protein 3D Reconstruction
31
Fig. 2. Reconstruction quality (RMSD) as function of the number of residues in the protein (Size) and of the percentage of random errors on the total pairs of residues (Err%). Better reconstruction has darker colors (12000 contact maps are analyzed).
reconstructed with a RMSD (from the native structure) that is less than 5 Å even when 10% random errors are introduced. For proteins with a number of residues ranging between 150 and 400, the quality of the reconstruction decreases with the increase of errors but the average RMSD still remains less than 5 Å for small percentages of errors. For proteins with more than 400 residues our algorithm shows poor performances (RMSD>5Å) even for small percentages of errors including 1% errors. Note that the sheer number of errors relative to the same percentage increases with size: as example 10% random errors for a protein of size 100 means 450 errors, while 1% random errors for a protein of size 400 means 798 errors. In Fig. 3 we show how reconstruction quality varies for different SCOP categories when we introduce 5% random errors, with the aim of highlighting whether some categories can be reconstructed better than others. As shown in Fig. 2, the mean RMSD from the native structure increases proportionally to protein size, with some exceptions. The most notable exception is the CDK4/6 inhibitory protein p18INK4c (1ihb chain A; size 156) that is in the SCOP Alpha+Beta category. It appears (Fig. 3) that exceptions to the length dependent behavior of the quality of the reconstruction are rare and distributed among SCOP categories so that it cannot be concluded that one SCOP category is more difficult to be reconstructed from faulty contact maps than another. We analyze how different types of errors influence the quality of reconstruction. In particular, in Fig. 4, we compare the performance of COMAR on the three classes of errors Err, Err-0 (errors on non-contacts), Err-1 (errors on contacts) previously introduced in this Section. As shown in Fig. 4, on the average, for COMAR is better to deal with Err-1 errors than with Err-0 errors. For example, we can see that contact maps with 50% errors on contacts are reconstructed with the same quality of contact maps having 1% errors on non-contacts (which means about 10% extra contacts).
32
M. Vassura et al.
Fig. 3. Reconstruction quality (RMSD) with an error Err 5% as a function of the protein length (Size) clustered according to SCOP categories (the number of contact maps is as in Fig. 2)
Fig. 4. Average RMSD to the native structure of structures reconstructed from contact maps as a function of the percentage of errors with respect to (wrt) each error class: Err refers to random errors, Err-1 refers to errors on contacts and Err-0 refers to errors on non-contact (the number of contact maps is as in Fig. 2
Improving the Reconstruction from Faulty Contact Maps. Our tests give some clues on how the quality of the prediction of contact maps could influence the reconstruction phase. This is much more evident if we analyze the reconstruction quality of FT-COMAR on faulty contact maps assuming to have a perfect filtering procedure, i.e. a procedure which is able to detect all errors on faulty contact maps. To test this approach we generate random incomplete contact maps by randomly choosing a column and a row of the contact map and marking that entry, corresponding to a detected error, as not safe (to be not considered during the reconstruction routine). As shown in Fig. 5, FT-COMAR with perfect filtering can skip up to 75% of the contact map area and still compute a reconstructed 3D structure which is endowed with a RMSD < 4 Å from the native structure. Furthermore this reconstruction quality is independent of the protein size. This unexpected result is due to the fact that FT-COMAR does not consider skipped entries in the refinement phase (see Sect. 2.1 for the description of the algorithm). In this way FT-COMAR does not uses wrong information during the refinement phase avoiding the propagations of errors. The drawback is that this is true only assuming that the remaining entries of the contact map are correct, i.e. only in presence of a perfect filtering. As shown in Fig. 6, even if
Fault Tolerance for Large Scale Protein 3D Reconstruction
33
Fig. 5. Reconstruction quality (RMSD) as function of the number of residues in the protein chain (Size) and of the percentage of random skipped pairs on the total pairs of residues (see legend). Lower percentages of Skip have darker colors (the number of contact maps is as in Fig. 2).
Fig. 6. Reconstruction quality (RMSD) as function of protein length (Size) when 25% of the input contact map is skipped. Increasing percentages of random errors (Err) on the remaining 75% of the map are shown (see legend). Lower percentages of Err have darker colors (the number of contact maps is as in Fig. 2).
we skip only 25% of the entries, the reconstruction quality is rapidly decreasing at the increasing of errors on the remaining 75% of the map. Again note that in this case the reconstruction quality depends on the length of the protein. We can interpret these results as an evidence of the fact that the quality of the reconstruction is negatively influenced by the erroneous predictions of some contacts more than by ignoring a consistent subset of contacts during the reconstruction. Error Filters Preprocessing with FT-COMAR. The experimental results of previous paragraphs show that we can reconstruct with much more reliability the 3D structure of a protein if we are able to predict which areas of the contact map are unsafe. This suggests that prediction quality is more important than quantity of contacts predicted: for instance, comparing Fig. 2 and Fig. 5 it is evident that it is better to predict 25% of the contact map with no errors than 100% of the contact map with 5% errors. This holds especially for proteins with a high number of residues. At the present time there is no way to predict contact maps with high reliability. Labeling unsafe contact map areas seems therefore an alternative way out to find possible solutions. There are various properties that can be implemented to test the “safeness” of contact map areas, from physical constraints to graph properties. Here we propose a simple filtering procedure based on the so called common neighbors property, namely the
34
M. Vassura et al.
number of common contacts of two contact nodes in the undirected graph (contact map) and we analyze how this procedure improves the prediction of our algorithm on faulty contact maps. The common neighbors property roughly assumes that two residues i, j are in contact if and only if they share a high number of neighbors, i.e. there is a high number of residues which are close to both i and j. Experimentally, in our dataset of 1760 non-redundant protein chains only the 6% of residues which are in contact share less than 10 neighbors and just the 0.7% of residues which are not in contact share more that 18 neighbors. Thus our common neighbors filtering procedure skips contact i, j if: – C[i, j]=1 (i e j are in contact) and i, j share less than 10 neighbors, i.e. residue i is in contact with less than 10 residues which are in contacts also with residue j; – C[i, j]=0 (i e j are not in contact) and i, j share more than 18 neighbors, i.e. residue i is in contact with more than 18 residues which are in contacts also with residue j. Results for reconstruction quality using FT-COMAR with the simple filter described above are shown in Fig. 7. We note that for percentages of errors less than 8% the reconstruction quality is independent from the protein length, as in Fig. 5. This means that the filter skips large enough faulty areas to avoid their negative influence on the whole reconstruction. When errors are over 16% the reconstruction quality decreases at increasing protein length. To avoid this behavior a better adjustment of filtering parameters (based on number of expected contacts, or other types of filtering procedures) should be considered. Nevertheless, in general the overall reconstruction quality with this simple/basic filter is significantly improved, as it stems out of the comparison of Fig. 2 and Fig. 7. We remark also that our algorithms runs within minutes, allowing them to be used also for a large-scale number of predictions. The reconstruction times of FT-COMAR for our 120 proteins data set are shown in Fig. 8.
Fig. 7. Reconstruction quality (RMSD) of FT-COMAR as function of protein length (Size). Lower percentages of random errors (Err%) on the whole contact map are shown with darker colors (the number of contact maps is as in Fig. 2).
Comparison with Previous Work. In Fig. 9 our target is the protein 1trm chain A to compare with the previous state-of-the-art reconstructing algorithm of Vendruscolo et al. [13]. The reconstruction quality is shown as a function of the number of included random errors. Both with COMAR and FT-COMAR (with
Fault Tolerance for Large Scale Protein 3D Reconstruction
35
Fig. 8. Average FT-COMAR reconstruction times in seconds for our 120 proteins data set as function of the protein length for four percentages of random errors (see legend) (the number of contact maps is as in Fig. 2).
Fig. 9. Average reconstruction quality (RMSD) for the protein 1trm (chain A, 223 residues) as a function of the number of random errors included in the native contact map. Vend refers to the performances described in [13]. 1000 errors are approximately 4% of the number of pairs of residues.
the filtering procedure already described) we obtain better reconstruction quality. To compare this result with the other tests described in this work, it should be considered that 1000 errors are approximately 4% of the total number of contact residue pairs and 4000 errors are approximately 16% of contact residue pairs.
4
Conclusions and Perspectives
In this paper we develop FT-COMAR an algorithm that improves fault tolerance of our heuristic algorithm (COMAR) previously described for protein reconstruction [10]. We perform extensive tests of the reconstruction quality of COMAR on a set of 120 non-redundant protein chains and compare the reconstruction performances in terms of RMSD on three classes of different errors: general errors, errors on contacts (that is errors on 1-entries of contact maps) and errors on noncontacts (that is errors on 0-entries of contact maps). The experimental results show that the reconstruction quality of contact maps with 50% errors on contacts is comparable to the reconstruction quality of contact maps with 1% errors on non-contacts. That is, COMAR is much more tolerant to errors on contacts than to errors on non-contacts. FT-COMAR can work on incomplete contact maps, i.e. contact maps with a set of unknown entries. We showed that FT-COMAR can ignore up to 75% of the contact map and still recover a 3D structure from
36
M. Vassura et al.
the remaining 25% entries with a RMSD value from the native one of less then 4 Å. Our conclusion is therefore that in order to improve structure reconstruction from contact maps more emphasis should be put on the quality than on the quantity of contact predictions. This is corroborated also by the better results obtained when a simple basic filter is implemented to detect unsafe (randomly perturbed) contact map areas. The very basic filtering algorithm we develop is based on the common neighbors property and its performance is tested versus the reconstruction quality obtained with the not filtered faulty contact maps. The reconstruction quality of FT-COMAR with this simple filtering procedure is overall better and, furthermore, it results to be independent of the length of the protein for percentage of errors less than 8%. We think that on this line other more complex filtering procedures will further improve the reconstruction efficiency.
Acknowledgements We thank MIUR for the following grants: PNR 2001-2003 (FIRB art.8) and PNR 2003 projects (FIRB art.8) on Bioinformatics for Genomics and Proteomics and LIBI-Laboratorio Internazionale di BioInformatica, both delivered to RC. This work was also supported by the Biosapiens Network of Excellence project no LSHG-CT-2003-503265 (a grant of the European Unions VI Framework Programme).
References 1. Altshul, S.F., Madden, T.L., Shaffer, A.A., Zhang, J., Zhang, Z., Miller, W., Lipman, D.J.: Gapped BLAST and PSI-BLAST: a new Generation of protein database search programs. Nucleic Acid Res. 25(17), 3389–3402 (1997) 2. Andreeva, D., Howorth, S.E., Brenner, T.J., Hubbard, C., Chothia, A.G.: SCOP database in 2004: refinement integrate structure and sequence family data. Nucleic Acids Res. 32(Database issue), D226–D229 (2004) 3. Bartoli, L., Capriotti, E., Fariselli, P., Martelli, P.L., Casadio, R.: The pros and cons of predicting protein contact maps 4. Bohr, J., et al.: Protein structures from distance inequalities. J. Mol. Biol. 231, 861–869 (1993) 5. Breu, H., Kirkpatrick, D.G.: Unit disk graph recognition is NP-hard. Computational Geometry 9, 3–24 (1998) 6. Fariselli, P., Olmea, O., Valencia, A., Casadio, R.: Progress in predicting interresidue contacts of proteins with neural networks and correlated mutations. Proteins 45(5), 157–162 (2001) 7. Galaktinov, S.G., Marshall, G.R.: Properties of intraglobular contacts in proteins: an approach to prediction of tertiary structure. In: System Sciences, vol. V, 1994. Proceedings of the Twenty-Seventh Hawaii International Conference on Biotechnology Computing, January 4-7, 1994, vol. 5, pp. 326–335 (1994) 8. Havel, T.F.: Distance Geometry: Theory, Algorithms, and Chemical Applications in the Encyclopedia of Computational Chemistry (1998) 9. Lesk, A.: Introduction to Bioinformatics. Oxford University Press, Oxford (2006)
Fault Tolerance for Large Scale Protein 3D Reconstruction
37
10. Vassura, M., Margara, L., Medri, F., Di Lena, P., Fariselli, P., Casadio, R.: Reconstruction of 3D Structures From Protein Contact Maps. In: ISBRA 2007. Proceedings of Bioinformatics Research and Applications third International Symposium, Atlanta, May 2007. LNCS (LNBI), vol. 4463, pp. 578–589. Springer, Heidelberg (2007) 11. Pollastri, G., Vullo, A., Fiasconi, P., Baldi, P.: Modular DAG-RNN Architectures for assembling Coarse Protein Structures. J.Comp.Biol. 13(3), 631–650 (2006) 12. Vendruscolo, M., Kussell, E., Domany, E.: Recovery of protein structure from contact maps. Folding and Design 2(5), 295–306 (1997) 13. Vendruscolo, M., Domany, E.: Protein folding using contact maps. Vitam Horm 58, 171–212 (2000)
Bringing Folding Pathways into Strand Pairing Prediction Jieun K. Jeong1,2 , Piotr Berman1 , and Teresa M. Przytycka2 1
Computer Science and Engineering Department The Pennsylvania State University University Park, PA 16802 2 National Center for Biotechnology Information National Library of Medicine, National Institutes of Health Bethesda, MD 20894
[email protected],
[email protected],
[email protected]
Abstract. The topology of β-sheets is defined by the pattern of hydrogen-bonded strand pairing. Therefore, predicting hydrogen bonded strand partners is a fundamental step towards predicting β-sheet topology. In this work we report a new strand pairing algorithm. Our algorithm attempts to mimic elements of the folding process. Namely, in addition to ensuring that the predicted hydrogen bonded strand pairs satisfy basic global consistency constraints, it takes into account hypothetical folding pathways. Consistently with this view, introducing hydrogen bonds between a pair of strands changes the probabilities of forming other strand pairs. We demonstrate that this approach provides an improvement over previously proposed algorithms.
1
Introduction
The prediction of protein structure from protein sequence is a long-held goal that would provide invaluable information regarding the function of individual proteins and the evolution of protein families. The increasing amount of sequence and structure data, made it possible to decouple the structure prediction problem from the problem of modeling of protein folding process. Indeed, a significant progress has been achieved by bioinformatics approaches such as homology modeling, threading, and assembly from fragments [16]. At the same time, the fundamental problem of how actually a protein acquires its final folded state remains a subject of controversy. Can successes/failures of computational method shade some light on this issue? It is generally accepted that proteins fold to their global free energy minimum. Through his famous Paradox, Levinthal made an important point that a protein cannot explore all conformational states in the search of the optimal conformation and therefore a protein chain has to fold by following some directed process or a folding pathway [14]. One view that has been gathering a lot of support since at nearly three decades is the concept of hierarchical protein R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 38–48, 2007. c Springer-Verlag Berlin Heidelberg 2007
Bringing Folding Pathways into Strand Pairing Prediction
39
folding [1, 2, 6, 12, 13, 19]. Consequently, many structure prediction algorithms use hierarchical approach in which the structure is assembled in a bottom up fashion (e.g. where smaller locally folded fragments are assembled into larger folded units [4, 9, 21]). Studies of β-sheets topology indicate that the way strands assemble into larger sheets may be quite complex. While about half of hydrogen bonded pairs of strands are adjacent in the sequence of strands on the chain, many are separated by a significant distance. How pairs of strands which are distant in sequence find their hydrogen bonded partners? In her classic 1977 paper, Richardson proposed a set of folding rules where consecutive β-strands grow into larger hydrogenbonded structures in successive steps, and blocks of strands obtained in this way coalesce, providing they are consecutive in the chain. Richardson showed, by manual inspection, that 37 known strand topologies can be constructed using these rules. A smaller, more restricted set of folding rules was shown by Przytycka et al. [17] to be sufficient for 80% of fold families, while proteins in more than 90% consist of at most three substructures that can be completely folded using proposed rules. It is tempting to hypothesize that such procedures are related to actual folding pathways. If this hypothesis is correct, such folding rules should be helpful in prediction of β-sheet topology in general, and the pairing of β-strands in particular. The latter problem, despite of many attempts, remains unsolved. Early work by Hubbard [7] has been followed by other studies directed towards understanding and predicting β-sheet topology [23, 8, 26, 25, 22, 20, 15]. In a recent work, Cheng and Baldi [5] addressed the strand pairing problem using a three-stage approach. In the first stage they compute, for the input protein sequence, the scores (estimated probabilities) of residue pairs as potential partners in a βstrand pairing. This computation is performed by a neural network with input describing a window of size five around each residue and the information about the distance between the two residues in the protein sequence. In the second stage the above pairwise scores are used to define alignment scores for pairs of strands, and for each pair a highest scoring alignment is found with the use of dynamic programming. The alignment scores are used in the third and final stage to run a greedy selection algorithm. Cheng and Baldi reported 59% specificity and 54% sensitivity which is significantly better than what is achieved by a naive algorithm predicting that all pairs of strands that are consecutive in the sequence form hydrogen bonded partners is space. (The performance of such naive algorithm was approximated to be 42% specificity and 50% sensitivity [5]. ) The important novelty of the approach of Cheng and Baldi when compared with previous methods (e.g. Hubbard [7], Zhu and Braun [26] and Steward and Thornton [22]) is that the prediction of residue pairs that are partners in strand pairing is not performed independently for each pair, but instead it takes into
40
J.K. Jeong, P. Berman, and T.M. Przytycka
account a wider context; to wit, the information about 10 surrounding residues and the distance between them. The approach of Cheng and Baldi does not employ explicitly folding rules, although some bias towards formation of hairpins (and in general contacts between close in sequence strands) is included in the (learned) scoring function. On the other hand, the third stage of their algorithm is a very simple greedy algorithm, which raises a question: Would a more elaborate approach increase the quality of prediction even further? What is more important – a better optimization method (e.g., as discussed by Berman and Jeong in [3]), or a biological insight, in particular, the knowledge of folding rules? To address these questions, we investigated two new algorithms for predicting strand partners. To make direct comparisons, we use the same scoring function as of Cheng and Baldi. The objective of the first algorithm is very similar to the approach of Cheng and Baldi, but rather than having a two-stage greedy selection heuristic, it poses the problem as integer linear programming optimization problem and solves it using ILOG CPLEXTM package. The second approach is greedy, but it explicitly encourages two simple folding rules. This is achieved by dynamically increasing the scores of pairs of strands (as potential partners), depending on the pairs of strands predicted so far. In particular, we double the pairs of strands whose pairing is consistent with one of the rules, which are based on the pairs that are already formed. Our rules are simple and biochemically justified (as we explained later in the paper). Both methods provided noticeable improvement over the previous approach. Importantly, a more significant improvement was obtained with the approach that promotes folding rules. This is remarkable, since in the case of integer linear program we are heuristically solving a NP-complete problem using about 100 times more time than folding rules promotion algorithm (almost entire time of the latter algorithm is consumed by the dynamic programming that computes optimal pairing/alignment for each pair of strands). While the improvement, taken in absolute numbers, is not drastic (about 2.7% in specificity and 1% in sensitivity), one has to keep in mind that the improvement of Cheng and Baldi over a naive algorithm was only 4-5 times larger. In another perspective, without any new predictor or data source we decreased the number of false predictions by 10% while increasing the number of good predictions.
2
Methods
The common notions in the three algorithms considered here are – strand: interval of residue numbers predicted to form a β-strand, we visualize a strand as a paper ribbon covered with squares with numbers; – contact: adjacency of two strands, as in Fig. 1; – contact energy: sum of numbers for pairs of residues adjacent in a contact that are returned by Cheng-Baldi neural network.
Bringing Folding Pathways into Strand Pairing Prediction
41
A solution returned by an algorithm is a collection of contacts that satisfies the following constraints: – uniqueness: at most one contact between a single pair of strands; – sidedness: contacts of a strand are on one of the two sides of that strand; – overlap-free: contacts on the same side of a strand are not in contact with the same residue; – direction-consistent: contacts on the same side of a strand are either all parallel, or all anti-parallel. 40 41 42
While these constraints are necessary, they allow for a: 59 60 61 62 63 many impossible combinations of contacts. After some 100 101 102 103 104 experimentation we added the constraint that a solu- b: 59 60 61 62 63 tion is cycle-free (as did Cheng and Baldi [5]). In the 123 124 125 126 data set, among all 916 protein chains and ca. 9000 c: 63 62 61 60 59 strands there were only 80 cycles. At the same time, without prohibition of all cycles, our program was reFig. 1. turning solutions with many cycles, ca. 99% of them wrong. Lastly, we disallowed contacts with score below 0.06 from further consideration. This caused the number of predicted contacts (true and false positives in Table 1) to roughly coincide with the number of actual contacts (true positives and false negatives). 2.1
ILP Formulation
We can view the strand pairing problem as an optimization problem which identifies a solution with the maximum sum of contact energies. As shown in [5], this problem cannot be solved in polynomial time in the worst case. However, in almost all instances in the test set, an ILP solver found provably optimal solutions. While there are many ILP methods used for protein structure prediction (e.g., see [11,24,10]) none of them operated in our particular framework, instead, they were used in the context of all-atom model, threading etc. In our formulation, a contact c has an upper strand and a lower strand, and a strand similarly has two sides, upper and lower. In Fig. 1, contacts b and c are in conflict as not overlap-free, while contacts a and c are in conflict as not direction-consistent. A contact is characterized by these parameters: upper strand, lower strand, parallel (or not), the offset (relative shift of the strands). The score of c, E(c) was computed using dynamic programming (we allowed a single gap of length 1 in the alignment). We kept only the contacts with the optimal offset values. For every possible contact c we introduced a variable xc , and for every pair of strands i, j a variable yi,j . The value of xc indicates if contact c is in the solution (xc = 1) or not (xc = 0). Similarly, yi,j = 1 means that strands i and j were paired, i.e. that we selected a contact that binds these two strands together. To formulate our ILP we introduce two classes of 0-1 vectors: Ci,j such that Cc = 1 if and only if contact c binds strand i with strand j, and γ(S) such that
42
J.K. Jeong, P. Berman, and T.M. Przytycka
γ(S)i,j = 1 if and only if {i, j} ⊂ S. We also set conflict(c, d) to be true if there is a conflict between contact c and contact d. We wish to solve the following ILP: maximize Ex subject to Ci,j x ≤ yi,j for {i, j} ⊂ {1, . . . , n} contact/pairing xc + xd ≤ 1 for i, j s.t conflict(c, d) no-conflict γ(S)y ≤ |S| − 1 for S ⊂ {1, . . . , n} cycle-free This set of constraints is often too large as an input to ILP solver: when the number of strands reaches 20, the number of cycle-free constraints reaches 106 and for the largest protein domains, with more than 40 strands, it exceeds 1012 . To avoid that problem, we start with a single cycle-free constraint with S = {1, . . . , n} and run a row generation loop: we submit ILP, we obtain a solution, and if it contains a cycle of strands we add a cycle-free constraint for its set of nodes. When the number of repetitions is too large (as it happened in ca. 15% of the cases) we give up and return the solution of the greedy algorithm descibed below. 2.2
Greedy Algorithm with Pathway-Based Promotion
The greedy algorithm has the same goal as the ILP method, but it increases the solution set one contact at the time, always choosing the new contact with the maximum possible score (energy). On one hand, the initial choices may block subsequent choices and thus prevent the algorithm from finding a solution with the maximum score. On the other hand, the greedy algorithm is much more flexible in checking the consistency requirements, as they do not have to be formulated in the form of linear inequalities. In the preliminary stage of the algorithm, for each pair of strands we preselect the best parallel and the best anti-parallel contact, and we order them according to their score. We consider candidates starting with the one with the largest score, and we never consider a candidate again. We represent contacts with unordered pairs of strands, which means that we do not declare which strand is the upper one and which one is lower. Otherwise we could get the following anomaly: we greedily choose contacts for pairs (1,2) and (3,4), and decide that, say, strands 1 and 3 are upper ones. Then we cannot choose contact (1,4): if in the latter strand 1 is upper, we have conflict with (1,2), and if strand 4 is lower, we have a conflict with (3,4). This representation makes it less obvious how to verify the constraints of sidedness, overlap-free and direction-consistent. (Verifying the constraints of uniqueness, cycle-free constraint, as well as metric consistency described below is straightforward.) The crucial observation is that in a consistent set we can decide which strand is upper and which strand is lower in every contact, we just may need to alter such a decision later. Therefore when we test adding a new contact we check if the resulting set of contacts is two-colorable in the following sense:
Bringing Folding Pathways into Strand Pairing Prediction
43
– color of a contact tells if the upper strand has the lower number, or the larger one; – two contacts are connected if they share a strand (e.g. (i, j) and (k, j)) and either (a) one is parallel and one is anti-parallel, or (b) they share a residue of the common strand. – two connected contacts are either required to have the same color, or to have different colors.
i−1
i+2
i+1
i
i+2
To illustrate, suppose that we consider contacts (2, 5) and (5, 7) and they share a residue on strand number 5. Then from top to bottom the strands have to be ordered (2, 5, 7) or (7, 5, 2), and thus the contacts have to have the same color. But if the second contact is (3, 5), the strands have to be ordered (2, 5, 3) and thus the contacts have to have different colors. Two-colorability is very easy to check. When we have a solution, it consists of several connected components of contacts in terms of connections between contacts that we have just described. Connected components of the above graph correspond to rigid parts of the chain, and they can be mapped onto a grid in such a way that strands form rows and paired partners are adjacent in common columns. Such a layout allows to form a conservative estimate of the minimal length of coils that join the strands in the components. If such a coil is actually shorter, we disallow the candidate. As before, we disallow a candidate if it would create a cycle. Up to this point, the algorithm does not differ from i i+ that of Cheng and Baldi in a significant way. (Their 1 notion of consistency as exhibited by their program is a bit different than the one described in the paper, but in the evaluation it was indistinguishable). However, we have this new element: after selecting a consecutive contact, say between strands i and i+1, we double the score of contacts between strand pairs (i, i + 2), (i − 1, i + 1), (i − 1, i + 2) and change their Fig. 2. position within the ordering to reflect that. This rule is explicitly promoting a folding pathway. It is actually a part of a more general rule, but it restricts it to the cases of the smallest separation between strands and thus the most reliable scores. There are biophysical reasons for which the probability of hydrogen bonding between strands i and i+2 (Fig. 2) is increased under assumption that i is already hydrogen bonded. Namely, strand i + 2 would stabilize the conformation already acquired by strands i and i + 1. The higher probability of bonding between strands i − 1 and i + 2 upon hydrogen bonding between i and i + 1 is in turn justified by the loss of entropy of subchain separating strands i − 1 and i + 2 resulted from the hairpin formation. This rule can be extended to strands i − 2 and i + 3 but with the current scoring schema it had no effect on the results (see Discussion section).
130
126
95
28 30 90
22
17
5
10
J.K. Jeong, P. Berman, and T.M. Przytycka
2
44
7
145
140 130
6
126
5 95
1 90 30 28
4
2
4
3
22
6
2
17
1
7
3
5
Fig. 3. Example how promotion may have good secondary effects. We show here the table of pairwise scores for 2C-Methyl-D-erythritol-2,4-cyclodiphosphate Synthase (PDB id: 1iv1, chain a). The entries in the table are color-coded, purple codes interval 2/3 to 1, and each subsequent code (purple-blue, blue, blue-green etc.) codes an interval decreased by 2/3 factor (and white for the remaining values down to zero). Black background codes the true contacts, purple ovals are the contacts found by Cheng & Baldi, and the pink ovals are the contacts found by our version of greedy. After contact 2-3 was selected, contact 1-4 (between strand 1 and strand 7) was promoted over 1-2; once we got contacts 1-4-3-2, contact 1-2 was blocked by cycle-free rule; moreover 1-5 was blocked by 5-6 and 5-7, thus 1-7 became the best available contact for 1 — as well as for 7.
3
Results
We used the data set of Cheng and Baldi (see [5], page 176) that consists of 916 protein chains that contain up to 45 β-strands. We also used the output of their program that given a sequence of amino acids (residues) returns (a) a sequence of secondary structure identifications (α-helix, β-strand, coil) and (b) for every pair of residues classified as β-strand it provides a pseudo-probability that these two residues face each other in a pairing of two βstrands. To evaluate the result we used their file of DSSP identifications of correct secondary structure identifications and correct pairing of β-strand residues.
Bringing Folding Pathways into Strand Pairing Prediction
45
We defined the population of possible answers in two ways: pairs of β-strands as identified by predict beta fasta.sh and as identified by DSSP. Given a pair of predicted (true) strands, we defined the pairing to be true (correctly predicted) if for at least one residue of one strand there was a residue in the other strand that was in a contact described by DSSP (predicted by the evaluated program). These two definitions yielded different numbers, but they registered roughly the same differences between various programs, so our conclusions do not seem to depend on this somewhat arbitrary definition. We compare three programs: the three-stage program of Cheng and Baldi, ILP optimizer and our greedy algorithm with pathway based promotion. The differences in the quality of predictions are very consistent when we use various measures. We use T and F to indicate the number of true and false predictions and ⊕ and to indicate positive and negative predictions. To evaluate the set of prediction, we use the correlation coefficient, as well as selectivity/specificity pairs. T ⊕T − F ⊕ F Correlation coefficient = (T ⊕ + F ⊕ )(T ⊕ + F )(T + F ⊕ )(T + F ) Spe =
T⊕ + F⊕
T⊕
Sel =
T⊕ + F
T⊕
The correlation coefficient was 0.555 for Cheng and Baldi’s, 0.567 for ILP optimizer and 0.577 for the greedy with pathway based promotion.
4
Discussion and Conclusions
We considered two methods of predicting β-sheet pairing partners using the machine learned scores for inter-residue contacts from [5]. In the first method, we computed optimal set of pairs by solving an instance of integer linear program. The fact that increasing the sum of scores improves the predictions suggests that these scores are indeed related to the energy of contacts. On the other hand, giving preference according to our rule leads to lower sums of scores and yet it improves the specificity significantly without decreasing the sensitivity. This suggests that a local assembly may remain stable even when it is inconsistent with a conformational state that has the minimal energy. However, for contacts separated for more than 3 strands the reliability of Cheng and Baldi’s scores seems to decrease rather quickly and more complete versions of our rules do not lead to further improvements. In the future, more complete set of rules based on the work of Richardson [18] and Przytycka [17] et al. should be added. However, more complete rules are also more ambiguous — the number of possible successive steps in the folding process goes up and we need to rely on pairwise predictors more, while in the same time their reliability goes down. Improving pairwise prediction of contacts for more separated pairs of strands seems to be a necessary challenge before a qualitative improvement in ab initio
46
J.K. Jeong, P. Berman, and T.M. Przytycka
Table 1. Comparison of results of three tested algorithms on a set of 916 protein chains. Note that the discriminating power of the potential function quickly decreases as the separation grows and the statistical quality measures are largely determined by contacts separated by up to three other strands. sepa- true false false true speci- sensiration positive negative positive negative ficity tivity greedy — Cheng & Baldi’s version ALL 5032 3140 3370 61563 0.599 0.616 0 3748 363 2136 3577 0.637 0.912 1 521 485 484 7418 0.518 0.518 2 407 523 355 6710 0.534 0.438 3 169 359 161 6412 0.512 0.320 4 100 276 89 5788 0.529 0.266 5 38 241 58 5130 0.396 0.136 6 29 195 32 4482 0.475 0.129 7 11 157 10 3891 0.524 0.065 8+ 9 541 45 18155 0.167 0.016 ILP optimizer ALL 5092 3080 3253 61603 0.610 0.623 0 3781 330 2084 3621 0.645 0.920 1 538 468 552 7342 0.494 0.535 2 427 503 317 6741 0.574 0.459 3 167 361 119 6447 0.584 0.316 4 94 282 72 5798 0.566 0.250 5 36 243 39 5143 0.480 0.129 6 30 194 10 4498 0.750 0.134 7 14 154 13 3883 0.519 0.083 8+ 5 545 47 18130 0.096 0.009 greedy — with pathway-based promotion ALL 5089 3083 3035 61821 0.626 0.623 0 3715 396 1733 3972 0.682 0.904 1 594 412 619 7275 0.490 0.590 2 472 458 385 6673 0.551 0.508 3 142 386 122 6444 0.538 0.269 4 81 295 68 5802 0.544 0.215 5 37 242 41 5141 0.474 0.133 6 30 194 10 4498 0.750 0.134 7 11 157 14 3882 0.440 0.065 8+ 7 543 43 18134 0.140 0.013
corr. coef. 0.557 0.541 0.457 0.423 0.368 0.348 0.209 0.230 0.175 0.044 0.568 0.558 0.449 0.457 0.398 0.352 0.230 0.306 0.196 0.021 0.577 0.596 0.473 0.469 0.347 0.318 0.231 0.306 0.158 0.034
prediction methods of the tertiary structure of proteins. In the same time, this task cannot be separated from the search of the best methods of using such predictors. An important implication of this work is the demonstration that a simple algorithm that takes into account folding rules works better than heavy duty integer linear programming. This suggests that the future line of research should developing a folding-rule depending scoring function that would allow to explore a richer set of folding rules.
Bringing Folding Pathways into Strand Pairing Prediction
47
Acknowledgments The authors thank George D. Rose (JHU), Bonnie Berger (MIT) and Arthur M. Lesk (PSU) for an insightful discussions. We also thank Jailing Cheng for help in using their program. This work was supported in part by the intramural research program, National Institutes of Health, National Library of Medicine.
References 1. Baldwin, R.L., Rose, G.D.: Is protein folding hierarchic? I. II. Folding intermediates and transition states. Trends in Biochemical Sciences 24(2), 77–83 (1999) 2. Baldwin, R.L., Rose, G.D.: Is protein folding hierarchic? I. Local structure and peptide folding. Trends in Biochemical Sciences 134(3), 26–33 (1999) 3. Berman, P., Jeong, J.: Consistent sets of secondary structures in proteins, http://www.cse.psu.edu/∼jijeong 4. Bystroff, C., Baker, D.: Prediction of local structure in proteins using a library of sequence-structure motifs. Journal of Molecular Biology 281(3), 565–577 (1998) 5. Cheng, J., Baldi, P.: Three-stage prediction of protein beta-sheets by neural networks, alignments and graph algorithms. Bioinformatics 21(suppl. 1), i75–84 (2005) 6. Crippen, G.M.: The tree structural organization of proteins. Journal of Molecular Biology 126, 315–332 (1978) 7. Hubbard, T.J., Park, J.: Fold recognition and ab initio structure predictions using hidden markov models and β-strand pair potentials. Proteins: Structure, Function, and Genetics 23(3), 398–402 (1995) 8. Huthinson, E.G., Sessions, R.B., Thornton, J.M., Woolfson, D.N.: Determinants of strand register in antiparallel β-sheets of proteins. Protein Science 7(11), 2287–2300 (1998) 9. Inbar, Y., Benyamini, H., Nussinov, R., Wolfson, H.J.: Protein structure prediction via combinatorial assembly of sub-structural units. Bioinformatics 19(suppl. 1), 158–168 (2003) 10. Kingford, C.L., Chazelle, B., Singh, M.: Solving and analyzing side-chain positioning problems using linear and integer programming. Bioinformatics 21(7), 1028– 1036 (2004) 11. Klepeis, J.L., Floudas, C.A.: Astro-fold: A combinatorial and global optimization framework for ab initio prediction of three-dimensional structures of proteins from the amino acid sequence. Biophysical Journal 85, 2119–2146 (2003) 12. Kryshtafovych, A., Venclovas, C., Fidelis, K., Moult, J.: Protein folding: From the levinthal paradox to structure prediction. Journal of Molecular Biology 293(2), 283–293 (1999) 13. Lesk, A.M., Rose, G.D.: Folding Units in Globular Proteins. PNAS 78(7), 4304– 4308 (1981) 14. Levinthal, C.: Are there pathways for protein folding? Journal de Chimie Physique et de Physico-Chimie Biologique 65, 44 (1968) 15. Menke, M., King, J., Berger, B., Cowen, L.: Wrap-and-pack: A new paradigm for beta structural motif recognition with application to recognizing beta trefoils. Journal of Computational Biology 12(6), 777–795 (2005) 16. Moult, J.: A decade of CASP: progress, bottlenecks and prognosis in protein structure prediction. Current Opinion in Structural Biology 15(3), 285–289 (2005)
48
J.K. Jeong, P. Berman, and T.M. Przytycka
17. Przytycka, T.M., Srinivasan, R., Rose, G.D.: Recursive domains in proteins. Protein Science 11(2), 409–417 (2002) 18. Richardson, J.S.: beta-Sheet topology and the relatedness of proteins. Nature 268(5620), 495–500 (1977) 19. Rose, G.D.: Hierarchic organization of domains in globular proteins. Journal of Molecular Biology 134(3), 447–470 (1979) 20. Ruczinski, I., Kooperberg, C., Bonneau, R., Baker, D.: Distributions of beta sheets in proteins with application to structure prediction. Proteins: Structure, Function, and Genetics 48(1), 85–97 (2002) 21. Srinivasan, R., Rose, G.D.: LINUS: A hierarchic procedure to predict the fold of a protein. Proteins: Structure, Function, and Genetics 22(2), 81–99 (1995) 22. Steward, R.E., Thornton, J.M.: Prediction of strand pairing in antiparallel and parallel β-sheets using information theory. Proteins: Structure, Function, and Genetics 48(2), 178–191 (2002) 23. Woolfson, D.N., Evans, P.A., Hutchinson, E.G., Thornton, J.M.: On the conformation of proteins: The handedness of the connection between parallel β-strands. Journal of Molecular Biology 110, 269–283 (1977) 24. Xu, J., Li, M., Kim, D., Xu, Y.: Raptor: Optimal protein threading by linear programming. Journal of Bioinformatics and Computational Biology 1(1), 85–117 (2003) 25. Zhang, C., Kim, S.-H.: The anatomy of protein [beta]-sheet topology. Journal of Molecular Biology 299(4), 1075–1089 (2002) 26. Zhu, H., Braun, W.: Sequence specificity, statistical potentials, and threedimensional structure prediction with self-correcting distance geometry calculations of beta-sheet formation in proteins. Protein Science 8(2), 326–342 (1999)
A Fast and Accurate Heuristic for the Single Individual SNP Haplotyping Problem with Many Gaps, High Reading Error Rate and Low Coverage Loredana M. Genovese, Filippo Geraci, and Marco Pellegrini Istituto di Informatica e Telematica del CNR, Via G. Moruzzi 1, 56100-Pisa (Italy)
[email protected],
[email protected],
[email protected]
Abstract. Single nucleotide polymorphism (SNP) is the most frequent form of DNA variation. The set of SNPs present in a chromosome (called the haplotype) is of interest in a wide area of applications in molecular biology and biomedicine, including diagnostic and medical therapy. In this paper we propose a new heuristic method for the problem of haplotype reconstruction for (portions of ) a pair of homologous human chromosomes from a single individual (SIH). The problem is well known in literature and exact algorithms have been proposed for the case when no (or few) gaps are allowed in the input fragments. These algorithms, though exact and of polynomial complexity, are slow in practice. Therefore fast heuristics have been proposed. In this paper we describe a new heuristic method that is able to tackle the case of many gapped fragments and retains its effectiveness even when the input fragments have high rate of reading errors (up to 20%) and low coverage (as low as 3). We test our method on real data from the HapMap Project.
1
Introduction
The single nucleotide polymorphism or SNP (pronounced “snip”) is the most common variation in the human DNA. In fact a recent study of 2001, has shown that similarity among human DNA sequences is over 99% and only a few bases (just 1.42M bases overall) are responsible for the variations in human phenotypes [12]. A SNP is a variation of a single nucleotide in a fixed point of the DNA sequence and in a bounded range of possible values. The sequence of SNPs in a specific chromosome (or a large portion of a chromosome) is called generically Haplotype. Since most cells in humans are diploid, each chromosome (except the X and Y chromosomes in males) comes in two almost identical copies, one inherited from the mother and one from the father. Thus the haplotype of a chromosome is fully described by two sequences of SNPs in the two copies of the chromosome. The Single Individual SNP Haplotype reconstruction problem is the problem of rebuild the two strings forming the haplotype from a set of fragments obtained by shotgun sequencing of the chromosomes’ DNA strands. The most important aspect of the problem is that with the current technology it is difficult and/or impractical to keep trace of the association of the fragments with their chromosome, thus this association has to be reconstructed computationally and it is a preliminary necessary phase to the actual fragment assembly to reconstruct the haplotype. Unlike the classical DNA fragment assembly problem, in R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 49–60, 2007. c Springer-Verlag Berlin Heidelberg 2007
50
L.M. Genovese, F. Geraci, and M. Pellegrini
which the position and orientation of fragments is unknown, in the parental haplotype reconstruction problem the position of each fragment is fixed and known. Further aspects that must be considered that render the problem difficult (and computationally interesting) are the following: 1) Reading errors. The complex nature of the biological/chemical/optical processes involved in shotgun sequencing implies that a non negligible error probability is attached to each single SNP reading. 2) Coverage of fragments. Algorithms using fragments to reconstruct a string rely heavily on the fragment’s overlaps and on the redundancy of information provided by several fragments covering the same SNP position, to perform in silico correction of reading errors. Thus a critical parameter of the input data is the minimum (or average) coverage of SNPs by fragments. This number is also related to the throughput of the sequencing equipment. 3) Gaps in fragments. Ideally each fragment covers consecutive SNP positions in the order of the SNPs of a chromosome. However in practice we may have many fragments with gaps due to several phenomena. 3.1 Ambiguous Readings. In the reading of fragments it may happen that is impossible to detect the value of a SNP with a sufficient confidence. It is better to model this ambiguous case with a small gap rather than introduce spurious values. 3.2 Matepair sequences. Some shotgun sequencing methodologies produce pairs of fragments that are from the same chromosome, do not overlap and whose distance is known up to a certain degree of precision. Matepair sequences are used to cope with the presence of repeat subsequences that complicate the reconstruction efforts This extra information attached to the produced fragments can be considered logically equivalent to a single fragment with one gap. Our contribution. In this paper we propose a heuristic algorithm for the SIH problem that is fast, handles well gaps, and is able to deal with high reading error rates and low fragment coverage. We demonstrate these properties via experiments on real human data from the HapMap project [5]. Advanced Personalized Medicine is one of the goals of current research trends and in this area new genetic diagnostic methods are critical. It is thus important to support diagnostic technologies that can be used as much as possible in the field (closer to the patient, and far from the traditional high tech labs). Away from the controlled environment of a lab it is likely that the current portable technology for sequencing will produce less reliable data. Moreover, if a real time and high throughput response is needed to care for the needs of many individuals in a short time span, one might not be able to guarantee a high coverage of the fragments and low reading error rates. Our algorithm is a step forward in the direction of extracting efficiently useful information even from low quality data. Formalization of the problem. From the computational point of view the problem of the haplotype reconstruction was defined in [7,13]. It can be easily described as follow: let S = s1 , s2 , . . . , sn a set of SNPs (specific positions in a DNA string) and F = f1 , f2 , . . . , fm a set of DNA fragments. Each SNP can be covered by a certain number of fragments and can take only two values (The values of the haplotype in that position). The natural way of representing fragments is to store them in an m x n matrix M called SNP matrix. The element
A Fast and Accurate Heuristic for the Single Individual SNP
51
Mi,j contains the value of the SNP sj in the fragment fi or the special character − if that SNP is unspecified in the fragment. If the element Mi,j = − we say that it is a gap or, equivalently, that the fragment fi contains a gap at position j. Let fi ∈ F and 1 ≤ a ≤ b ≤ n such that ∀k ∈ [a, b], Mi,k = − and ∀k ∈ [1, m] \ [a, b], Mi,k = −, the fragment fi is called gapless. We say that M is gapless if all its fragments are gapless. We say that two fragments fi and fj have a collision if the following condition is true: ∃k ∈ [1, n] such that Mi,k = Mj,k ∧ Mi,k = − ∧ Mj,k = −. Given the matrix M the conflict graph G = (V, E) is defined as follow: for each row of M there is a vertex labelled with the correspondent fragment fi . If fi has a collision with fj , insert an edge between Vi and Vj . In this case the haplotype reconstruction is easy to solve. The rows of M can be split in two disjoint sets according to the bipartition of G. By construction of graph G the i-th character of all elements of a set induced from bipartition have the same value or is a gap. Thus for each set we build an haplotype simply choosing as value for SNP si the value of the i-th character (not equal to −). If M is not error free, the graph G may be not bipartite. The single individual haplotype reconstruction problem, can be reduced to one of the following problems [2]: – Minimum Fragment Removal (MFR): determine a minimal number of fragments (rows of the matrix M ) whose removal from the input set induces a bipartite graph. – Minimum SNP Removal (MSR): determine a minimal number of SNPs (columns of the matrix M ) whose removal from the input set induces a bipartite graph. – Longest Haplotype Reconstruction (LHR): determine set of fragments (rows of the Matrix M ) whose removal from the input set induces a bipartite graph and the length of the induced haplotype is maximized. – Minimum Error Correction (MEC): determine a minimal set of entries of the matrix M whose correction to a different value induces a bipartite graph. Our approach. We give a heuristic method for the minimum error correction problem MEC, since we permit to change single matrix entries. It is a heuristic method since we have no guarantee of attaining the minimum, nor any guarantee on the approximation to the minimum that we can achieve. Note however than MEC is the hardest of the problems listed above. Our method is organized in phases (four phases) and it is greedy in nature (making choices that are optimal in a local sense). In each phase we perform three tasks: 1) detect likely positions of errors 2) allocate fragments to the two partially built haplotype strings, and 3) build partial haplotype strings deciding via majority on ambiguous SNPs. The difference among the phases is twofold: on one hand we can use the knowledge built up in the previous phases, and on the other hand in passing from one phase to the next we relax the conditions for the decisions to be taken regarding tasks 1), 2) and 3). Organization of the paper. In Section 2 we review the state of the art for the SIH problem. In Section 3 we describe our algorithm. In Section 4 we describe the experiments and their results.
52
2
L.M. Genovese, F. Geraci, and M. Pellegrini
State of the Art
SNP’s and Haplotypes have become recently a focus of research (See the HapMap project [5]) because of their potential for associating observable phenotypes (e.g. resilience to diseases, reactivity to drugs) to individual genetic profiles [15]. The technology for detecting the position of SNP’s in the human genome has been developed [9,12] and continues to be refined to produce more accurate SNP maps. Two large and active areas of research involving haplotypes are the determination of the genetic variability in a population (see surveys in [2,6]) starting from genotyping data, and the association of genetic variability with phenotypes. In this paper we discuss the problem of determining the haplotype of a single individual based on fragments from shotgun sequencing of his/her DNA which is known as the Single Individual SNP Haplotyping Problem (SIH)1 . This problem has been tackled both from a theoretical point of view [1,3,4,7,13] and from a more practical one [8,11,14]. Weighted versions of the problem are studied in [16]. The SIH problem is clearly not formally an input/output problem as defined usually in computer science2 , therefore precise complexity statements can be made only for the derived problems such as: MEC, LHR, MFR and MSR. MEC even with gapless fragments is NP-hard [3], and it is APX-hard for fragments with at most 1 gap [4]. There is an O(log n)-approximate polynomial time algorithm [11]. LHR with gapless fragments can be solved exactly in polynomial time [3]; it is NP-hard and APX-hard for fragments with at most 1 gap [4]. MFR is NP-hard for fragments with at most 1 gap, and MSR is NP-hard for fragments with at most 2 gaps [7]. If we have a bound k on the total number of gaps, for k constant, MFR and MSR are polynomially solvable [13]. In general MFR and MSR are APX-hard. The polynomial time algorithms proposed for the above problems are at least cubic (in the gapless case) therefore a faster heuristic method has been proposed in [11] that is based on an incremental construction. We improve upon [11] by giving a method that is as fast in practice and more accurate when the reading error rate increases and/or the fragment coverage decreases. Interestingly, even if exact polynomial algorithms are known for MFR on gapless input in [13], simulations reported in [11] show that the heuristic method of [11] achieves better accuracy in solving the original SIH problem. For this reason we take [11] as baseline algorithm even when dealing with fragments with gaps. Wang et al. [14] describe a Genetic Algorithm for this problem that in some reported experiments gives good performance for short haplotypes (about 100 SNPs). It is unclear how this method would performs on longer haplotypes and with lower coverage rate. We are not aware of any publicly available implementation of the methods described in [8,11,14,16], therefore we chose as baseline the method in [11] that is comparable to ours in terms of speed, and does not rely on any statistical model. As future work we plan a comparison of our method with the one in [14]. 1 2
Also called the Haplotype Assembly Problem. SIH informally relates the output of the algorithm to an unknown DNA string whose "approximation" is the purpose of the algorithm. The formal input to the algorithm is a set of fragments that are related to the unknown string via physical error-prone processes. Thus there is no mathematically formalized relationship between the input and the criterion for evaluating the output of the algorithm.
A Fast and Accurate Heuristic for the Single Individual SNP
3
53
Our Heuristic
The Input to the problem is a set of fragments F and a set of SNP’s positions S. The Output is pair of consensus strings calS 1 and S2 . In the process of obtaining the consensus strings one has to decide to which string a fragment should be associated, whether any letter in a fragment should be modified and finally decide by majority the output letter at any given position. Ideally one should strive for a minimal modification of the input letters. Note however that our quality metric is the reconstruction error, not the number of letters changed. We start by building the SNP matrix M with m rows and n columns where each row is a fragment. The element in position Mi,j is the j-th SNP in fragment fi or −, if it is a gap. Our heuristic builds the haplotype consensus with a pre-processing (phase 1) and three main phases (2-4): Ph-1 We perform a statistical analysis of potential conflicts among pairs of columns in M ; Ph-2 in phase Ph-2 we select a first group of columns with the highest possible confidence to be error-free and we build an initial solution from them; Ph-3 in the third phase we select those columns that we are able to disambiguate using the solution obtained in the previous phase; Ph-4 in the last phase we try to complete the solution using weaker conditions for assigning columns to the final solution. In this section we will give priority to an intuitive understanding of the several phases and steps, skipping on some more formal details to be expanded in the full paper. First phase: Preprocessing. For each column of M we build a group Gi containing a certain number of sets. Each set is initialized with the indexes of all the rows which have in position i a character different from −. So Gi can contain from 0 up to 4 sets (the empty set and one for each base: a, c, g, t). Observation 1. If Gi has 0 sets, column i is empty. In this case there is no data to reconstruct the haplotype for column i. If Gi has just 1 set, all the character in column i are the same. If Gi has more then 2 sets, column i contains errors. If Gi contains three of four sets, we can suppose that the one or two smaller sets are due to errors. Unfortunately we can only detect the presence of errors, but we have not enough information to correct them. In this case we remove from the matrix M the information about the possibly uncorrect values and update Gi accordingly. Note that in cases where Gi contains a large set and two smaller ones of the same size, we can not remove those sets because we could likely be removing correct data. If we suppose a constant coverage of each locus by both the haplotypes, in the case Gi has two sets and one of them is much bigger than the other, we can suppose that locus to be homozygote and the data in the smaller set is a reading error. Clearly in this case we can predict the right content of the matrix M in these positions. After filtering out the above easy cases we are left to deal with groups of two sets of non negligible size. Given two groups Gi = (Si,1 , Si,2 ) and Gj = (Sj,1 , Sj,2 ) having exactly 2 sets and such that i = j, we call conflict matrix the squared matrix Ei,j of order 2: Si,1 ∩ Sj,1 Si,1 ∩ Sj,2 Ei,j = Si,2 ∩ Sj,1 Si,2 ∩ Sj,2
54
L.M. Genovese, F. Geraci, and M. Pellegrini
When only one diagonal of E has its elements non-zero and it is of full rank, there are no detectable errors. Otherwise we have a conflict between column i and j. The detected errors could be in one or both columns. Observation 2. If Ei,j has only one element equal to ∅ we can suppose that the corresponding diagonal element contains the reading errors and its cardinality is the number of such errors. For example if in Ei,j only the element Si,2 ∩ Sj,1 is 0 then there are |Si,1 ∩ Sj,2 | errors in at least one of the columns i and j in the rows of indexes in Si,1 ∩ Sj,2 . The assumption that the elements in Si,1 ∩ Sj,2 are the errors in Ei,j becomes more plausible if its cardinality is significantly smaller than the others. Observation 3. In presence of errors in Ei,j we can not establish if the error is in column i or j or both. We can locate the error if one of the following conditions hold: – If ∀k = j Ei,k does not contain errors, then errors is likely in column j; – If ∃k such that Ei,j has an error, Ej,k has an error and Ei,k has no errors, then we deduce that the error is likely in column j. In the case of the example in observation 2, if also one of the conditions of observation 3 holds, we deduce that the errors are in the rows Si,1 ∩ Sj,2 in the column j. So we can correct the error by removing from M the incorrect values and updating Sj,2 via removing Si,1 ∩Sj,2 . If none of the conditions in observation 3 hold we can not discriminate between columns i and j so we can remove the errors at the cost of a loss of information by assigning: Sj,2 = Sj,2 \ Si,1 ∩Sj,2 and Si,1 = Si,1 \ Si,1 ∩ Sj,2 . We have observed empirically that the error correcting criteria of first Phase are effective when the input has a very low reading error rate. As the error rate increases the bulk of the disambiguation is on the next phases 2-4. Second phase. The main goal of this phase is the selection of a set of pair of groups with the highest possible probability of containing no inconsistencies and extract from them two sets of fragments that will be the core of the first (partial) solution. Candidate list selection. The optimal set of candidate pairs to select is that in which each group has no conflicts with all the other groups. Unfortunately, if the percentage of errors in M is high this set can be empty. Moreover a correct group can be involved in a conflict with another group due to reading errors in the latter. This fact causes the removal of all the pairs in which that group appears. Higher coverage tends to increase this bad effect on the size of the candidate set. In fact the probability that a group with no errors has a conflict with a group with errors is proportional to the coverage. If the optimal candidate set of groups pairs is empty, we must to find the set with the highest confidence to be a good candidate set. First of all we compute the mean number of conflicts among pairs of groups. As candidate set we pick all the pairs for which all the following conditions hold: a) both its groups have two sets, b) the number of conflicts in which its groups are involved is less than the mean, c) the matrix E of its groups is diagonal and of full rank
A Fast and Accurate Heuristic for the Single Individual SNP
55
Extraction of initial core. From the candidate list obtained in the previous paragraph, we build now two disjoint set of rows of M that will be used as core of the final solution. We build a series of chains of pair in this way: the first pair of a new chain is the first unused pair of the candidate list. Then we add a pair to the chain if at least one group of the pair is already in the chain until no more pairs can be added to the chain. The procedure stops when all the pairs are in a chain. At the end we select the longest chain. The construction of the series of chains is straightforward. First of all, we sort the candidate pairs in lexicographic order and place them in a vector L = [C0 , . . . , C|L| ]. We build also a vector V in which we store all the indexes j ∈ [1, |L|] of L such that the the first elements of consecutive pairs are different, Cj [0] = Cj−1 [0]. We set as first element of V the value 0 and as last element of V the value |L|. We build also a vector v of size m containing several status flags: position i is set to “to visit” if the group i-th does not appear in any chain, set to “visited” if it appears in the chain we are building and set to “complete” if all the pair containing the index i were already used. A new chain is built as follows: 1. Find an index i such that the pair Ci is not already used and set it as the first element of the chain. 2. All the elements of L not yet used in the range [V [i], V [i + 1] − 1] are added to the chain, if they exist. The vector v is updated accordingly. 3. If there is an index j such that v[Cj [0]] is set to “visited” got step (2.) using i such that V [i] = j. Otherwise search a pair where v[Cj [1]] is set to “visited” and goto step (2.) using i such that V [i] = j. 4. if v has no element set to “visited” the chain is complete. It is easy to note that the arbitrary choice of the first element do not influence the pairs that will fall in the chain, but only their order that is not important in our heuristic. Chains have the important propriety: Property 1. If we consider groups in the same order in which they appear in a chain, one of the following conditions holds: 1. Si,1 ∩ Si+1,1 = ∅ ∧ Si,2 ∩ Si+1,2 = ∅ ∧ Si,1 ∩ Si+1,2 = ∅ ∧ Si,2 ∩ Si+1,1 = ∅ 2. Si,1 ∩ Si+1,2 = ∅ ∧ Si,2 ∩ Si+1,1 = ∅ ∧ Si,1 ∩ Si+1,1 = ∅ ∧ Si,2 ∩ Si+1,2 = ∅ We are now ready to build a sort of “super-group” G = (S1 , S2 ) in which S1 will be used to build the first haplotype consensus, and S2 for the second haplotype. If G0 is the first element of the longest chain, S1 is initialized with the elements of S0,1 and S2 is initialized with the elements of S0,2 . Property 1 suggests a simple way to assign the sets of each considered group to a set Si . In fact if, for example, the elements in set Si,1 are assigned to S1 and Si,1 ∩ Si+1,1 = ∅ holds, the elements in set Si+1,1 can also be assigned to S1 . All the groups whose sets are assigned to G are marked as “used” and will not be considered in the next phases. If the considered columns of M , (remember that Gi refers to column i of M ), have no errors we have that S1 ∩ S2 = ∅. Otherwise3 there are errors in the rows of M whose indexes are in the intersection and in at least one of the columns considered. If there is an element j in both the Si ’s and we do not remove it from one of these sets, the fragment fj would give its contribute to both the haplotypes, which is incorrect. In order to choose to which haplotype 3
As before, high reading error rates reduce the efficacy of previous filtering steps.
56
L.M. Genovese, F. Geraci, and M. Pellegrini
to assign the fragment fj , we simply count how many times j appear in the sets assigned to S1 and S2 and assign j to the set with the highest number of assignments. Third phase. If we succeed in partitioning all the rows of M we are ready to build the final haplotype consensus using the method described at the end of this section. Experiments with high error rates show that at the end of the previous phase we are able to assign a large part of the rows of M , but not all of them because we had not enough information to unambiguously assign some fragment to a set Si . In this phase we already have a partial solution that could give us more information and we can use weaker conditions to assign elements of the groups to G. The first information we distill from the partial solution is an estimation of the mean ratio between the cardinality of sets of the fragments belonging to the two haplotype strings. We compute this ratio only for those groups that were involved in the partial solution because they have higher probability to be correct with respect to the others. We can now safely assume that if the ratio between the cardinality of the sets of an unused group is far enough from the mean, the locus represented from that group is homozygote and the elements in the smaller set of that group are all errors and can be corrected updating M accordingly. Considering G as a group, we can build a vector of conflict matrices E = E1 , . . . , En , such that Ei is the conflict matrix relative to G and Gi . Note that these matrices are more informative than those of previous phase because they are representative of a greater part of the input and not only of two columns. In case of conflicts in Ei we can with high probability say that the errors are in Gi and not in G. This becames more evident in the case of a matrix Ei that have just one element equal to 0 and the value in the diagonal with the 0 is much smaller than the values in the other diagonal. A matrix of this form was discarded in the previous phase, because the error position was not predictable with enough confidence. Instead, here the information provided by G gives us the ability to deduce the exact position of the errors in the i-th column of M and correct them. The main goal on this phase is to add as many possible elements to Gi trying to correct some errors in M for improving the haplotype consensus. The procedure acts as follow: 1. Let α = ∅, β = ∅ 2. For all those groups Gi with i ∈ [1, n] not yet marked, with 2 sets and such that Ei is diagonal and of full rank: if Si,1 ∩ S1 = ∅ and Si,1 ∩ S2 = ∅ add the elements of Si,1 to α and Si,2 to β. Otherwise, due to the fact Ei is diagonal, must hold that Si,2 ∩ S1 = ∅ and Si,2 ∩ S2 = ∅. In this case simply add the elements of Si,1 to β and Si,2 to α. Gi becomes marked. 3. If an element j appear in both α and β, we simply count how many times j is present in the sets assigned to α and β and assign j to the set with the highest number of assignments. 4. Assign all the elements of α to S1 and the elements of β to S2 . 5. Recompute the conflict matrix for the groups that are still not marked and restart from step (1.) until no more groups can be marked. 6. Correct errors that can be detected in M and restart from step (1.) until no more groups can be marked.
A Fast and Accurate Heuristic for the Single Individual SNP
57
Fourth phase. At the end of phase three, if there is some other group that is not marked yet, there is no further weaker condition that we can use to add those groups to G safely. The goal in this phase is not to add elements to G one by one, but to build another super-group G from the remaining unmarked groups and merge it with G, if possible. This strategy relies on the fact that an aggregation of columns is more robust to errors with respect to a single column. The choice to reuse the previous phases seems the most reasonable, but we must use weaker constraints. We can not use the techniques of the second phase to initialize G because at the end it could not intersect G (or the intersection could be too small). The problem of the intersection between G and the G is important. In fact if all the sets of both have null intersection there is not a way to join G and G. Instead, if the intersection is small, because of errors, by mistake we can join each set of G with the wrong one of G. The safest way to initialize G, is selecting the unmarked group with the highest possible intersection with G. Analyzing the matrices Ei from the previous phase for the unmarked groups, the one with the highest sum of the elements in a diagonal is the best candidate to initialize G. After the initialization of G, we can use the previous phase to add other elements. Here two constraints are relaxed: it is no more necessary that the conflict matrices are of full rank; detected errors in M are not corrected, but simply the wrong data is removed from M . Let a and b such that |Sa ∩ S1 | > |Sa ∩ S2 | and |Sb ∩ S1 | < |Sb ∩ S2 | and a = b, we assign to S1 all the elements of Sa not in S2 and assign to S2 all the elements of Sb not in S1 . Haplotype consensus. At the end of the previous phase, some fragments could still be assignable to both haplotype strings. They will be assigned a posteriori after the process of consensus construction to the most similar haplotype. We split M in two sub-matrices: M1 containing all the rows with indexes in S1 and M2 containing the rows with indexes in S2 Naturally it is impossible to establish which of the parent’s haplotype is deduced from S1 and which from S2 . We call pivot of M at position i the element P viM (different from a gap) that appears more frequently. If the column i of M has no elements, its pivot will be a gap. The consensus haplotype induced from S1 is a sequence in which the i-th element is P viM1 and the consensus haplotype induced from S2 is obtained in the same way from M2 .
4
Experiments
In our experiment we compared the following algorithms: A) Our heuristic, as described in section 3; B) Our implementation of Fast Hare (F.H.) following the description in [11]; C) The trivial reconstruction algorithm by majority voting that has the true fragment assignment as part if its input (Base). We implemented the algorithms in Python. Tests have been run on a Intel(R) Pentium(R) D CPU 3.20GHz with 4GB of RAM and with operating System Linux. All algorithms completed their task in less than 10 seconds for the data of largest size considered (strings of 1000 SNP’s). Input data and fragment generation. In previous papers [7,11] experiments were based on SNP matrices obtained from the fragmentation of artificially generated haplotype data. The most common approach to the generation of the
58
L.M. Genovese, F. Geraci, and M. Pellegrini
SNP matrices was suggested in [10]. The recent research project HapMap [12] has produced a map of the human haplotypes that is now publicly available [5]. Thus we were able to generate the fragment matrices from real data instead of using synthetic input haplotypes. Using real data, the Hamming distance between the two haplotypes is not a free parameter of our choice in the generation of M . For the extraction of the SNP matrix from the haplotypes we were inspired by the approach suggested in [10] taking in account standard parameters in current technology for shotgun sequencing. The free parameters we set in our experiments are: (a) the length l of the haplotype section to be reconstructed, (b) the coverage c of each haplotype and (c) the error rate e. Current technology for shotgun sequencing is able to manage fragments of the order of one hundreds of bases. In Li et al.[8] the average distance in bp of two SNP’s in the DNA sequence is quantified as 300 bp on average, and each fragment is of 650 bp’s. Each fragment covers a number of SNP’s in the range roughly [3, 7], thus we chose the length of each fragment in this range. Our generation schema is as follow for each experiment: we select the haplotype strings from a random chromosome among the human chromosomes numbered in [1..22] (thus excluding the gender chromosomes), we get a contiguous substring of length l from the first haplotype starting from a random location and its homologous substring from the second haplotype. As in [10] each such string is replicated c times. Next, errors are inserted uniformly at random in the haplotype substrings with probability e. At this point the strings are split in fragments by selecting iteratively the next cut point at an integer distance from the previous one chosen uniformly at random in the range [3, 7], starting from the first base. Note that the number of fragments is not determined a priori but it depends on the length l, on the coverage c and on the distribution of the fragment lengths. Gaps came from two sources. Input SNP gaps are those present in the original HapMap data. Mate pairs are obtained as follows: random pairs of disjoint fragments belonging to the same haplotype string are mated in a single gapped fragment (at the end of this phase globally 50% of the fragments are 1-gapped). Outcome of the experiments. We investigate the performance of our algorithm in different settings varying the input parameters. We choose three different length for the haplotyes: 100 bases as in [11], 500 bases like in [10] and 1000 bases. To test the effectiveness of the method we vary the coverage of each haplotype from 3 to 10 considering that in most reported experiments the coverage is about 5 [10]. To test algorithms robustness we used different levels of errors: from 0% to 20%. Each test was repeated 100 times and in table 1 is reported the mean number of errors in the reconstructed haplotypes with respect to the strings before error implants. Analysis of the experiments. In absence if errors (but with gaps) our method was able to reconstruct the haplotypes exactly in all cases. The reconstruction error rate increases for all three methods as the reading error rate increases and it decreases with the increase of coverage. In order to give a synthetic view of the data in Table 1 we use the Merit Function f : ⎧ if Our = F H ⎪ ⎨ 0 Our−B 1 − f= F H−B if Our < F H ⎪ ⎩ − 1 − F H−B if Our > F H Our−B
(1)
A Fast and Accurate Heuristic for the Single Individual SNP
59
Table 1. Quality measurements on the compared algorithms. Mean over 100 runs of the number of errors in the reconstructed haplotypes for error rate in [0.0,0.2], coverage in [3,10], and haplotypes length l = 100, 500, 1000. Err. Alg. Base Our F. H. Base. 5% Our F. H. Base. 10% Our F. H. Base 15% Our F. H. Base 20% Our F. H. 0%
Coverage. l = 100 3 5 8 10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.04 0.97 0.10 0.00 0.00 0.97 0.15 0.07 0.02 1.26 0.18 0.19 0.03 4.05 0.75 0.03 0.01 5.39 0.88 0.44 0.03 9.32 1.54 0.41 0.02 9.78 2.26 0.34 0.08 12.21 2.83 0.43 0.25 18.41 3.40 1.55 0.83 15.13 5.71 1.19 0.35 20.44 7.77 2.16 0.93 32.63 11.51 3.40 1.68
Coverage. l = 500 3 5 8 10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.72 0.40 0.04 0.27 4.81 0.47 0.01 0.00 5.60 0.57 0.01 0.04 11.79 0.95 0.03 0.03 21.14 3.74 0.24 0.03 26.45 4.28 0.33 0.07 45.52 5.91 0.43 0.07 47.71 12.57 1.49 0.38 66.55 25.70 2.21 0.96 102.60 25.34 2.65 0.88 80.97 27.90 5.04 1.68 120.53 52.38 10.17 4.74 224.46 64.14 12.32 4.16
Coverage. l = 1000 3 5 8 10 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 8.94 1.79 2.24 0.04 11.60 0.99 0.04 0.01 14.95 1.59 0.13 0.03 21.24 2.97 0.26 0.55 43.38 7.85 0.60 0.13 60.87 9.95 2.59 0.29 123.92 15.17 1.43 0.46 95.40 25.42 2.66 0.77 134.74 35.61 4.59 2.46 268.09 58.81 4.63 1.59 159.74 56.90 10.86 3.53 220.52 94.26 23.12 13.54 469.54 150.18 22.21 11.05
where Our is the error count of our algorithm, F H is the error count for Fast Hare and B is the error count for the baseline algorithm. Note that when Our and F H tie f has value zero. When Our is better than F H, f assumes a value in the range [0, 1], the higher the absolute value, the better is our algorithm w.r.t. Fast Hare. Symmetrically when Fast Hare is better than Our algorithm f assumes values in the range [−1, 0] the higher the absolute value, the better is Fast Hare w.r.t. our algorithm. This indicator is almost always in our favor (see Figure 1). The figure of merit f gives an idea of the quality ratio of FH and Our method w.r.t the baseline. There are 10 cases out of 60 in which FH has a better ratio. This happens mostly with high coverage (8 or 10). However in these case the quality difference is always rather small: less then 0.03 bases # 100 bases
# 500 bases
Merit
Coverage 1 3 5 8 10 0.5
# 1000 bases
1
1
0.5
0.5
0
0
0
-0.5
-0.5
-0.5
-1
-1 0
0.05
0.1
0.15
Error rate
0.2
-1 0
0.05
0.1 Error rate
0.15
0.2
0
0.05
0.1
0.15
0.2
Error rate
Fig. 1. Figure of merit (see equation 1) for the experiments in Table 1. Values above 0, indicates better relative performance of Our Method over Fast Hare. Values below 0 indicate better relative performance of Fast Hare.
60
L.M. Genovese, F. Geraci, and M. Pellegrini
over 100 bases, less than 0.58 over 500 bases and less than 2.49 over 1000 bases. Conversely often when our method has a better quality ratio for lower coverage also the absolute difference of the reconstruction errors is large.
References 1. Bafna, V., Istrail, S., Lancia, G., Rizzi, R.: Polynomial and APX-hard cases of the individual haplotyping problem. Theor. Comput. Sci. 335(1), 109–125 (2005) 2. Bonizzoni, P., Della Vedova, G., Dondi, R., Li, J.: The haplotyping problem: an overview of computational models and solutions. J. Comput. Sci. Technol. 18(6), 675–688 (2003) 3. Cilibrasi, R., van Iersel, L., Kelk, S., Tromp, J.: On the complexity of several haplotyping problems. In: Casadio, R., Myers, G. (eds.) WABI 2005. LNCS (LNBI), vol. 3692, pp. 128–139. Springer, Heidelberg (2005) 4. Cilibrasi, R., van Iersel, L., Kelk, S., Tromp, J.: On the complexity of the single individual SNP haplotyping problem. Algorithmica (in print, 2007) 5. The International HapMap Consortium: A haplotype map of the human genome. Nature 437, 1299–1320 (2005), http://snp.cshl.org 6. Gusfield, D., Orzack, S.H.: Haplotype Inference. In: CRC Handbook on Bioinformatics, ch. 1, pp. 1–25. CRC Press, Boca Raton, USA (2005) 7. Lancia, G., Bafna, V., Istrail, S., Lippert, R., Schwartz, R.: SNPs problems, complexity, and algorithms. In: Meyer auf der Heide, F. (ed.) ESA 2001. LNCS, vol. 2161, pp. 182–193. Springer, Heidelberg (2001) 8. Li, L., Kim, J.H., Waterman, M.S.: Haplotype reconstruction from SNP alignment. In: Proceedings of the seventh annual international conference on Computational molecular biology, pp. 207–216. ACM Press, New York (2003) 9. Matukumalli, L.K., Grefenstette, J.J., Hyten, D.L., Choi, I.-Y., Cregan, P.B., Van Tassell, C.P.: Application of machine learning in SNP discovery. BMC Bioinformatics 7, 4 (2006) 10. Myers, G.: A dataset generator for whole genome shotgun sequencing. In: Proceedings of the Seventh International Conference on Intelligent Systems for Molecular Biology, pp. 202–210. AAAI Press, Stanford, California, USA (1999) 11. Panconesi, A., Sozio, M.: Fast hare: A fast heuristic for single individual SNP haplotype reconstruction. In: Jonassen, I., Kim, J. (eds.) WABI 2004. LNCS (LNBI), vol. 3240, pp. 266–277. Springer, Heidelberg (2004) 12. Sachidanandam, R., et al.: A map of human genome sequence variation containing 1.42 million single nucleotide polymorphisms. Nature 409, 928–933 (2001) 13. Rizzi, R., Bafna, V., Istrail, S., Lancia, G.: Practical algorithms and fixedparameter tractability for the single individual SNP haplotyping problem. In: Guigó, R., Gusfield, D. (eds.) WABI 2002. LNCS, vol. 2452, pp. 29–43. Springer, Heidelberg (2002) 14. Wang, R.-S., Wu, L.-Y., Li, Z.-P., Zhang, X.-S.: Haplotype reconstruction from SNP fragments by minimum error correction. Bioinformatics 21(10), 2456–2462 (2005) 15. Weiner, M.P., Hudson, T.J.: Introduction to SNPs: discovery of markers for disease. Biotechniques Suppl (2002) 16. Zhao, Y.-Y., Wu, L.-Y., Zhang, J.-H., Wang, R.-S., Zhang, X.-S.: Haplotype assembly from aligned weighted SNP fragments. Computational Biology and Chemistry 29(4), 281–287 (2005)
Two Birds, One Stone: Selecting Functionally Informative Tag SNPs for Disease Association Studies Phil Hyoun Lee and Hagit Shatkay Computational Biology and Machine Learning Lab School of Computing, Queen’s University Kingston, ON, Canada {lee,shatkay}@cs.queensu.ca
Abstract. Selecting an informative subset of SNPs, generally referred to as tag SNPs, to genotype and analyze is considered to be an essential step toward effective disease association studies. However, while the selected informative tag SNPs may characterize the allele information of a target genomic region, they are not necessarily the ones directly associated with disease or with functional impairment. To address this limitation, we present a first integrative SNP selection system that simultaneously identifies SNPs that are both informative and carry a deleterious functional effect – which in turn means that they are likely to be directly associated with disease. We formulate the problem of selecting functionally informative tag SNPs as a multi-objective optimization problem and present a heuristic algorithm for addressing it. We also present the system we developed for assessing the functional significance of SNPs. To evaluate our system, we compare it to other state-of-the-art SNP selection systems, which conduct both information-based tag SNP selection and function-based SNP selection, but do so in two separate consecutive steps. Using 14 datasets, based on disease-related genes curated by the OMIM database, we show that our system consistently improves upon current systems.
1 Introduction Identifying single nucleotide polymorphisms1 (SNPs) that are involved in complex common diseases, such as cancer, is a major challenge in current molecular epidemiology. Due to their genome-wide prevalence, knowledge of such SNPs is expected to be essential for unraveling the genetic etiology of human diseases, and thus, for enabling timely diagnosis, treatment, and, ultimately, prevention of disease. However, genotyping2 and analyzing all the SNPs on the human genome [2] is practically infeasible as the number of SNPs is estimated at over ten million [3]. Thus, selecting a subset of SNPs that is sufficiently informative to conduct disease-gene association but still small enough to reduce the genotyping and analysis overhead, a process known as tag SNP selection, is a key step toward effective association studies. 1
2
A single nucleotide polymorphism (SNP) is the substitution of a single nucleotide at a certain position on the genome [1]. Genotyping is the biomolecular process of identifying the nucleotide of a genetic variation [1].
R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 61–72, 2007. c Springer-Verlag Berlin Heidelberg 2007
62
P. H. Lee and H. Shatkay
A variety of measures and algorithms have been proposed for tag SNP selection, and their utility has been empirically demonstrated by simulation studies or by association studies. Yet, while the selected informative tag SNPs may effectively characterize the allele information of a target genomic region, they are not necessarily the ones directly associated with disease or with functional impairment. Given this limitation, SNPs with deleterious functional effects have drawn recent attention [4, 5]. Typically, SNPs occurring in functional genomic regions are more likely to cause functional distortion and, as such, more likely to underly disease-causing variations [2,6]. As of yet, methods for the selection of informative tag SNPs do not take into account the functional significance of SNPs; similarly, methods for identifying disease-related SNPs do not attempt to capture the allele information of the complete target locus3 . The identification of informative tag SNPs and of functionally significant SNPs can be viewed as two distinct optimization problems with possibly conflicting objectives. Consequently, current systems that try to support both information-based tag SNP selection and function-based SNP selection [7, 8] address each selection problem independently. That is, they separately conduct tag SNP selection and function-based SNP selection, and combine the two selected sets as a last step. A major shortcoming of such systems is that the number of selected SNPs can be much larger than necessary. Moreover, the functional SNPs selected may not be predictive of the other SNPs in the locus, while the predictive SNPs selected may have no relation to disease. To address this limitation, we propose an integrative SNP selection system that simultaneously identifies SNPs that are both informative and carry a deleterious functional effect – which in turn means that they are likely to be disease-related. We formulate SNP selection as a multi-objective optimization problem, to which we refer as functionally informative tag SNP selection. We define a single objective function, incorporating both allelic information and functional significance of SNPs, and present a heuristic selection algorithm that we show, through a comparative study, to improve upon other state-of-the-art systems. To our knowledge, the idea of combining the two notions of SNP selection – the function-based and the information-based – into a single optimized selection process is new, and was not attempted before. In Sec. 2, we formulate the problem of functionally informative tag SNP selection, and introduce the basic notations that are used throughout the paper. Section 3 describes our functional-significance assessment process and our heuristic algorithm for selecting functionally informative SNPs. Section 4 reports the results from a comparative study. Section 5 summarizes our findings and outlines future directions.
2 Functionally Informative Tag SNP Selection We are concerned with identifying a set of SNPs associated with a given disease. The relevant target locus on the genome can be as large as a whole chromosome or as small as a part of a gene. Disease association studies typically involve the following steps: 1) chromosome samples are obtained from cases bearing the disease and from controls (people not bearing the disease); 2) The allele information for all the SNPs on the target locus is obtained (genotyped) from the chromosome samples; 3) a subset of SNPs that 3
A locus is the chromosomal location of the target region for biomolecular experiments [1].
Two Birds, One Stone: Selecting Functionally Informative Tag SNPs
63
is most associated with the disease phenotype4 is identified. However, in practice, due to experimental cost and time, not all the SNPs on the target locus can be genotyped or analyzed. We thus need to select a subset of at most k SNPs on the target locus (where k is a pre-specified number) whose allele information is as informative as that of the whole set of SNPs, while including those SNPs that are most functionally significant. We refer to the problem as functionally informative tag SNP selection. Before we formulate and address this problem, we introduce here the basic notations that are used throughout this paper. Suppose that our target locus contains p consecutive SNPs. Each SNP can be represented as a discrete random variable, Xj (j = 1, ..., p), whose possible values are the 4 nucleotides, {a, g, c, t}. For each value x ∈ {a, g, c, t}, there is a probability P r(Xj = x) that Xj is assigned the nucleotide x. Let V ={X1 , ..., Xp } denote the set of random variables corresponding to the p SNPs. We are given a haplotype5 dataset, D, containing the allele information of n haplotypes, each of which consists of the p SNPs in V . The set D can be viewed as an n by p matrix; each row, Di+ , in D corresponds to the allele information of the p SNPs comprising haplotype hi , while each column, D+j , corresponds to the allele information of SNP Xj in each of the n haplotypes. We denote by Dij the allele information of the j th SNP in the ith haplotype. To formally address functional significance of SNPs, we denote by ej the functional significance score for each SNP Xj in V , and define E = {e1 , ..., ep } to be the set of scores for all the SNPs. We further discuss how these values can be obtained in Sec. 3.1. For a subset of SNPs, T ⊂ V , we define an objective function, f (T |D, E), to reflect both the allele information carried by the SNPs in T about the remaining SNPs in V − T , and the functional significance of the SNPs in T . The problem of functionally informative tag SNP selection can then be stated as follows: Problem : Functionally Informative Tag SNP Selection Input : A set of SNPs, V ; A maximum number of SNPs to select, k; A haplotype dataset, D; A set of functional significance scores, E; Output : A set of SNPs T = argmax f (T |D, E) . T s.t. T ⊂ V & |T | ≤ k
That is, to select a subset of functionally informative tag SNPs, we need to find among all possible subsets of the original SNPs in the set V , an optimal subset of SNPs, T , of size ≤ k, based on the objective function f (T |D, E). Our first task is to define the objective function, f (T |D, E). To do so, we first introduce two simpler objective functions, denoted by f1 (T |D) and f2 (T |E); the former measures the allelic information, while the latter measures the functional significance of a SNP set T . Definition 1. Information-based Objective. Given a set of k SNPs, T = {Xt1 , ..., Xtk}, and a dataset D of n haplotypes, we define an information-based objective function, f1 (T |D), as: p n 1 f1 (T |D) = I(Xj , T, Di+ ) np j=1 i=1 4 5
A phenotype is the physical, observed manifestation of a genetic trait [1]. A haplotype is a set of consecutive SNPs present on one chromosome [1].
64
P. H. Lee and H. Shatkay
where I(Xj , T, Di+ ) =
1 : if Dij == argmax P r(Xj = x |Xt1 = Dit1 , ..., Xtq = Ditk) ; x∈{a,g,c,t}
0 : otherwise .
The function I returns 1 if the allele of the j th SNP in the ith haplotype (i.e., Dij ) is correctly predicted based on the allele information of the SNPs in T . We note that, by using the conditional probability expression, the allele of Dij is predicted as the one that is most likely to occur given the allele information of predictive tag SNPs in T . 6 Otherwise, the function I returns 0. To summarize, the allelic information provided by a SNP set, T , with respect to a given haplotype dataset D, is measured by the average proportion of the correctly predicted alleles of each SNP, Xj , given the allele information of the SNPs in T . This information-based objective function, f1 (T |D), was introduced in our previous work [9], and is based on the prediction-based tag SNP selection approach [10, 11], which aims to select a subset of SNPs (i.e., tag SNPs) that can best predict the alleles of the remaining, unselected SNPs (i.e., tagged SNPs). This approach is appealing since: (1) it does not require prior block partitioning [12]; (2) it tends to select a small number of SNPs [13]; and (3)it works well even for genomic regions with low linkage disequilibrium7 [9]. An in-depth discussion and survey of information-based tag SNP selection approaches is given elsewhere [14, 15]. Definition 2. Function-based Objective. Given a set of k SNPs, T ⊂ V , and a set of functional significance scores, E = {e1 , ..., ep }, we define a function-based objective function, f2 (T |E) as: p ej · IT (Xj )
f2 (T |E) = where IT (Xj ) =
j=1
1 :
p e
j
j=1
if Xj ∈ T ; 0 : otherwise .
In other words, the functional significance of a SNP set T is the normalized sum of the functional significance of SNPs in T . We note that, for the vast majority of SNPs, no experimental evidence is yet available to substantiate their functional significance [2]. We thus define and evaluate the functional significance of SNPs using a large variety of bioinformatics tools for function-assessment. The details of our assessment procedure are described in Sec. 3.1. Based on the two functions defined above, we next define a single objective function, f (T |D, E), incorporating allelic information and functional significance. Definition 3. Functionally Informative Objective Function. Given a set of k SNPs, T ⊂ V , a haplotype dataset, D, a functional significance score set, E = {e1 , ..., ep }, and a parameter value, α (0 ≤ α ≤ 1), we define a functionally informative (FI) objective function, f (T |D, E) as: f (T |D, E) = α · f1 (T |D) + (1 − α) · f2 (T |E) . 6 7
Note that for any SNP Xtl ∈ T, I(Xtl , T, Di+ ) is by definition always 1. Linkage disequilibrium (LD) refers to the non-random association of SNPs [1].
Two Birds, One Stone: Selecting Functionally Informative Tag SNPs
65
The parameter α is a weighting factor, which allows us to adjust the importance of information-based selection with respect to that of functional significance. In the work described here, we assign an equal weight to the two criteria, that is, α = 0.5. We refer to the value assigned by this function to the subset of SNPs T, as the FI-score of T. To summarize, we are looking for a subset of at most k SNPs, T , that is both functionally significant and likely to correctly predict the remaining SNPs in V − T . Bafna et al. [12] have previously shown that finding k most informative tag SNPs is NP-hard. Based on this, we take it as a conjecture that the current problem is also NP-hard, (the proof is beyond the scope of this paper). The next section introduces a functionassessment process and a heuristic algorithm to address the problem.
3 Models and Algorithms Our SNP selection system involves two main steps: 1) assessing the functional significance, ej , of SNPs and 2) selecting a set of functionally informative tag SNPs, T . These are described next. 3.1 Assessing the Functional Significance of SNPs Using a variety of existing, publicly available bioinformatics tools, we examine the deleterious effects of SNPs on the molecular function of their genomic region. In particular, we focus on the following three major categories of biological function: – Protein Coding: SNPs in protein coding regions may cause an amino acid substitution (i.e., a missense mutation) or interfere with protein translation (i.e., a nonsense mutation). – Splicing Regulation: SNPs in splicing regulatory regions may affect alternative splicing or result in exon skipping or intron retention. – Transcriptional Regulation: SNPs in transcription regulatory regions (e.g., transcription factor binding sites, CpG islands, regulatory RNAs) can alter the affinity of the binding sites, and disrupt proper gene regulation. We assess the functional significance of SNPs based on their location and possible deleterious effects along these three functional categories. Figure 1 illustrates the following assessment process: For each of the three categories, a SNP is separately assigned into one of three classes8 : Class 1 indicates irrelevance to the biological function; Class 2 indicates that the SNP is relevant to the biological function, but predicted to be benign or has no evidence of deleterious effects; Class 3 indicates that the SNP is likely to be deleterious. For example, SNPs outside a protein coding region are considered to be irrelevant to protein coding, and as such are assigned to Class 1 with respect to Protein Coding. Among the SNPs within a protein coding region, nonsense SNPs and some missense SNPs are predicted to have deleterious effects to protein coding, and are thus assigned to Class 3; the remaining SNPs within the protein coding region are assigned to Class 2. 8
Thus, a SNP is assigned three class labels; one label for each of the three functional categories.
66
P. H. Lee and H. Shatkay
SNP
Splicing Regulation
Protein Coding
NO
Co din g Re gi on?
YES
Intronic Splice Site ?
Class 1
Transcription Regulation
Class 3
YES
TF Binding Site?
YES Non Se n se ?
NO
YES
Exonic Splicing Regulator ?
NO NO
Class 2
M is Se ns e ?
NO
Class 3 NO
Other Regulatory Region?
Class 1
NO
Class 1
YES
YES YES
Deleterious ?
NO
NO
Conserved ?
NO
Conserved ?
Class 2
YES YES
Class 3
Class 3
Class 3 Pol yP h en
S IFT
Class 2
YES
S NP effect
Majority Vote
SNP s3D
LS-SNP
ES E fi nder
Re scue ESE
ESR Se arch
Majority Vote
PESX
Gol de n Pa th
TF Se arch
HGMD
rSNP
Consite
Majority Vote
Fig. 1. Our functional significance assessment system
Similarly, the SNPs within a highly conserved splice regulatory region or transcriptional regulatory region are assumed to be deleterious with respect to the corresponding regulatory function [2], and are thus assigned to Class 3, while the SNPs within nonconserved regulatory regions are only relevant to the respective function, and are thus assigned to Class 2. To make a robust assessment, we use multiple bioinformatics tools that are based on different data, algorithms, or theory for examining each biological functional category. The tools, PolyPhen [16], SIFT [17], SNPeffect [18], SNPs3D [19], and LS-SNP [20] are used to examine missense SNPs; ESEfinder [21], RescueESE [22], ESRSearch [23], and PESX [24] are used to identify the SNPs in exonic splice regions; TFSearch [25] and Consite [26] are used to identify transcriptional regulatory SNPs in promoter regions; Ensembl [27], GoldenPath [28], and HGMD [29] databases are used to identify SNPs in other transcriptional regulatory regions (e.g., microRNA); and Ensembl [27] database is used to identify nonsense SNPs and the SNPs in intronic splicing sites. The classes assigned to each SNP, with respect to each functional category are decided by a majority vote of the integrated tools in the category. As a result, three class labels are assigned to each SNP, one for each of the three categories of biological function. To assign a single functional significance value to each SNP, we follow Bhatti et al. [2], and assign the highest class tag along all three categories as the functional significance score, ej , for the SNP Xj . For example, SNP rs4963 on gene ADD1 is assigned to Class 3 with respect to Protein Coding, Class 1 with respect to Splicing Regulation, and Class 1 with respect to Transcription Regulation. The functional significance score of SNP rs4963 is thus 3 because it is highly significant for the protein coding function.
Two Birds, One Stone: Selecting Functionally Informative Tag SNPs
67
3.2 Selecting Functionally Informative Tag SNPs Our selection algorithm takes an incremental, greedy approach. It starts with an empty tag SNP set, T , and iteratively adds one SNP to T until a maximum number, k, of SNPs are selected. Each greedy selection step identifies a SNP whose addition to T will result in the maximum increase in the value of the functionally informative objective function (FI-score) with respect to the current tagging set T . We first explain the basis for our greedy incremental selection process. Let T (m) denote the set of m selected SNPs after the mth iteration, where m = 0, ..., k and T (0) = ∅. The FI-score of T (m) was defined in Def. 3 as follows:
p n α · 1 · I(X , T (m) , D ) +(1 − α)· =
f (T (m) |D, E) = α · f1 (T (m) |D) + (1 − α) · f2 (T (m) |E) j=1
np
j
i=1
i+
e ej
· IT (m)
p
(Xj ) .
l
l=1
Note that the FI-score of T (m) is the weighted sum of the allelic information of T (m) and the functional significance of T (m) for each SNP Xj (j = 1, ..., p). For simplicity, we denote the contribution of each SNP Xj to the FI-score of T (m) as fj (T (m) |D, E), and refer to it as the FI-score of Xj with respect to T (m) . That is,
n e 1 fj (T (m) |D, E) = α · np · I(Xj , T (m) , Di+ ) + (1 − α)·
j
p
i=1
el
· IT (m)
(Xj )
,
l=1
and f (T (m) |D, E) =
p
fj (T (m) |D, E) .
j=1
In the next iteration, m+ 1, we aim to select a SNP, X (m+1) , whose addition to T (m) will maximally increase the FI-score. Using the FI-score of Xj with respect to T (m) , fj (T (m) |D, E), defined above, this goal can be stated as follows: X (m+1) = argmax
p f (T (m) ∪ j
{X}|D, E) − fj (T (m) |D, E)
.
X∈ V −T (m) j=1
Our algorithm is outlined in Fig. 2. It starts with an empty set of tag SNPs, T , and computes the FI-score of each SNP with respect to the current set T . We note that although no SNP is currently selected, our algorithm can still predict the allele information of SNPs, and can thus lead to a different FI-score for each SNP. The reasoning is that in this initial case where T is empty, the posterior probability, P r(Xj |T ), shown in the definition of the function I within Def. 1, is simply the prior probability, P r(Xj ). That is, we always predict the alleles of Xj , Dij (i = 1, ..., n), as the major allele of the SNP. This approach is taken because it maximizes the expected prediction accuracy when no other information is given. At each subsequent iteration, the SNP that leads to the maximum increase in the FI-score is selected and added to T . The FI-score for
68
P. H. Lee and H. Shatkay Input: a set of SNPs, V ; a maximum number of SNPs to select, k; a haplotype dataset, D; a set of functional significance scores, E; Output: a set of tag SNPs, T . m ← 0. T (m) ← ∅. For each SNP Xj ∈ V F Ij ← fj (T (m) |D, E). While m < k For each t where Xt ∈ V − T (m) (m)
Δt
←
p f (T (m) ∪ X |D, E) − F I . j
t
j
j=1
X
(m+1)
← argmax Xt ∈V −T (m)
(m) Δt .
T (m+1) ← T (m) ∪ X (m+1) . For each Xj ∈ / T (m) F Ij ← fj (T (m+1) |D, E). m ← m + 1. T ← T (m) . Fig. 2. The incremental, greedy algorithm for selecting functionally informative tag SNPs
each SNP is updated based on the augmented set T and used in the next iteration. This procedure is repeated until the set T contains the pre-specified number of SNPs, k. The time complexity of each incremental greedy selection is O((p − m)2 · n), where p−m is the number of SNPs that can be selected, and n is the number of haplotypes in a dataset D. As this iteration is repeated for m = 0 to m = k − 1, the overall complexity of our algorithm is O(k · n · p2 ).
4 Experiments and Results 4.1 Experimental Setting For evaluation, we have selected 14 genes that are involved in the etiology of common and complex diseases according to the OMIM database [30] and have disease-related SNPs identified and recorded by the HapMap Project [31]. To identify the candidate genes, we scanned the OMIM database for several major common and complex diseases, including diabetes, cancer, hypertension, and heart disease. The retrieved genes were then scanned to find those that have SNPs with possible deleterious functional effects reported in the biomedical literature and also have haplotype information available from the HapMap consortium [31]. From the genes satisfying these criteria, 14 were selected at random. Table 1 provides the genetic characteristics of the 14 genes and their associated disease. The haplotype datasets of the 14 genes were downloaded from the HapMap project website [31]; The genomic location of each gene, including a 10k promoter region, was used to download the phased haplotype data (HapMap public release #20/phaseII) for the CEU population.
Two Birds, One Stone: Selecting Functionally Informative Tag SNPs
69
Table 1. Summary of 14 test datasets. Linkage disequilibrium (LD) is estimated by the multiallelic extension of Lewontin’s LD, D [32]. The number of SNPs selected by TAMAL and by SNPSelector are shown in the right column.
Gene
Target Disease
Locus
LD (D ) Total # of SNPs
ADD1 BRCA2 CMA1 ELAC2 ERBB2 F7 HEXB ITGB3 LEPR LTA MSH2 NOS3 PTPRJ TP53
Hypertension Breast Cancer Hypertension Prostate Cancer Prostate Cancer Heart Disease Mental Retardation Heart Disease Diabetes Heart Disease Colon Cancer Alzheimer Disease Colon Cancer Colon Cancer
4p16.3 13q12.3 14q11.2 17p11 17q21.1 13q34 5q13 17q21.32 1p31 6p21.3 2p22-p21 7q36 11p11.2 17p13.1
0.7718 0.7657 0.8361 0.8336 0.8104 0.8629 0.7371 0.6491 0.7048 0.7865 0.8413 0.6183 0.7863 0.7154
60 106 20 35 8 13 51 83 245 12 51 16 115 9
# of Selected SNPs TAMAL SNPSelector 16 28 6 13 6 8 10 20 46 4 18 7 32 5
1 13 4 2 1 5 5 8 11 2 4 0 7 2
We compare our system with two state-of-the-art SNP selection systems that support both tag SNP selection and function-based SNP selection: TAMAL [7] and SNPselector [8]. The two systems share the same goal with our system, namely, selecting a set of tag SNPs, with significant functional effects on the molecular function of the genes, for association studies. However, they differ from our system in the assessment process for the functional significance of SNPs, the integrated bioinformatics tools, and the criteria used for selecting SNPs. Moreover, they conduct tag SNP selection and function-based SNP selection in two separate consecutive steps, while we address it as a single optimization problem. As evaluation measures, we use Halperin’s prediction accuracy [11] and the FI-score, introduced in Def. 3, (we note that the two systems to which we compare do not provide an evaluation measure). To compare the performance of the systems using the two measures, the SNP sets selected by each of the compared systems must include an equal number of SNPs. However, unlike our system, TAMAL and SNPselector do not allow the user to specify the number of selected SNPs, but rather calculate a subset of SNPs and provide it as their output. Thus, when they do not select the same number of SNPs for the same gene, they cannot be directly compared. Hence, for a fair comparison, we first apply each of the compared systems to each of 14 test datasets, and then use our system on the same dataset to select the same number of SNPs as selected by the compared system. We then compute the two evaluation measures for the sets selected by each of the systems, and compare the resulting scores. The number of SNPs selected by TAMAL and SNPselector for the 14 tested genes is shown in Table 1. To ensure robustness of the results obtained from our system, we employ 10-fold cross validation 10 times, each using a randomized 10-way split of the n haplotypes. In all cases, the average performance is used in the comparison.
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
Our System TAMAL
1
2
3
4
5
6
7
8
Prediction Accuracy .
P. H. Lee and H. Shatkay
Prediction Accuracy .
70
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
9 10 11 12 13 14
Our System SNPselector 1
2
3
4
5
Tested Genes
6
7
8
9 10 11 12 13 14
Tested Genes
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
Our System TAMAL 1
2
3
4
5
6
7
8
9 10 11 12 13 14
Tested Genes
The FI-Score
The FI-Score
(a) The prediction accuracy of the selected tag SNPs for each gene 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
Our System SNPselector 1
2
3
4
5
6
7
8
9 10 11 12 13 14
Tested Genes
(b) The FI-score of the selected tag SNPs for each gene Fig. 3. The performance of our system and the compared systems for 14 gene datasets
4.2 Results Figure 3 shows the performance of our system compared with TAMAL (left) and with SNPselector (right). The X-axis represents the 14 genes in an alphabetical order of their names, as listed in Table 1. In Fig. 3(a) (top), the Y-axis shows Halperin’s prediction accuracy [11], and in Fig. 3(b) the Y-axis shows the FI-score for the selected SNP set of the corresponding gene. Our system (upper solid line with diamonds) consistently outperforms the other two systems, TAMAL and SNPselector (lower dotted line with rectangles) on both evaluation measures. The performance difference in all cases is statistically significant, as confirmed by the Wilcoxon rank-sum test (p-values are 1.144e005 and 4.7e-003 with respect to the TAMAL system and 1.7382e-005 and 5.6780e-004 with respect to the SNPselector system.). We note that optimizing the FI-score when selecting SNPs does not compromise the predictive power of the SNPs selected by our system, that is, our selected SNPs still have a high prediction accuracy according to Halperin’s original measure as demonstrated by Fig. 3(a).
5 Conclusions We have presented a first integrative SNP selection system that simultaneously identifies SNPs that are both highly informative in terms of providing allele information for
Two Birds, One Stone: Selecting Functionally Informative Tag SNPs
71
the target locus, and are of high functional significance. Our main contributions include the formulation of the problem of functionally informative tag SNP selection as a multiobjective optimization problem, presenting a heuristic selection algorithm to address the problem, and proposing an assessment process for scoring the functional significance of SNPs. An empirical study over a set of 14 disease-associated genes shows that our system indeed improves upon current state-of-the-art systems. In the near future we plan to apply a general computational approach, such as goal programming [33], for addressing the multi-objective optimization problem of selecting functionally informative tag SNPs. We also plan to apply a probabilistic approach to assess the functional significance of SNPs.
References 1. Hedrick, P.: Genetics of pouplation, 3rd edn. Jones and Bartlett Publishers (2004) 2. Bhatti, P., Church, D., Rutter, J.L., Struewing, J.P., Sigurdson, A.J.: Candidate single nucleotide polymorphism selection using publicly available tools: a guide for epidemiologists. American Journal of Epidemiology 164, 794–804 (2006) 3. Sherry, S., Ward, M., Kholodov, M., Baker, J., Phan, L., Smigielski, E., Sirotkin, K.: dbSNP: the NCBI database of genetic variation. Nucleic Acids Research 29, 308–311 (2001) 4. Brunham, L.R., Singaraja, R.R., Pape, T.D., Kejariwai, A., Thomas, P.D., Hayden, M.R.: Accurate prediction of the functional significance of single nucleotide polymorphisms and mutations in the ABCA1 gene. PLOS Genetics 1, 739–747 (2005) 5. Rebbeck, T.R., Ambrosone, C.B., Bell, D.A., Chanock, S.J., Hayes, R.B., Kadlubar, F.F., Thomas, D.C.: SNPs, haplotypes, and cancer: applications in molecular epidemiology. Cancer Epidemiology, Biomarkers & Prevention 13, 681–687 (2004) 6. Conde, L., Vaquerizas, J.M., Ferrer-Costa, C., de la Cruz, X., Orozco, M., Dopazo1, J.: PupasView: a visual tool for selecting suitable SNPs, with putative pathological effect in genes, for genotyping purposes. American Journal of Epidemiology 33, W501-W505 (2005) 7. Hemminger, B.M., Saelim, B., Sullivan, P.F.: TAMAL: an integrated approach to choosing SNPs for genetic studies of human complex traits. Bioinformatics 22, 626–627 (2006) 8. Xu, H., Gregory, S.G., Hauser, E.R., Stenger, J.E., Pericak-Vance, M.A., Vance, J.M., Zuchner, S., Hauser, M.A.: SNPselector: a web tool for selecting SNPs for genetic association studies. Bioinformatics 21, 4181–4186 (2005) 9. Lee, P.H., Shatkay, H.: BNTagger: improved tagging SNP selection using Bayesian networks. Bioinformatics 22, e211–219 (2006) 10. Sebastiani, P., Lazarus, R., Weiss, S.T., Kunkel, L.M., Kohane, I.S., Ramoni, M.F.: Minimal haplotype tagging. Proceedings of the National Academy of Sciences 100, 9900–9905 (2003) 11. Halperin, E., Kimmel, G., Sharmir, R.: Tag SNP selection in genotype data for maximizing SNP prediction accuracy. Bioinformatics 21, i195–i203 (2005) 12. Bafna, V., Halldorsson, B.V., Schwartz, R., Clark, A.G., Istrail, S.: Haplotypes and Informative SNP Selection Algorithms: Don’t Block Out Information. In: Proceedings of the 7th International Conference on Computational Molecular Biology, pp. 19–26 (2003) 13. Bakker, P.D., Graham, R.R., Altshuler, D., Henderson, B., Haiman, C.: Transferability of tag SNPs to capture common genetic variation in DNA repair genes across multiple population. In: Proceedings of Pacific Symposium on Biocomputing (2006) 14. Halldorsson, B.V., Istrail, S., Vega, F.D.L.: Optimal selection of SNP markers for disease association studies. American Journal of Epidemiology 58(3-4), 190–202 (2004)
72
P. H. Lee and H. Shatkay
15. Lee, P.H.: Computational haplotype analysis: An overview of computational methods in genetic variation study. Technical Report, -512, Queen’s University, Kingston, ON, Canada (2006), WEB URL: http://www.cs.queensu.ca/TechReports/ Reports/2006-512.pdf 16. Ramensky, V., Sunyaev, S.: Human non-synonymous SNPs: surver and survey. Nucleic Acid Research 30, 3894–3900 (2002) 17. Ng, P., Henikoff, S.: Predicting deleterious amino acid substitutions. Genome Research 11, 863–874 (2001) 18. Reumers, J., Schymkowitz, J., Ferkinghoff-Borg, J., Stricher, F., Serrano, L., Rousseau, F.: SNPeffect: a database mapping molecular phenotypic effects of human non-synonymous coding SNPs. Nucleic Acid Research 33, D527–532 (2005) 19. Yue, P., Melamud, E., Moult, J.: SNPs3D: candidate gene and SNP selection for association studies. BMC Bioinformatics 7, 166 (2006) 20. Karchin, R., et al.: LS-SNP: large-scale annotation of coding non-synonymous SNPs based on multiple information sources. Bioinformatics 21, 2814–2820 (2005) 21. Cartegni, L., Wang, J., Zhu, Z., Zhang, M.Q., Krainer, A.R.: ESEfinder: A web resource to identify exonic splicing enhancers. Nucleic Acids Research 31, 3568–3571 (2003) 22. Yeo, G., Burge, C.B.: Variation in sequence and organization of splicing regulatory elements in vertebrate genes. In the Proceeding of Proc. Natl. Acad. Sci. 101(44), 15700–15705 (2004) 23. Fairbrother, W.G., Yeh, R.F., Sharp, P.A., Burge, C.B.: Predictive identification of exonic splicing enhancers in human genes. Science 297, 1007–1013 (2002) 24. Zhang, et al.: Exon inclusion is dependent on predictable exonic splicing enhancers. Molecular and Cellular Biology 25(16), 7323–7332 (2005) 25. Akiyama, Y.: TFSEARCH: Searching Transcription Factor Binding Sites (1998), WEB URL: http://www.rwcp.or.jp/papia/ 26. Sandelin, A., Wasserman, W.W., Lenhard, B.: ConSite: web-based prediction of regulatory elements using cross-species comparison. Nucleic Acids Research 32, W249–252 (2004) 27. Hubbard, T.J.P., et al.: Ensembl, Nucleic Acids Research (Database issue) (2007) 28. Karolchik, D., et al.: The ucsc genome browser database. Nucl. Acids Res. 31(1), 51–54 (2003) 29. Krawczak, M., Thomas, N.S., Hundrieser, B., Mort, M., Wittig, M., Hampe, J., Cooper, D.N.: Single base-pair substitutions in exon-intron junctions of human genes: nature, distribution, and consequences for mrna splicing. Human Mutation 28(2), 150–158 (2007) 30. McKusick-Nathans Institute of Genetic Medicine, J.H.U., National Center for Biotechnology Information, N.L.o.M.: Online Mendelian Inheritance in Man, OMIM (TM). WEB URL: http://www.ncbi.nlm.nih.gov/omim/ 31. The International HapMap Consortium,: The International HapMap Project. Nature 426, 789–796 (2003) 32. Hedrick, P.: Gametic disequilibrium measures: proceed with caution. Genetics 117, 331– 341 (1987) 33. Lee, S.M.: Goal programming for decision analysis. Auerback, Philadelphia (1972)
Genotype Error Detection Using Hidden Markov Models of Haplotype Diversity Justin Kennedy, Ion M˘ andoiu, and Bogdan Pa¸saniuc CSE Department, University of Connecticut, Storrs, CT 06269 {jlk02019,ion,bogdan}@engr.uconn.edu
Abstract. The presence of genotyping errors can invalidate statistical tests for linkage and disease association, particularly for methods based on haplotype analysis. Becker et al. have recently proposed a simple likelihood ratio approach for detecting errors in trio genotype data. Under this approach, a SNP genotype is flagged as a potential error if the likelihood associated with the original trio genotype data increases by a multiplicative factor exceeding a user selected threshold when the SNP genotype under test is deleted. In this paper we give improved error detection methods using the likelihood ratio test approach in conjunction with likelihood functions that can be efficiently computed based on a Hidden Markov Model of haplotype diversity in the population under study. Experimental results on both simulated and real datasets show that proposed methods achieve significantly improved detection accuracy compared to previous methods with highly scalable running time.
1
Introduction
Despite recent advances in typing technologies and calling algorithms, significant error levels remain present in SNP genotype data (see [1] for a recent survey). A recent study of dbSNP genotype data [2] found that as much as 1.1% of about 20 million SNP genotypes typed multiple times have inconsistent calls, and are thus incorrect in at least one dataset. When genotype data is available for related individuals, some errors become detectable as Mendelian inconsistencies (MIs). However, a large proportion of errors (as much as 70% in mother-father-child trio genotype data [3,4]) remains undetected by Mendelian consistency analysis. Since even low error levels can lead to substantial losses in the statistical power of linkage and association studies [5,6,7], error detection remains a critical task in genetic data analysis. This task becomes particularly important in the context of association studies based on haplotypes instead of single locus markers, where error rates as low as 0.1% may invalidate some statistical tests for disease association [8]. An indirect approach to handling genotyping errors is to explicitly model them in downstream statistical analyses, see, e.g., [9,10]. While powerful, this approach often leads to complex statistical models and impractical runtimes for large datasets such as those generated by current large-scale association studies. A more practical approach is to perform genotype error detection as a separate R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 73–84, 2007. c Springer-Verlag Berlin Heidelberg 2007
74
J. Kennedy, I. M˘ andoiu, and B. Pa¸saniuc
analysis step following genotype calling. SNP genotypes flagged as putative errors can then be excluded from downstream analyses or can be retyped when high quality genotype data is required. Error detection is currently implemented in all widely-used software packages for pedigree genotype data analysis such as SimWalk2 [11] and Merlin [12], which detect Mendelian consistent errors by independently analyzing each pedigree and identifying loci of excessive recombination. Unfortunately, these methods are not appropriate for error detection in genotype data from unrelated individuals or small pedigrees such as motherfather-child trios, which require using population level linkage information. In this paper we propose novel methods for genotype error detection extending the likelihood ratio error detection approach recently proposed by Becker et al. [13]. While we focus on detecting errors in trio genotype data, our proposed methods can be applied with minor modifications to genotype data coming from unrelated individuals and small pedigrees other than trios Unlike Becker et al., who adopt a window-based approach and rely on creating a short list of frequent haplotypes within each window, we use a hidden Markov model (HMM) to represent frequencies of all haplotypes over the set of typed loci. Similar HMMs have been successfully used in recent works [14,15,16,17] for genotype phasing and disease association. Two limitations of previous uses of HMMs in this context have been the relatively slow (typically EM-based) training on genotype data, and the inability to exploit available pedigree information. We overcome these limitations by training our HMM on haplotypes inferred using the pedigree-aware ENT phasing algorithm of [18], based on entropy minimization. Becker et al. [13] use the maximum phasing probability of a trio genotype as the likelihood function whose high sensitivity to single SNP genotype deletions signals potential errors. The former is heuristically approximated by a computationally expensive search over quadruples of frequent haplotypes inferred for each window. When all haplotype frequencies are implicitly represented using an HMM, we show that computing the maximum trio phasing probability is in fact hard to approximate in polynomial time. Despite this result, we are able to significantly improve both detection accuracy and speed compared to [13] by using alternate likelihood functions such as Viterbi probability and the total trio genotype probability. We show that these alternate likelihood functions can be efficiently computed for small pedigrees such as trios, with a worst-case runtime increasing linearly in the number of SNP loci and the number of trios. Further improvements in detection accuracy are obtained by combining likelihood ratios computed for different subsets of trio members. Empirical experiments show that this technique is very effective in reducing false positives within correctly typed SNP genotypes for which the same locus is mistyped in related individuals. The rest of the paper is organized as follows. We introduce basic notations in Section 2 and describe the structure of the HMM used to represent haplotype frequencies in Section 3. Then, in Section 4 we present the likelihood ratio framework for error detection, and in Section 5 we describe three likelihood functions that can be efficiently computed using the HMM. Finally, we give experimental results assessing the error detection accuracy of our methods on both simulated
Genotype Error Detection Using Hidden Markov Models
75
and real datasets in Section 6, and conclude with ongoing research directions in Section 7.
2
Preliminaries
We start by introducing the basic definitions and notations used throughout the paper. We denote the major and minor alleles at a SNP locus by 0 and 1. A SNP genotype represents the pair of alleles present in an individual at a SNP locus. Possible SNP genotype values are 0/1/2/?, where 0 and 1 denote homozygous genotypes for the major and minor alleles, 2 denotes the heterozygous genotype, and ? denotes missing data. SNP genotype g is said to be explained by an ordered pair of alleles (σ, σ ) ∈ {0, 1}2 if g =?, or σ = σ = g when g ∈ {0, 1}, or σ = σ when g = 2. We denote by n the number of SNP loci typed in the population under study. A multi-locus genotype (or simply genotype) is a 0/1/2/? vector G of length n, while a haplotype is a 0/1 vector H of length n. An ordered pair (H, H ) of haplotypes explains multi-locus genotype G iff, for every i = 1, . . . , n, the pair (H(i), H (i)) explains G(i). A trio genotype T = (Gm , Gf , Gc ) consists of multilocus genotypes for the mother, father, and child of a nuclear family. An ordered 4-tuple (H1 , H2 , H3 , H4 ) of haplotypes is said to explain a trio T = (Gm , Gf , Gc ) iff (H1 , H2 ) explains Gm , (H3 , H4 ) explains Gf , and (H1 , H3 ) explains Gc .
3
Hidden Markov Model
The HMM used to represent haplotype frequencies has a similar structure to HMMs recently used in [14,15,16,17] (see Figure 1). This structure is fully determined by the number of SNP loci n and a user-specified number of founders K (typically a small constant, we used K = 7 in our experiments). Formally, the HMM is specified by a triple M = (Q, γ, ε), where Q is the set of states, γ is the transition probability function, and ε is the emission probability function. The set of states Q consists of disjoint sets Q0 = {q 0 }, Q1 , Q2 , . . . , Qn , with |Q1 | = |Q2 | = · · · = |Qn | = K, where q 0 denotes the start state and Qj , 1 ≤ j ≤ n, denotes the set of states corresponding to SNP locus j. The transition
-g -g -g -g g Q 3 Q 3 Q 3 Q 3 7 7 AS Q 7 AS Q 7 AS Q 7 Q AS Q AS Q Q AS Q s s AS sg Q Qg Qg AS sg Q g S S S S * ZA ZA ZA ZA 3 3 3
3
S
S S SZ A S A S A S A S q0 Z Z
Z H H S S S S ZZ S S S S wg AZ wg A
wg AZ wg
~
~ H g AZ S j Z Z ~ Z S A~
A3
A
A 3 QS QS 3 QS 3 S Q SA Q SA Q SA Q SA S Q QS QS QS QS A A A w Sg w U w U w U wAU g s Q s Q s Q s Q
- g - g - g Fig. 1. The structure of the Hidden Markov Model for n=5 SNP loci and K=4 founders
76
J. Kennedy, I. M˘ andoiu, and B. Pa¸saniuc
probability between two states a and b, γ(a, b), is non-zero only when a and b are in consecutive sets. The initial state q 0 is a silent state, while every other state q emits allele σ ∈ {0, 1} with probability ε(q, σ). The probability with which M emits a haplotype H along a path π starting from q 0 and ending at a state in Qn is given by: n P (H, π|M ) = γ(q 0 , π(1))ε(π(1), H(1)) γ(π(i − 1), π(i))ε(π(i), H(i)) (1) i=2
In [14,15], similar HMMs were trained from genotype data using variants of the EM algorithm. Since EM-based training is generally slow and cannot be easily modified to take advantage of phase information that can be inferred from available family relationships, we adopted the following two-step approach for training the HMM. First, we use a highly scalable algorithm based on entropy minimization [18] to infer haplotypes for all individuals in the sample. The phasing algorithm can handle genotypes related by arbitrary pedigrees, and has been shown to yield high phasing accuracy as measured by the so called switching error. In the second step we use the classical Baum-Welch algorithm to train the HMM based on the inferred haplotypes.
4
Likelihood Ratio Approach to Error Detection
Our detection methods are based on the likelihood ratio approach of Becker et al. [13]. We call likelihood function any function L assigning non-negative real-values to trio genotypes, with the further constraint that L is non-decreasing under data deletion. Let T = (Gm , Gf , Gc ) denote a trio genotype, x ∈ {m, f, c} denote one of the individuals in the trio (mother, father, or child), and i denote one of the n SNP loci. The trio genotype T(x,i) is obtained from T by marking SNP genotype Gx (i) as missing. The likelihood ratio of SNP genotype Gx (i) is defined as L(T(x,i) ) L(T ) . Notice that, by L’s monotony under data deletion, the likelihood ratio is always greater or equal to 1. A SNP genotype Gx (i) will be flagged as a potential error whenever the corresponding likelihood ratio exceeds a user specified detection threshold t. The likelihood function used by Becker et al. [13] is the maximum trio phasing probability, L(T ) =
max (H1 ,H2 ,H3 ,H4 )
P (H1 )P (H2 )P (H3 )P (H4 )
(2)
where the above maximum is computed over all 4-tuples (H1 , H2 , H3 , H4 ) of haplotypes that explain T . The use of maximum trio phasing probability as likelihood function is intuitively appealing, since one does not expect a large increase in this probability when a single SNP genotype is deleted. The computational complexity of computing the maximum trio phasing probability L(T ) depends on the encoding used to represent haplotype frequencies. When all N = 2n haplotype frequencies are given explicitly, computing L(T )
Genotype Error Detection Using Hidden Markov Models
77
can be trivially done in O(N 4 ) time. Unfortunately this representation can only be used for a small number n of SNP loci. To maintain practical running time, Becker et al. [13] adopted a heuristic approach that relies on creating a short list of haplotypes with frequency exceeding a certain threshold (computed using the FAMHAP software package [19]) followed by a pruned search over 4-tuples of haplotypes from the list. Due to the high computation cost of the search algorithm, the list of haplotypes must be kept very short (between 50 and 100 for the experiments reported in [13]), which makes the approach applicable only for short windows of consecutive SNP loci. This limits the amount of linkage information that could be used in error detection, explaining at least in part the high number of false positives observed in [13] within correctly typed SNP genotypes located in the neighborhood SNP genotypes that are mistyped in the same individual. The HMM described in previous section provides a compact implicit representation of all haplotype frequencies that can be used for large numbers of SNP loci. The problem of computing L(T ) based on the HMM is formalized as follows: HMM-based maximum trio phasing probability: Given an HMM model M of haplotype diversity with n SNP loci and K founders and a trio genotype T = (Gm , Gf , Gc ), compute L(T |M ) =
max (H1 ,H2 ,H3 ,H4 )
P (H1 |M )P (H2 |M )P (H3 |M )P (H4 |M )
(3)
where the maximum is computed over all 4-tuples (H1 , H2 , H3 , H4 ) of haplotypes that explain T . Computing P (H|M ) for a given haplotype H can be easily done in O(nK) time by using a standard forward algorithm, and thus the probability of any given 4-tuple (H1 , H2 , H3 , H4 ) that explains T can also be computed within the same time bound. Unfortunately, as stated in the following theorem whose proof we omit due to space constraints, approximating the HMM-based maximum trio phasing probability is hard under some standard computational complexity assumption.1 Theorem 1. For every ε > 0, L(T |M ) cannot be approximated within a factor 1 of O(n 4 −ε ) for any ε > 0, unless ZPP=NP. In next section we propose alternative likelihood functions that are efficiently computable based on an HMM model of haplotype diversity, even for very large numbers of SNP loci. 1
A proof similar to that of Theorem 1 shows that, when haplotype frequencies are represented using an HMM, computing the maximum phasing probability for a single 1 multi-locus genotype is hard to approximate within a factor of O(n 2 −ε ) for any ε > 0, unless ZPP=NP, thus solving a problem left open in [15].
78
5
J. Kennedy, I. M˘ andoiu, and B. Pa¸saniuc
Efficiently Computable Likelihood Functions
In this section we consider three alternatives to the likelihood function used in [13], and describe efficient algorithms for computing them given an HMM model of haplotype diversity. 5.1
Viterbi Probability
The probability with which the HMM M emits four haplotypes (H1 , H2 , H3 , H4 ) along a set of 4 paths (π1 , π2 , π3 , π4 ) is obtained by a straightforward extension of (1). The first proposed likelihood function is the Viterbi probability, defined, for a given trio genotype T , as the maximum probability of emitting haplotypes that explain T along four HMM paths. Viterbi probability can be computed using a “4-path” extension of the classical Viterbi algorithm as follows. For every 4-tuple q = (q1 , q2 , q3 , q4 ) ∈ Q4j , let Vf (j; q) denote the maximum probability of emitting alleles that explain the first j SNP genotypes of trio T along a set of 4 paths ending at states (q1 , q2 , q3 , q4 ) (we will refer to these values as the forward Viterbi values). Also, let Γ (q , q) = γ(q1 , q1 )γ(q2 , q2 )γ(q3 , q3 )γ (q4 , q4 ) be the probability of transition in M from the 4-tuple q ∈ Q4j−1 to the 4-tuple q ∈ Q4j . Then, Vf (0; (q 0 , q 0 , q 0 , q 0 )) = 1 and Vf (j; q) = E(j; q) max {Vf (j − 1; q )Γ (q , q)} 4 q ∈Qj−1
(4)
4 Here, E(j; q) = max(σ1 ,σ2 ,σ3 ,σ4 ) i=1 ε(qi , σi ), where the maximum is computed over all 4-tuples (σ1 , σ2 , σ3 , σ4 ) that explain T ’s SNP genotypes at locus j. For a given trio genotype T , the Viterbi probability of T is given by V (T ) = maxq∈Q4n {Vf (n; q)}. The time needed to compute forward Viterbi values with the above recurrences is O(nK 8 ), where n denotes the number of SNP loci and K denotes the number of founders. Indeed, for each one of the O(K 4 ) 4-tuples q ∈ Q4j , computing the maximum in (4) takes O(K 4 ) time. A O(K 3 ) speed-up is achieved by computing, in order: P re1 (j; q1 , q2 , q3 , q4 ) = maxq1 ∈Qj {Vf (j; (q1 , q2 , q3 , q4 ))γ(q1 , q1 )} P re2 (j; q1 , q2 , q3 , q4 ) = maxq2 ∈Qj {P re1 (j; (q1 , q2 , q3 , q4 ))γ(q2 , q2 )} P re3 (j; q1 , q2 , q3 , q4 ) = maxq3 ∈Qj {P re2 (j; (q1 , q2 , q3 , q4 ))γ(q3 , q3 )} Vf (j + 1; q) = E(j + 1; q) maxq4 ∈Qj {P re3 (j; (q1 , q2 , q3 , q4 ))γ(q4 , q4 )} for each SNP locus j = 1, . . . , n and all 4-tuples (q1 , q2 , q3 , q4 ) ∈ Qj+1 × Q3j , (q1 , q2 , q3 , q4 ) ∈ Q2j+1 ×Q2j , (q1 , q2 , q3 , q4 ) ∈ Q3j+1 ×Qj , respectively q = (q1 , q2 , q3 , q4 ) ∈ Q4j+1 . A similar speed-up idea was used in the context of single genotype phasing by Rastas et al. [15]. To apply the likelihood ratio test, we also need to compute Viterbi probabilities for trios with one of the SNP genotypes deleted. A na¨ıve approach is to compute each of these probabilities from scratch using the above O(nK 5 ) algorithm. However, this would result in a runtime that grows quadratically with
Genotype Error Detection Using Hidden Markov Models
79
the number of SNPs. A more efficient algorithm is obtained by also computing backward Viterbi values Vb (j; q), defined as the maximum probability of emitting alleles that explain genotypes at SNP loci j + 1, . . . , n of trio T along a set of 4 paths starting at the states of q ∈ Q4j . Once forward and backward Viterbi values are available, the Viterbi probability of a modified trio can be computed in O(K 5 ) time by using again the above speed-up idea, for an overall runtime of O(nK 5 ) per trio. 5.2
Probability of Viterbi Haplotypes
The Viterbi algorithm described in previous section yields, together with the 4 Viterbi paths, a 4-tuple of haplotypes which we refer to as the Viterbi haplotypes. Viterbi haplotypes for the original trio can be computed by a standard traceback algorithm. Similarly, Viterbi haplotypes corresponding to modified trios can be computed without increasing the asymptotic runtime via a bi-directional traceback. The second likelihood function that we considered is the probability of Viterbi haplotypes, which is obtained by multiplying individual probabilities of Viterbi haplotypes. The probability of each Viterbi haplotype can be computed using a standard forward algorithm in O(nK) time. Unfortunately, Viterbi paths for modified trios can be completely different from each other, and the probability of each of them must be computed from scratch by using the forward algorithm. This results in an overall runtime of O(nK 5 + n2 K) per trio. 5.3
Total Trio Genotype Probability
The third considered likelihood function is the total trio genotype probability, i.e., the total probability P (T ) with which M emits any four haplotypes that explain T along any 4-tuple of paths. Using again the forward algorithm, P (T ) can be computed as p(n; q), where p(0; (q 0 , q 0 , q 0 , q 0 )) = 1 and q∈Q4n
p(j; q) =
p(j − 1; q )Γ (q , q)
q ∈Q4j
4
ε(qi , σi )
(5)
(σ1 ,σ2 ,σ3 ,σ4 ) i=1
The second sum in last equation is computed over all 4-tuples (σ1 , σ2 , σ3 , σ4 ) that explain T ’s SNP genotypes at locus j. Using the speed-up techniques from Section 5.1, we obtain an overall runtime of O(nK 5 ) per trio.
6 6.1
Experimental Results Experimental Setup
HMM-based genotype error detection algorithms using the three likelihood functions described in Section 5 were implemented in C++. Since the detection accuracy of the three likelihood functions is very similar, we report here accuracy results only for the total trio genotype probability.
80
J. Kennedy, I. M˘ andoiu, and B. Pa¸saniuc
We tested the performance of our methods on both synthetic datasets and a real dataset obtained from Becker et al. [13]. Synthetic datasets were generated following the methodology of [13]. We started from the real dataset in [13], which consists of 551 trios genotyped at 35 SNP loci spanning a region of 91,391 base pairs from chromosome 16. The FAMHAP software [19] was used to estimate the frequencies of the haplotypes present in the population. The 705 haplotypes that had positive FAMHAP estimated frequencies were used to derive synthetic datasets with 551 trios as follows. For each trio, four haplotypes were randomly picked by random sampling from the estimated haplotype frequency distribution. Two of these haplotypes were paired to form the mother genotype, and the other two were paired to form the father genotype. We created child genotypes by randomly picking from each parent a transmitted haplotype (assuming that no recombination is taking place). To make the datasets more realistic, missing data was inserted into the resulting genotypes by replicating the missing data patterns observed in the real dataset. Errors were inserted to the genotype data using the random allele model [20]. Under this model, we selected each (trio, SNP locus) pair with a probability of δ (δ was set to 1% in all our experiments). For each selected pair, we picked uniformly at random one of the non-missing alleles and flipped its value. Similar detection accuracy was obtained in experiments in which we simulated recombination rates of up to 0.01 between adjacent SNPs, and in experiments where errors were inserted using the random genotype, heterozygous-to-homozygous, and homozygous-to-heterozygous error models described in [20]. 6.2
Results on Synthetic Datasets
Following the standard practice, we first removed the trivially detected MI errors by marking child SNP genotypes involved in MIs as missing (similar results were obtained by marking all three SNP genotypes as missing). Figure 2 shows the distributions of log-likelihood ratios (computed using the total trio genotype probability as likelihood function) for error and nonerror SNP genotypes in both parents and children. These results are based on averages over 10 synthetic instances of 551 trios typed at 35 SNP loci, with errors inserted using the random allele model with δ = 1%. It is known that there is an asymmetry in the amount of information gained from trio genotype data about children and parent haplotypes: while each of the two child haplotypes are constrained to be compatible with two genotypes, only one of the parent haplotypes has the same degree of constraint. This asymmetry was shown to make errors in children more likely to result in MIs [3,4]. As shown by the histograms in Figure 2, the asymmetry also results in a much sharper separation between errors and non-errors in children than in parents. Surprisingly, the histogram of log-likelihood ratios for non-error SNP genotypes in children has a significant peak between 3 and 4. Upon inspection, we found that these SNP genotypes are at loci for which parents have inserted errors. A similar bias towards higher false positive rates in correctly typed SNP genotypes for which the same locus is mistyped in related individuals has been noted for
Genotype Error Detection Using Hidden Markov Models
Children-TRIOS
4.8
5.12
5.44
5.76
5.44
5.76
4.48
5.12
4.16
4.48
4.8
4.16
3.2
2.88
2.56
2.24
1.6
3.84
ERR
3.84
3.2
2.88
2.56
2.24
1.92
1.6
1.28
0.96
0
5.76
5.44
4.8
5.12
4.48
4.16
3.84
3.52
3.2
2.88
2.56
1
2.24
10
1
1.92
100
10
1.6
1000
100
1.28
10000
1000
0.96
100000
10000
0
100000
0.64
1000000
0.64
NO_ERR
1000000
0.32
1.92
Children-COMBINED
ERR
0.32
NO_ERR
ERR
3.52
Parents-COMBINED
1.28
0
5.76
4.8
5.44
4.48
5.12
4.16
3.84
3.2
3.52
2.88
2.56
1.6
1
2.24
10
1
1.92
100
10
1.28
1000
100
0.96
10000
1000
0
100000
10000
0.64
100000
0.32
1000000
0.96
NO_ERR
1000000
0.64
ERR
0.32
NO_ERR
3.52
Parents-TRIOS
81
Fig. 2. Histograms of log-likelihood ratios for parents (left) and children (right) SNP genotypes, computed based on trios (top) or by using the minimum of uno, duo, and trio log-likelihood ratios
other pedigree-based error detection algorithms [21]. To reduce this bias, we propose a simple technique of combining multiple likelihood ratios computed for different subsets of trio members. Under this combined approach, henceforth referred to as TotalProb-Combined, for each SNP genotype we compute likelihood ratios using the total probability of (a) the trio genotype, (b) the duo genotypes formed by parent-child pairs, and (c) the individual’s genotype by itself. Likelihood ratios (b) and (c) can be computed without increasing the asymptotic running time via simple modifications of the algorithm in Section 5.3. A SNP genotype is then flagged as a potential error only if all above likelihood ratios exceed the detection threshold. To assess the accuracy of our error detection methods we use receiver operating characteristic (ROC) curves, i.e., plots of achievable sensitivity vs. false positive rates, where – the sensitivity is defined as the ratio between the number of Mendelian consistent errors flagged by the algorithm and the total number of Mendelian consistent errors inserted; and – the false positive rate is defined as the ratio between the number of non-errors flagged by the algorithm and the total number of non-errors. Figure 3 shows the ROC curves for TotalProb-Combined and for flagging algorithms that use single log-likelihood ratios computed from the total probability of uno/duo/trio genotypes. We also included ROC curves for two versions of the
82
J. Kennedy, I. M˘ andoiu, and B. Pa¸saniuc
algorithm of [13], which test one SNP genotype at a time (FAMHAP-1) or simultaneously test the mother/father/child SNP genotypes at a locus (FAMHAP-3). The results show that simultaneous testing yields low detection accuracy, particularly in parents, and it is therefore not advisable. The combined algorithm yields the best accuracy of all compared methods. The improvement over the trio-based version is most significant in parents, where, surprisingly, uno and duo log-likelihood ratios appear to be more informative than the trio log-likelihood ratio. 6.3
Results on Real Data from [13]
For simplicity, in previous section we used the same detection threshold in both children and parents. However, histograms in Figure 2 suggest that better tradeoffs between sensitivity and false positive rate can be achieved by using differential detection thresholds. For the results on the real dataset from Becker et al. [13] (Table 1) we independently picked parent and children thresholds by finding the minimum detection threshold that achieves false positive rates of 0.1-1% under log-likelihood ratio distributions of simulated data. Unfortunately, for this dataset we do not know all existing genotyping errors. Becker et al. resequenced all trio members at a number of 41 SNP loci flagged by their FAMHAP-3 method with a detection threshold of 104 . Of the 41 × 3 resequenced SNP genotypes, 26 (12 in children and 14 in parents) were identified as being true errors, 90 were confirmed as originally correct. The error status of remaining 7 resequenced SNP genotypes is ambiguous due to missing calls in either the original or resequencing data. The “True Positive” columns in Table 1 1
1
0.9
0.9
0.8
0.8
0.7
0.7
Sensitivity
0.5
0.4
0.5
0.4
0.3
0.3
0.2
0.2
0.1
TotalProb-UNO TotalProb-DUO TotalProb-TRIO TotalProb-COMBINED FAMHAP-1 FAMHAP-3
0.6
Sensitivity
TotalProb-UNO TotalProb-DUO TotalProb-TRIO TotalProb-COMBINED FAMHAP-1 FAMHAP-3
0.6
0.1
0
0
0
0.005
0.01
0.015
0
0.005
FP rate
0.01
0.015
FP rate
Fig. 3. Comparison with FAMHAP accuracy for parents (left) and children (right)
Table 1. Results of TotalProb-Combined on Becker et al. dataset FP rate Parents Children Total
Total Signals 1% 0.5% 0.1% 218 127 69 104 74 24 322 201 93
True Positives 1% 0.5% 0.1% 9 9 8 11 11 11 20 20 19
False Positives 1% 0.5% 0.1% 1 0 0 3 3 2 4 3 2
Unknown Signals 1% 0.5% 0.1% 208 118 61 90 60 11 298 178 72
Genotype Error Detection Using Hidden Markov Models
83
give the number of TotalProb-Combined flags among the 26 known errors, the “False Positive” columns give the number of flags among the 90 known nonerrors, and the “Unknown Signals” columns give the number flags among the 57,739 SNP genotypes for which the error status is not known (since resequencing was not performed or due to missing calls). With a predicted false positive rate of 0.1%, TotalProb-Combined detects 11 out of the 12 known errors in children, and 8 out of the 14 known errors in parents, with only 2 false positives (both in children). TotalProb-Combined also flags 72 SNP genotypes with unknown error status, 61 of which are in parents. We conjecture that most of these are true typing errors missed by FAMHAP-3, which, as suggested by the simulation results in Figure 3, has very poor sensitivity to errors in parent genotypes. We also note that the number of Mendelian consistent errors in parents is expected to be more than twice higher than the number of Mendelian consistent errors in children, due on one hand to the fact that there are twice more parents than children and on the other hand to the higher probability that errors in parents remain undetected as Mendelian inconsistencies [3,4].
7
Conclusions
In this paper we have proposed high-accuracy methods for detection of errors in trio genotype data based on Hidden Markov Models of haplotype diversity. The runtime of our methods scales linearly with the number of trios and SNP loci, making them appropriate for handling the datasets generated by current large-scale association studies. In ongoing work we are exploring the use of locus dependent detection thresholds, methods for assigning p-values to error predictions, and iterative methods which use maximum likelhood to correct MIs and SNP genotypes flagged with a high detection threshold, then recompute loglikelihoods to flag additional genotypes. Finally, we are exploring integration of population-level haplotype frequency information with typing confidence scores for further improvements in error detection accuracy, particularly in the case of unrelated genotype data.
Acknowledgments We would like to thank the authors of [13] for kindly providing us the real dataset used in their paper. This work was supported in part by NSF CAREER award IIS-0546457 and NSF award DBI-0543365.
References 1. Pompanon, F., Bonin, A., Bellemain, E., Taberlet, P.: Genotyping errors: causes, consequences and solutions. Nat. Rev. Genet. 6, 847–859 (2005) 2. Zaitlen, N., Kang, H., Feolo, M., Sherry, S.T., Halperin, E., Eskin, E.: Inference and analysis of haplotypes from combined genotyping studies deposited in dbSNP. Genome Research 15, 1595–1600 (2005)
84
J. Kennedy, I. M˘ andoiu, and B. Pa¸saniuc
3. Douglas, J., Skol, A., Boehnke, M.: Probability of detection of genotyping errors and mutations as inheritance inconsistencies in nuclear-family data. AJHG 70, 487–495 (2002) 4. Gordon, D., Heath, S., Ott, J.: True pedigree errors more frequent than apparent errors for single nucleotide poloymorphisms. Hum. Hered. 49, 65–70 (1999) 5. Ahn, K., Haynes, C., Kim, W., Fleur, R., Gordon, D., Finch, S.: The effects of SNP genotyping errors on the power of the Cochran-Armitage linear trend test for case/control association studies. Ann. Hum. Genet. 71, 249–261 (2007) 6. Abecasis, G., Cherny, S., Cardon, L.: The impact of genotyping error on familybased analysis of quantitative traits. Eur. J. Hum. Genet. 9, 130–134 (2001) 7. Cherny, S., Abecasis, G., Cookson, W., Sham, P., Cardon, L.: The effect of genotype and pedigree error on linkage analysis: Analysis of three asthma genome scans. Genet. Epidemiol. 21, S117–S122 (2001) 8. Knapp, M., Becker, T.: Impact of genotyping errors on type I error rate of the haplotype-sharing transmission/disequilibrium test (HS-TDT). Am. J. Hum. Genet. 74, 589–591 (2004) 9. Cheng, K.: Analysis of case-only studies accounting for genotyping error. Ann. Hum. Genet. 71, 238–248 (2007) 10. Liu, W., Yang, T., Zhao, W., Chase, G.: Accounting for genotyping errors in tagging SNP selection. Am. J. Hum. Genet. 71(4), 467–479 (2007) 11. Sobel, E., Papp, J., Lange, K.: Detection and integration of genotyping errors in statistical genetics. Am. J. Hum. Genet. 70, 496–508 (2002) 12. Abecasis, G., Cherny, S., Cookson, W., Cardon, L.: Merlin-rapid analysis of dense genetic maps using sparse gene flow trees. Nat. Genet. 30, 97–101 (2002) 13. Becker, T., Valentonyte, R., Croucher, P., Strauch, K., Schreiber, S., Hampe, J., Knapp, M.: Identification of probable genotyping errors by consideration of haplotypes. European Journal of Human Genetics 14, 450–458 (2006) 14. Kimmel, G., Shamir, R.: A block-free hidden Markov model for genotypes and its application to disease association. Journal of Computational Biology 12, 1243–1260 (2005) 15. Rastas, P., Koivisto, M., Mannila, H., Ukkonen, E.: Phasing genotypes using a hidden Markov model. In: Bioinformatics Algorithms: Techniques and Applications, Wiley, Chichester (to appear, preliminary version in Proc. WABI 2005) 16. Scheet, P., Stephens, M.: A fast and flexible statistical model for large-scale population genotype data: applications to inferring missing genotypes and haplotypic phase. American Journal of Human Genetics (to appear) 17. Schwartz, R.: Algorithms for association study design using a generalized model of haplotype conservation. In: Proc. CSB, pp. 90–97 (2004) 18. Gusev, A., Pa¸saniuc, B., M˘ andoiu, I.: Highly scalable genotype phasing by entropy minimization. IEEE Transactions on Computational Biology and Bioinformatics (to appear) 19. Becker, T., Knapp, M.: Maximum-likelihood estimation of haplotype frequencies in nuclear families. Genet. Epidemiol. 27, 21–32 (2004) 20. Douglas, J., Boehnke, M., Lange, K.: A multipoint method for detecting genotyping errors and mutations in sibling-pair linkage data. AJHG 66, 1287–1297 (2000) 21. Mukhopadhyaya, N., Buxbauma, S., Weeks, D.: Comparative study of multipoint methods for genotype error detection. Hum. Hered. 58, 175–189 (2004)
Haplotype Inference Via Hierarchical Genotype Parsing Pasi Rastas and Esko Ukkonen Department of Computer Science and Helsinki Institute for Information Technology HIIT P.O Box 68, FIN-00014 University of Helsinki, Finland
[email protected]
Abstract. The within-species genetic variation due to recombinations leads to a mosaic-like structure of DNA. This structure can be modeled, e.g. by parsing sample sequences of current DNA with respect to a small number of founders. The founders represent the ancestral sequence material from which the sample was created in a sequence of recombination steps. This scenario has recently been successfully applied on developing probabilistic Hidden Markov Methods for haplotyping genotypic data. In this paper we introduce a combinatorial method for haplotyping that is based on a similar parsing idea. We formulate a polynomial-time parsing algorithm that finds minimum cross-over parse in a simplified ‘flat’ parsing model that ignores the historical hierarchy of recombinations. The problem of constructing optimal founders that would give minimum possible parse for given genotypic sequences is shown NP-hard. A heuristic locally-optimal algorithm is given for founder construction. Combined with flat parsing this already gives quite good haplotyping results. Improved haplotyping is obtained by using a hierarchical parsing that properly models the natural recombination process. For finding short hierarchical parses a greedy polynomial-time algorithm is given. Empirical haplotyping results on HapMap data are reported.
1
Introduction
Recombination is a major factor causing genetic variation between individuals of a population by combining mutations. In this paper we generalize and improve the combinatorial founder model [19] of recombinations. This model assumes that the current population is evolved from a small number of ‘founder’ individuals, thus the current sequences are recombinations of these founder sequences. If visualized by giving each founder sequence a different color, the founders define a coloring of the current sequences, thus uncovering a mosaic-like structure. Figure 1 shows an example mosaic obtained by parsing 20 sequences (‘Recombinants’) with respect to four founder sequences. The term mosaic is also used in this sense in [13,20]. A key-question with the founder model is how to find
Supported by the Academy of Finland under grant 211496 (From Data to Knowledge).
R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 85–97, 2007. c Springer-Verlag Berlin Heidelberg 2007
86
P. Rastas and E. Ukkonen
Fig. 1. Screenshot from HaploVisual program that implements the parsing algorithms of [19]. The program is available on www.cs.helsinki.fi/u/prastas/haplovisual/
good founders. A natural parsimonicity criterion was used in [19]: find ancestral sequences that explain the given data with fewest recombinations. This model is also studied in [22]. Our contribution is three-fold. First we generalize the model from haplotypes to genotypes, and give a parsing algorithm that parses given genotype sequences into fragments that are taken from the haplotypic founders. This immediately suggests a phasing for the genotypes as the parse is composed of two haplotype sequences, i.e. we have a haplotyping algorithm.1 This type of parsing is flat in the sense that it ignores the historical order of recombinations. Then we provide some computational complexity results on finding a founder set for which the flat parse has smallest possible number of recombinations: Finding founders that are optimal in this sense is NP-hard in general but polynomial-time if the number of founders is restricted to two. As finding optimal founders is hard, we develop a locally-optimal method for finding a good founder set. Finally we improve the parsing model to include the hierarchical structure of recombinations. This leads to a novel parsing problem of finding a shortest hierarchical parse with respect to given founders. We propose a greedy polynomialtime parsing algorithm. The paper is concluded by reporting some haplotyping experiments on the HapMap data. It turns out that already the flat parsing with respect to the locally optimal set of founders gives reasonably good
1
Essentially the same observation was independently made in [9].
Haplotype Inference Via Hierarchical Genotype Parsing
87
haplotyping results as compared to the state-of-the-art probabilistic methods. The performance improves if the hierarchical parsing is applied. Our hierarchical parsing can be seen as a method for constructing a variant of the so–called ancestral recombination graph (ARG) that connects the founders to the given genotypes. An ARG is the most accurate model of the genealogy of sequences [3]. It is a directed graph, whose nodes correspond to sequences, single edges correspond to mutations, and edges connecting nodes a and b to a single node stand for a recombination between a and b. All sequences in the ARG model evolve from a single root sequence. A natural parsimonious problem is to find an ARG with minimum number of recombinations assuming each allele mutates only once. The problem is known to be NP-hard in the case of a known root sequence [21]. Current state-of-the-art methods can produce ARGs for about 20 SNPs and 40 haploid sequences [12].
2
Genotypes, Haplotypes, and Recombination
A Single Nucleotide Polymorphism (SNP) is a single base-pair position in genomic DNA where different nucleotides, called alleles, occur in some population. In most SNPs only two alleles out of A, C, G and T are present. Most of the genetic variance between individuals is due to SNPs. Thus, when studying genetic diseases or factors, one often studies variations in certain SNPs. In humans and other diploid organisms, most cells contain two almost identical copies of each chromosome, one inherited from the organism’s mother and the other from the father. These copies are called haplotypes. Thus, each individual has two haplotypes: maternal and paternal. Current practical laboratory methods determine for each SNP of an individual only the alleles, but no information on which copy they are from. In this context, these sequences without copy information are called genotypes. Thus, a genotype is a sequence that gives at each SNP the alleles of the two haplotypes. For example, consider the case that alleles at three SNPs are A-A, C-T and A-T. The possible haplotypes are therefore ACA and ATT, or ATA and ACT. If the alleles at an SNP are different we call this site heterozygous (the second and the third SNP in the example), and otherwise homozygous (the first SNP). If a genotype has k heterozygous sites then there are 2k−1 possible pairs A
b
A
B
A
B
a
B
a
b
c
d
C
d
C
D
a
b
c
D
c
d
C
D
Fig. 2. On the left hand side there are the haplotypes of the parents and on the right hand side are the outcomes for the child’s haplotypes from the two recombinations illustrated in the middle
88
P. Rastas and E. Ukkonen
of haplotypes for that genotype. Without assumptions about the haplotypes or about the population, all of these possibilities are equally likely. For measuring haplotyping performance we use a commonly used metric called the switch distance [11]. We use the unnormalized version of this distance, i.e. the number of switches. It equals the number of phase changes in the inferred haplotypes, that are needed to get the correct haplotypes. For example, assume that the correct haplotypes are AAAAA and TTTTT. Then a phasing solution ATTTT, TAAAA would score one switch, and a solution ATATA, TATAT four switches. Figure 2 shows how recombination in a meiosis combines maternal and paternal sequences. Child’s haplotype inherited from one parent contains fragments from both haplotypes of that parent. An underlying assumption in this paper is that recombinations happen in an equal crossing over fashion, i.e. in such way that sequence fragments retain their locations in the resulting sequence [19].
3
Combinatorial Mosaic Model
In this section the founder models presented in [19,17,8,6] are generalized for genotypes and point mutations. We assume that our sequences of interest are from a finite alphabet Σ, for example Σ = {A, C, G, T } for DNA or Σ = {0, 1} for SNP haplotypes. If our sequences are from n markers, then a sequence can be described as a string of length n from alphabet Σ ∪ {−}, where symbol − is used to indicate missing values. We want to analyze a set D of current sequences with respect to some small set of founder sequences F . The sequences in D and F are haplotypes over the same n markers. We denote |D| = m and |F | = K. The differences between D and F are due to point mutations and recombinations. Recombination is modeled as a process, that builds a new haploid sequence by combining a prefix of one sequence with a suffix of another one [8]. Mutation is simply an event that changes one symbol of a certain sequence. A haplotype h ∈ D has a simple parse (with no mutations) of cost k with respect to founder sequences F , if we can write h as concatenation fi0 · fi1 · · · fik of nonempty substrings fij , where each fij occurs in some f ∈ F at the same position as it is used in the parse. Let c be a parameter that gives a relative weight for mutations as compared to recombinations. Then a haplotype h has a parse of cost k + k c with respect to F , if there is a simple parse of cost k of some h and the Hamming distance between h and h , d(h, h ), is k . We say that a parse is optimal, if it has the lowest possible cost. The score that we want to minimize is the sum of optimal parse costs for the sequences in D. This score can be computed for each sequence independently, and it depends on the number of recombination and mutation events. Each recombination adds amount of 1 to the score and each point mutation adds amount of c > 0. By setting a high value for c, the parse is forced to use mutations only rarely, and by setting c to a small positive value, the parse is forced to use recombinations rarely.
Haplotype Inference Via Hierarchical Genotype Parsing
89
Let F = (F1 , . . . , FK ) ⊂ Σ n , |F | = K, be a fixed founder set where each Fa = Fa1 . . . Fan . Then we can compute the minimum cost of a parse of a haplotype h = h1 . . . hn with respect to F by dynamic programming using the following formulas: S(0, a) = 0 (1) S(i, a) = pc (hi , Fai ) + mina S(i − 1, a ) + Ia =a for a = 1, . . . , K, and i = 1, . . . , n. Here IA is the indicator function of predicate A, and pc (S, S ) is the cost of mutating symbol S to symbol S , i.e., 0 , if S = S or S = − pc (S, S ) = c , otherwise. The minimum score, scorecF (h), is mina S(n, a). The corresponding parse can be found using standard trace-back after each S(i, a) has been computed. Direct evaluation of formula (1) would take space O(nK) and time O(nK 2 ). A more efficient evaluation is possible, however, as follows. Bywriting the minimization in the latter equation S(i, a) = pc (hi , Fai ) + mina S(i − 1, a ) + Ia =a as min S(i − 1, a), 1 + mina S(i − 1, a) , we can see that by maintaining the value mina S(i − 1, a ) during the computation one can reduce the running time to O(nK). Moreover, the space requirement can be reduced trivially to O(K), if we do not need the corresponding parse. However, space O(K) and time O(nK) is also enough to get the parse. This achieved by using a divide and conquer algorithm similar to the Hirshberg’s algorithm [5]. Theorem 1. The optimal parse and parsing score of a haplotype with respect to a given founder set F can be found in time O(n|F |) and in space O(|F |). The score of a set of m haplotypes H is defined as a sum of individual scores h ∈ H, i.e. scorecF (H) = h∈H scorecF (h). The running time to compute the score for a set H of m haplotypes is O(mn|F |). Let us next consider unphased sequences, i.e. our dataset D consists of genotypes instead of haplotypes. We show that with some modifications to (1) we can parse genotype sequences as well. A similar algorithm appears in [9] while our formulation is from [14]. For reasons of clarity, we assume that our alphabet Σ is {0, 1}. All results apply for general alphabet too, but the notation would get too complicated. A genotype g is a string in alphabet {0, 1, 2, −}, where 0 and 1 denote the two homozygote alleles and value 2 denotes heterozygous alleles. Two haplotypes h = h1 . . . hn ∈ {0, 1}n and h = h1 . . . hn ∈ {0, 1}n are compatible with a genotype g = g1 . . . gn ∈ {0, 1, 2, −}n, denoted g = γ(h, h ), if either (gi = hi = hi ) or (gi = 2 and hi = hi ) or (gi = −) for each i, 1 ≤ i ≤ n. Given a founder set F and a genotype g, we define the score of g, scorecF (g), as minh,h :γ(h,h )=g scorecF (h) + scorecF (h ) . Score of a set of genotypes G is
90
P. Rastas and E. Ukkonen
defined, as with haplotypes, as g∈G scorecF (g). Score of g can be computed efficiently using dynamic programming as follows:
S(0, a, b) = 0
S(i, a, b) = pc (gi , Fai , Fbi ) + mina ,b S(i − 1, a , b ) + Ia =a + Ib =b
(2)
for a, b = 1, . . . , K, and i = 1, . . . , n. Here pc (T, S, S ) is the cost of mutating genotype T to γ(S, S ), i.e. ⎧ ⎨0 , if T = γ(S, S ) or T = − pc (T, S, S ) = 2c , if T = γ(S, S”) and T = γ(S”, S ) for all S” ∈ Σ ⎩ c , otherwise. Minimum score, scorecF (g), is mina,b S(n, a, b) and the parse can be uncovered by trace–back. Direct evaluation of (2) would take O(nK 4 ) time. Using similar trick as earlier we can write the minimization as min(C00 , C01 , C10 , C11 ), where C00 = S(i − 1, a, b), C01 = 1 + mina S(i − 1, a , b), C10 = 1 + minb S(i − 1, a, b ) and C11 = 2 + mina ,b S(i − 1, a , b ). Now we can maintain values mina S(i − 1, a , b) and minb S(i − 1, a, b ) by using two arrays (actually one is enough) of size O(K) (indexes a and b). These arrays can be computed in time O(K 2 ) for column i−1. Further on, we need to keep track of a single value mina ,b S(i − 1, a , b ). By computing S(i, a, b) in this way we get time complexity of O(nK 2 ). The space complexity can be reduced to O(K 2 ) similarly as in the case of haplotypes, to O(K). The parse of a genotype also fixes its haplotypes, i.e. we can use this parse to infer haplotypes based on a founder set F . Theorem 2. The optimal parse and parsing score of a genotype with respect to a given founder set F can be found in time O(n|F |2 ) and space O(|F |2 ). The parse suggests a phasing of the genotype by giving two haplotypes that are compatible with the genotype.
4
Hardness of Finding Founders
In this section we consider the complexity of the problem of finding a set F of K founder sequences that minimizes scorecF (D). The decision version of the problem can be proven to be NP-complete. Problem 1. Given haplotype or genotype data D, parameters K, c and T , is there a set F of K founder sequences such that the score of data D, scorecF (D), is at most T ? Theorem 3. Problem 1 is NP-complete when the data consists of haplotypes, i.e., D ⊂ {0, 1, −}n.
Haplotype Inference Via Hierarchical Genotype Parsing
91
Proof. Problem is in NP, because if we are given a founder set F we can check if it gives score ≤ T using the polynomial algorithm derived from (1). Problem is NP-hard because we can reduce the graph coloring problem to it. The graph coloring problem asks one to color the vertices of a graph with K colors such that there are no edges between vertices with the same color. The problem is NP-hard even for K = 3 [2]. Let G = (V, E) be a graph with n = |V | vertices. Let H = {h1 , .., hn } be the corresponding set of haplotypes represented as an n × n matrix (Hij ) where Hij = hij . Graph G is coded into H by setting ⎧ ⎨1 , if i = j Hij = 0 , if (i, j) ∈ E ⎩ − , otherwise. In this coding, the vertex i of the graph G corresponds to the haplotype hi . Now there is a graph coloring of G with K colors if and only if there is founder set of size K giving for H total parsing score 0. “if”: Let a founder set F give score 0, |F | = K. Then we can construct a parse where each h ∈ H is parsed using exactly one f ∈ F . Now let Vf ⊂ V be the set of all vertices i corresponding haplotypes hi ∈ H that are parsed using f . Since each hi has 1 at position i and no other haplotype have one at that position, all haplotypes corresponding to vertices Vf \ {i} must have symbol − at position i ∈ Vf . Thus, there cannot be any edges between i ∈ Vf and Vf and therefore we have a coloring of G with K colors by coloring each Vf using the same, unique color. “only if”: Assume that G has a valid K coloring. Let us define Vj as the vertices that have been colored using the color j. Now we can construct a founder set F as a set of haplotypes fj with ones at positions Vj and zeros otherwise. Because vertices Vj can be colored using same colors there cannot be any edges between them. So the corresponding haplotypes will have only values 1 and − at positions i ∈ Vj and therefore we can parse all haplotypes H with score 0. In such a parse, haplotype hi ∈ Vj could be parsed using founder fj . 2 Theorem 4. Problem 1 is NP-complete when the data consists of genotypes, i.e., D ⊂ {0, 1, 2}n. Proof. The problem of finding founder set with score 0 for genotype data (without missing values) is the Pure Parsimony problem from [4]. In pure parsimony problem one asks whether there is a set of haplotypes F , such that |F | ≤ K and F generates input genotypes D. This problem is NP-complete [10]. We note that for
maximum parsimony to have a solution, parameter K must be greater than 2|G| [10]. 2 Theorem 5. The optimization version of Problem 1 cannot be approximated in polynomial time within any factor, unless NP=P. Proof. Had we a polynomial time approximation algorithm with some fixed approximation factor α, we could solve Problem 1 in the case of T = 0, D ⊂ {0, 1, 2} (genotypes) and D ⊂ {0, 1, −}n (haplotypes). But by Theorems 3 and 4, these problems are NP-hard. 2
92
P. Rastas and E. Ukkonen
Theorem 6. Problem 1 is NP-complete when data D ⊂ {0, 1} consists of hap1 lotypes and c = n|D| . 1 Proof. When c is n|D| Problem 1 becomes a clustering problem. The problem can be stated: is there a set of K binary vectors F , such that h∈D minf ∈F d(f, h) ≤ T where d(f, h) is the Hamming distance of f and h. This problem is the complementary (Hamming distance instead of Hamming overlap) problem of the Hypercube segmentation problem, which is NP-complete even for K = 2 [7]. Thus, Problem 1 is also NP-complete. 2
5
Heuristic Algorithm for Founder Construction
The simplest algorithm to find the optimal set of founders is to enumerate all founder sets F of a given size K, compute scorecF (D) for each of them, and choose |Σ|n the best solution. Time complexity of this algorithm is proportional to K . This algorithm is not very practical, but could be improved by clever enumeration of the sets F (Branch-and-Bound). In some cases finding founder sets for haplotypes is easy. If we set parameter c to ∞, we try to find parses with minimum number of recombinations. Then, if K = 2 there is a polynomial O(mn) time algorithm for finding optimal founder set [19], without missing values in the haplotypes. It is based on the fact that we can consider only haplotype columns on which both alleles are present and each such column infers the correct partition into two classes. The optimal founder set can be obtained in this case as follows: Without loss of generality we can remove all columns that contain only single value. We process the haplotypes from left to right and consider adjacent columns. The alleles of the first founder column can be set arbitrarily to 0 and 1. Now let us assume that the founders have been fixed for column i and we proceed to the column i+1. We count how many times substrings 00, 01, 10 and 11 occur at position i in the haplotypes. We pick either 01 and 10 or 00 and 11, depending which combination is more common. The founder column i + 1 is determined from the picked substrings; founders are set in a unique way such that the picked substrings occur at founder position i. Proceeding this way until column n we get a solution for K = 2 whose optimality is easily shown as between any successive columns this procedure uses a minimum number of recombinations on two founders. Since the more common of substrings of 01 and 10 or 00 and 11 occurs at least in 12 m haplotypes, we can have at most as many recombinations. Thus,an optimal solution can have at most 12 m(n−1) recombinations (this is a tight bound). Note that the above method finds optimal founder set of size 2 for genotypes as well [22], as we can compute maximum number of occurrences of 00, 01, 10 and 11 in the case of genotype input. The possible substrings in genotypes are 00, 01, 10 and 11 as in haplotypes and 20, 21, 02, 12 and 22. In the latter substrings first four correspond uniquely to two of 00, 01, 10 and 11. two possibilities we can choose the one minimizing the number of recombinations. However, this does not work when sequences contain missing values.
Haplotype Inference Via Hierarchical Genotype Parsing
93
The algorithm just described works from left to right by assigning founder columns in a greedy fashion. Next we generalize this idea for arbitrary number of K founders. The algorithm is the following. From left to right we construct the columns of F in a greedy manner. For column i we enumerate all |Σ|K possibilities and choose the one that minimizes the parsing score of the prefixes of the sequences in D up to column i. After the first pass we make repeated left–to–right passes until we have found a local optimum. In each pass the content of column i is reselected from the |Σ|K possibilities such that it minimizes the parsing score of the entire data D when F is kept fixed for all columns other than i. A single pass of this algorithm can be implemented in time O(mnK|Σ|K ) (in time O(mnK 2 |Σ|K )) for dataset of m haplotypes (genotypes) of length n. Algorithm finds the optimum when K = 2, c = ∞, and sequences have no missing values. Similar algorithm was used in [15].
6
Hierarchical Parsing
The parsing scheme of Section 3 applies recombinations independently on each sequence to be parsed. There is no attempt to utilize the same recombination several times. The hierarchical parsing scheme aims at finding recombinations that are common to several sequences in the data. The structure of the hierarchical parsing is simple: we start from some given founder set and add to it recombinants of the founders (including the recombinants added in earlier steps) such that the resulting process finally generates data D. This process forms a tree like history for the sequences D. Again, finding a shortest possible hierarchical parse is of interest but it seems very difficult. We note that if we start from a single sequence (|F | = 1) and add mutations and recombinations in this fashion, we would construct an ARG. Instead of exact algorithm, we use following greedy heuristic algorithm: We try in all, at most (n − 1)|F |(|F | − 1) ways to add new founder f that is recombinant of founders F , and add to the founder set the one that minimizes scorecF ∪{f } (D). By assigning the parameter c properly we would model errors or mutations in the sequences. If c is set to a low value we should stop the greedy algorithm when there are no recombinations. We take as the initial set of founders the ones that minimize scorecF (D). Algorithm is the following: Find out founder set F0 minimizing scorecF0 (D). Set Fi+1 = Fi ∪ {f }, where f is the recombinant of f1 ∈ Fi and f2 ∈ Fi that minimizes scorecFi+1 (D). Repeat until scorecFi+1 (D) = 0. As each greedy step decreases score by at least one, the total number of greedy steps cannot exceed scorecF0 (D). On the other hand, there must be a haplotype with at least scorecF0 (D)/m recombinations, where m is the numberof haplotypes (2|D| in case of genotypes). Thus we must take at least as many greedy steps.
94
P. Rastas and E. Ukkonen
By taking starting founders F0 as the ones minimizing scorecF0 (D), we minimize both the upper and lower bound on the number of greedy steps. Trivial implementation of this greedy step would take time O(mn2 |Fi |3 ) in case of haplotypes and O(mn2 |Fi |4 ) in case of genotypes. Our implementation takes time O(mn|Fi |2 ) for haplotypes and O(mn|Fi |3 ) for genotypes. In practice, this algorithm becomes quite slow, as |Fi | increases by one in every step.
7
Experimental Results
We used 220 datasets obtained from the HapMap data [18]. We selected data from two groups, abbreviated YRI (Yoruba) and CEU (Utah). For both these groups unphased genotypes are available for 30 trios, resulting in the total of 120 known haplotypes. From each of the 22 chromosomes we chose 5 fragments covering 100 consecutive SNPs starting from SNPs 1001, 2001, . . ., 5001. We haplotyped 60 genotypes taken from the trios. We used c = 1000. We compared our phasing results against fastPHASE [16] with standard settings (fastPHASE). Unlike our method, fastPHASE builds its final solution by combining several haplotype predictions. Therefore we also generated with fastPHASE a single-run solution based on 10 founders (clusters). We call this solution fastPHASE-10. With HIT [15] we generated a solution using 10 founders. We started the hierarchical algorithm with K = 3, 7, 10 initial founders, constructed by the algorithm of Section 5, and applied the greedy hierarchical parsing algorithm of Section 6 until the flat parsing score of the data decreased by one. So we can stop here as the recombinants added from now on would participate in only one parse and there is no hierarchy. Our Java implementation took a couple of minutes to run on a single HapMap dataset on a standard desktop PC. Table 1. Average values of switch distances for different algorithms and datasets
CEU YRI
Flat(K=3/7/10) Hierarchical(K=3/7/10) fastPHASE-10 fastPHASE HIT 225/138/136 119/110/113 136 85 89 406/248/230 203/181/178 207 134 143
Table 1 gives the number of switches averaged over CEU and YRI datasets. “Flat” is the parsing algorithm (2), and “Hierarchical” is the greedy hierarchical algorithm. The hierarchical method gives comparable results to fastPHASE-10, but fastPHASE and HIT are somewhat better. Figure 3 shows how the number of switches develops after every hierarchical step. The figure also shows the switch distances achieved by fastPHASE, fastPHASE-10, and HIT. Our implementation selects between equally good alternatives (columns of initial founders and added recombinants of the greedy parsing step) with equal probabilities. Sometimes the actual choices had a significant effect on the result.
Haplotype Inference Via Hierarchical Genotype Parsing
CEU chr10 (1001−1100)
95
YRI chr3 (3001−3100)
250 400
switch
200 150 100
300
switch
K=3 K=7 K=10 fastPHASE−10 fastPHASE HIT
200 100
50 0
20
40 60 iterations
80
0
100
CEU chr3 (1001−1100)
50
100 iterations
150
YRI chr7 (1001−1100)
250 400 200
switch
switch
300 150 100
100
50 0
200
20
40 60 80 iterations
0
100 120
CEU chr10 (1001−1100)
150
200 180
switch
80
switch
100 iterations
YRI chr3 (3001−3100)
90
70
60
50
50
160 140 120
100
150
200 score
250
300
100
200
300 400 score
500
Fig. 3. Four upper panels illustrate on four typical datasets the bahaviour of the switch distance after each greedy hierarchical step that adds a new recombinant to the founders. We used K = 3, 7, 10 initial founders (magenta, blue and black regular lines). The straight red dotted line shows fastPHASE’s, straight dash dotted green line fastPHASE-10’s, and straight dashed black line HIT’s performance. The two lower diagrams visualize the correlation between the flat parsing score and the switch distance during the greedy hierarchical steps.
96
P. Rastas and E. Ukkonen
References 1. Daly, M., Rioux, J., Schaffner, S., Hudson, T., Lander, E.: High-resolution haplotype structure in the human genome. Nature Genetics 29, 229–232 (2001) 2. Garey, M., Johnson, D.: Computers and Intractability: A Guide to the Theory on NP-Completeness. W. H. Freeman and Company, New York (1979) 3. Griffiths, R., Marjoram, P.: Ancestral inference from samples of DNA sequences with recombination. Journal of Computational Biology 3, 479–502 (1996) 4. Gusfield, D.: Haplotype inference by pure parsimony. Technical Report CSE-20032, Department of Computer Science, University of California (2003) 5. Hirschberg, D.S.: A linear space algorithm for computing maximal common subsequences. Comm. ACM 18, 341–343 (1975) 6. Kececioglu, J., Gusfield, D.: Reconstructing a history of recombinations from a set of sequences. Discrete Applied Mathematics 88, 239–260 (1998) 7. Kleinberg, J., Papadimitriou, C., Raghavan, P.: Segmentation problems. In: Proc. STOC ’98, In practice several alternative columns of initial founders as well as several recombinants to be added in the greedy parsing step have equally good effect, New York, USA, pp. 473–482. ACM Press, New York (1998) 8. Koivisto, M., Rastas, P., Ukkonen, E.: Recombination systems. In: Karhum¨ aki, J., Maurer, H., P˘ aun, G., Rozenberg, G. (eds.) Theory Is Forever. LNCS, vol. 3113, pp. 159–169. Springer, Heidelberg (2004) 9. Lajoie, M., El-Mabrouk, N.: Recovering haplotype structure through recombination and gene conversion. Bioinformatics 21(2), ii173–ii179 (2005) 10. Lancia, G., Pinotti, C., Rizzi, R.: Haplotyping populations: Complexity and approximations. Technical Report DIT-02-0080, Department of Information and Communication Technology, University of Trento (2002) 11. Lin, S., Cutler, D.J., Zwick, M.E., Chakravarti, A.: Haplotype inference in random population samples. American Journal of Human Genetics 71, 1129–1137 (2002) 12. Lyngsø, R., Song, Y., Hein, J.: Minimum recombination histories by branch and bound. In: Casadio, R., Myers, G. (eds.) WABI 2005. LNCS (LNBI), vol. 3692, pp. 239–250. Springer, Heidelberg (2005) 13. P¨ aa ¨bo, S.: The mosaic in our genome. Nature 421, 409–412 (2003) 14. Rastas, P.: Haplotyyppien m¨ aa ¨ritys (Haplotype inference). Report C-2004-69 (M.Sc. thesis), Department of Computer Science, University of Helsinki (2004) 15. Rastas, P., Koivisto, M., Mannila, H., Ukkonen, E.: A hidden markov technique for haplotype reconstruction. In: Casadio, R., Myers, G. (eds.) WABI 2005. LNCS (LNBI), vol. 3692, pp. 140–151. Springer, Heidelberg (2005) 16. Scheet, P., Stephens, M.: A fast and flexible statistical model for large-scale population genotype data: applications to inferring missing genotypes and haplotypic phase. American Journal of Human Genetics 78, 629–644 (2006) 17. Schwartz, R., Clark, A., Istrail, S.: Methods for inferring block-wise ancestral history from haploid sequences. In: Guig´ o, R., Gusfield, D. (eds.) WABI 2002. LNCS, vol. 2452, pp. 44–59. Springer, Heidelberg (2002) 18. The International HapMap Consortium: A haplotype map of the human genome. Nature 437, 1299–1320 (2005) 19. Ukkonen, E.: Finding founder sequences from a set of recombinants. In: Guig´ o, R., Gusfield, D. (eds.) WABI 2002. LNCS, vol. 2452, pp. 277–286. Springer, Heidelberg (2002) 20. Wade, C., Kulbokas, E., Kirby, A., Zody, M., Mullikin, J., Lander, E., Daly, M.: The mosaic structure of variation in the laboratory mouse genome. Nature 420, 574–578 (2002)
Haplotype Inference Via Hierarchical Genotype Parsing
97
21. Wang, L., Zhang, K., Zhang, L.: Perfect phylogenetic networks with recombination. Journal of Computational Biology 8, 69–78 (2001) 22. Wu, Y., Gusfield, D.: Improved algorithms for inferring the minimum mosaic of a set of recombinants. In: Proc. CPM 2007, Springer, Heidelberg (to appear, 2007)
Seeded Tree Alignment and Planar Tanglegram Layout Antoni Lozano1 , Ron Y. Pinter2 , Oleg Rokhlenko2, Gabriel Valiente3 , and Michal Ziv-Ukelson4 1
Logic and Programming Research Group, Technical University of Catalonia, E-08034 Barcelona, Spain
[email protected] 2 Department of Computer Science, Technion – Israel Institute of Technology, Haifa 32000, Israel {pinter,olegro}@cs.technion.ac.il 3 Algorithms, Bioinformatics, Complexity and Formal Methods Research Group, Technical University of Catalonia, E-08034 Barcelona, Spain
[email protected] 4 School of Computer Science, Tel-Aviv University, Tel-Aviv 69978, Israel
[email protected] Abstract. The optimal transformation of one tree into another by means of elementary edit operations is an important algorithmic problem that has several interesting applications to computational biology. We introduce a constrained form of this problem in which a partial mapping of a set of nodes in one tree to a corresponding set of nodes in the other tree is given, and present efficient algorithms for both ordered and unordered trees. Whereas ordered tree matching based on seeded nodes has applications in pattern matching of RNA structures, unordered tree matching based on seeded nodes has applications in co-speciation and phylogeny reconciliation. The latter involves the solution of the planar tanglegram layout problem, for which we give a polynomial-time algorithm.
1
Introduction
Matching and aligning trees is a recurrent problem in computational biology. Two prominent applications are the comparison of phylogenetic trees [2,12,15,19,22] and the comparison of RNA structures [8,9,20,24]. The specific problems defined and addressed in this paper are motivated by applications where densely seeded local tree alignments are sought. In what follows, we first describe an example motivated by evolutionary studies of RNase P RNAs and their target tRNAs; it is interesting as it demonstrates the need for seeded tree alignments for both ordered and unordered trees. Section 2 describes a general framework and the corresponding analysis for seeded tree alignment. Finally, in Section 3, an algorithm is presented which computes a planar layout for two unordered seeded trees, if such exists. Ribonuclease P is the endoribonuclease responsible for the 5’ maturation of tRNA precursors [5]. RNase P is a ribonucleoprotein in all organisms, but is R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 98–110, 2007. c Springer-Verlag Berlin Heidelberg 2007
Seeded Tree Alignment and Planar Tanglegram Layout
99
Fig. 1. The known secondary structures for two RNase P sequences and the corresponding coarse-grain trees. (left) E. coli RNase P, based on [5], shaded elements represent conserved loci. (right) M. barkery RNase P obtained from the RNase P database.
Fig. 2. Seeded tree alignment for the E. coli versus M. barkery RNase P secondary structures of Fig. 1. Dark vertices represent conserved loci, dotted lines represent alignment seeds.
best understood in Bacteria, in which the RNA component of the enzyme is by itself catalytically proficient in vitro (it is a ribozyme). The structure of bacterial RNase P RNA has been studied in detail, primarily using comparative methods [4,7,13,23]. Bacterial RNase P RNAs share a common core, and synthetic minimal RNase P RNAs consisting only of these core sequences and structures are catalytically proficient. Structural variation in RNase P RNA is predominated by variation in the presence or absence of helical elements and in variation of the size of the distal regions of these helices. However, there is additional variation in the form of small differences in the lengths of helices, loops and joining regions. In terms of RNA secondary structure tree alignment, this means that the operations applied in transforming one tree to another consist of subtree deletions and insertions as well as homeomorphic node insertions and deletions in ordered rooted trees (see Fig. 1).
100
A. Lozano et al.
Fig. 3. Seeded phylogenetic unordered tree alignment, in the context of horizontal gene transfer prediction. (left) Tanglegram formed by connecting, via seed edges, the phylogenetic tree based on archeal RNase P structures [6] with another phylogenetic tree based on archeal RNA [25]. The seed edges for Archeaglogi and Methanococci, which are putatively involved in RNase P RNA horizontal transfer [6], were omitted. (right) Planar layout of the tanglegram.
Recently, sequences encoding RNase P RNAs of various genomes have been determined (see the RNase P database, http://www.mbio.ncsu.edu/RNaseP/). This broad sampling of RNase P RNAs allows some phylogenetic refinement of the secondary structure, and reveals patterns in the evolutionary variation of sequences and secondary structures. In [5], the extent and patterns of evolutionary variation in RNase P RNA sequence and structure were studied, in both bacterial and archeal species, and it was shown that highly-conserved bases are scattered throughout the sequence and secondary structure. A detailed description of the conserved loci is given in [5] and shown in Fig. 1. In terms of RNA secondary structure tree comparison, this means that in a biologically correct alignment of two RNase P trees, the nodes corresponding to the conserved loci should be mapped to each other (“alignment seeds”), as shown in Fig. 2. The need to align seeded tree-pairs also arises in applications where the bioinformatics data is represented in the form of unordered trees. To demonstrate this, consider the example in Fig. 3, which illustrates the reconciliation of a phylogenetic tree based on archeal RNase P structures with the phylogenetic tree based on archeal rRNA structures. It is based on a detailed comparative analysis of archaeal RNase P RNA structures [6] from a wide range of archaeal species. The RNase P RNA sequences were rigorously aligned in a comparative analysis of secondary structure, providing an opportunity to compare phylogenetic relations derived from RNase P RNA sequences with those derived from small subunit ribosomal RNA sequences from the same group of organisms [10]. Although the RNase P RNA sequences generally recreate trees similar to those based on rRNA, a significant exception is the placement of the sequence from Archaeoglobus fulgidus. In rRNA-based trees, this genus lies on a branch distinct from the other major euryarchaeal groups, separating from the other groups at approximately the bifurcation between methanobacteria and halobacteria/methanomicrobia [10]. The A. fulgidus RNase P RNA, however, is clearly related in structure and sequence to those of Methanococcus. Trees constructed using parsimony (DNAPARS) and maximum likelihood (DNAML) methods [3]
Seeded Tree Alignment and Planar Tanglegram Layout
101
agree on the placement of this sequence as a relative of Methanococcus, and this placement is robust. The most likely interpretations of the similarities between RNase P RNAs of Methanococcus and A. fulgidus are that either (1) the ribosomal RNA-based trees are for some reason misleading, and A. fulgidus is specifically related to the methanococcus, or (2) the gene encoding RNase P RNA has been transferred laterally from one group to another. The above analysis could be formulated as a seeded unordered tree alignment, as follows (see Fig. 3). Connect each leaf from the RNase P RNA tree with the corresponding (same species) leaf from the ssu-rRNA tree, if such exists. Note that the layout of two unordered trees with additional edges forming a bijection among their leaves is called a tanglegram [14]. It is easy to see that the seeded unordered trees can be aligned if the input trees can be put in a non-crossing representation (in other words: if the tanglegram formed by the input trees together with the seed has a planar layout). Correspondingly, when formulating the problem raised by [6] as that of seeded unordered tree alignment: if the tanglegram formed by the two seeded RNA trees has a planar layout, and the two trees agree, then there is no basis for a lateral transfer hypothesis. In the above example, however, the tanglegram formed by the two RNA trees can be untangled, and the two trees can be aligned after removing the seed edges corresponding to the two new neighbors (by RNase P RNA homology) Archeaglobi and Methanococci. This supports the hypothesis of a lateral transfer of the gene encoding RNase P RNA from Archeaglobi to Methanococci, or vice versa.
2
Tree Alignment Based on Seeded Nodes
Consider the constrained form of the tree matching problem in which the mapping of a subset of the nodes in one tree to a corresponding subset of the nodes in the other tree is given in advance. The initial node mapping is called the seed set of the matching. Definition 1 (Mapping). A mapping M of a tree T1 = (V1 , E1 ) to a tree T2 = (V2 , E2 ) is a bijection M ⊆ V1 × V2 such that for all (v1 , v2 ), (w1 , w2 ) ∈ M , it holds that v1 is an ancestor of w1 in T1 if and only if v2 is an ancestor of w2 in T2 . A seed set S is a bijection S ⊆ M ⊆ V1 × V2 such that S itself also is a mapping of T1 to T2 . Among all possible mappings, in this paper we deal with the commonly used least-common-ancestor (LCA) preserving ones. Definition 2 (LCA-preserving mapping). Let T1 = (V1 , E1 ) and T2 = (V2 , E2 ) be trees, and let M ⊆ V1 × V2 be a mapping of T1 to T2 . M is LCApreserving if the following condition holds: if (x1 , x2 ) ∈ M and (y1 , y2 ) ∈ M then (lca(x1 , y1 ), lca(x2 , y2 )) ∈ M . We next define a new tree alignment optimization problem over pairs of seeded trees, to be applied as a constrained form of a general, pre-selected tree alignment
102
A. Lozano et al.
algorithm. Therefore, let TAA(T1 , T2 ) denote a “black box” tree alignment algorithm, which applies a pre-selected tree alignment algorithm to an input consisting of two labeled trees T1 and T2 . The class of tree alignment algorithms to which the seed constraint can actually be applied is discussed in the following section. Definition 3 (Seeded tree alignment problem). Given two trees T1 = (V1 , E1 ) and T2 = (V2 , E2 ), a set of seeds S ⊆ V1 × V2 , and a predefined tree similarity measure SIM , such that SIM (M ) denotes a similarity score computed based on the pairs of nodes (v1 , v2 ) ∈ M . The seeded tree alignment problem STA(T1, T2 , S,TAA) is to find a mapping M ⊆ V1 × V2 such that S ⊆ M and the alignment score SIM (M ) is maximal under this constraint. In this section, we show how to efficiently apply seeded alignment on top of existing tree alignment algorithms. We note that our results apply to LCApreserving mappings (see Def. 2). This class of algorithms includes subtree isomorphism [11,18], subtree homeomorphism [1,16,17], and maximum common subtree (MCS) [21] finding algorithms. For the sake of clarity of presentation, we note that all these algorithms employ a dynamic programming table where entry [i, j] denotes the similarity score of subtree i of tree T1 versus subtree j of tree T2 . Moreover, the time complexity of each of the above algorithms is computed by summing up the work invested in matching a subtree tu ∈ T1 with a subtree tv ∈ T2 : O(
n m
(c(u)x c(v)y f (c(u), c(v)))
(1)
u=1 v=1
where |T1 | = n, |T2 | = m, c(u) denotes the out-degree of tu , c(v) denotes the out-degree of tv , and f (c(u), c(v)) is a concave function that differs from one algorithm to another along with coefficients x and √ y. For example, unordered subtree homeomorphism can be computed in O(nm m) time √ using the top-down algorithm of [1] and the corresponding concave function is m (see Exmp. 1 for a complete analysis). In the discussion to follow, let the seeds contained in the initial seeds set S be denoted primary seeds. Since we restrict our analysis to LCA-preserving mappings, the LCAs of the primary seeds also function as seeds, to be denoted secondary seeds (see Fig. 4 (left)). For the sake of simplicity of presentation we will describe the seeded tree alignment algorithm for binary trees. Extensions to non-binary trees are straightforward. Note that, given an LCA-preserving tree alignment algorithm, and given as input a planar layout tanglegram of a pair of seeded trees that are to be aligned, the corresponding seeded tree alignment could immediately be derived by extending the applied node label similarity table as follows: For each seed s = (u, v) ∈ S such that u ∈ T1 and v ∈ T2 , relabel the seeded nodes to u and v respectively and add two new rows and two new columns to the label similarity table – one for node u and the other one for node v . Then, the similarity score for entries [u , v ] and [v , u ] is set to highest possible value of a node-to-node pairwise score, while all the remaining entries in
Seeded Tree Alignment and Planar Tanglegram Layout
103
Fig. 4. An illustration of the dynamic programming table computed during the seeded matching algorithm. (left) The matched trees with a partitioning induced by seeds. (right) The corresponding DP table, divided into independent rectangles to be computed by an appropriate LCA-preserving mapping algorithm. The colored areas illustrate which parts of the DP need to be computed. The lowest right-most corner of each colored rectangle holds the value for the roots of the corresponding compared subtrees. Each dashed rectangle corresponds to a secondary seed. Within each dashed rectangle, the single-cell components correspond to seeds, where the primary seeds are at the bottom-right and top-left (only for the subtrees framed by two primary seeds) corners, and the secondary seed is located between the two rectangles, each corresponding to one of the subtrees rooted at this secondary seed.
these two rows and columns are set to zero. This way we ensure that the above LCA-preserving tree alignment algorithms will match seeds as required. That being said, in this section we show how to exploit the seeds to more efficiently apply the tree alignment, and avoid redundant work by restricting the computations to limited areas in the dynamic programming (DP) matrix. This “constrained-by-seeds” dynamic programming can be intuitively explained by following the example in Fig. 4. A regular, unconstrained application of the LCApreserving algorithms mentioned above to the two trees in Fig. 4 (left) would require the computation of each and every entry in the DP table of Fig. 4 (right). The algorithm described below, however, will only compute the shaded rectangles along the diagonal of the table. Note that each primary seed corresponds to a single entry in the DP table whose score can be computed in an initialization step. Furthermore, each pair of consecutive seeds in S (according to a planar layout) defines a rectangle in the DP matrix with a side of size at most k, where k denotes the maximum gap between two consecutive seeds (in a planar layout), that can be filled independently of other rectangles. This is true for all entries except for the single entry in the rectangle which corresponds to a secondary seed, and whose computation depends on the availability of entries external to the rectangle. This availability, however, can be taken care of if the rectangles are processed by postorder traversal of the corresponding secondary seeds. The number of rectangles is bounded by n/2k and the size of each such rectangle is
104
A. Lozano et al.
bounded by k 2 , and thus, there is an immediate O(nk) bound on the number of entries that need to be computed in the table (in comparison to O(n2 ) entries in the unconstrained tree alignment case). Furthermore, each application of TAA is given as input two subtrees with no more than k nodes. The time complexity of seeded LCA-preserving tree alignment algorithms is formally analyzed in Obs. 2 and demonstrated in Exmp. 1. We refer the reader to Fig. 4 (left) for the following discussion. Consider the subtree obtained during a postorder traversal of T1 , from node c to node d: note that all nodes located in the left part are colored green and all nodes located in the right part are colored blue. Correspondingly, in the subtree obtained during a postorder traversal of T2 , from node c to node d , all nodes located in the right part are colored green and all nodes located in the left part are colored blue. This correspondence of colors is explained by Obs. 1; before we state it we need the following definition. Definition 4. For any tree T and nodes x, y ∈ T , let tx−y denote the subtree consisting of all nodes found in a postorder traversal of T , starting from node x and ending in node y. Also, let leftx−y and rightx−y denote the left and the right subtrees of tx−y , respectively. Note that both leftx−y and rightx−y are rooted at lca(x, y). Observation 1. Let T1 = (V1 , E1 ) and T2 = (V2 , E2 ) be trees to be aligned and (x1 ∈ V1 , x2 ∈ V2 ) and (y1 ∈ V1 , y2 ∈ V2 ) be a pair of seeds such that x1 < y1 and x2 < y2 in the postorder traversal of T1 and T2 , respectively. In an LCA-preserving mapping of T1 to T2 , all nodes in leftx1 −y1 are mapped to nodes in rightx2 −y2 . Symmetrically, all nodes in rightx1 −y1 are mapped to nodes in leftx2 −y2 . Proof. By recursive invocation of Def. 2.
The seeded tree alignment algorithm starts by extending the seeds set S to include the secondary seeds. Next, it orders S such that all the seeds obey a planar layout, that is, there is no crossing between seeds. An algorithm to compute this layout, if such layout exists, is given in Sect. 3. The resulting order partitions the target trees, according to Obs. 1, into exclusive subtree-pair intervals (see Fig. 4 (right)). The suggested algorithm processes these subtree pairs in postorder traversal of their roots (which are paired as secondary seeds). For each such interval, it retrieves the corresponding subtrees and feeds them as input to TAA. Lemma 1. Let T1 = (V1 , E1 ) and T2 = (V2 , E2 ) be two trees to be aligned, and let S ⊆ V1 × V2 be a primary seeds set. Given an LCA-preserving tree alignment algorithm TAA and the corresponding score function SIM , the algorithm described above computes STA(T1 , T2 , S, TAA). Restricting the computations to limited areas in the DP matrix results in a speedup of the applied tree comparison algorithms, as analyzed below.
Seeded Tree Alignment and Planar Tanglegram Layout
105
Lemma 2. The above framework for computing STA(T1, T2 , S, TAA) yields a speedup of Ω((n/k)x+y−1 f (n, n)/f (k, k)) over the time complexity of the corresponding, unseeded, tree alignment algorithm TAA(T1 , T2 ). Proof. Let f (c(u), c(v)) denote the concave function quantifying the work that a given (LCA-preserving, DP subtree-to-subtree based) tree-comparison algorithm TAA applies per alignment of a subtree tu ∈ T1 with a subtree tv ∈ T2 , where c(u) denotes the out-degree of tu and c(v) denotes the out-degree of tv . k k Observation 2. u=1 c(u) = k and v=1 c(v) = k. Summing up the work over all node pairs, applying Obs. 2 to Eq. 1 we get: O(
k k n (c(u)x c(v)y f (c(u), c(v))) = k u=1 v=1
n n n = O( k x (c(v)y f (c(u), k) = O( k x k y f (k, k)) = O(nk x+y−1 (f (k, k)) . k v=1 k
This yields a speedup of Ω((n/k)x+y−1 f (n, n)/f (k, k)) over the time complexity obtained by applying the corresponding unseeded version of the tree comparison algorithm. Below we give an example of one such seeded tree alignment algorithm. Time complexities of the seeded versions of additional currently known LCA-preserving tree comparison algorithms will be given in the full version of this paper. Example 1 (Top-down unordered subtree homeomorphism [1]). The algorithm for top-down unordered subtree isomorphism between trees T1 and T2 with |T1 | = √ n1 and |T2 | = n2 runs in O(n1 n2 n2 ) time, since O(
n1 n2
√ (c(u)c(v) c(v)) = O(n1 n2 n2 )
u=1 v=1
When applied over a seeded tree matching, we get O((n1 /k)
k k
k (c(u)c(v) c(v)) = O((n1 /k)k (c(v) c(v))) =
u=1 v=1
√ √ = O((n1 /k)k k) = O(n1 k k)
v=1
2
Thus, if the compared trees are heavily seeded and k = O(1) then the algorithm √ runs in O(n1 ) time and the speedup factor is O(n2 n2 ).
3
Planar Tanglegram Layout
A layout of two unordered trees with additional edges forming a bijection among their leaves, is called a tanglegram [14]. These diagrams arise in host-parasite cospeciation studies and in the reconciliation of gene and species phylogenies.
106
A. Lozano et al.
Definition 5 (Tanglegram). A tanglegram is a triple (T1 , T2 , S) where T1 = (V1 , E1 ) and T2 = (V2 , E2 ) are unordered trees, and S ⊆ V1 × V2 is a seed, that is, a partial mapping of T1 to T2 . A tanglegram is binary if both T1 and T2 are binary trees. Given a tanglegram (T1 , T2 , S), we will be interested in finding a way to represent the two trees such that the seed does not create any crossings among the edges corresponding to seeds in that representation. We call such a representation a planar layout of the tanglegram. To define it formally, we first introduce the notion of an extension of a set (and a pair of sets) of nodes. Definition 6 (Extension). Let T1 be an unordered tree, let X be an ordered set of nodes in T1 , and let u ∈ X be a non-leaf of T1 . Denote by X the ordered set X where u has been replaced by its children in some particular ordering. Then, we call X a one-step extension of X. We say that Z is an extension of X if there is a sequence of zero or more one-step extensions from X to Z. Let Y be an ordered set of nodes in an unordered tree T2 . Then, we also say that (X , Y ) is an extension of (X, Y ) if X is an extension of X and Y is an extension of Y . We are interested in extending the pair formed by the roots of the two trees of a tanglegram until there is no point in extending it further. The extensions are performed until no seed with seeded descendants can be found (for instance, seeded leaves satisfy this condition). In the following, we will call these nodes terminals. Definition 7 (Planar layout). Let T1 and T2 be unordered trees with roots r1 and r2 , respectively. A planar layout of a tanglegram (T1 , T2 , S) is a pair (x, y) with x = (x1 , . . . , xn ) and y = (y1 , . . . , yn ), such that: (x, y) is an extension of ((r1 ), (r2 )), the nodes in x and y are terminals, and (xi , yi ) ∈ S for every i with 1 i n. Example 2. The tanglegram to the left has a planar layout, namely: ((a, b, d, c), (a, b, d, c)), while the one to the right does not.
T1
a b c d
S
d b a c
T2
T1
a
S
b
b c
d a
d
c
T2
We next describe an algorithm for finding a planar layout of a binary tanglegram. The procedure Untangle computes the layout of a binary tanglegram by successive refinements of two lists, the ordered sets X and Y , which initially contain the roots of the trees. At each iteration of the loop, a node of one of the lists is “refined,” which means that a correct ordering of its children is found and
Seeded Tree Alignment and Planar Tanglegram Layout
107
fixed for the rest of the algorithm. The loop stops when all the elements of the lists X and Y are terminal nodes of the trees; at this point, the planar layout (if it exists) is completed. Before starting the main loop, the procedure Paths computes a table P of Boolean values which can be understood as an extension of the bijection S to all the nodes of the trees. In particular, for any node u in T1 and any node v in T2 , P [u, v] is true if and only if the subtree of T1 rooted at u has a descendant u , the subtree of T2 rooted at v has a descendant v , and (u , v ) ∈ S. Now we return to the main procedure. Algorithm 1. Given a tanglegram (T1 , T2 , S), obtain a planar layout (X, Y ) for (T1 , T2 , S). Let r1 , r2 be the roots of T1 , T2 , respectively. procedure Untangle(T1 , T2 , S) X, Y ← (r1 ), (r2 ) E ← {{r1 , r2 }} P ← Paths(T1 , T2 , S) while X ∪ Y contain some non-terminal node do u ← a non-terminal node of highest degree in (X ∪ Y, E) if u is in X then Refine(u, X, Y, E, P ) else Refine(u, Y, X, E, P ) return (X, Y ) In the refinement step, a node u in the graph (X ∪ Y, E) is substituted by its children u1 , u2 in such a way that no edge crossing is introduced. Algorithm 2. Given a partial planar layout (A ∪ B, E) and a node u, refine the planar layout by substituting u by its children and return A and E modified according to the refinement. procedure Refine(u, A, B, E, P ) u1 , u2 ← children of u for every node v ∈ B such that {u, v} ∈ E do if P [u1 , v] then add edge {u1 , v} to E if P [u2 , v] then add edge {u2 , v} to E delete {u, v} from E if u1 is an isolated node in ({u1 } ∪ B, E) then replace u by u2 in A else if u2 is an isolated node in ({u2 } ∪ B, E) then replace u by u1 in A else if not Crossings(u1 , u2 , B, E) then replace u by the ordered set (u1 , u2 ) in A else if not Crossings(u2 , u1 , B, E) then
108
A. Lozano et al.
replace u by the ordered set (u2 , u1 ) in A and flip clade u else reject The above procedure selects an ordering of the nodes U = {u1 , u2 } such that, replacing u by U in A, the graph (A ∪ B, E) does not create any edge crossings. We say that (A ∪ B, E) has an edge crossing if there are two nodes a1 , a2 in A and two more nodes b1 , b2 in B, appearing in this order in A and B, such that E contains edges (a1 , b2 ) and (a2 , b1 ). Assuming (A ∪ B, E) does not already have any edge crossings before replacing u by U in A, this property is checked in the procedure Crossings with cost O(n) by just checking if any edge adjacent with node u2 crosses the last (in the order given by B) edge adjacent with node u1 . Theorem 1. The procedure Untangle(T1 , T2 , S) computes a planar layout for (T1 , T2 , S) if there is one. Proof (Sketch). The whole algorithm can be thought of as the computation of an extension of ((r1 ), (r2 )), which becomes a planar layout at the end. Furthermore, if (X, Y ) is promising (it can be extended to a planar layout) at the beginning of the main loop, then it is promising at the end. In order to ensure this invariant, the choice of a highest degree node is crucial: for degree at least 2, the ordering of u’s refinement will be unique, while for degree 1, it can be argued that any ordering will be equally promising. The computation finishes when all nodes have degree 1, in which case we already have a planar layout. Lemma 3. Algorithm 1 runs in O(n2 ) time and space. Proof. Let T1 and T2 be unordered trees with |T1 | = n1 and |T2 | = n2 , and let n = n1 + n2 . The cost of Alg. 1 is dominated by the computation of the path matrix P , which takes O(n2 ) time and uses O(n2 ) additional space. Once P is available, the Refine procedure is called exactly once for each non-terminal node of the trees, and in each call the neighbors of the node in the graph (A ∪ B, E) are updated in O(max(n1 , n2 )) = O(n) time; the Crossing procedure also takes O(n) time. Therefore, the Untangle procedure runs in O(n2 ) time. Note that, in practical applications, the local, or “all subtree versus subtree” version of seeded tree alignment is actually sought, in which case we iteratively run the described framework over all subtree pairs of T1 and T2 . In this case, P is only constructed once, as a preprocessing step, in O(n2 ) time, and then, for each local seeded subtree pair to be aligned, the processing work consists of untangling the corresponding tanglegram in O(n) time, using the table P which was already computed in the preprocessing stage, and then applying the seeded tree alignment algorithm. Since there are O(n2 ) subtree pairs to be processed, the bottleneck in practice is actually dictated by the time complexity of the seeded tree alignment, according to the density of the given seeds set and the pre-selected tree alignment algorithm TAA to be applied.
Seeded Tree Alignment and Planar Tanglegram Layout
109
Acknowledgements AL was partially supported by Spanish CICYT project TIN2004-04343 iDEAS and TIN2005-08832-C03-03 MOISES-BAR. GV was partially supported by Spanish CICYT project TIN 2004-07925-C03-01 GRAMMARS and DGES project MTM2006-07773 COMGRIO. MZ was partially supported by an Eshkol grant of the Israeli Ministry of Science and Technology.
References 1. Chung, M.J.: O(n2.5 ) time algorithms for the subgraph homeomorphism problem on trees. J. Algorithms 8, 106–112 (1987) 2. DasGupta, B., et al.: On distances between phylogenetic trees. In: Proc. 8th Annual ACM-SIAM Symp. Discrete Algorithms, pp. 427–436. ACM Press, New York (1997) 3. Felsenstein, J.: Phylip - phylogeny inference package. Cladistics 5, 164–166 (1989) 4. Gardiner, K.J., Marsh, T.L., Pace, N.R.: Ion dependence of the bacillus subtilis rnase p reaction. J. Biol. Chem. 260, 5415–5419 (1985) 5. Haas, E.S., Brown, J.W.: Evolutionary variation in bacterial RNase P RNAs. Nucleic Acids Res. 26, 4093–4099 (1998) 6. Harris, J.K., et al.: New insight into RNase P RNA structure from comparative analysis of the archaeal RNA. RNA 7, 220–232 (2001) 7. James, B.D., et al.: The secondary structure of ribonuclease P RNA, the catalytic element of a ribonucleoprotein enzyme. Cell 52, 19–26 (1988) 8. Jansson, J., Hieu, N.T., Sung, W.-K.: Local gapped subforest alignment and its application in fnding RNA structural motifs. J. Comput. Biol. 13, 702–718 (2006) 9. Le, S.-Y., Nussinov, R., Maizel, J.V.: Tree graphs of RNA secondary structures and their comparisons. Comput. Biomed. Res. 22, 461–473 (1989) 10. Maidak, B.L., et al.: The RDP (Ribosomal Database Project) continues. Nucleic Acids Res. 28, 173–174 (2000) 11. Matula, D.W.: Subtree isomorphism in O(n5/2 ). Ann. Discrete Math. 2, 91–106 (1978) 12. Nye, T.M., Lio, P., Gilks, W.R.: A novel algorithm and web-based tool for comparing two alternative phylogenetic trees. Bioinformatics 22, 117–119 (2006) 13. Pace, N.R., Brown, J.W.: Evolutionary perspective on the structure and function of ribonuclease P, a ribozyme. J. Bacteriol. 177, 1919–1928 (1995) 14. Page, R.D.M. (ed.): Tangled Trees: Phylogeny, Cospeciation, and Coevolution. The University of Chicago Press, Chicago (2002) 15. Page, R.D.M., Valiente, G.: An edit script for taxonomic classifications. BMC Bioinformatics 6, 208 (2005) 16. Pinter, R.Y., et al.: Approximate labelled subtree homeomorphism. In: Sahinalp, S.C., Muthukrishnan, S.M., Dogrusoz, U. (eds.) CPM 2004. LNCS, vol. 3109, pp. 59–73. Springer, Heidelberg (2004) 17. Reyner, S.W.: An analysis of a good algorithm for the subtree problem. SIAM J. Comput. 6, 730–732 (1977) 18. Shamir, R., Tsur, D.: Faster subtree isomorphism. J. Alg. 33, 267–280 (1999) 19. Shan, H., Herbert, K.G., Piel, W.H., Shasha, D., Wang, J.T.L.: A structure-based search engine for phylogenetic databases. In: SSDMB 2002, pp. 7–10. IEEE Computer Society Press, Los Alamitos (2002)
110
A. Lozano et al.
20. Shapiro, B.A., Zhang, K.: Comparing multiple RNA secondary structures using tree comparisons. Comput. Appl. Biosci. 6, 309–318 (1990) 21. Valiente, G.: Algorithms on Trees and Graphs. Springer, Heidelberg (2002) 22. Valiente, G.: A fast algorithmic technique for comparing large phylogenetic trees. In: Consens, M.P., Navarro, G. (eds.) SPIRE 2005. LNCS, vol. 3772, pp. 371–376. Springer, Heidelberg (2005) 23. Woese, C.R., Pace, N.R.: Probing RNA structure, function, and history by comparative analysis. In: Gesteland, R.F., Atkins, J.F. (eds.) The RNA World, pp. 91–117. Cold Spring Harbor Laboratory Press (1993) 24. Zhang, K., Wang, L., Ma, B.: Computing similarity between RNA structures. In: Crochemore, M., Paterson, M.S. (eds.) Combinatorial Pattern Matching. LNCS, vol. 1645, pp. 281–293. Springer, Heidelberg (1999) 25. Hugenholtz, P.: Exploring prokaryotic diversity in the genomic era. Genome Biol. 3, 1–8 (2002)
Inferring Models of Rearrangements, Recombinations, and Horizontal Transfers by the Minimum Evolution Criterion (Extended Abstract) Hadas Birin1 , Zohar Gal-Or1, Isaac Elias2 , and Tamir Tuller1, 1
School of Computer Science Tel Aviv University {hadasbir,zohargal,tamirtul}@post.tau.ac.il 2 School of Computer Science and Communication KTH
[email protected]
Abstract. The evolution of viruses is very rapid and in addition to local point mutations (insertion, deletion, substitution) it also includes frequent recombinations, genome rearrangements, and horizontal transfer of genetic material. Evolutionary analysis of viral sequences is therefore a complicated matter for two main reasons: First, due to HGTs and recombinations, the right model of evolution is a network and not a tree. Second, due to genome rearrangements, an alignment of the input sequences is not guaranteed. Since contemporary methods for inferring phylogenetic networks require aligned sequences as input, they cannot deal with viral evolution. In this work we present the first computational approach which deals with both genome rearrangements and horizontal gene transfers and does not require a multiple alignment as input. We formalize a new set of computational problems which involve analyzing such complex models of evolution, investigate their computational complexity, and devise algorithms for solving them. Moreover, we demonstrate the viability of our methods on several synthetic datasets as well as biological datasets. Keywords: Phylogenetic network, horizontal gene transfer, genome rearrangements, recombinations, minimum evolution.
1
Introduction
Eukaryotes evolve largely through vertical lineal descent driven by local point mutations and genome rearrangements. Unlike the Eukaryotes, bacteria also acquire genetic material through the transfer of DNA segments across species boundaries—a process known as Horizontal Gene Transfer (HGT) [8]. In the presence of HGTs, the evolutionary history of a set of organisms is modelled by
Corresponding author.
R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 111–123, 2007. c Springer-Verlag Berlin Heidelberg 2007
112
H. Birin et al.
a phylogenetic network, which is a directed acyclic graph obtained by inferring a set of edges between pairs of edges in the organismal tree to model the horizontal transfer of genetic material [15] (see Figure 1). We call such a network a rooted phylogenetic network. In the case of viruses, the evolutionary model is even more complicated. The viral genomes are usually compact and evolve very rapidly by all the aforementioned mutations in addition to a large number of recombinations [23], and rearrangements. Furthermore, in this case an organismal tree usually does not exist [23], thus the right model is an unrooted tree with an additional small set of undirected edges (between pairs of edges in the initial tree). We call such networks unrooted phylogenetic networks. There are many strategies and models for dealing with non tree-like evolution, here we briefly describe some of them. For example, Splits networks (see e.g. [13]) are graphical models that capture incompatibilities in the data due to various factors, not necessarily HGT or hybrid speciation. Some works describe a phylogenetic network as probabilistic models and use maximum likelihood for analyzing it [25,14], while others use maximum parsimony [15], or deal with the problem by a graph-theoretic approach of reconciling species and gene trees into phylogenetic networks [1]. None of the mentioned works deal with rearrangements. In this work we advise a distance based method for inferring evolution under complicated models that can involve substitutions, insertions, and deletions of single nucleotides, rearrangement, HGT, and recombination. We believe that in our case, where the models of evolution are complex, distance methods have advantages for three main reasons: First, sometimes the appropriate probabilistic model is not completely clear, thus, using ML is not feasible. Second, by our experience [14,15], usually ML and MP are more time consuming than distance methods even when considering complete HGT. If the models include HGTs together with rearrangements these methods are not feasible. Finally, MP and ML require multiple alignment as an input, while we want to separate our method from this requirement. The multiple alignment problem is NP-hard [9], and to the best of our knowledge, at some stage of the processing most methods for inferring evolutionary networks require a multiple alignment. We believe that this requirement is problematic, especially with regard to complete viral genomes. Thus our method takes unaligned sequences as input. Boc and Makarenkov suggested a distance based method for detecting HGTs [4], however, there are two main differences between this research and the work of Boc and Makarenkov: First, as opposed to their method, our models allow for rearrangements and recombination. Second, our models are sequence oriented (i.e. the input in our case is a set of sequences), while the approach of Boc and Makarenkov [4] requires distance matrices as input. Consequently, our work considers a more general and realistic setting. Our methods are based on the following basic biological observations: 1) In phylogenetic networks each nucleotide evolves according to a tree (which may be different from the organismal tree) [12]. 2) Closely positioned nucleotides are
Inferring Models of Rearrangements and Recombinations by ME
113
more likely to have evolved according to the same tree than distantly positioned nucleotides [23]. Therefore, our method infer different trees to different subset of sequences, and partition the genomes into subsequences (each of at least a few dozens bp) and constrain the nucleotides in each subsequence to have the same evolution. Given an organismal tree and a set of sequences1 , our method finds families of homologue subsequences and reconstructs their evolutionary history by adding reticulation edges to the organismal tree while optimizing the minimum evolution criteria. This work does not handle gene duplication or deletion; dealing with these operations has been deferred to future works. However, as we demonstrate in this work, there are many interesting datasets that do not involve events such as duplication or deletion.
2
Definitions
Let T = (V, E) be a tree, where V and E are the tree nodes and tree edges, respectively, and let L(T ) denote its leaf set. Further, let X be a set of taxa (species). Then T is a phylogenetic tree over X if there is a bijection between X and L(T ). Henceforth, we identify the taxa with their associated leaves and denote the set of leaf-labels with [n] = {1, .., n}. A tree T is said to be rooted if the set of edges E is directed and there is a single distinguished internal vertex r with in-degree 0. Let S = [s1 , s2 , s3 , . . . , sn ] be the sequences corresponding to the n taxa (note that these sequences may be of different lengths). A family over the set of sequences S is a set of sequences S = [s1 , s2 , s3 , . . . , sn ], such that for all i, si is a subsequence of si . The definition of the ACS distance between two sequences appear in [26]. Let D(·, ·) denote a distance measure between pairs of sequences. In this paper D(·, ·) is either the cost of the pairwise alignment or the ACS distance. Two sequences, s1 and s2 , are considered d-homologous with respect to a block length L, if each sequence is longer than L, and every window of length L in their pairwise alignment has evolutionary distance < d; we denote this property DL (s1 , s2 ) < d. A family of d-homologous subsequences is defined as a set of subsequences S with the following property: ∀s1 , s2 ∈ S DL (s1 , s2 ) < d. A non-overlapping set of families is a set of families such that in each sequence, subsequences from different families do not overlap. The subsequence s ⊆ s that is part of the family f is denoted by f (s). We call the set of subsequences that are induced by a set of families a partitioning. A rooted phylogenetic network N = N (T ) = (V , E ) over the taxa set X is derived from a rooted tree T by inferring reticulation edges between pairs of edges in T . That is, each reticulation edge is inferred by adding two new vertices on two edges of E and thereafter joining the two new vertices with the directed reticulation edge. A tree edge can take part in more than one reticulation event. In a similar way, an unrooted phylogenetic network is derived from an unrooted 1
If the organismal is not part of input we estimate it from the input sequences.
114
H. Birin et al.
tree by adding undirected edges to the tree. Each family f of subsequences is related to a subset of the reticulation edges, denoted by M (f ), which describes the evolution of the family. If a family, f , evolves along the organismal tree then M (f ) = ∅. A rooted phylogenetic network must satisfy additional temporal constraints, such as acyclicity [14,15]. Such temporal constraints do not exist in an unrooted network. Finally, we denote the set of all trees contained inside the network N (rooted or unrooted) by T (N ). In the case of rooted network, each such tree is obtained by the following two steps: (1) for each node of in-degree 2, remove one of the incoming edges, and then (2) for every node x of in-degree and out-degree 1, whose parent is u and its child is v, remove node x and its two adjacent edges, and add a new edge from u to v. In the case of unrooted networks, a tree is obtain by removing an edge from each cycle of the tree, removing each node, x, with exactly two neighbors u and v, removing the two edges that include the node x, and adding a new undirected edge, (u, v). In our setting the tree, Tf ∈ T (N ) that includes exactly all the reticulation edges in M (f ) describes the evolution of the family f . In this work, we deal with the Minimum Evolution (ME) criteria [18]. It is known to be consistent when using the least-squares criterion [21] (as in this work); meaning that it converges to the correct tree for long enough sequences. In the case of evolutionary trees, the decision variant of the problem of finding the minimum evolution tree is defined as follows: Problem 1. [7] Input: Set of n sequences, S, that induces a distance matrix B and a real number e. Output: A tree, T , with total edge lengths less than e, while the edge lengths are least squares estimated from B. The sum of edge lengths of a tree T is the ME score of a tree; Let E(T, S, D) denotes the ME score for a tree T , with a set of sequences S corresponding to its leaves, and when D is used as a distance measure between pair of sequences. In our setting, we use the minimum evolution criterion to select the additional reticulation edges that best explain the evolution of each family of subsequences. That is, given a set of sequences S and a phylogenetic tree T , our goal is to find a set of non-overlapping families, a set of reticulation edges, and a mapping relating each family to a subset of the reticulation edges (i.e. one tree for each family). These are selected with the objective of minimizing the sum of minimum evolution scores for each family and associated tree. If the set of families is F = [f1 , f2 , .., fh ], the set of reticulation edges is H, the mapping is M , and the pairwise distance measure between sequences is D , then we denote this score by E(T, F, H, M, D) = i E(Tfi , fi , D). Let s1 and s2 denote two subsequences of the sequence s. We say that s1 precedes s2 (s1 ≺ s2 ) if s1 ends before s2 begins. Under a non-rearrangement assumption, there is an order of the families, f1 , f2 , .., fh , such that in each sequence, si : f1 (si ) ≺ f2 (si ), .., fh−1 (si ) ≺ fh (si ) (see figure 1), but this assumption is not always justified.
Inferring Models of Rearrangements and Recombinations by ME
y
x A
B a
115
C b
(a)
D c
d
a
c
b
(b)
d
A\a
B\b
C\c
D\d
(c)
(d)
(e)
Fig. 1. (a)-(c): A simple example of a HGT or recombination event between the ancestral black sequences in the ancestral taxa x and y. (a) A phylogenetic network with a single HGT event (the directed edge) which describes the evolution of the black family of sub-sequences. (b) The tree of the horizontally transferred family. (c) The underlying organismal (species) tree which describe the rest of the sequences. (d)-(e): Families.(d) Set of families under the non-rearrangement assumption. (e) Set of families without the non-rearrangement assumption. The white parts in the two cases denotes families that evolve along the organismal tree, T , while the evolution of the colored families is along trees that are different than T .
Here we deal with three variants of the problem, each related to different assumptions about the input: 1. The first variant, Non Rearrangement Given Tree (NRGT), assumes an organismal tree and that subsequences have not been rearranged. An example of such input is a set of proteins and an organismal tree of bacteria. 2. The second variant, Rearrangement Given Tree (RGT), assumes an organismal tree and that subsequences may be rearranged. An example of such input is a set of genomes and an organismal tree of bacteria. 3. The third variant, Rearrangement No Tree (RNT), does not assume an organismal tree and subsequences may be rearranged. An example of such input is a set of viral genomes. The output for the first two variants is a set of homologous non-overlapping families, a set of reticulation edges, and a mapping from each family to a subsets of reticulation edges (that is related to that family). In the third variant, the organismal tree is also part of the output.
3
Hardness Issues
In this section, we deal with the computational hardness of some variants of the problems that were mentioned in the previous section, and other related problems. Roughly, the problem can be divided into two subproblems 2 : (i) Dividing the set of input sequences into non-overlapping d-homologous families and (ii) Finding the best set of reticulation edges for each family. By the results that are presented in this section, it seems that these two problems are NP-hard. A related problem is Binary Minimum Common String Partitioning (BMCSP); we will use the hardness result of this problem for establishing the hardness result of our problems. A minimum common partitioning of two binary strings s1 and s2 is given by the least number of blocks that s1 has to be cut into such that these blocks can be reconcatenated to form s2 . Formally, BM CSP is defined as follows: 2
In practice these two problems are not independent.
116
H. Birin et al.
Problem 2 [BMCSP]. Input: Two binary strings, s1 and s2 , an integer B. Output: Can the sequence s2 be formed from the sequence s1 by cutting it into less than B subsequences and subsequently reconcatinating them. The hardness of BM CSP can be proved by a reduction from the APXcomplete problem 2-MCSP [11], which is defined as follows (due to lack of space the full details of the proof are deferred to the full version of the paper): Problem 3 [2-MCSP] [11]. Input: Two strings of integers, s1 and s2 , where each integer appears exactly twice in each sequence, and an integer B. Output: Can the sequence s2 be formed from the sequence s1 by cutting it into less than B subsequences and subsequently reconcatinating them. The hardness of the BMCSP problem implies the hardness of our problem. The decision variant of the RGT problem, which is defined as follows: Problem 4 [RGT].3 Input: A set of binary sequences S, a phylogenetic tree T , two integers h, and k, a real number c, and a distance measure between pairs of sequences, D. Question: Is there a set, F , of h non-overlapping families S1 , .., Sh : ∀i Si ⊂ S, a set, H, of k reticulation edges, and a mapping, M , from each family to subset of H , such that the score E(T, F, H, M, D) ≤ c. A reduction from BM CSP can show that RGT and RN T are hard even when there are 0 reticulation edges (details are deferred to the full version of the paper). Theorem 1. RGT and RN T are NP-hard. As mentioned, in this work we deal with minimum evolution criteria (minimum evolution tree, or M ET , see Problem 1. This problem is probably NP-hard for trees (it is still an open problem). It is easy to see that the N RGT problem (even if there is only one family) is NP-hard if Problem 1 is NP-hard (details are deferred to the full version of the paper). Observation 1. NP-hardness of the problem M ET implies NP-hardness of N RGT (when there is no rearrangement and the tree is given).
4
Algorithms and Parameters
In this section, we describe our method, Find Net-Families. As can be seen in Figure 2 this method consists of three stages, each of which solves a seperate computational problem. As was just shown, most of the problems we deal with are NP-hard and consequently the algorithms presented here are heuristics. The input to Find Net-Families is an organismal tree. This tree is either provided by the user or generated by computing a distance matrix with the ACS [26] method and then building the associated neighbor joining tree [22]. In 3
The problem N GT is defined in a similar way while the input does not include a tree T , the problem N RGT is defined in a similar way but the families must be in order.
Inferring Models of Rearrangements and Recombinations by ME
Find Net-Families: A.
a
b
The input includes a set of sequences; the organismal tree is either part of the input or is generated by the ACS method. c a b c
B.
a
{ { {
b
Stage 1: For all pairs of sequences find the best partition such that each block is longer than L; details in c subsection 4.1. a b b c c
C.
a
b
c
Stage 2 : By expanding one of the partitions from stage 1 generate set of non-overlapping families that cover all the input sequences; a details in subsection b 4.2. c
D.
a
b
c a b c
117
Stage 3: While improving the ME score, greedily add HGTs to each family that was found in stage 2. Update the set H, if the solution includes HGTs that do not appear in H; This stage also includes small modifications in the set of the families given the new set of HGTs; details in subsection 4.3.
a
Fig. 2. A sketch of the main algorithm for finding families and a set of reticulation edges for each family
the first stage we generate good partitions to each of the n2 input sequences. Thereafter, we greedily expand each of the partitionings to get a set of nonoverlapping families that covers all of the input sequences. In the final stage, we improve the total minimum evolution score of the families by greedily adding reticulation edges to the organismal tree. In the final stage, we also adjust the boundaries of the subsequences representing the families . Due to running time considerations we used a parameter L that constrains the length of each subsequence in each family to be a multiple of L 4 . The typical length of a gene is a few hundred nucleotides, usually only complete genes are horizontally transferred [6]. In the case of partial HGT or recombination, the lengths have similar order of magnitude [17,3] (very short horizontal transfer are hard and somtimes impossible to detect by any method). Indeed using L of few hundreds nucleotides gave good results (usually changing L from one hundred to few hundreds does not change the results dramatically). Finding d-Homologous Families in two Sequences. Given two sequences s1 and s2 of length , our goal is to find d-homologous families where each block should be longer than L, and such that d is minimal. Namely, we wish to match each block in one sequence with exactly one as similar as possible block in the other sequence. In this work we assume that there is one unique such matching. In practice, for large enough L (i.e more than few dozen characters) and when duplications are not present, this is indeed the case. The procedure has two stages; in the first stage we search for common subsequences of length at least W , where W has to be tuned with respect to the input sequences. In general, too small W (e.g. W = 2) is not specific enough, since we expect that both non-homologue and homologue sequences share common subsequences of length W . On the other hand too large W (e.g. W = 100) is also problematic, since even homologue sequences do not share such long subsequences. In practice 12 < W < 18 gave good results for nucleotides, and 7 < W < 12 gave good results in the case of amino acids. Let Si (s1 , s2 ) denote the longest substring that starts in position i in s1 and appears in the two sequence (we assume that |Si (s1 , s2 )| = O(1) ). In the first stage, we performed the following steps: 1. Generate the suffix array for s1 . 4
In practice the adjusting procedure allows lengths that are up to 10% different than this constraint.
118
H. Birin et al.
2. Scan s2 , in each position i, find the longest subsequence that starts in that position and appears in both sequence, Si (s1 , s2 ). 3. If |Si (s1 , s2 )| > W keep the position and the length of the matching substring. In our implementation we used the ”lightweight suffix array” of [5,26] which is constructed in time O( log()). Step 2 of the algorithm above, for each position, i, can be accomplished in log() time by performing lexicographic binary search for s2 (i) in the suffix array of s1 . After the first stage we have a set of position-pairs for each common substring longer than W . In the second stage, we map each overlapping window of length L in the first sequence with the window in the second sequence which has the maximal sum of lengths of common substrings. We call each such match the core of a family f ∈ F . Finally, we greedily adjust the boundaries of each family by adding/removing small blocks at the ends of the windows while optimizing minF ;s (i),s (j)∈F DL (s (i), s (j)), such that in the end of this stage the two strings have been partitioned into families that cover all of the sequences. The runtime complexity of this stage is O(2 ) for each pair of sequences. Thus the total runtime complexity for n sequences is O(2 · n2 ). Finding a Family of d-homologous Subsequences. From the previous stage we have a d-homologous partitioning for each n2 pairs of sequences. In this stage the aim is to expand these pairwise matchings to families of d-homologous subsequences with minimal d that cover all the n input sequences. As mentioned before, we assume that each window of length close to L in a sequence has exactly one homologue in each of the other sequences, an assumption which is supported by our biological inputs. We examine the expansion of each of the n2 partitionings of pairs of sequences to a partitioning over all the n sequences. This is done by the following steps: 1. For each of the n2 partitionings of pairs of sequences. a. Start with one partitioning. b. The k-th (k ≤ n − 1) step: Greedily add another sequence to the partitioning of k − 1 sequences that was generated in the previous step. This is done by checking consecutive overlapping windows of length L, and for each family choosing a non-overlapping window(s) (i.e. a subsequence of the new sequence) that includes the maximal sum of lengths of common subsequences that appear in the other members of this family in the k − 1 previous sequences. 2. Chose the expansion that minimizes minF ;s (i),s (j)∈F DL (s (i), s (j)). The runtime complexity of this stage is O( · n2 ) for each pair of sequences. Thus the total runtime complexity for n sequences is O( · n2 · n2 ). Adding Reticulation Edges and Refining the Partitioning to Families. In this subsection we describe how to find the set of reticulation edges that are related to each family. In this stage we assume a given initial (organismal) tree and a set of d-homologous families. Each family induces a distance matrix. Our procedure greedily chooses one of the families and adds a new reticulation edge
Inferring Models of Rearrangements and Recombinations by ME
119
that is related to that family. In each such step the size of the set of reticulation edges that is related to one of the families is increased by one. We plot a graph of the improvement in the ME score after each such step. Such a graph can help biologists to decide the actual number of reticulation edges. As is described in the simulation study, usually after adding the actual number of reticulation edges the improvement in the ME score is insignificant. Given a tree topology (an organismal tree and a set of reticulation edges) and a set of sequences at its leaves (a family). We use the least square estimation to calculate the edge lengths of the tree. This can be done in the time complexity of an n × n matrix inversion [22], less than O(n3 ). By using the more sophisticated method of [10] the least square estimation of the edge lengths of a given tree and distance matrix can be done in O(n2 ). After each stage of adding a reticulation edge we perform a stage of greedily adjusting the boundaries of the families (by increasing or decreasing the boundaries of each subsequences in each family) while improving the ME criteria. Since after each such stage the ME criteria is improved, a convergence to a local optima is guaranteed. The time complexity of this stage is (h2 · f · n) · n2 . Total Time Complexity. Suppose the input includes n sequences of length , and the result includes h families each edges. The total with f reticulation runtime complexity of our method is n2 ·2 + · n2 · n2 +(h2 · f · n) · n2 = O(n2 · (2 + n · h2 · f + n2 · )).
5
Experimental Results
For evaluating our methods we performed three tests. First, we implemented our method on two biological dataset (bacterial rbcL proteins, and the plants’ gene rps11) that underwent horizontal gene transfer. In the second test we simulated evolution that included HGT/recombination, rearrangements, and local point mutations, our method were used for reconstructing the simulated evolution. Finally, we implementation of our method on two datasets of viruses’ genomes. 5.1
Biological Inputs: Proteins and Genes
Proteins of Bacteria. The first input includes the rubisco gene rbcL of a group of 14 plastids, cyanobacteria, and proteobacteria, which were first analyzed by Delwiche and Palmer [6] (they and other suggest that it includes HGTs). This dataset consists of amino acid sequences, part of them are from Form I of rubisco, and the other six are from Form II of rubisco. We used exactly the same sequences that Delwiche and Palmer used in their paper. The species tree was based on information from the ribosomal database project (http://rdp.life.uiuc.edu) and the work of [6]. We checked two distance matrices, P AM 250 and Blosum62, both with gap penalty −8. Since this dataset includes a set of proteins we constrained the families to be ordered (the NRGT problem). We checked various sizes of L and got similar results (due to lack of space the more details about the
120
H. Birin et al.
results are deferred to the full version of this paper). We got similar results for the two distance matrices; this indicates that our method is robust to changes in the distance matrix. In general, our results support previous results that analyzed this dataset [6,4,15,14]. For example, we and previous methods discovered reticulation edge between α and β proteobacteria, and reticulation edge between proteobacteria and the plastid. Genes of Plants. The second database includes the ribosomal protein gene rps11 of a group of 47 flowering plants, which was first analyzed by Bergthorsson et al. [3] (they and others suggest that this dataset includes partial HGT). The species tree was reconstructed based on various sources, including the work of [20] and [16]. We used exactly the same sequences that Bergthorsson et al. used in their paper. Due to lack of space more details about the results are deferred to the full version of the paper. By Bergthorsson et al. these species underwent chimeric HGT (e. g. partial HGT), this conjecture is supported by our results which relate all the HGT to the family in positions 150 trough 300. In general, our HGTs suggest transfer of genetic material between Liliopsida and Dipsacales, Liliopsida and Papaveraceae, and Ranunculales and Dipsacales. The first two HGTs are similar to HGTs reported in previous works (for example, in [15]), while the third is new and suggests further biological research. Simulated Data: Simulating HGT/Recombination, Rearrangements, and Local Point Mutations. Here we evaluate the accuracy of our method on simulated data. The data consists of sequences which have evolved through substitutions, insertions, deletions, and lateral transfers. We generated 20 data sets with 10 leaves and 20 data sets with 20 leaves using the following recipe (see figure 3). (1) The species tree was generated using a regular birth death process from the Beep software package [2]. These trees are ultra metric with a root to leaf distance of 1. (2) Three transfer trees were independently created from the species tree by applying two random lateral transfers. Each transfer event was chosen to occur at time t ∈ [0, 1] with probability P (t) =
# concurrent lineages at time t , 1 0 P (r)
i.e, the probability increases linearly with the number of concurrent lineages. Once t was selected the transfer was selected uniformly at random from the possible transfer events at time t. (3)Species sequences, the sequences which have evolved according to the species tree, of expected length 4000 (similar to the typical length of genome virus, which is is few kbp) were generated using the ROSE [24] software package. Each nucleotide evolved according to the Jukes-Cantor model with a substitution probability of 0.2 from the root down to any leaf. Moreover, in each nucleotide insertions and deletions of up to 7 nucleotides5 occurred with probability 0.01 from the root down to any leaf. (4) Transfer blocks, the sequences which have evolved according to the transfer trees, of expected 5
The standard insertion and deletion functions in ROSE were used.
Inferring Models of Rearrangements and Recombinations by ME
121
length 500 were generated using the same process as for the species sequences (The typical length of a gene is few hundreds nucleotides, usually complete gene are horizontally transferred [6]. In the case of partial HGT or recombination, the lengths are in the order of magnitude of at least half a gene [17,3], i.e. few hundreds bp. Thus, we transfers blocks with similar size.). (5) The combined sequences, the sequences containing both the species sequences and the transfer blocks, where created by inserting the transfer blocks uniformly at random into the species sequences such that no evolutionary block in the sequences was shorter than 500.
(a)
(b)
(c)
(d)
Fig. 3. Illustration of our simulation. We generated synthetic data by the following steps. (a) Generated a random tree. (b) Add three random reticulation edges to the tree. (c) Evolve sequences along the trees, most of the positions evolve according the organismal tree, three blocks were evolve according to the organismal tree plus subset of the reticulation edges. (d) Randomly rearrange the blocks in each of the leaves.
We ran our algorithm with 380 < L < 600, and with W = 15 (the results for 12 ≤ W ≤ 18 where similar). For each of the 20 dataset of each size, there are 3 blocks of length about 500 that were transferred (while the rest of the sequences evolve in the original tree). Thus, there were 7 families for each dataset with a total of 140 families (for both the 10 and 20 leaf test sizes). Moreover, each family had been affected by two HGT events. Thus, there was a total of 120 HGT events (for both the 10 and 20 leaf test sizes). The results were similar for the two datasets, while the results for the 20 leaves datasets were a bit better. Due to lack of space we describe only the results of the 10 leaf datasets, while the results for the 20 leaf datasets are deferred to the full version of the paper: Out of the 140 families our algorithm did not completely miss any family. Only four families were shifted; three by 300 positions and one by 200 positions. Our algorithm identified 93 of the total 120 HGT events. Four of the edges were identified but with reversed direction. Only 23 edges were different than the original edges. However, in this case the edges our algorithm found were very close to the original edges. According to our results the accuracy of the algorithm improves when the number of leafs increases. One important goal of the method is its ability to infer the right number of HGT events. According to the results, our method performed very well in achieving this goal. Usually after adding the correct number of reticulation edges the improvement in the score is negligible. This is a major advantage compared to methods such as MP or ML when sites are independent [15,14], where usually there is less clearer change in the slope of the score graph.
122
H. Birin et al.
Genome of viruses. Our last datasets include complete genomes of two RNA viruses, one of HIV the other of Hepatitis C. We checked our method on these two typical inputs. The genomes were downloaded from [19], and each dataset included 10 genomes. We used our method to check if the datasets include HGTs/recombination and/or rearrangement. For the HIV dataset, our method did not find HGT events nor did it find rearrangement events. In the case of Hepatitis C we found two possible reticulation edges that may suggest an ancient recombination or horizontal gene transfer events. Due to lack of space more details about the virus datasets and results are deferred to the full version of the paper.
6
Concluding Remarks and Further Research
In general, genomic material evolves through local point mutations (insertion, deletion, substitution), genome rearrangements, horizontal gene transfers, recombinations, duplications, and deletions. This work is a step towards developing a method for inferring evolution under all these types of operations, and it is mainly a proof of concept. We showed that our method, which is based on the ME criterion, is useful for inferring partial or complete HGT events, and can infer rearrangements together with HGTs or recombinations. One work on this new topic is clearly not enough for solving all the problems. Further research in this direction will include: extending the set of operations to include duplications, deletions, and inversions; developing a more sophisticated simulator of virus evolution; investigating the hardness of N RGT (in this work we proved the hardness RGT and RN T ); and improving the running time of our heuristic. are currently aimed at using our approach for exploring the evolution of various groups of viruses and bacteria.
Acknowledgment We thank Prof. Benny Chor for helpful discussions. T.T. was supported by the Edmond J. Safra Bioinformatics program at Tel Aviv University.
References 1. Addario-Berry, L., Hallett, M., Lagergren, J.: Towards identifying lateral gene transfer events. In: PSB03, pp. 279–290 (2003) 2. Arvestad, L., Berglund, A., Lagergren, J., Sennblad, B.: Beep software package (2006) 3. Bergthorsson, U., Adams, K., Thomason, B., Palmer, J.: Widespread horizontal transfer of mitochondrial genes in flowering plants. Nature 424, 197–201 (2003) 4. Boc, A., Makarenkov, V.: New efficient algorithm for detection of horizontal gene transfer events. In: Benson, G., Page, R.D.M. (eds.) WABI 2003. LNCS (LNBI), vol. 2812, pp. 190–201. Springer, Heidelberg (2003)
Inferring Models of Rearrangements and Recombinations by ME
123
5. Burkhardt, S., K¨ arkk¨ ainen, J.: Fast lightweight suffix array construction and checking. In: Baeza-Yates, R.A., Ch´ avez, E., Crochemore, M. (eds.) CPM 2003. LNCS, vol. 2676, pp. 55–69. Springer, Heidelberg (2003) 6. Delwiche, C., Palmer, J.: Rampant horizontal transfer and duplicaion of rubisco genes in eubacteria and plastids. Mol. Biol. Evol 13(6) (1996) 7. Desper, R., Gascuel, O.: Fast and accurate phylogeny reconstruction algorithms based on the minimum-evolution principle. J. Comp. Biol. 9(5), 687–705 (2002) 8. Doolittle, W.F., Boucher, Y., Nesbo, C.L., Douady, C.J., Andersson, J.O., Roger, A.J.: How big is the iceberg of which organellar genes in nuclear genomes are but the tip? Phil. Trans. R. Soc. Lond. B. Biol. Sci. 358, 39–57 (2003) 9. Elias, I.: Settling the intractability of multiple alignment. In: Ibaraki, T., Katoh, N., Ono, H. (eds.) ISAAC 2003. LNCS, vol. 2906, pp. 352–363. Springer, Heidelberg (2003) 10. Gascuel, O.: Concerning the NJ algorithm and its unweighted version UNJ (1997) 11. Goldstein, A., Kolman, P., Zheng, J.: Minimum common string partition problem: Hardness and approximations. In: Fleischer, R., Trippen, G. (eds.) ISAAC 2004. LNCS, vol. 3341, pp. 484–495. Springer, Heidelberg (2004) 12. Hein, J.: A heuristic method to reconstruct the history of sequences subject to recombination. J. Mol. Evol. 36, 396–405 (1993) 13. Huson, D.H., Bryant, D.: Application of phylogenetic networks in evolutionary studies. Mol. Biol. Evol 23(2), 254–267 (2006) 14. Jin, G., Nakhleh, L., Snir, S., Tuller, T.: Maximum likelihood of phylogenetic networks. Bioinformatics 22(21), 2604–2611 (2006) 15. Jin, G., Nakhleh, L., Snir, S., Tuller, T.: Efficient parsimony-based methods for phylogenetic network reconstruction. Bioinformatics 23(2), 123–128 (2007) 16. Judd, W.S., Olmstead, R.G.: A survey of tricolpate (eudicot) phylogenetic relationships. American Journal of Botany 91, 1627–1644 (2004) 17. Kalinina, O., Norder, H., Magnius, L.O.: Full-length open reading frame of a recombinant hepatitis c virus strain from St Petersburg: proposed mechanism for its formation. J. Gen. Virol. 85, 1853–1857 (2004) 18. Kidd, K.K., Sgaramella-Zonta, L.A.: Phylogenetic analysis: concepts and methods. Am. J. Hum. Genet. 23(3), 235–252 (1971) 19. Kuiken, C., Yusim, K., Boykin, L., Richardson, R.: The los alamos hcv sequence database. Bioinformatics 21(3), 379–384 (2005) 20. Michelangeli, F.A., Davis, J.I., Stevenson, D.W.: Phylogenetic relationships among Poaceae and related families as inferred from morphology, inversions in the plastid genome, and sequence data from mitochondrial and plastid genomes. American Journal of Botany 90, 93–106 (2003) 21. Rzhetsky, A., Nei, M.: Theoretical foundation of the minimum-evolution method of phylogenetic inference. Mol. Biol. Evol. 10, 1073–1095 (1993) 22. Saitou, N., Nei, M.: The neighbor-joining method: a new method for reconstructing phylogenetic trees. Mol. Biol. Evol. 4(4), 406–425 (1987) 23. Sinkovics, J., Horvath, J., Horak, A.: The origin and evolution of viruses (a review). Acta Microbiol Immunol Hung. 45(3-4), 349–390 (1998) 24. Stoye, J., Evers, D., Meyer, F.: Rose: generating sequence families. Bioinformatics 14, 157–163 (1998) 25. Strimmer, K., Moulton, V.: Likelihood analysis of phylogenetic networks using directed graphical models. Mol. Biol. Evol. 17(6), 875–881 (2000) 26. Ulitsky, I., Burstein, D., Tuller, T., Chor, B.: The average common substring approach to phylogenomic reconstruction. J. Comp. Biol. 13(2), 336–350 (2006)
An Ω(n2 / log n) Speed-Up of TBR Heuristics for the Gene-Duplication Problem Mukul S. Bansal and Oliver Eulenstein Department of Computer Science, Iowa State University, Ames, IA, USA {bansal,oeulenst}@cs.iastate.edu
Abstract. The gene-duplication problem is to infer a species supertree from gene trees that are confounded by complex histories of gene duplications. This problem is NP-hard and thus requires efficient and effective heuristics. Existing heuristics perform a stepwise search of the tree space, where each step is guided by an exact solution to an instance of a local search problem. We improve on the time complexity of the local search problem by a factor of n2 / log n, where n is the size of the resulting species supertree. Typically, several thousand instances of the local search problem are solved throughout a stepwise heuristic search. Hence, our improvement makes the gene-duplication problem much more tractable for large-scale phylogenetic analyses.
1
Introduction
An abundance of potential information for phylogenetic analyses is provided by the rapidly increasing amount of available genomic sequence information. Most phylogenetic analyses combine genomic sequences, from presumably orthologous loci, or loci whose homology is the result of speciation, into gene trees. These analyses largely have to neglect the vast amounts of sequence information, in which gene duplication generates gene trees that differ from the actual species tree. Phylogenetic information from such gene trees can be utilized through a species tree obtained by solving the gene-duplication problem [1]. This problem is a type of supertree problem, that is, assembling from a set of gene trees a supertree that contains all species found in at least one of the input trees. The decision version of the gene-duplication problem is NP-complete [2]. Existing heuristics aimed at solving the gene-duplication problem search the space of all possible supertrees guided by a series of exact solutions to instances of a local search problem [3]. The gene-duplication problem has shown much potential for building phylogenetic species trees for snakes [4], vertebrates [5,6], Drosophia [7], and plants [8]. Yet, the computation time of local search problems which are solved by existing heuristics has largely limited the size of such studies. Throughout the current section n denotes the number of leaves in the resulting species tree, and, for brevity in stating time complexities, gene trees and the resulting species tree are assumed to have similar sizes.
This research was supported in part by NSF grant no. 0334832.
R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 124–135, 2007. c Springer-Verlag Berlin Heidelberg 2007
An Ω(n2 / log n) Speed-Up of TBR Heuristics
125
We improve on the best existing solution for a particular local search problem, the TBR local search problem, by a factor of n2 / log n. Heuristics solving the TBR local search problem, TBR heuristics, were rarely applied in practice due to inefficient running times. Our method greatly improves the speed of TBR based heuristics for the gene-duplication problem and makes it possible to infer larger supertrees that were previously difficult, if not impossible, to compute. For convenience, we use the term “tree” to refer to a rooted and full-binary tree. The terms “leaf-gene” and “leaf-species” refer to a gene or species that is represented by a leaf of a gene or species tree respectively throughout this work unless otherwise stated. Previous Results: The gene-duplication problem is based on the Gene Duplication model from Goodman et al. [9]. In the following, we (i) describe the Gene Duplication model, (ii) formulate the gene-duplication problem, and (iii) describe a heuristic approach of choice [3] to solve the gene-duplication problem. Gene Duplication model: The Gene Duplication (GD) model [1, 10, 11, 12, 13, 14, 15, 16] explains incompatibilities between a pair of “comparable” gene and species trees through gene duplications. A gene and a species tree are comparable, if a sample mapping, called leaf-mapping, exists that maps every leaf-gene to the leaf-species from which it was sampled. Figure 1 depicts an example. Gene tree G is inferred from the leave-genes that were sampled from the leaf-species of the species tree described by the leaf-mapping. However, both trees describe incompatible evolutionary histories. The GD model explains such incompatibilities by reconciling the gene tree with postulated gene duplications. For example, in Figure 1 a reconciled gene tree R can be theoretically inferred from the species tree S by duplicating a gene x in species X into the copies x and x and letting both copies speciate according to the topology of S. In this case, the gene tree can be embedded into the reconciled tree. Thus, the gene tree can be reconciled by using the duplication of gene x to explain the incompatibility. The gene duplications that are necessary under the GD model to reconcile the gene tree can be described by the mapping M, which is an extension of the given leaf-mapping. M maps every gene in the gene tree to the most recent species in the species tree
Fig. 1. (a) Gene trees G and species tree S are comparable, as the mapping from the leaf-genes to the leaf-species indicates. M is the lca-mapping from G to S. (b) R is the reconciled tree for G and S. In species X of R gene x duplicates into the genes x and x . The solid lines in R represent the embedding of G into R.
126
M.S. Bansal and O. Eulenstein
that could have contained the gene (i.e. their least common ancestor). A gene in the gene tree is a (gene) duplication if it has a child with the same mapping under M. In Figure 1 gene h and its child t map under the mapping M to the same species X. The reconciliation cost for a gene tree and a comparable species tree is measured in the number of duplications in the gene tree induced by the species tree. The reconciliation cost for a given set of gene trees and a species tree is the sum of the reconciliation costs for every gene tree in the set and the species tree. The reconciliation cost is linear time computable [13, 17, 18]. Gene-duplication problem and heuristic: The gene-duplication problem is to find, for a given set of gene trees, a comparable species tree with the minimum reconciliation cost. The decision variant of this problem and some of its characterizations are NP-complete [2, 19] while some parameterizations are fixed parameter tractable [20, 21]. However, GeneTree [3], an implementation of a standard local search heuristic for the gene-duplication problem, was used to show that the gene-duplication problem can be an effective approach. Therefore, in practice, heuristics are commonly applied to solve the gene-duplication problem, even if they are unable to guarantee an optimal solution. While the local search heuristic for the gene-duplication problem performs reasonably well in computing smaller sized instances, it does not allow the computation of larger species supertrees. In this heuristic, a tree graph is defined for the given set of gene trees and some, typically symmetric, tree edit operation. The nodes in the tree graph are the species trees which are comparable with every given gene tree. An edge adjoins two nodes exactly if the corresponding trees can be transformed into each other by the tree edit operation. The reconciliation cost of a node in the graph is the reconciliation cost of the species tree represented by that node and the given gene trees. Given a starting node in the tree graph, the heuristic’s task is to find a maximal-length path of steepest descent in the reconciliation cost of its nodes and to return the last node on such a path. This path is found by solving the local search problem for every node along the path. The local search problem is to find a node with the minimum reconciliation cost in the neighborhood (all adjacent nodes) of a given node. The neighborhood searched depends on the edit operation. Edit operations of interest are rooted subgraph pruning and regrafting (SPR) [22,23,24] and rooted tree bisection and reconnection (TBR) [22,23,25]. We defer the definition of these operations to Section 2. The best known run times for the SPR and TBR local search problems are O(kn2 ) [26] and O(kn4 ) (naive solution) respectively, where k is the number of input gene trees. Our Contribution: The efficient solution for the SPR local search problem makes SPR based heuristics suitable for large-scale phylogenetic analyses. Currently, TBR based heuristics are not applicable for phylogenetic analyses because no efficient solution is known for the TBR local search problem. However, TBR based heuristics are more desirable because they significantly extend the search space explored at each local search step. In particular, TBR heuristics search a neighborhood of Θ(n3 ) nodes, including the Θ(n2 ) nodes of the SPR neighborhood, at each local search step. Our contribution is an O(kn2 log n) algorithm
An Ω(n2 / log n) Speed-Up of TBR Heuristics
127
for the TBR local search problem. This makes TBR heuristics almost as efficient as SPR heuristics for large-scale phylogenetic analyses.
2
Basic Definitions, Notation, and Preliminaries
In this section we first introduce basic definitions and notation and then define preliminaries required for this work. 2.1
Basic Definitions and Notation
A tree T is a connected graph with no cycles, consisting of a node set V (T ) and an edge set E(T ). The nodes in V (T ) of degree at most one are called leaves and denoted by Le(T ). A node in V (T ) that is not a leaf is called an internal node. T is rooted if it has exactly one distinguished node called the root which we denote by Ro(T ). Let T be a rooted tree. For any pair of nodes x, y ∈ V (T ) where y is on a path from Ro(T ) to x we call (i) y an ancestor of x, and (ii) x a descendant of y. If {y, x} ∈ E(T ) then we call y the parent of x denoted by Pa(x) and we call x a child of y. We write (y, x) to denote the edge {y, x} where y = Pa(x). The set of all children of y is denoted by Ch(y). If two nodes in T have the same parent, they are called siblings. T is (fully) binary if every internal node has exactly two children. A subtree of T rooted at node x ∈ V (T ), denoted by Tx , is the tree induced by x and all its descendants. The depth of a node x ∈ V (T ) is the number of edges on the path from Ro(T ) to x. The least common ancestor of a non-empty subset L ⊆ V(T ), denoted as lca(L), is the common ancestor of all nodes in L with maximum depth. 2.2
The Gene Duplication Problem
We now introduce necessary definitions to state the gene duplication problem. A species tree is a tree that depicts the evolutionary relationships of a set of species. Given a gene family for a set of species, a gene tree is a tree that depicts the evolutionary relationships among the sequences encoding only that gene family in the given species. Thus the nodes in a gene tree represent genes. In order to compare a gene tree G with a species tree S a mapping from each gene g ∈ V (G) to the most recent species in S that could have contained g is required. Definition 1 (Mapping). The leaf-mapping LG,S : Le(G) → Le(S) specifies the species MG,S (g) from which gene g was sampled from. An extension of LG,S to MG,S : V (G) → V (S) is the mapping where MG,S (g) = LG,S (g), if g ∈ Le(G), and MG,S (g) = lca(MG,S (Le(Gg )) otherwise. Definition 2 (Comparability). The trees G and S are comparable if there exists a leaf-mapping LG,S . A set of gene trees G and S are comparable if each gene tree in G is comparable with S. Let G and S be comparable trees for the remainder of this section.
128
M.S. Bansal and O. Eulenstein
Definition 3 (Duplication). A node v ∈ V (G) is a (gene) duplication if MG,S (v) = MG,S (u) for some u ∈ Ch(v) and we define Dup(G, S) = {g ∈ V (G) : g is a duplication }. Definition 4 (Reconciliation cost). We define reconciliation costs for gene and species trees as follows: 1. Δ(G, S) = | Dup(G, S)| is the reconciliation cost from G to S. 2. Δ(G, S) = G∈G Δ(G, S) is the reconciliation cost from G to S. 3. Let T be the set of species trees that is comparable with G. We define Δ(G) = minS∈T Δ(G, S) to be the reconciliation cost of G. Problem 1 (Duplication). Instance: A set G of gene trees. Find: A species tree S ∗ such that Δ(G, S ∗ ) = Δ(G). 2.3
Local Search Problems
Here we first provide definitions for the TBR [25] and SPR [24] edit operations and then formulate the related local search problems that were motivated in the Introduction. Definition 5 (RR operation). Let T be a tree and x ∈ V (T ). RR(T, x) is defined to be the tree T , if x = Ro(T ). Otherwise, RR(T, x) is the tree that is obtained from T by (i) suppressing Ro(T ), and (ii) subdividing the edge {Pa(x), x} by a new root node. We define the following extension: RR(T ) = x∈V (T ) {RR(T, x)}. Definition 6 (TBR operation). For technical reasons we first define for a tree T the planted tree P (T ) that is the tree obtained by adding an additional edge, called root edge, {u, Ro(T )} to T . Let T be a tree, e = (u, v) ∈ E(T ) and X, Y be the connected components that are obtained by removing edge e from T where v ∈ X and u ∈ Y . We define TBRT (v, x, y) for x ∈ X and y ∈ Y to be the tree that is obtained from P (T ) by first removing edge e, then replacing the component X by RR(X, x), and then adjoining a new edge f between x = Ro(RR(X, x)) and Y as follows: 1. Create a new node y that subdivides the edge (Pa(y), y). 2. Adjoin the edge f between nodes x and y . 3. Suppress the node u, and rename x as v and y as u. We say that the tree TBRT (v, x, y) is obtained from T by a tree bisection and reconnection (TBR) operation that bisects the tree T into the components X, Y and reconnects them above the nodes x, y. We define the following extensions for the TBR operation: 1. TBRT (v, x) = y∈Y {TBRT (v, x, y)} 2. TBRT (v) = x∈X TBRT (v, x) 3. TBRT = (u,v)∈E(T ) TBRT (v)
An Ω(n2 / log n) Speed-Up of TBR Heuristics
129
An SPR operation for a given tree T can be briefly described through the following three steps: (i) prune some subtree P from T , (ii) add a root edge to the remaining tree S, (iii) regraft P into an edge of the remaining tree S. For our purposes we define the SPR operation as a special case of the TBR operation. Definition 7 (SPR operation). Let T be a tree, e = (u, v) ∈ E(T ) and X, Y be the connected components that are obtained by removing edge e from T where v ∈ X and u ∈ Y . We define SPRT (v, y) for y ∈ Y to the tree TBRT (v, v, y). We say that the tree SPRT (v, y) is obtained from T by a subtree prune and regraft (SPR) operation that prunes subtree Tv and regrafts it above node y. We define the following extensions of the SPR operation: 1. SPRT (v) = y∈Y {SPRT (v, y)} 2. SPRT = (u,v)∈E(T ) SPRT (v) Problem 2 (TBR-Scoring (TBR-S)). Instance: A gene tree set G, and a comparable species tree S. Find: A tree T ∗ ∈ TBRS such that Δ(G, T ∗ ) = minT ∈TBRS Δ(G, T ). Problem 3 (TBR-Restricted Scoring (TBR-RS)). Instance: A triple (G, S, v), where G is a set of gene trees, S is a comparable species tree, and (u, v) ∈ E(S). Find: A tree T ∗ ∈ TBRS (v) such that Δ(G, T ∗ ) = minT ∈TBRS (v) Δ(G, T ). The problems SPR-Scoring (SPR-S) and SPR-Restricted Scoring (SPR-RS) are defined analogously to the problems TBR-S and TBR-RS respectively. Throughout this paper we use the following terminology: (i) G is a set of gene trees, (ii) S denotes a compatible species tree, (ii) r = Ro(S), (iii) P denotes a proper (pruned) subtree of S, and (iv) v = Ro(P ).
3
Solving the TBR-S Problem
In this section we study the TBR-S problem in more detail. First, we show how the algorithm developed by Bansal et al. [26] to solve the SPR-RS problem can be slightly modified to solve the TBR-S problem. This already improves the running time of the existing solution considerably. Second, we show how the inherent structure of the TBR-S problem can be used to further improve the running time. To do this, we define the “BestRooting” problem, and show how an efficient solution for this problem leads to an efficient solution for the TBR-S problem. 3.1
Relating Scores of TBR and SPR Neighborhoods
The following algorithm Alg-SPR-RS is a brief restatement of the algorithm presented in [26] to solve the SPR-RS instance (G, S, v) efficiently. Algorithm Alg-SPR-RS 1. Prune P from S, regraft P above node r to obtain the resulting tree denoted by (P ). Compute the reconciliation cost of (P ).
130
M.S. Bansal and O. Eulenstein
2. Compute the difference between the reconciliation cost of each tree in SPRS (v) and (P ). This gives the reconciliation cost of each tree in SPRS (v). Observe that SPRS (v) = TBRS (v, v). In fact, Alg-SPR-RS can be modified to efficiently compute the reconciliation costs of all trees in TBRS (v, x) for any node x ∈ V (P ). To do this, we simply modify Step 1 of Alg-SPR-RS as follows: 1. Prune P from S, re-root P to obtain P = RR(S, x), and regraft P above node r to obtain (P ). Compute the reconciliation cost of (P ). Note, this modification does not change the algorithms’s complexity. Observation 1. The TBR-RS problem on (G, S, v) can be solved by computing the reconciliation cost of each tree in TBRS (v, x), for all x ∈ V (P ). The TBR-S problem in turn can be solved by solving the TBR-RS problem |V (S)| − 1 times. Let us assume, for convenience, similar gene tree and species tree sizes. It is known that the SPR-RS problem is solvable in O(kn) time [26], where k = |G|. Based on Observation 1, and the modification described above, the TBR-S problem can then be solved in O(kn3 ) time. This already gives us a speed up of Θ(n) over known algorithms for this problem. We will show how to solve the TBR-S problem in O(kn2 log n) time. This gives a speed-up of Θ(n2 / log n) over existing algorithms. Also, it should be noted that the correctness or efficiency of our algorithm does not depend on the simplifying assumption of similar gene and species tree sizes. It is interesting to note that the size of the set TBRS is Θ(n3 ). Thus, for one gene tree the time complexity of computing and enumerating the reconciliation costs of all trees in TBRS is Ω(n3 ). However, to solve the TBR-S problem one is only interested in finding a tree with the minimum reconciliation cost. This lets us solve the TBR-S problem in time that is sub-linear in the size of TBRS , and obtain a time complexity of O(n2 log n) for the TBR-S problem. In fact, after the initial O(n2 log n) preprocessing step, our algorithm can output the reconciliation cost of any tree in TBRS in O(1) time. 3.2
Relating TBR-RS with SPR-RS
To obtain our speed-up, we concentrate on improving the complexity of solving the TBR-RS problem. To do this, we take a closer look at Step 2 of Alg-SPR-RS. This part of the algorithm computes the difference in reconciliation cost of each tree in SPRS (v) and the tree (P ). To compute this difference, the algorithm considers only the leaf set of P , and not its topology. This means that the difference values would be the same if P was replaced by any tree P ∈ RR(P ). Based on this observation, we have the following theorem. In the interest of brevity, this theorem is stated here without proof. Theorem 1. Let x , x ∈ V (P ), and y , y ∈ V (S) \ (V (P ) ∪ {r}). Let T1 = TBRS (v, x , y ), T2 = TBRS (v, x , y ), and, T3 = TBRS (v, x , y ), T4 = TBRS (v, x , y ). Then, Δ(G, T1 ) − Δ(G, T2 ) = Δ(G, T3 ) − Δ(G, T4 ).
An Ω(n2 / log n) Speed-Up of TBR Heuristics
131
Corollary 1. To obtain the reconciliation cost of each tree in TBRS (v), it is sufficient to compute the reconciliation cost of (P ) for each P ∈ RR(P ), and then perform Step 2 of Alg-SPR-RS starting with any (P ), P ∈ RR(P ). This is because the output of Step 2 of Alg-SPR-RS will be the same for all (P ) where P ∈ RR(P ). To solve the TBR-RS problem it is sufficient to find one tree in TBRS (v) with minimum reconciliation cost. Based on Alg-SPR-RS and Corollary 1 we have the following theorem. Theorem 2. Let T1 be a tree with minimum reconciliation cost in TBRS (v). Consider tree P ∈ RR(P ) where (P ) has minimum reconciliation cost and let P = RR(P, x). Then, there exists a tree T2 ∈ TBRS (v, x) such that Δ(G, T1 ) = Δ(G, T2 ). In other words, to obtain a solution for the TBR-RS problem for instance (G, S, v), it is sufficient to obtain the reconciliation costs of only the trees in TBRS (v, x), where P = RR(P, x) such that (P ) has the minimum reconciliation cost. Based on Corollary 1 and Theorem 2 we have the following corollary. Corollary 2. The minimum reconciliation cost of a tree in TBRS (v) can be obtained by performing Step 2 of Alg-SPR-RS starting with (P ), where P ∈ RR(P ) such that (P ) has minimum reconciliation cost. Problem 4 (BestRooting (BR)). Instance: A set of gene trees G, a compatible species tree S, and a proper subtree P of S. Find: A tree P ∈ RR(P ) for which Δ(G, (P )) is minimum. Thus, based on Observation 1, Theorems 1 and 2, and, Corollaries 1 and 2, an efficient solution to the BR problem leads naturally to an efficient solution for the TBR-S problem. The remainder of this paper deals mostly with our solution to solve the BR problem efficiently. In the next section we take a closer look at the BR problem and study some of its structural properties.
4
Structural Properties of the BR Problem
Our solution to solve the BR problem for a set of input gene trees involves computing the reconciliation cost of (P ), where P ∈ RR(P ), for each gene tree separately, and then combining the results to obtain the final solution. The solution for the BR problem is easily obtained by picking that P ∈ RR(P ) for which the sum of the reconciliation costs from each gene tree is minimum. Therefore, in the remainder of this section we assume that there is only one input gene tree G for the BR problem. Thus, the problem to be solved is the following: Problem 5. (Rooting) Instance: A triple (G, S, P ), where G is a gene tree, S a compatible species tree, and P a proper subtree of S. Find: The reconciliation cost Δ(G, (P )) for each P ∈ RR(P ).
132
M.S. Bansal and O. Eulenstein
To solve the Rooting problem we first calculate the reconciliation cost of (P ). As P is re-rooted to form P , the duplication status of some of the nodes from G may change, which changes the reconciliation cost. We show how to efficiently compute this difference between the reconciliation cost of (P ) and the reconciliation cost of (P ) for each P ∈ RR(P ). To realize this strategy it is imperative to study the change in the duplication status of nodes in the gene tree as P is re-rooted step-by-step. Lemma 1. The duplication status of any node g ∈ G for which MG,S (g) ∈ V (P ) remains the same for each (P ), P ∈ RR(P ). Thus, under our strategy, we only need to consider those nodes in G that map to a node in V (P ) under MG,S . These are the nodes that are responsible for any difference in the reconciliation costs of (P ) and (P ), where P ∈ RR(P ). Definition 8. An internal node g ∈ V (G) is relevant if MG,S (g) ∈ V (P ). For the remainder of this section let g ∈ V (G) be relevant, and Ch(g) = {g , g }. Lemma 2. If MG,(P ) (g) = MG,(P ) (g ) = MG,(P ) (g ) for some P ∈ RR(P ), then g remains a duplication under MG,(P ) for every P ∈ RR(P ). Lemma 3. Let a = MG,(P ) (g). The duplication status of g under MG,(P ) is preserved under MG,(P ) where P = RR(P, x) for x ∈ V (P ) \ (V (Pa ) \ {a}). Lemma 4. Suppose g is not a duplication under MG,(P ) . Let b = MG,(P ) (g ), c = MG,(P ) (g ). Then g is a duplication under MG,(P ) where P = RR(P, x) for x ∈ (V (Pb )\ {b})∪(V (Pc )\ {c}). And, g is not a duplication under MG,(P ) for any other P . Lemma 5. Let a = MG,(P ) (g) = MG,(P ) (g ), and b = MG,(P ) (g ). Let α denote the node closest to b along the path from a to b in (P ), such that there exists a node v ∈ Gg with MG,(P ) (v) ∈ Pα . Then, (i) g is not a duplication under MG,(P ) where P = RR(P, x) and x is a node along the path from a to b, but not a, in (P ), and, (ii) g is a duplication under MG,(P ) for any other P .
5
Description of the Algorithm
We first design an efficient algorithm, called RootingCostTree (Alg-RCT), which solves the Rooting problem. Based on the lemmas seen in Section 4, we then show how this algorithm fits into our algorithm for solving the TBRS problem. Finally we analyze the complexity of our algorithm for solving the TBR-S problem. 5.1
Algorithm Alg-RCT(G, S, P )
The input for Alg-RCT is the instance (G, S, P ) of the Rooting problem. The first step in the algorithm is to obtain the tree (P ). The output P is a W : V (P) → N0 node weighted version of tree P , where W (s) = Δ(G, (P )) for P = RR(P, s).
An Ω(n2 / log n) Speed-Up of TBR Heuristics
133
Initialization: Construct (P ) and initialize two counters g(s) and l(s) with 0, for each node s ∈ V (P ). Then, compute MG,(P ) . Create two empty sets “start” and “end” at each node in P . Partially updating the values for g and l: For each relevant node g do the following: If g is not a duplication under MG,(P ) , then g(MG,(P ) (c)) ← g(MG,(P ) (c)) + 1 for each c ∈ Ch(g). If g is a duplication where a = MG,(P ) (g) = MG,(P ) (u), and b = MG,(P ) (v), for Ch(g) = {u, v} and b = a. Add u to the “start” set of node a and the “end” set of node b. Fully updating the values for g and l: We now update the l and g values for those nodes that satisfy the condition of Lemma 5. Lets call these nodes “special”. Following the notation from Lemma 5, the goal is to find node α ∈ P for each special node from G. In the interest of brevity we only give a high level idea of the algorithm to be followed for this step. An in-order labeling of G lets us store the subtree Gg for any special node g ∈ V (G) as an interval. These intervals can be stored in an interval tree, so that stabbing queries can be performed efficiently. We traverse P in post-order, and for each node, say x, we keep track of those nodes from the gene tree that might have a descendant mapping to x and for which α can be deduced from x. This is done by making use of the “start” and “end” sets established in the previous step. This ‘currently active’ set of nodes (intervals) is maintained dynamically in the interval tree. Suitably querying the interval tree allows us to obtain those special nodes for which the α nodes can be deduced easily from x. This step can be shown to run in time O(|V (P ) + V (G)| log(|V (P ) + V (G)|)). Computing P: The tree P is initialized to be P and its node weights are set to 0. Set d ← Δ(G, (P )). For each node s in a preorder traversal on the tree P , we calculate the weight of that node as follows: If s ∈ Ch(Ro(P )) then W (s) ← d. Otherwise, set W (s) ← W (Pa(s)) + g(Pa(s)) − l(s). Note: The value g(s), represents the number of additional nodes from G that will become duplications when P = RR(P, s) is re-rooted to form P = RR(P, t), t ∈ Ch(s). The value l(s) represents the number of nodes from G that will lose their duplication status when P = RR(S, Pa(s)) is re-rooted to form P = RR(S, s). 5.2
Algorithm Alg-TBR(G, S, P )
This algorithm solves the TBR-S problem. The algorithm is as follows: We first use Algorithm Alg-RCT to solve the BR problem as shown in Section 4. A solution to the BR problem leads naturally to a solution for the TBR-S problem (see Observation 1, Theorems 1 and 2, and, Corollaries 1 and 2). 5.3
Correctness and Complexity
To establish the correctness of our algorithm for the TBR-S problem, it is sufficient to show that the Rooting problem is correctly solved by Algorithm Alg-RCT. The correctness of algorithm Alg-RCT is based on Lemmas 1-5. For brevity, a detailed proof is omitted herein.
134
M.S. Bansal and O. Eulenstein
We first state the time complexity of Alg-RCT, and then derive the time complexity of algorithm Alg-TBR which solves the TBR-S problem. Note, to simplify our analysis we assume that all G ∈ G have approximately the same size. The input for BR problem is a gene tree G, a species tree S, and the pruned subtree P of S. Let n = | Le(S)|, and k = |G|. Complexity of Alg-RCT(G, S, P ): Let m = | Le(S)|+ | Le(G)|. The overall time complexity of Alg-RCT(G, S, P ) is bounded by O(m log m) (proof omitted for brevity). This implies that the complexity of the BR problem is O(km log m). Complexity of Alg-TBR(G, S, P ): By Corollary 2 the time complexity of the TBR-RS problem is O(km) + O(km log m) which is O(km log m). The time complexity of Alg-TBR is thus, O(n) × O(km log m), which is O(knm log m). The time complexity of the existing naive solution for the TBR-S problem is O(kn3 m). Thus, our algorithm improves on the current solution by a factor of n2 / log m.
6
Outlook and Conclusion
Despite the inherent complexity of the duplication problem, it has been an effective approach for incorporating data from gene families into a phylogenetic inference [4, 5, 6, 7]. The duplication problem is typically approached by using local search heuristics. Among these, TBR heuristics are especially desirable for large-scale phylogenetic analyses, but current solutions have prohibitively large run times. Our algorithm offers a vast reduction in run time, which makes TBR heuristics applicable for such large-scale analyses. The ideas developed in this paper could possibly be applied to other problems related to the reconciliation of gene and species trees. For example, our solution for the rooting problem can be used to efficiently find an optimal rooting for any species tree, with respect to the given gene trees.
References 1. Guig´ o, R., Muchnik, I., Smith, T.F.: Reconstruction of ancient molecular phylogeny. Molecular Phylogenetics and Evolution 6(2), 189–213 (1996) 2. Ma, B., Li, M., Zhang, L.: On reconstructing species trees from gene trees in term of duplications and losses. In: RECOMB, pp. 182–191 (1998) 3. Page, R.D.M.: GeneTree: comparing gene and species phylogenies using reconciled trees. Bioinformatics 14(9), 819–820 (1998) 4. Slowinski, J.B., Knight, A., Rooney, A.P.: Inferring species trees from gene trees: A phylogenetic analysis of the elapidae (serpentes) based on the amino acid sequences of venom proteins. Molecular Phylogenetics and Evolution 8, 349–362 (1997) 5. Page, R.D.M.: Extracting species trees from complex gene trees: reconciled trees and vertebrate phylogeny. Molecular Phylogenetics and Evolution 14, 89–106 (2000) 6. Cotton, J., Page, R.D.M.: Vertebrate phylogenomics: reconciled trees and gene duplications. In: Pacific Symposium on Biocomputing, pp. 536–547 (2002) 7. Cotton, J.A., Page, R.D.M.: Tangled tales from multiple markers: reconciling conflict between phylogenies to build molecular supertrees. In: Bininda-Emonds, O.R.P. (ed.) Phylogenetic Supertrees: Combining Information to Reveal the Tree of Life, pp. 107–125. Springer, Heidelberg (2004)
An Ω(n2 / log n) Speed-Up of TBR Heuristics
135
8. Sanderson, M.J., McMahon, M.M.: Inferring angiosperm phylogeny from EST data with widespread gene duplication. BMC Evolutionary Biology 7(suppl. 1), S3 (2007) 9. Goodman, M., Czelusniak, J., Moore, G.W., Romero-Herrera, A.E., Matsuda, G.: Fitting the gene lineage into its species lineage, a parsimony strategy illustrated by cladograms constructed from globin sequences. Systematic Zoology 28, 132–163 (1979) 10. Page, R.D.M.: Maps between trees and cladistic analysis of historical associations among genes, organisms, and areas. Systematic Biology 43(1), 58–77 (1994) 11. Mirkin, B., Muchnik, I., Smith, T.F.: A biology consistent model for comparing molecular phylogenies. Journal of Computational Biology 2(4), 493–507 (1995) 12. Eulenstein, O.: Predictions of gene-duplications and their phylogenetic development. PhD thesis, University of Bonn, Germany, GMD Research Series No. 20 / 1998 (1998), ISSN: 1435-2699 13. Zhang, L.: On a Mirkin-Muchnik-Smith conjecture for comparing molecular phylogenies. Journal of Computational Biology 4(2), 177–187 (1997) 14. Chen, K., Durand, D., Farach-Colton, M.: Notung: a program for dating gene duplications and optimizing gene family trees. Journal of Computational Biology 7, 429–447 (2000) 15. Bonizzoni, P., Vedova, G.D., Dondi, R.: Reconciling gene trees to a species tree. In: Petreschi, R., Persiano, G., Silvestri, R. (eds.) CIAC 2003. LNCS, vol. 2653, Springer, Heidelberg (2003) 16. G´ orecki, P., Tiuryn, J.: On the structure of reconciliations. In: Lagergren, J. (ed.) Comparative Genomics. LNCS (LNBI), vol. 3388, Springer, Heidelberg (2005) 17. Bender, M.A., Farach-Colton, M.: The LCA problem revisited. In: Latin American Theoretical INformatics, pp. 88–94 (2000) 18. Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM Journal on Computing 13(2), 338–355 (1984) 19. Fellows, M., Hallett, M., Korostensky, C., Stege, U.: Analogs & duals of the mast problem for sequences & trees. In: Bilardi, G., Pietracaprina, A., Italiano, G.F., Pucci, G. (eds.) ESA 1998. LNCS, vol. 1461, pp. 103–114. Springer, Heidelberg (1998) 20. Stege, U.: Gene trees and species trees: The gene-duplication problem is fixedparameter tractable. In: Proceedings of the 6th International Workshop on Algorithms and Data Structures (1999) 21. Hallett, M.T., Lagergren, J.: New algorithms for the duplication-loss model. In: RECOMB, pp. 138–146 (2000) 22. Swofford, D.L., Olsen, G.J.: Phylogeny reconstruction. In: Molecular Systematics, Sinauer Associates, pp. 411–501 (1996) 23. Allen, B.L., Steel, M.: Subtree transfer operations and their induced metrics on evolutionary trees. Annals of Combinatorics 5, 1–13 (2001) 24. Bordewich, M., Semple, C.: On the computational complexity of the rooted subtree prune and regraft distance. Annals of Combinatorics 8, 409–423 (2004) 25. Chen, D., Eulenstein, O., Fern´ andez-Baca, D., Burleigh, J.G.: Improved heuristics for minimum-flip supertree construction. Evolutionary Bioinformatics (2006) 26. Bansal, M.S., Burleigh, J.G., Eulenstein, O., Wehe, A.: Heuristics for the geneduplication problem: A θ(n) speed-up for the local search. In: RECOMB, pp. 238– 252 (2007)
Incremental Discovery of Irredundant Motif Bases in Time O(|Σ|n2 log n) (Extended Abstract) Alberto Apostolico and Claudia Tagliacollo
Georgia Institute of Technology and Università di Padova
[email protected]
1
Introduction
Compact bases formed by motifs called “irredundant” and capable of generating all other motifs in a sequence have been proposed in [8,10] and successfully tested in tasks of biosequence analysis and classification. Given a sequence s of n characters drawn from an alphabet Σ, the problem of extracting such a base from s had been previously solved in time O(n2 log n log |Σ|) and O(|Σ|n2 log2 n log log n), respectively in [9] and [7], through resort to the FFT-based string searching by Fischer and Paterson [5]. More recently, a solution taking time O(|Σ|n2 ) without resort to the FFT was also devised [4]. In the present paper, the problem is considered of extracting the bases of all suffixes of a string incrementally. In previous work [3], this task was accomplished in time O(n3 ). A much faster incremental algorithm is described here, which takes time O(|Σ|n2 log n). Whereas also this algorithm does not make use of the FFT, its performance is comparable to the one exhibited by the previous FFT-based algorithms computing only one base. The implicit representation of a single base requires O(n) space, whence for finite alphabets the proposed solution is within a log n factor from optimality. The present paper assumes some familiarity with [2,3,4], to which notation largely conforms. With ‘•’ ∈ Σ denoting a don’t-care character, a pattern is a string over Σ ∪{•} containing at least one solid character. For characters σ1 and σ2 , we write σ1 σ2 if and only if σ1 is a don’t care or σ1 = σ2 . Given two patterns p1 and p2 with |p1 | ≤ |p2 |, p1 p2 holds if p1 [j] p2 [j], 1 ≤ j ≤ |p1 |. We also say in this case that p1 is a sub-pattern of p2 , and that p2 implies or extends p1 . For example, let p1 = ab • •e, p2 = ak • •e and p3 = abc • e • g. Then p1 p3 , and p2 p3 . The
Corresponding author. Dipartimento di Ingegneria dell’ Informazione, Università di Padova, Padova, Italy and College of Computing, Georgia Institute of Technology, 801 Atlantic Drive, Atlanta, GA 30318, USA.Work Supported in part by the Italian Ministry of University and Research under the Bi-National Project FIRB RBIN04BYZ7, and by the Research Program of Georgia Tech. Performed in part while visiting IMS, National University of Singapore in 2006, and CAS-MPI, Shanghai in 2007, with support provided by those Institutes. Work performed in part while visiting the College of Computing of the Georgia Institute of Technology.
R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 136–148, 2007. c Springer-Verlag Berlin Heidelberg 2007
Incremental Discovery of Irredundant Motif Bases in Time O(|Σ|n2 log n)
137
relation is clearly transitive. The operator “⊕” is further introduced, such that for σ1 , σ2 ∈ Σ∪•, σ1 ⊕σ2 = σ1 , if σ1 = σ2 and• , if σ1 = σ2 .A natural extension of “⊕” is also defined: given patterns p1 and p2 , p1 ⊕ p2 = p1 [i] ⊕ p2 [i], ∀1 ≤ i ≤ min{|p1 |, |p2 |}). Given the patterns p1 , p2 , the consensus of p1 and p2 is the pattern p = p1 ⊕p2 . Deleting all leading and trailing don’t cares from p yields the meet of p1 and p2 , denoted by [p1 ⊕ p2 ]. For instance, aac•tgcta ⊕ caact•cat = •a••t•c••, and [aac•tgcta ⊕ caact•cat] = a••t•c. Note that a meet may be the empty word. With sufi denoting the suffix si si+1 ...sn of s, a pattern p is an autocorrelation of s if p is the meet of s and one of its suffixes, i.e., if p = [s ⊕ sufi ] for some 1 < i ≤ n. For a sequence s and positive integer k, k ≤ |s|, a k-motif of s is a pair (m, Lm ), where m is a pattern such that |m| ≥ 1 and m[1], m[|m|] are solid characters, and Lm = (l1 , l2 , . . . , lq ) with q ≥ k is the exhaustive list of the starting position of all occurrences of m in s. Given a motif m, a sub-motif of m is any motif m that may be obtained from m by (i) changing one or more solid characters into don’t care, (ii) eliminating all resulting don’t cares that precede the first remaining solid character or follow the last one, and finally (iii) updating Lm in order to produce the (possibly, augmented) list Lm . We also say that m is a condensation for any of its sub-motifs. We are interested in motifs for which any condensation would disrupt the list of occurrences. A motif with this property has been called maximal or saturated. Thus, a motif m is maximal or saturated if we cannot make it more specific while retaining the cardinality of the list Lm of its occurrences in s. A motif (m, Lm ) is redundant if m and its location list Lm can be deduced from the other motifs without knowing the input string s. Trivially, every unsaturated motif is redundant. As it turns out, however, saturated motifs may be redundant, too. More formally: A saturated motif (m, Lm ), is redundant if there exist saturated motifs (mi , Lmi ) 1 ≤ i ≤ t, such that Lm = (Lm1 + d1 ) ∪ (Lm2 + d2 ) ∪ ... ∪ (Lmp + dt ) with 0 ≤ dj < |mj |. Here and in the following, (L + d) is used to denote the list that is obtained by adding a uniform offset d to every element of L. For instance, the saturated motif m1 = a•a is redundant in s = acacacacabaaba, since Lm1 = {1, 3, 5, 7, 9, 12} = (Lm2 ) ∪ (Lm3 ) ∪ (Lm4 + 1) where m2 = acac, m3 = aba and m4 = ca•a. Saturated motifs enjoy some special properties. First (Property 1), if (m1 , Lm1 ) and (m2 , Lm2 ) are saturated motifs, then, m1 = m2 ⇔ Lm1 = Lm2 . Whereas, given a generic pattern m, it is always possible to determine its occurrence list in any sequence s, with a saturated motif m it is possible in addition to retrieve of m from the sole list Lm in s, simply by taking: the structure m= suf . Moreover (Property 2), if (m1 , Lm1 ), (m2 , Lm2 ) are moi i∈Lm tifs of s, then, m1 m2 ⇔ Lm2 ⊆ Lm1 . Finally (Property 3), if (m, Lm ) is a saturated motif of s, then ∀L ⊆ Lm it is m suf k . k∈L Let now sufi (m) denote the ith suffix of m. The occurrence at j of m1 is covered by m2 if m1 sufi (m2 ), j ∈ Lm2 + i − 1 for some sufi (m2 ). For instance, m6 = aca•a with Lm6 = {1, 3, 5, 7} is covered at position 5 by m2 =
138
A. Apostolico and C. Tagliacollo
acacaca•a••a, Lm2 = {1, 3}. In fact, let m be ith suffix of m3 with i = 5, that is, m = aca•a••a. Then 5 ∈ Lm2 +4 and m6 ≺ m , which together lead to conclude that m6 is covered at 5 by m2 . An alternate definition of the notion of coverage can be based solely on occurrence lists, since the occurrence at j of m1 is covered by m2 if there is i such that Lm2 + i ⊆ Lm1 , j ∈ Lm2 + i. In terms of our running example, we have: 5 ∈ Lm2 + 4 and Lm2 + 4 = {5, 7} ⊂ Lm6 = {1, 3, 5, 7}. A maximal motif that is not redundant is called an irredundant motif. Hence a saturated motif (m, Lm ) is irredundant if the components of the pair (m, Lm ) cannot be deduced by the union of a number of other saturated motifs. We use Bi to denote the set of irredundant motifs in sufi . Set Bi is called the base for the motifs of sufi. In particular, B is used to denote the base of s, which coincides with B1 . Formally, let M be the set of all saturated motifs on s. A set of saturated motifs B is called a base of M iff the following hold: (1) for each m ∈ B, m is irredundant with respect to B − {m}, and, (2) let G(X ) be the set of all the redundant maximal motifs generated by the set of motifs X , then M = G(B). In general, |M| = Ω(2n ). However, the base of 2-motifs has size linear in |s|. This follows immediately from the known result (see, e.g., [3]): Theorem 1. Every irredundant motif is the meet of s and one of its suffixes. From now on and for the remainder of this paper, treatment will be restricted to 2-motifs. Recall now that in order for a motif to be irredundant it must have at least one occurrence that cannot be deduced from occurrences of other motifs. In [3], such an occurrence is called maximal and the motif is correspondingly said to be exposed at the corresponding position. Clearly, every motif with a maximal occurrence is saturated. However, not every saturated motif has a maximal occurrence. In fact, it is seen that the set of irredundant motifs is precisely the subset of saturated motifs with a maximal occurrence. We use Lmax to denote m the list of maximal occurrences of m. The following known definitions and properties (see, e.g., [3,4,9]) are listed for future reference. Definition 1. (Maximal occurrence) Let (m, Lm ) be a motif of s and j ∈ Lm . Position j is a maximal occurrence for m if for no d ≥ 0 and (m , Lm ) we have Lm ⊆ (Lm − d ) with (j − d ) ∈ Lm . Lemma 1. m ∈ B ⇔ |Lmax m | > 0. Lemma 2. If m ∈ B, then j ∈ Lmax ⇔ [s ⊕ suf(max{j,k}−min{j,k}) ] = m, ∀k ∈ m Lm . Lemma 3. m∈B |Lm | < 2n. Lemma 2 shows that in order to check whether a position i is a maximal occurrence for an assigned motif (m, Lm ), it suffices to check the condition [sufi ⊕ sufk ] = m, ∀k ∈ Lm . Also Lemma 3 [9], which poses a counter-intuitive linear bound on the cumulative size of the occurrence lists in a base, will play an important role in our construction.
Incremental Discovery of Irredundant Motif Bases in Time O(|Σ|n2 log n)
2
139
The Incremental Management of Motif Occurrences
Any approach to the extraction of bases of irredundant motifs must solve the problem of finding the occurrences of the autocorrelations or meets of the input string s or of its suffixes. This evokes the notable variant of approximate string searching featuring don’t cares (see, e.g., [1,6]), which admits of a classical O(n log m log |Σ|) time solution based on the FFT [5]. Such an FFT-based solution is the one adopted in [7,9], resulting in an overall time O(n2 log n log |Σ|). The incremental approach in [3] proceeds instead by computing those lists directly and for consecutively increasing suffixes of each autocorrelation. This produces the base for each suffix of s, at the overall cost of O(n3 ) time. In [4], a fast test for meet occurrence is built on the observation that these patterns all come all from the set of autocorrelations of the same string. In a nutshell, an occurrence of m = sufi ⊕ sufj at some position k in s induces strong interdependencies among the number of don’t cares in each of the three patterns m = sufi ⊕ sufj , m = sufi ⊕ sufk and m = sufj ⊕ sufk . The specific structure of these relationships depends on whether the alphabet is binary or larger. For binary alphabets, with dx denoting the number of don’t cares in x and prefi (x) the prefix of x of length i, the following holds. Lemma 4. [4] Let m = [sufi ⊕ sufj ], m = pref|m| (sufi ⊕ sufk ) and m = pref|m| (sufj ⊕ sufk ). k ∈ Lm ⇔ dm = dm + dm . Thus, following an O(n2 ) preprocessing in which the number of don’t cares in every suffix of each autocorrelation of s is counted, it is possible to answer in constant time whether any meet occurs at any position of s, just by checking the balance of don’t cares. In generalizing to arbitrary alphabets, an O(|Σ|n2 ) preprocessing of the input string s is required, in which the count is partitioned among the different symbols of Σ, whereby every don’t care is accompanied by a “pedigree” specifying one out of 4 possible origins. Correspondingly, the test takes now O(|Σ|). We refer to [4] for details and summarize these findings in the following: Theorem 2. Let s be a string of n characters over an alphabet Σ, and m the meet of any two suffixes of s. Following an O(|Σ|n2 ) time preprocessing of s, it is possible to decide for any assigned position k whether or not k is an occurrence of m in time O(|Σ|). We concentrate now on designing an algorithm that produces the bases of all suffixes of an input string s. Following an initial preparation, the algorithm will proceed incrementally on suffixes of increasing length, along the lines of a paradigm introduced in [3]. At the generic iteration n − i the algorithm builds the base Bi relative to sufi . This base is formed in part by selecting the elements of Bi+1 that are still irredundant in sufi , in part by identifying and discarding, from the set of new candidate motifs consisting of the meets of sufi , those motifs that are covered by others. Since the elements in any base will come from meets of some of the suffixes of s, a bottleneck for the procedure is represented by the
140
A. Apostolico and C. Tagliacollo
need to compute the occurrences of all such meets. Before entering the details of our construction, it is worthwhile to examine more closely the challenge posed by the incremental management of such meets. Our algorithm must build the sets Mi = {[sufi ⊕ sufj ], ∀j > i} and Bi ⊆ Mi as i goes from n − 1 down to 1 through the main cycle. For the generic iteration, this entails, in particular, to update the lists of occurrences of Mi+1 = {[sufi+1 ⊕ sufj ], ∀j > i + 1} and Bi+1 ⊆ Mi+1 in order to produce those of Mi as well as Bi ⊆ Mi . As there are possibly O(n2 ) occurrences to update at each of the n − 1 iterations, this task is a major potential source of inefficiency, even though it is not difficult to see that the lists do not need to be built from scratch at each iteration [3]. In fact, consider a generic motif m = [sufi ⊕ sufj ] and let m = [sufi+d ⊕ sufj+d ], m ∈ Mi+d , be the motif such that m = d−1 σ {•} m . Then, the set of occurrences of m is determined by scanning the list of occurrences of m and verifying the condition s[i] = s[k − d] for every k ∈ Lm . This is accomplished in constant time per update. Still, for any of the sets M under consideration, we have m∈M |Lm | = O(n2 ). Thus, the method bears a cost of O(n2 ) per iteration, O(n3 ) in total. Our goal is to set up a more prudent organization of the data, leading to a global cost O(|Σ|n2 log n), amortized over all iterations. This seems counterintuitive, since there is no way around listing all occurrences in all lists in less than cubic space. However, we can take advantage of the dynamics undergone by our list and make do with a partially implicit representation. In order to proceed, we need some preparatory developments. It is a crucial consequence of Theorem 2 that once the don’t cares have been tallied for all suffixes of each meet of s (together with each don’t care’s “pedigree” information), then it takes only constant time to determine whether or not an arbitrary position k is an occurrence of m, m being the meet of an arbitrary pair of suffixes of s. Although the same could be done on-the-fly with no penalty, we will assume for simplicity that a trivial, O(|Σ|n2 ) pre-processing phase has already been performed to determine the number (and individual “pedigree”) of don’t cares in (every suffix of) each [s ⊕ sufi](i = 1, 2, ..., n), and concentrate on computing the occurrences of every pairwise suffix meet. Definition 2. (Earliest index) Let m be a meet of s and 1 ≤ j ≤ |s|, and let sufk (m) indicate as usual the k-th suffix of m. The earliest index Ijm of m at j is Ijm = min{k : (j − |m| + k) ∈ Lsufk (m) }. That is, starting at some occurrence j of the last solid character of m, the index Ijm is k if sufk (m) is the longest suffix of m ending at j (m[k] = s[j − |m| + k]). Consider now a generic meet m = [s ⊕ sufi ]. Knowing the earliest index relative to m at every position j of s, we also know that for l ≥ Ijm , position j − |m| + l must be included in the list of occurrences of sufl (m) , whereas for l < Ijm the position j − |m| + l is not an occurrence of sufl (m). Lemma 5. Let m = [s ⊕ sufi ] and 1 ≤ j ≤ |m|. Computing Ijm , the earliest index of j relative to m, takes time O(|Σ| log n). Proof. The computation is carried out by straightforward binary search of the longest matching suffix of m. At the generic step of the recursion, we check
Incremental Discovery of Irredundant Motif Bases in Time O(|Σ|n2 log n)
141
whether j − |m| + k is an occurrence of sufk (m); if this is the case, we proceed with the next longer suffix in the recursion, otherwise with the next shorter one. The cost of the step is that of determining whether a given position is an occurrence for a certain meet of two suffixes of s, which Theorem 2 affords in time O(|Σ|). Through the O(log n) steps, the computation of Ijm takes thus O(|Σ| log n). This immediately yields: Corollary 1. Computing the earliest indices of all meets of s at all positions 1, 2, ..., |s| = n takes time O(|Σ|n2 log n). Corollary 1 is a crucial handle for our speedup, which requires nevertheless a few additional observations. First, recall that the motifs that survive each round of updates are essentially a subset of the current version of M: their respective lists are sublists of the original ones. Upon updating, each surviving occurrence in a list will retain its original starting position, up to an offset which is uniform for all fellow survivors. By making the convention that the elements in a list are represented by their ending, rather than by their starting position, and keeping track of lengths we will never need to re-name the survivors. Moreover, the occurrences that do not survive will never be readmitted to any list. Finally, because the base Bi comes only from meets of sufi , then at iteration n − i, we only need, in addition to Bi+1 , the lists in the set: Mi = {[sufi ⊕ sufj ], ∀j > i}. We will see next that, under our conventions, these lists can be made readily available throughout, at a total cost of O(|Σ|n2 log n). In fact, a stronger construct can be established, whereby all sets Mji = {[sufi ⊕ sufk ], ∀k = i, k ≥ j} can be implicitly maintained with their individual lists throughout, for each j ≤ i, at the overall cost of O(|Σ|n2 log n) instead of O(n3 ). The remainder of the section is devoted to substantiate this claim. At the iteration for sufi the list for the generic meet m of s will appear as partitioned into sections, as follows. The currently open section contains the ending positions in sufi of occurrences of suffixes of m that fall still short of their respective earliest indices. The remaining sections are called closed and assigned to various lengths, as follows: the section assigned to length stores the ending positions, if any exist, of the occurrences in sufi of suffixes of m of length that cannot be prolonged into occurrences of length > . A list will be initialized as soon as the rightmost two replicas in s of the last solid character of its meet are found. Let these positions be respectively k and h > k. These two entries k and h are dubbed open and appended to the open list of name j = (h − k). New entries are added to the open list while longer and longer suffixes of the input string s are considered. At the iteration for sufi , i is added to the open section of the all lists of meets having s[i] as their last character. At that point, a “sentinel” pointer is also issued from the positions i − |m| + Iim of s to this entry in the list. The role of each sentinel is to gain access to its corresponding entry when the latter “decays” at iteration k = i − |m| + Iim , as a consequence of the corresponding occurrence becoming “too short” to survive. At that point, the entry i is taken out of the open section of the list and moved to the closed
142
A. Apostolico and C. Tagliacollo
section assigned to length m−Iim . In conclusion, the list assigned to m undergoes “refresh cycles” as longer and longer extensions provoke the defection of more and more entries from the open to the closed length sublists and new, shorter suffix occurrences are discovered and added to the open list. For each meet m, the list assigned to m is partitioned into sublists arranged in order of decreasing length, with the length of the open list set conventionally equal to n, and the items inside each sublist are in turn sorted in order of ascending position. The collective list will be referred to as the panpipes of m, after the ancient musical instrument it resembles. For any integer ≤ n − 1, tallying the current size of all the occurrences of suffixes of m not longer than is like stabbing the set of degrading pipes with an orthogonal stick, striking at a height of from the base, and then counting how many were hit. Standard balanced tree implementation of the list with its subsections supports in O(log n) time each of: – Insertion of an element in the open section; – Demotion of an element to the closed section of a given length; – Line stabbing at any height, or tallying elements of a given minimum length; Theorem 3. Maintaining the panpipes of all distinct meets of s consecutively at sufi , for i = n − 1, n − 2, ..., 1 takes overall time O(|Σ|n2 log n). Proof. It takes time O(|Σ|n2 log n) to determine Ijm for all j’s and meets of s. Then, refer to the preceding description for the updates. Each one of the O(n) candidate occurrences of each of the O(n) meets is inserted in the open sub-list exactly once, and then possibly moved from there to a specific length list once and forever. This accounts for O(n2 ) panpipes primitives in total, at an individual cost of O(log n) each, which yields a total complexity of O(|Σ|n2 log n). Corollary 2. The sequence of sets Mi = {[sufk ⊕ sufj ], ∀k ≥ i, j > k} (i = n − 2, n − 3, ..., 1), each with its occurrence lists and individual list cardinalities can be consecutively generated one from the other in overall time O(|Σ|n2 log n). Proof. Following all necessary preprocessing, and with m denoting the generic meet of s, just let sufi (m) first “inherit” the whole list of sufi+1 (m) (that is, Lsufi (m) = Lsufi+1 (m) −1), and then use the sentinels at i to access and eliminate from that list all occurrences j − |m| + i such that Ijm = i.
3
Computing the Bases of All Suffixes of a String
We are ready to detail the generic iteration of the algorithm. Iteration n − i will determine the base Bi for sufi , so that in particular the base of s itself will be available after n iterations. The input for this iteration is as follows:
Incremental Discovery of Irredundant Motif Bases in Time O(|Σ|n2 log n)
143
– The set Mi+1 of meets of sufi+1 each with its individual occurrence list. – The base Bi+1 , represented by the collection of patterns on Σ ∪ {•} each with its list of occurrences in sufi+1 , with maximal occurrences tagged. The output of the iteration are Mi and Bi , in the same representation. Recall that at any time the collective size of all lists in any given set Bi is linear in n− i, by virtue of Lemma 3. This is not necessarily true of the collective size of the lists of Mi . However, these sets possess each at most n − 1 meets. Each iteration of the main cycle consists of the two phases: – Phase 1: extract from Bi+1 the motifs that are still irredundant in sufi ; – Phase 2: identify all new irredundant motifs. We describe these two phases in succession. 3.1
Phase 1 - Computing Bi+1 ∩ Bi
This phase consists of identifying the motifs of Bi+1 that are still irredundant in sufi . Two distinct events may lead a motif m in Bi+1 to become redundant: 1. m is covered by a new motif discovered at the current iteration; 2. m is covered by the occurrence starting at i of some other element of Bi+1 . It is convenient to single out from Bi+1 the motifs that exhibit a new occurrence starting at i, and handle them separately from the rest. This enables us to search for the motifs of Bi+1 that are still irredundant in sufi , among motifs: – [1(a)] with an occurrence starting at i; – [1(b)] without an occurrence starting at i. These two cases differ on the basis of how a maximal occurrence is covered. If a motif m that becomes redundant in sufi has an occurrence starting at i and maximal occurrence j in sufi+1 , this means that m ≺ m for some m with j ∈ Lm . In the second case, as it shall be seen later in detail, such a motif becomes redundant because some other motif extends its maximal occurrence j by adding a solid character σ = s[i] at position j − i + 1. Since the two phases operate on distinct sets of motifs (respectively with and without an occurrence at i), they can be handled independently upon separating their respective inputs. Alternatively, the entire Bi+1 is fed as input to Phase 1(a) and the output of this phase will be the input of Phase 1(b). Whereas the preliminary separation reduces the input size for either phase, deciding for each motif of Bi+1 whether or not it has an occurrence at i induces an extra cost O(|Σ||Bi+1 |). The second approach also requires some partitioning, but this can be performed on a smaller input in between phases or at the end. The approach described next uses preliminary partitioning. The second approach is left for an exercise.
144
A. Apostolico and C. Tagliacollo
Phase 1(a). Since we know the name (meet-id, list-head) and length of the motif in Bi+1 to be checked, we can compute the position at which an occurrence at i would end, and then check (or compute from scratch) the earliest index of that position relative to the meet name. Therefore, separating from Bi+1 the i motifs with an occurrence at i takes at most O(|Σ||Bi+1 |). With Bi+1 denoting the subset of Bi+1 containing such motifs, the goal is then that of determining i Bi+1 ∩ Bi . This set exhibits some important properties, which are derived next. Lemma 6. Let B j be the set of irredundant motifs with an occurrence at j, and Mj the set of meets [sufj ⊕ sufk ], ∀k = j. Then B j ⊆ Mj . Proof. Let m be an element of B j . From Lemma 1, m must have at least one maximal occurrence k. If k = j then m = [sufj ⊕ sufl ], ∀l ∈ Lm . If this is not the case, it follows from the maximality of the occurrence at k that m = [sufk ⊕ sufl ], ∀l ∈ Lm , which holds in particular for l = j. Lemma 6 is useful when searching irredundant motifs of which a specific occurrence is known, since it restricts the set of candidates to a linear subset of all pairwise suffix meets. In the present context, the lemma can be used to determine which ones among the old motifs having an occurrence at i conserve their irredundancy in sufi . Corollary 3. Let, as earlier, Mi denote the set of meets [sufi ⊕ sufk ], ∀k > i. Then i Bi+1 ∩ Bi ⊆ Mi .
Proof. From Lemma 6.
In order for a motif in Bi+1 to stay irredundant in the transition from sufi+1 to sufi , at least one of its maximal occurrences in sufi+1 must be preserved also in sufi . Lemma 7. Let m ∈ Bi+1 . Then m ∈ Bi ⇔ ∃k = i : k ∈ Lmax m . Proof. This holds clearly for a motif of Bi+1 with no occurrence at i, since irredundancy presupposes a maximal occurrence. Assume then a motif of Bi+1 having i as its sole maximal occurrence. Then, m = [sufi ⊕ sufk ], ∀k ∈ Lm . Let k ∈ Lm be a maximal occurrence of m in sufi+1 . Since k ∈ Lm , we have m = [sufi ⊕ sufk ], so that k is a maximal occurrence of m in sufi as well. Therefore, no motif of the old base can preserve its irredundancy by having i as its sole maximal occurrence. On the other hand, preserving irredundancy for an old motif does not necessarily require a maximal occurrence at i. These properties suggest that the redundancy of a motif m ∈ Bi+1 can be assessed by scanning maximal occurrences of m and deciding which ones among them are still maximal in sufi. If the maximal occurrences of m are already known in sufi+1 , all that is left is to check maximality with respect to the new occurrence at i.
Incremental Discovery of Irredundant Motif Bases in Time O(|Σ|n2 log n)
145
Lemma 8. m ∈ Bi+1 , i ∈ Lm , and m ∈ Bi ⇔ ∃k ∈ Lmax such that m = m [sufi ⊕ sufk ]. Proof. Immediate from Lemma 7.
In conclusion, the bulk of Phase 1(a) consists of scanning the maximal occurrences of each m ∈ Bi+1 also occurring at i and determining whether at least one such occurrence stays maximal. Maximal occurrence j stays maximal in sufi iff [sufi ⊕ sufj ] = m, a condition that can be tested by comparing the number of don’t cares respectively in m and [sufi ⊕ sufj ], given that m occurs at i and j. Alternatively, this condition can be checked by comparing the occurrence lists of m and [sufi ⊕ sufj ]. In fact, since both i and j are in Lm , it must be that m [sufi ⊕ sufj ] ⇔ L[sufi ⊕sufj ] ⊆ Lm . Hence, in order to check whether [sufi ⊕ sufj ] and m coincide it suffices to check the condition: |L[sufi ⊕sufj ] | = |Lm |, Note that, as a by-product, either method inductively maintains knowledge of the maximal occurrences for all motifs in the sets B. Lemma 9. Phase 1(a) takes time O(n). Proof. For any j > i, we identify [sufi ⊕ sufj ] from our knowledge of i, j, and of their difference. In fact, the latter identifies a specific meet of s. Let i now m ∈ Bi+1 . For every maximal occurrence j of m it takes constant time to compare don’t cares or list sizes for m and [sufi ⊕ sufj ]. By Lemma 3, the size of all lists in a base cumulates to less than 2n, whence the total number of occurrences that need to be checked is O(n). Phase 1(b). Recall that the task of this phase is the identification of the motifs that stay irredundant in sufi among the elements of Bi+1 with no occurrence at i. The identification of these motifs is rather straightforward once it is observed that the only way in which such a motif m may become redundant in sufi is for it to be covered, in its maximal occurrences in sufi+1 , by a motif m = σ(•)d m with an occurrence at i. Lemma 10. If m ∈ Mi covers m ∈ Bi+1 , i ∈ / Lm , then m = σ(•)d m where σ = s[i] and d ≥ 0. Proof. Occurrence j ∈ Lmax loses maximality if ∃k ∈ Lm such that [sufi ⊕ m sufi+k−j ] m, where it is assumed w.l.o.g. k > j. Since j is a maximal occurrence of m in sufi+1 , then [sufk ⊕ sufj ] = m and the only possibility is [sufi ⊕ sufi+k−j ] = s[i](•)d m, where d = j − i. The elimination from Bi+1 of the motifs m ∈ / Bi without an occurrence at i is done by checking for every maximal occurrence of m whether it can be extended in such a way as to lose maximality. The procedure terminates as soon as an occurrence that stays maximal is met, or when all maximal occurrences have been obliterated.
146
A. Apostolico and C. Tagliacollo
Lemma 11. Phase 1(b) takes time O(n). Proof. Since each m to be checked is in Bi+1 , then the total number of motif occurrences of which the possible extension into i needs to be checked is O(n). Checking for extensibility of an occurrence is easily done in constant time. 3.2
Phase 2 - Identifying the New Irredundant Motifs
Recall that by new irredundant motifs we mean those elements of Bi that did not belong to Bi+1 . Lemma 6 prescribes that these motifs are to be identified among the elements of Mi = {[sufi ⊕ sufj ], ∀j > i}. Indeed, to be irredundant these motifs must have a single maximal occurrence at position i in case they already had multiple occurrences in sufi+1 ; otherwise, they must have precisely two occurrences, both occurrences being maximal. Let then = Mi − (Bi+1 ∩ Bi ) B be the set of the candidate new irredundant motifs. Since i must be a maximal we need to check which ones among old and occurrence of any motif m ∈ B, new motifs with an occurrence at i can cover this occurrence of m. The way this is done is based on the following properties. and let j = i ∈ Lm1 ∩ Lm2 , |Lm1 | < |Lm2 |. Then, Lemma 12. Let m1 , m2 ∈ B m2 ∈ / Bi . Proof. Observe first that it is impossible for both motifs to be irredundant in sufi . In fact, since they do not belong to the old base they would have to have maximal occurrences at i. But if this holds for m1 then [sufi ⊕ sufj ] = m1 , ∀k ∈ Lm1 , whence, in particular, [sufi ⊕ sufj ] = m1 . Likewise, it must be [sufi ⊕ sufk ] = m2 , ∀k ∈ Lm2 , hence [sufi ⊕ sufj ] = m2 = m1 . Assume then that only m2 is irredundant. Then, [sufi ⊕ sufk ] = m2 , ∀k ∈ Lm2 and thus [sufi ⊕ sufj ] = m2 . Since i, j ∈ Lm1 we have [sufi ⊕ sufj ] m1 and thus |Lm2 | ≤ |Lm1 |, which contradicts the hypothesis. mold ∈ B i ∩Bi , and j = i ∈ Lmnew ∩Lm , |Lm | Lemma 13. Let mnew ∈ B, old old i+1 < |Lmnew |. Then, mnew ∈ / Bi . Proof. As was already argued, if mnew ∈ Bi then its occurrence at i must be maximal, hence [sufi ⊕ sufj ] = mnew . We have then again mnew mold which generates the contradiction |Lmnew | ≤ |Lmold |. it must be In conclusion, in order to check for irredundancy of the elements of B, or by checked for every such motif m whether it is covered by another motif of B some old irredundant motif which is still irredundant in sufi . Let m1 , m2 , ..., ml (l ≤ n) be the motifs to verify. They all come in the form [sufi ⊕ sufk ] for some k > i. Considering m1 = [sufi ⊕ sufk1 ] with Lm1 = {i, k1 , k2 , ..., kr }, the motifs that can possibly obliterate m1 are [sufi ⊕ sufj ], j ∈ Lm1 , j = i, j = k1 . Taking m = [sufi ⊕ sufk2 ] as the first motif to be considered, we check the condition
Incremental Discovery of Irredundant Motif Bases in Time O(|Σ|n2 log n)
147
|Lm1 | ≥ |Lm |. Note that having chosen m as [sufi ⊕ sufk2 ] where both i and k2 are occurrences for m1 , we must have |Lm1 | ≥ |Lm |. If |Lm1 | = |Lm |, then m1 = m and m is excluded from further analysis. If |Lm1 | > |Lm |, then m1 is obliterated by m and thus m must be eliminated since it is redundant. The procedure is repeated with the surviving motif until all redundant motifs have been eliminated. Lemma 14. Phase 2 takes time O(n). Proof. We need first to establish that the described approach is correct. Indeed, assume that the k-th iteration is handling the motif m with an occurrence at j, and that the pair m, m = [sufi ⊕ sufj ] is checked, where m had been already considered during some previous iteration h < k. Two situations are possible: 1. m had been eliminated at iteration h. In this case, there must be a motif covering m at i, whence that motif will also cover the occurrence at i of m. Thus, m can be eliminated at the current iteration. 2. m has been previously checked but not eliminated. This means that m ∈ Bi . Since m and m share an occurrence other than i it must be m ∈ / Bi , so that also in this case m can be eliminated at the current iteration. Following each one of the comparisons, the procedure eliminates a distinct meet of sufi from further consideration. Since there are O(n) such meets, we also have O(n) iterations, each requiring constant time to compare the cardinalities of two lists. Theorem 4. The irredundant motif bases of all suffixes of a string can be computed incrementally in time O(|Σ|n2 log n). Proof. By the preceding properties and discussion.
4
Concluding Remarks
Several issues are still open, notable among them, the existence of an optimal algorithm for general alphabets and of an optimal incremental algorithm for alphabets of constant or unbounded size.
References 1. Apostolico, A., Galil, Z. (eds.): Pattern matching algorithms. Oxford University Press, New York (1997) 2. Apostolico, A.: Pattern discovery and the algorithmics of surprise. Artificial Intelligence and Heuristic Methods for Bioinformatics, 111–127 (2003) 3. Apostolico, A., Parida, L.: Incremental paradigms of motif discovery. Journal of Computational Biology 11(1), 15–25 (2004) 4. Apostolico, A., Tagliacollo, C.: Optimal extraction of irredundant motif bases. In: Lin, G. (ed.) Proceedings of COCOON 07. LNCS, vol. 4598, pp. 360–371. Springer, Heidelberg (2007)
148
A. Apostolico and C. Tagliacollo
5. Fischer, M.J., Paterson, M.S.: String matching and other products. In: Karp, R. (ed.) Proceedings of the SIAM-AMS Complexity of Computation, American Mathematical Society, Providence, R.I, pp. 113–125 (1974) 6. Navarro, G.: A guided tour to approximate string matching. ACM Computing Surveys 33(1), 31–88 (2001) 7. Pelfrêne, J., Abdeddaïm, S., Alexandre, J.: Extracting approximate patterns. Journal of Discrete Algorithms 3(2-4), 293–320 (2005) 8. Parida, L.: Algorithmic Techniques in Computational Genomics. PhD thesis, Department of Computer Science, New York University (1998) 9. Pisanti, N., Crochemore, M., Grossi, R., Sagot, M.-F.: Bases of motifs for generating repeated patterns with wild cards. IEEE/ACM Trans. Comput. Biol. Bioinformatics 2(1), 40–50 (2005) 10. Parida, L., Rigoutsos, I., Floratos, A., Platt, D., Gao, Y.: Pattern discovery on character sets and real-valued data: linear bound on irredundant motifs and an efficient polynomial time algorithm. In: Symposium on Discrete Algorithms, pp. 297–308 (2000)
A Graph Clustering Approach to Weak Motif Recognition Christina Boucher, Daniel G. Brown, and Paul Church D.R. Cheriton School of Computer Science University of Waterloo {caboucher,browndg,pchurch}@cs.uwaterloo.ca
Abstract. The aim of the motif recognition problem is to detect a set of mutually similar subsequences in a collection of biological sequences. Weak motif recognition is where the sequences are highly degenerate. Our new approach to this problem uses a weighted graph model and a heuristic that determines high weight subgraphs in polynomial time. Our experimental tests show impressive accuracy and efficiency. We give results that demonstrate a theoretical dichotomy between cliques in our graph that represent actual motifs and those that do not.
1
Introduction
Understanding the structure and function of genomic data remains an important biological and computational challenge. Motifs are short subsequences of genomic DNA responsible for controlling biological processes, such as gene expression. Motifs with the same function may not entirely match, due to mutation. The motif consensus of the instances is a sequence representing the shared pattern. Given a number of DNA sequences, motif recognition is the task of discovering motif instances in sequences without knowing their positions or pattern. This problem becomes increasingly difficult as the number of allowed mutations grow. Weak motif recognition addresses the difficult case when many degenerate positions are allowed. Many useful versions of motif recognition are NP-complete, and therefore are unlikely to have polynomial-time algorithms. Pevzner and Sze define the weak motif recognition problem concretely, illustrating the limitations of motif recognition programs. In 2000, most methods were capable of finding motifs of length 6 with no degeneration but failed to detect motif instances of length 15 with 4 degenerate positions in a random sample containing 20 sequences of length 600 [8]. Since this “challenge problem” was defined, many approaches have been developed to detect motifs with a relatively large number of degenerate positions. We describe a new approach for this problem, and provide theoretical and experimental results that support our novel motif recognition algorithm. Our algorithm, MCL-WMR, builds an edge-weighted graph model of the given motif recognition problem and uses a graph clustering algorithm to quickly determine important subgraphs are to be searched for valid motifs. Synthetic data has R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 149–160, 2007. c Springer-Verlag Berlin Heidelberg 2007
150
C. Boucher, D.G. Brown, and P. Church
shown that MCL-WMR has competitive running time capabilities and accuracy. An added advantage of MCL-WMR is the ability to detect multiple motif instances. The efficiency of MCL-WMR lies in the use of the Markov Cluster algorithm (MCL) to quickly find dense subgraphs likely to contain a motif. These subproblems are then solved optimality via dynamic programming. Extracting important subgraphs is in the spirit of WINNOWER, the combinatorial algorithm created by Pevzner and Sze [8], which builds a similar graph model and eliminates spurious edges sequentially. Our algorithm eliminates complete subgraphs and hence, avoids considering edges individually. One of the main contributions of the creation of MCL-WMR is the introduction of a novel model for motif recognition. Previous algorithms and programs search exhaustively or probabilistically on an unweighted graph or string. Due to the lack of information contained in these models, the required search requires extensively computation. By considering a weighted graph model, we narrow the search dramatically to easy problems. We argue that there exists a dichotomy between the weight of cliques corresponding to actual motifs and that of cliques which do not, and suggest this separation can be used to filter data to be searched.
2
Previous Approaches to Weak Motif Recognition
The limitations of the existing motif recognition programs were first highlighted by Pevzner and Sze, who identified “challenge” problems in motif discovery [8]. We approach the problem from a similar combinatorial perspective and hence, consider the following combinatorial formulation. Definition 1. The (l, d)-motif problem: Let S = {S1 , . . . , Sm } be a set of n length DNA sequences, and M be the motif consensus, a fixed and unknown sequence of length l. Suppose that M is contained in each Si , corrupted with at most d substitutions, so their Hamming distance is at most d. The aim is to determine M and the location of the motif instance in each sequence. The Hamming distance between two sequences si and sj is H(si , sj ). The weak motif recognition problem is to find the motif instances when the number of degenerate positions d is large in relation to the motif length l; well-known weak motif recognition problems exist when the motif instances are (9, 2) (11, 3), (15, 4), and (18, 6), with 20 DNA random sequences, each 600 nucleotides long. Although the strength of the motif leads to an increased or decreased inherent difficulty, varying the background sequence length is also important. As the number of sequences increases, the number of noisy l-mers increases: detection of the motif instances becomes increasingly difficult, and spurious motifs are more likely to occur. Also, as the sequence length grows, the number of nearmotifs will also increase dramatically. Existing software programs developed for motif finding use either a heuristic or enumeration approach. Heuristic methods attempt to maximize a score function representative of how likely a particular subsequence is a motif instance;
A Graph Clustering Approach to Weak Motif Recognition
151
they are often unsatisfactory for weak motifs because they get trapped in local maxima. Pevzner and Sze developed WINNOWER and SP-STAR for weak motif recognition. WINNOWER creates a graph representation with a vertex for every occurring l-mer and an edge between all pairs of vertices that are at most 2d distance apart; spurious edges are deleted to reveal sets of vertices whose corresponding subsequences are possible motif instances [8]. Due to spurious edges, the running time is prohibitively large and grows immensely as motif strength weakens or subsequence length or number increases [5]. Sze et al. [10] extend upon the graph formation of WINNOWER [8]: they formulate motif finding as finding cliques in k-partite graphs, with the additional requirement of a string s close to every motif instance. They hypothesize that this approach provides a better formulation to model motifs than using cliques alone; the use of k-partite graphs lends itself to be solved exactly and efficiently by a divide-and-conquer algorithm. Experimental results demonstrate that the approach is feasible on difficult motif finding problems of moderate size [10]. Buhler and Tompa [1] developed a heuristic algorithm called PROJECTION that projects every occurring l-mer onto a smaller space by hashing. The hash function is based on k of the l positions that are selected at random when the algorithm begins. After the initialization step, a consensus is derived for each grouping of l-mers, and expectation maximization is used for refinement. PROJECTION does significantly better than other program but its accuracy is dependent on an user-defined input parameter [1]. As m becomes larger, PROJECTION recovers motif instances slower as m increases; hence, the running time and accuracy of is very sensitive to changes in m. An obvious method to detect motif instances of length l is to enumerate all 4l possible motif consensus sequences, count occurrences, and calculate a significance value for each of the considered l-mers or count instances of them or see if they satisfy a requirement as in the (l, d) problem. These algorithms are guaranteed to find the best motif (or the most probable one, in the case of maximizing a likelihood function), but their running times become prohibitively slow for large degenerate motifs. To tackle more significant motif recognition problems, enumeration methods have been created that consider only oligomers which are present in the given data sets. SP-STAR, developed by Pevzner and Sze [8], does an enumerative search but only over the occurring data rather than the entire space of 4l l-mers.; however, we note that the number of sequences to be searched is approximately dl 3d . SP-STAR was successful in finding (15,4)-motif instances in data sets containing 20 DNA sequences, each of which has maximum length 700 but failed to have reasonable accuracy when the sequence length exceeded 700 [8].
3
System and Methods
MCL-WMR involves three stages: graph construction, clique finding using graph clustering, and recovering the motif instances and their consensus. The construction of MCL-WMR is as follows: a reference sequence Sr is chosen randomly
152
C. Boucher, D.G. Brown, and P. Church
from the data set and for each l-length subsequence of Sr a graph Gr is built from comparing that subsequence with all other possible l-length subsequences in the data set S1 , . . . , Sr−1 , Sr+1 , . . . , Sm . The entire graph G is the union of these subgraphs G1 , . . . , Gm−l . We use MCL to generate subgraphs which contain vertices that are highly inter-related. From these clusters of vertices, we generate the positions of the possible motif instances and their corresponding motif consensus. The algorithm terminates when a motif is found. In order to increase the probability a motif is found, we minimize searching subgraphs with low probability of containing a motif; hence, the adjacency subgraphs are not clustered and searched in a sequential manner. 3.1
Graph Construction
In our graphical representation of the data set, each subsequence of length l is represented by a vertex and the construction of our graph ensures that the motif instances represented by vertices in the graph are connected to each other and form a clique of size m (though the converse need not hold). The vertex set contains a vertex vi,j representing the l-length subsequence in sequence i starting at position j, for each i and j = 1, 2, . . . , n − l + 1. Each pair of vertices vi,j and vi ,j , for i = i is joined by an edge when the Hamming distance between the two represented subsequences is at most 2d. An edge between vertices at distance k has weight l − k for d < k ≤ 2d, or 10(l − k) for k ≤ d. This emphasizes subsequences at small distances. This graph is represented by a symmetric adjacency matrix, constructed in O(m2 (n − l)(n + l)) time. The graph is m-partite so a clique of size m contains exactly one vertex from each sequence. We reduce the size of the instance being passed to MCL by considering subgraphs {G0 , G1 , . . . , Gm−l }, where Gi is the subgraph induced by a reference vertex, denoted as vR,i , and its neighbors (for some arbitrary choice of reference sequence R) instead of searching all of G at once. 3.2
Using Clustering to Find Motifs
A clustering of graph G(V, E) is a decomposition of V into subsets of highly intraconnected vertices. A good clustering of a graph is an approximation of a partitioning of the graph into cliques. A clique corresponding to a motif will exist in one of the subgraphs of G since each motif instance appears as a vertex in a clique of size m. We use MCL [11] to cluster the sets of vertices to determine subgraphs that are highly intra-connected with high-weight edges, and scarcely inter-connected and thus, likely to correspond to a motif instance. MCL can handle larged, undirected weighted graphs efficiently. The idea underlying the MCL algorithm is that dense subgraphs correspond to regions where the number of k-length paths is relatively large, for small k. Random walks of length k have higher probability for paths beginning and ending in the same dense region than for other paths. 3.3
Recovering Motifs
MCL identifies dense high-scoring regions of the subgraph Gi ; we filter the subgraphs obtained from MCL to subgraphs that have high probability of containing
A Graph Clustering Approach to Weak Motif Recognition
153
a motif. A clique in G that represents a motif instance must have size n and weight greater than or equal to (l − 2d) m since each pair of vertices are adja2 cent. We filter out clusters that do not meet these criteria. Clusters that pass this test may contain multiple cliques formed by choosing different subsets of n cluster vertices, or possibly no cliques at all. We identify all ways of forming a clique from the cluster vertices by using the m-partite nature of the graph to explore all possible cliques with a depth-first search. As the number of cliques can be exponential in the cluster size in the worst case, this step becomes a bottleneck for problem sizes such as (18, 6), where MCL returns large clusters. For each clique, we test if it represents a motif instance by attempting to build a motif consensus that has distance at most d to every vertex. We do this by building up a list of possible consensuses and the number of mismatches to each vertex for each possibility, one character at a time. Once a candidate consensus has d + 1 mismatches to some vertex, it is discarded. Although the space of 4l possible consensus strings is very large, in practice the list is pruned very rapidly on the d + 1st character, i. e. after reaching size 4d .
4
Analysis of Graph-Theoretic Model
To validate our weighted graph approach, we show the existence of a separation between the total weight of a clique corresponding to a motif and that of a clique that does not. We demonstrate theoretically that the total weight of a clique corresponding deviates from the mean with low probability. Empirical results support this, and also show that there exists some separation between cliques that can be extended to motifs and those that cannot. 4.1
Analysis of the Weight of a Clique Containing a Motif
Consider a clique C containing a motif. Define the weight of an edge to be l minus the Hamming distance between the sequences corresponding to the endpoints of the edge. Let W be the random variable for the sum of each of the m edge 2 weights in C. Without loss of generality, let v1 , v2 , . . . vm be the set of m vertices in C corresponding to sequences s1 , . . . , sm . We seek E[W ] and a tail bound a large deviations from the mean. Let Wi be the expected value of the random variable W given that the first i subsequences in C are known. Theorem 1. The expected weight of a clique in G, which models a random (l, d)-motif recognition problem containing m sequences, is d d m 1 l l a+b 4ba E[W ] = l− 2 3 a+b− 2 β a=0 b a 3l b=0
where β =
l i i=0 i 3 .
d
Proof. Given an (l, d) motif, we aim to compute the expected value of the clique’s m m total weight, E[ i=1 j=i+1 (l − H(si , sj ))]. Let μe be E[H(si , sj )] for any pair
154
C. Boucher, D.G. Brown, and P. Church
of sequences si and sj , where (vi , vj ) is an edge in a clique that contains a motif and si and sj are unknown. ⎡ ⎤ m E [W ] = E ⎣ (l − H(si , sj ))⎦ = μe 2 ∀vi ,vj ,i<j
d l i We choose the m sequences uniformly from the β = i=0 i 3 possible choices. Let αi denote the Hamming distance between vertex vi and the consensus S. The expected weight of an edge depends on the distance of the two subsequences from the consensus, so we break the expectation into pieces: d μe = αi =0 P r[H(S, si ) = αi ]E[H(si , sj )|H(S, si ) = αi ] d d = αi =0 P r[H(S, si ) = αi ] · αj =0 P r[H(S, sj ) = αj ]|| E[H(si , sj )|H(S, si ) = αi , H(S, sj ) = αj ] (αlj )3αj ( l )3αi d = dαi =0 αiβ E[H(si , sj )|H(S, si ) = αi , H(S, sj ) = αj ] αj =0 β The remaining problem is to compute the expected Hamming distance between si and sj , knowing that the strings consist of copies of S with a and b positions mutated, respectively. If a position was mutated in neither string it is a match; if a position was mutated in one string but not the other it is a mismatch; if a position was mutated in both strings, it is a match with probability 13 . If si is fixed, sj consists of b mutations that each either hit one of the a mutated positions in si or one of the other l − a positions, sampled without replacement. The number that hit the a mutated positions in si follows a hypergeometric distribution with mean ba l . If the number of hits to mutated positions is c, the expected total number of mismatches is: b − c positions that hit among the l − a non-mutated positions in si , a − c positions among the a mutated positions of si that were not hit, and 23 c mismatches from the hits among the mutated positions, for a total of (b − c) + (a − c) + 23 c = a + b − 43 c. Therefore, E(H(si , sj )|H(S, si ) = a, H(S, sj ) = b) = a + b − 4ba 3l . Let μe be d l a d l b 1 4ba l − α2 a=0 a 3 b=0 b 3 a + b − 3l , the expected weight of a single edge. We have the following: l α d l α d 4α α 1 i j E [W ] = m αi + αj − 3li j αi =0 αi 3 αj =0 αj 3 2 l − α2 l l α +α d 4αi αj 1 d i j = m l − 3 α + α − 2 i j αi =0 αj =0 αj αi 2 α 3l We are able to easily bound the variance of W by first demonstrating that W0 , W1 , . . . , Wm is a martingale sequence and next, applying Azuma’s inequality to determine the probability of a specific deviation. Theorem 2. Consider the (l, d)-motif recognition problem containing m sequences. Let W be the sum of the m edge weights in an arbitrary clique in 2 Gmotif that contains a motif and let μW be the expected weight of a clique in G that contains a motif, then for any λ > 0, λ2 P r[|W − μW | ≥ λ] ≤ 2 exp − 2 2d (m + 1)
A Graph Clustering Approach to Weak Motif Recognition
155
Proof. The mean of W has been previously defined, here we concentrate on proving the tail bound. Recall that Wi is the expected value of the random variable W given that the first i subsequences in C are known and hence, the distances between the consensus S and the first i vertices are known. Without loss of generality we choose a consensus S and let Fi be the σ-field generated by the random choice of the subsequence i from the set of all subsequences at most distance d from the consensus and hence, αi randomly chosen with the same probability. It follows that Wi = [W |Fi ], since Wi denotes the conditional expectation of W knowing the first i subsequences. Therefore, W0 , W1 , . . . , Wm is a martingale sequence [6], with W0 = E[W ] and Wm = W . We now focus on the value Wi − Wi−1 . Let Δi,e be the change in the random variable representing the weight of an edge e from knowing the first i−1 sequences to knowing the first i sequences. The value of Δe,i is non-zero for edges where the sequence corresponding to one of the endpoints of that edge was previously not known and is now known. Each vertex in the clique is adjacent to m − 1 vertices. For i − 1 the corresponding sequences were known and for n − i, the corresponding sequences were unknown. All other m 2 − m + 1 remaining edges in the clique have no change. The expectation of the weight of the edge can change by at most d. |Wi − Wi−1 | ≤ d(m − 1) The random variables W0 , W1 , . . . , Wm form a martingale with W0 = E[W ] and Wm = W and that |Wi − Wi−1 | ≤ d(m − 1) Therefore, we can invoke Azuma’s inequality to give us the following for any λ > 0: λ2 λ2 P r [|W − μW | ≥ λ] ≤ 2 exp − m 2 = = 2 exp − 2 2 i=0 d 2d (m + 1) We compare the theoretical tail bound with the distribution of values obtained from MCL-WMR; Figure 4.1 demonstrates that the distribution of the values of W approach the normal distribution in the limit with the mean value centered at 897. This corresponds to the theoretical mean of 900.1 calculated using the result from Theorem 1. The weight of cliques that do not represent valid motifs appears to follow a normal distribution but their mean weight is slightly lower, approximately 885. This result, shown in Figure 4.1, was determined by generating the weight of cliques that do not correspond to motifs in 100 random data sets but these were discovered using MCL-WMR and so are likely are not a uniform sample of such cliques. These results demonstrate a partial separation between the weight of cliques representing motifs and those that do not, which can be exploited to efficiently find dense subgraphs that are of interest. As highlighted in Figure 4.1, we use the weight to determine which subgraphs a further search for valid motifs is necessary. Further, Figure 4.1 demonstrates that as the value of m increases this separation will become more apparent since the deviation of the weight of cliques corresponding to motifs will occur with less probability, and the weight of the cliques will
156
C. Boucher, D.G. Brown, and P. Church
Fig. 1. Distribution of the weight of cliques containing a motif consensus and the distribution of the weight of cliques not containing a motif consensus. The data for non-motif cliques was generated was generated by running MCL-WMR 100 times, calculating the total weight of the clique, and generating a histogram of these values. The data is given for the (15,4) motif problem instance with m = 15.
become more centralized around the mean. Similar experimental tests were completed to demonstrate the relationship between the weight of spurious cliques when m = 15 and when m = 50, specifically, we ran MCL-WMR 100 times with n = 800, l = 15, and d = 4 and determined cliques that did not correspond to valid motifs. We found no spurious cliques in the data sets when m = 50, agreeing with our intuition that very few spurious cliques occur randomly in the data set when m becomes large. We should further note our confidence in MCL-WMR being able to detect cliques–both spurious and those corresponding to motifs–this is due to the accuracy is detecting the embedded motifs (see Section 4.2 details concerning these experimental tests). These results also suggest that when m is relatively large we can be more certain than any cliques found correspond to valid motifs; an attribute that should be further explored. 4.2
Discussion of Complexity
A few interesting observations can be made regarding the complexity of the algorithm and the quality of its solutions. Finding cliques of maximum size in a given input graph is NP-complete and thus, unlikely to be solved in polynomialtime [3]. Further, the results from Chen et al. [2] show that unless unlikely consequences occur in parameterized complexity theory, the problem of finding maximum–size cliques cannot be solved in no(k) time. Thus, finding cliques of a specific size k is not likely to be computationally feasible for graphs of significant size. The best known algorithm for finding cliques of size k in a given input graph runs in time O(mck/3 ), where c is the exponent on the time bound for multiplying two integer m×m matrices; the best known value for is c is 2.38 [7]. The runtime for the straightforward algorithm that checks all size k subsets is O(mk+2 ) and is the one to be most likely to be implemented in practice. The runtime of the algorithm of Yang and Rajapakse [12], a dynamic programming clique finding 2d algorithm, is O(m(nA2 + An−1 p2n−5 ), where A = m i=0 il (3/4)i (1/4)l−i , m is the length of each sequence and n is the number of sequences. This runtime
A Graph Clustering Approach to Weak Motif Recognition
157
Fig. 2. Distribution of average edge weights in cliques corresponding to actual motifs of size 15 and 50. The data is given for the (15, 4) motif problem with n = 600.
reflects the steep computational expense required to find cliques of a given size for an input graph. Similarly, the estimated runtime of the WINNOWER algorithm is O((mD)4 ), where D is approximately 30 for the challenge problem [8]. The time required by MCL-WMR to find a solution is not affected by the length of the motif that is to be discovered, whereas this is true for many other methods. Rather, it is the weakness of the motif–that is, the probability of the pairwise motif similarity occurring randomly–that has the most impact on the complexity of the algorithm. The increased probability of a clique of high weight affects the runtime of MCL-WMR since the exponential-time algorithm required to determine in a high cluster or subgraph contains a motif instance. We can compare the computational complexity of these programs by considering the required runtime of MCL-WMR of the three sequential steps–that is, the computational time required to construct the graph, finds all cliques of size m, and determine the motifs and consensus. MCL-WMR uses the MCL algorithm that runs in time O(N 3 ) where N is the number of vertices in the input graph [11] to find dense subgraphs. Hence, the most computationally expensive step of MCL-WMR is the clique-finding algorithm that serves the dense subgraphs for cliques corresponding to valid motifs and increases in computation time with the number of vertices. Other graph-based methods for motif finding rely on enumeration methods to find dense subgraphs; for example, WINNOWER requires each edge to be checked and the algorithm of Yang and Rajapakse uses dynamic programming on the complete graph,
5
Experimental Results
We tested MCL-WMR on synthetic problem instances generated according to the embedded (l, d)-motif model. We produce problem instances as follows: first we choose a random motif consensus of length l, and pick m occurrences of the motif
158
C. Boucher, D.G. Brown, and P. Church
Table 1. Comparison of the performance on a range of (l, d)-motif problems with synthetic data, where n = 600 and m = 20. The average performance of MCL-WMR on the eight different problem instances, generated as specified, are given. Data for WINNOWER and SP-STAR is the average of eight random instances given by Pevzner and Sze [8], while PROJECTION is the average of 100 random problem instances where the projection size is 7 and the bucket size is 4 give by Bulher and Tompa [1]. l 10 11 12 13 14 15 17 18
d PROJECTION SP-STAR WINNOWER MCL-WMR Time 2 0.80 0.56 0.78 1.00 54 ± 10.8 2 0.94 0.84 0.90 1.00 30 ± 10.6 3 0.77 0.33 0.78 1.00 205 ± 11.0 3 0.94 0.92 0.92 1.00 65 ± 10.4 4 0.71 0.02 0.02 1.00 806 ± 71.3 4 0.93 0.73 0.92 1.00 220 ± 17.2 5 0.93 0.69 0.03 1.00 704 ± 67.2 6 N. A. N. A. N. A. 1.00 20605 ± 534.3
by randomly choosing d positions per occurrence and randomly mutating the base at each. Lastly, we construct m background sequences of length n and insert the generated motifs into a random position in the sequence. For each of the (l, d) combinations, 100 randomly generated sets of input sequences (n = 600 and m = 20) were generated. This generation corresponds to the “FM” model used in the challenge problem by Pevzner and Sze and the results concerning PROJECTION by Buhler and Tompa. All empirical results were obtained on a desktop computer with a 2.0 GHz AMD Athlon 64 bit processor with 512 KB cache and 1 GB RAM, running Debian Linux. The time is the number of CPU seconds. One of the main advantages of MCL-WMR is the accuracy of the results even for hard problems. A metric, referred to as performance coefficient, is used to gauge the accuracy of the algorithm and is defined as K∩P K∪P , where K is the set of ls nucleotides in motif instances and P is the set of ls nucleotides in the proposed motif instances. A performance coefficient of 0.75 or greater is acceptable for algorithms not guaranteeing exact accuracy; improved algorithms return results with coefficients between 0.9 and 0.95. Table 1 compares the performance of MCL-WMR with that of previous motif finding programs on sets of eight random problem instances. We give the average performance coefficient for MCL-WMR and the competing programs, the mean runtime, and the range of runtimes for each set of motif problem instances. For comparison, we give the performance coefficients for WINNOWER, SP-STAR and PROJECTION. The data for these corresponding algorithms was collected by Pevzner and Sze [8] and Bulher and Tompa [1]. Our program found the exact location of a motif instance every single time and hence, the coefficient is 1; other programs typically were only approximate in discovering the motifs. The computation time of previous programs that find the exact solution becomes unacceptable as the motifs become degraded beyond the (15, 4) problem [9]. The main advantage to our tool is the time required to solve the extremely difficult challenge problems–that is (17, 5) ans (18, 6) problem–is substantially better to the running time of previous algorithms.
A Graph Clustering Approach to Weak Motif Recognition
159
Table 2. Comparison of the time required to solve the (15, 4)-motif problem with 20 sequences of varying length, of MCL-WMR and PROJECTION; n denotes the sequence length, which varies from 600 to 2000. The running times are obtained by averaging the time to obtain a solution on 8 different instances of the problem. Data for PROJECTION was collected from King et al. [4]. n 600 800 1000 1200 1400 1600 1800 2000
PROJECTION 6.6 ± 1.0 27 ± 4 82 ± 25 250 ± 60.0 600.6 ± 140.0 1000 ± 200 1435 ± 353.0 1891 ± 600.0
MCL-WMR 50 ± 17.6 118 ± 39.9 228 ± 67.4 407 ± 78.8 706 ± 138.6 1043.4 ± 80.51 1652 ± 342.7 2078 ± 432.2
The performance coefficient of MCL-WMR is greater than that of the previous algorithms in every line of Table 1. MCL-WMR correctly solved planted (11, 2), (13, 3), (15, 4), (17, 5) and (18, 6) on all data sets–in these cases, the planted motif and motif occurrences at least as strong as planted motifs. WINNOWER, PROJECTION, and SP-STAR achieve acceptable performance on the (11, 2), (13, 3) and (15, 4) problem instances when the sequence length is less than or equal to 600 and the number of sequences is less than or equal to 20, however, all fail on the (18, 6) and (19, 6) problem, and WINNOWER and SP-STAR fail on the (16, 5) and (17, 5) problem instances. The performance of MCL-WMR is most eminent on the more difficult planted (14, 4), (16, 5), (17, 5) and (18, 6) motif problems when compared to results from previous algorithms. WINNOWER and SP-STAR typically failed to find the planted motifs and PROJECTION often failed to have acceptable performance on the more difficult cases of the challenge problem [1] and hence, MCL-WMR’s performance substantially exceeded that of previously algorithms. We evaluated the performance of MCL-WMR on problem instances with longer background sequences–that is, problems where n varies from values greater than 600. As the length of the sequences increase, the number of randomly occurring l-mers increases; specifically, the increase in n, increases the probability of cliques of high-weight occurring. Due to the increase in noise and hence, difficulty in detecting true motifs, MCL-WMR will recover motifs more slowly. Our results are comparable to the results of PROJECTION, as can be seen in Table 2, MCL-WMR maintains its speed advantages as n increases. Considering the (15, 4) problem and fixing the number of sequences to be 20, the performance of WINNOWER breaks at length 700, and SP-STAR breaks when the length is 800 to 900. Table 2 demonstrates that MCL-WMR has comparable running time to PROJECTION for lengths above 1400, and in any case higher. For smallest lengths PROJECTION appears to be faster. We should further note that MCL-WMR achieves a performance ratio of 1.0 whereas, PROJECTION achieved a performance ratio around 0.93.
160
6
C. Boucher, D.G. Brown, and P. Church
Conclusion
We propose an efficient algorithm for motif recognition with the specific purpose of solving more difficult problems when the motif signal is weak due to a large amount of degeneration. We demonstrate promising results on synthetic data. Specifically, we showed promising running time and accuracy for all challenge problems, with most-impressive improvement on the (14, 4), (17, 5) and (18, 6) problems. Previous algorithms lack accuracy, the ability for the running time to scale with the length and number of sequences, and achieving a reasonable running time for all challenge problems. We have shown that a novel model for motif recognition can dramatically influence the algorithmic ability and efficiency. By changing the graphical model to incorporate edge weights, we exploit theoretical results demonstrating the existence of a separation between the weights of cliques corresponding to valid motifs and the weights of those that do not, and obtain improved search techniques. Our theoretical work and empirical data show a large percentage of the cliques corresponding to valid motifs have total weight in a narrow range. This helps us distinguish cliques containing valid motifs and spurious cliques. We expect interesting theoretical results lie within study of this weighted graph model, along with further exploitation of theoretical results for the problem.
References 1. Buhler, J., Tompa, M.: Finding motifs using random projections. J. Comput. Biol. 9(3), 225–242 (2002) 2. Chen, J., Huang, X., Kanj, I.A., Xia, G.: Linear FPT reductions and computational lower bounds. In: Proc. Sym. on Theory of Comp., pp. 212–221 (2004) 3. Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman and Co., New York, NY (1979) 4. King, J., Cheuny, W., Hoos, H.H.: Neighbourhood Thresholding for ProjectionBased Motif Discovery. Bioinfo. (to appear) 5. Liang, S., Samanta, M.P., Biegel, B.A.: cWINNOWER algorithm for finding fuzzy DNA motifs. J. Bioinfo. Comput. Biol. 2(1), 47–60 (2004) 6. Motwani, R., Raghavan, R.: Randomized Algorithms. Cambridge University Press, New York, NY (1995) 7. Niedermeier, R.: Invitation to fixed-parameter algorithms. Habilitation thesis, Universit¨ at T¨ ubingen (2002) 8. Pevzner, P., Sze, S.: Combinatorial approaches to finding subtle signals in DNA sequences. Proc. Int. Conf. Intell. Syst. Mol. Biol (ISMB00) 8, 344–354 (2000) 9. Styczynski, M.P., Jensen, K.L.: An extension and novel solution to the (1, d)-motif challenge problem. Gen. Info. 15(2), 63–71 (2004) 10. Sze, S., Lu, S., Chen, J.: Integrating sample-driven and patter-driven approaches in motif finding. In: Jonassen, I., Kim, J. (eds.) WABI 2004. LNCS (LNBI), vol. 3240, pp. 438–449. Springer, Heidelberg (2004) 11. van Dongen, S.: Graph clustering by flow simulation. PhD thesis, University of Utrecht (May 2000) 12. Yang, X., Rajapakse, J.: Graphical approach to weak motif recognition. Gen. Info. 15(2), 52–62 (2004)
Informative Motifs in Protein Family Alignments Hatice Gulcin Ozer1,2 and William C. Ray2,3 1
Biophysics Program Columbus Children’s Research Institute 3 Department of Pediatrics, The Ohio State University, 700 Children’s Drive Columbus, OH 43205, USA {ozer.9,ray.29}@osu.edu 2
Abstract. Consensus and sequence pattern analysis on family alignments are extensively used to identify new family members and to determine functionally and structurally important identities. Since these common approaches emphasize dominant characteristics of the family and assume residue identities are independent at each position, there is no way to describe residue preferences outside of the family consensus. In this study, we propose a novel approach to detect motifs outside the consensus of a protein family alignment via an information theoretic approach. We implemented an algorithm that discovers frequent residue motifs that are high in information content and outside of the family consensus, called informative motifs, inspired by the classic Apriori algorithm. We observed that these informative motifs are mostly spatially localized and present distinctive features of various members of the family. Availability: The source code is available upon request from the authors. Keywords: Information content, motif, sequence alignment, protein structure.
1 Introduction Multiple sequence alignments have been extensively studied to understand and describe characteristics of biomolecule families for several decades. Consensus analysis, position specific scoring matrices (1,2), hidden Markov models (HMM) (3,4), profile HMMs (5), sequence logos (6) and sequence patterns are the most common approaches to represent and model biosequence families. Unfortunately, all of these approaches attempt to describe only dominant characteristics of the biomolecule families. Structural and functional importance of highly conserved residues in a protein family alignment is indisputable. However, localized preferences outside of the consensus are also very important to understand characteristics of the family. In addition, most of the popular models assume independence of identities in the sequences. Due to this assumption, these methods can result in model descriptions where no instance of the model exists in the family. Although there are numerous studies to address this drawback, generally they are specific to a region of a family or group of biomolecules, or incorporate prior biological knowledge, and they are not integrated into current popular modeling tools. Therefore, it is necessary to define a generalized method to identify variant motifs outside the consensus of a protein family. R. Giancarlo and S. Hannenhalli (Eds.): WABI 2007, LNBI 4645, pp. 161 – 170, 2007. © Springer-Verlag Berlin Heidelberg 2007
162
H.G. Ozer and W.C. Ray
Regular expressions are commonly employed to report sequence patterns that are common to all or most of the sequences in the protein family alignments. This approach can be easily expanded to describe residue preferences outside the consensus. On account of having the positional independence assumption, such patterns might not represent any family member at all. Although this method is good to understand preferences at distinct positions, it cannot identify variant motifs across the family. Of the existing techniques HMMs provide the best possibility for modeling positional dependencies, though practically HMMs are limited to near neighbor dependencies. Long range interdependence approach intractable and crossing dependencies are impossible to represent in the HMM paradigm. Additionally, while HMMs may accurately model certain features of an alignment, it is impractical to tease human understanding of the represented motifs back out of the HMM model. Correlated mutations have been extensively used to predict both intra- and intermolecular contacts. The underlying idea is to define the correlation between the residue conservation patterns of the two columns in the sequence alignment(s). The measurements proposed for correlated mutations are highly depend on residue conservation scoring matrices. There are numerous diverse and sophisticated studies to define both correlated mutation measurements (7) and residue conservation scoring (8). Although several correlated mutation measurements yield reasonable accuracy for predicting residue contacts for some families, general reviews point out that current methodologies of correlated mutations analysis are not suitable for large scale residue contact prediction (7). MAVL/StickWRLD is an analysis and visualization system we developed to display and interpret positional dependencies discovered in nucleic acid (9) and amino acid (10) family alignments. In the analysis system, the expected number of sequences that should share identities at a particular pair of positions is calculated based on positional probabilities, and residuals are calculated based on the observed population of sequences actually sharing the residues. Correlating pairs of residues based on these residuals are visualized in StickWRLD diagram. This approach differs from correlated mutation analysis by examining identitywise correlations between the columns of family alignment, for every possible identity combination. Ongoing research has shown that residue pairs displaying large residuals and high statistical significance, are often the result of physical proximity. We are therefore continuing to develop analysis new analysis techniques to enhance the performance and accuracy of the MAVL analysis engine, and to populate StickWRLD visualizations with additional data to assist the researcher. Mining frequent item sets is a key step in many data mining problems, such as association rule mining, sequential pattern mining and classification. Therefore efficient frequent item set generation is an active research area. The Apriori algorithm (11) is the most popular implementation of frequent item set mining problem. This algorithm can also be applied to amino acid sequence alignments to discover frequently occurring residue patterns. Slight modifications in the algorithm could allow us to discover motifs composed by residues that are not strongly conserved. In addition, an information theoretic approach can be employed to assess significance of discovered motifs. Shannon’s entropy (12) in information theory describes how much information there is in a signal or event. The position specific probabilities of amino acids in a family alignment can be utilized to compute
Informative Motifs in Protein Family Alignments
163
information content of discovered motifs. Information content of a motif is at a minimum when either a motif is strongly conserved or when all motifs are equiprobable. Therefore, we are interested in identifying the motifs that are high in information content and name such motifs as informative motifs. In this paper, we introduce a novel algorithm to mine informative motifs outside the consensus of a protein family alignment by modifying the classic Apriori algorithm. This will allow us to describe localized, distinctive features of various members of the family.
2 Methods In a nut shell, we modified the classic Apriori algorithm to mine frequent residue motifs that are high in information content and outside the family consensus. The fundamental approach for frequent item set mining can be summarized as follows: Let I={i1, i2, …, im} be a set of items and D={t1, t2, …, tk} be a database of transactions where each transaction T is a set of items such that T ⊆ I . Let X be a
set of items. A transaction T is said to contain X if and only if X ⊆ T . The support of an item set X is the percentage of transactions in which X occurs. X is frequent if the support of X is no less than a user defined support threshold. Here, we are interested in finding the complete set of frequent item sets. Apriori is a breadth first frequent item set mining algorithm. The basic idea of the Apriori algorithm is to generate candidate item sets of a particular size and then scan the database to count them, to see if they are large, i.e. if they satisfy the minimum support requirement. During scan i, candidates of size i, Ci are counted. Only those candidates that are large are used to generate candidates for the next pass. To generate candidates of size i+1, joins are made of large item sets found in the previous pass. This process repeats until no new candidates are generated (13). In this study, we applied Apriori algorithm to protein family alignments to detect frequent residue motifs. For this particular application, the transaction database refers to the family alignment, a transaction refers a sequence in the alignment, and an item set refers to a residue motif that exists at least in one sequence. Since the order of residues, i.e. positions along the sequence is important, each residue is subscripted with its position before applying the algorithm. In this analysis minimum support is a critical user defined value. High values of minimum support may result in underestimation of rare but important patterns. Also low values of minimum support result in overestimation of many patterns. Therefore, we decided to examine information content of the candidate item sets based on position specific probabilities of amino acids in the family alignment. Instead of minimum support we used a cutoff (explained later) on information content of the item set to proceed to the next step in the algorithm. Information content of an item set X={x1, x2, …, xK} with associated positions J={j1, j2, …, jK} and size K, is calculated as follows:
IC ( X ) =
∑ P(t
k =1.. K
jk
= xk ) log 2 P(t jk = xk )
164
where
H.G. Ozer and W.C. Ray
t jk is the residue at position jk in the transaction database i.e. the sequence
family alignment. The relation of an amino acid’s probability to information content of that position is depicted in Figure 1. If a residue is highly conserved i.e. it is part of the family consensus, its contribution to the motif’s information content will be low. On the other hand, if a residue is rarely found at a position, again its contribution to the motif’s information content will be low. In this sense, the informative motifs idea properly accommodates the aim of this study.
Fig. 1. Depicts the relation of probability to information content
As highlighted in Figure 1, information content larger than or equal to 0.5, represents amino acid probabilities between 0.25 and 0.5. If a residue’s probability at a position is larger than 0.5, then it will be consensus. If a residue’s probability is less than 0.25, then it can be counted as infrequent. Thus, we take 0.5 as a cutoff on information content of a single position. Since the information content is computed via an aggregate formula, a motif’s information content will increase as its size increases. Therefore, we calculated the motif’s per residue information content by dividing total information content to the motif’s size. Our second modification to the Apriori algorithm is elimination of residues that cause unnecessary computations. Since we want to extract motifs outside of consensus, we eliminate consensus residues in the candidate generation step of the algorithm. Also, due to the cutoff applied on the information content, it is not possible to see rare residues in the final motifs. Thus we eliminate rare residues at the same step too. To be cautious, we eliminated residues with probabilities larger than 0.7 and smaller than 0.1. Our last modification to the Apriori algorithm is at the candidate generation step. The normal Apriori algorithm generates candidates by creating cross-product joins of every current candidate with every other current candidate. This is extremely inefficient in a situation where most of the generated candidates do not exist in the actual data. Therefore we further modify the algorithm by extracting candidates from the actual sequence composition, limiting searches to only those candidates that are at least possible in the sequence set.
Informative Motifs in Protein Family Alignments
165
Fig. 2. The flow chart of the informative motif extraction algorithm. P(xi) denotes position specific probability of residue x at position i. IC(X) denotes per residue information content of item set X.
To sum up, we modified the Apriori approach to be able to detect informative motifs in a protein family alignment. First, each residue in the family alignment is subscripted with its position. Residues with position specific probabilities larger than 0.7 and smaller than 0.1 are eliminated, to avoid unnecessary computations. Then, each sequence with its remaining residues is recorded as a transaction into the transaction database that represents the family alignment. First iteration of the algorithm starts with generation of size-3 candidates based on the existing transactions. The candidates with average information content less than 0.5 are eliminated to obtain 3-size motifs. Then one size larger candidates are generated again based on existing transactions and information content cutoff applied to get corresponding motifs. This is repeated until no new motifs are generated. Also every time new motifs recorded, their subsets in the smaller sized motifs are deleted. At last, the final item sets produced as a result of this modified Apriori approach is called informative motifs. Figure 2, depicts the flowchart of the proposed algorithm.
3 Discussion We examined structural representations of discovered informative motifs for a number of protein families from Pfam database (14). By examining numerous protein family alignments, we observed that discovered informative motifs mostly present spatially localized clusters of residues in the
166
H.G. Ozer and W.C. Ray
structure. Sometimes these motifs also reveal alternating preferences at certain positions of the family alignment. As an example, malic enzymes (malate oxidoreductases) catalyse the oxidative decarboxylation of malate to form pyruvate, a reaction important in a number of metabolic pathways - e.g. carbon dioxide released from