31 May, NTU A Fast Multiple Longest Common Subsequence (MLCS) Algorithm 組員: 黃安婷 江蘇峰 李鴻欣 劉士弘 施羽芩 周緯志 林耿生 張世杰 潘彥謙 Qingguo Wang, Dmitry Korkin, and.

Slides:



Advertisements
Similar presentations
Longest Common Subsequence
Advertisements

Protein – Protein Interactions Lisa Chargualaf Simon Kanaan Keefe Roedersheimer Others: Dr. Izaguirre, Dr. Chen, Dr. Wuchty, ChengBang Huang.
Introduction to Algorithms Rabie A. Ramadan rabieramadan.org 2 Some of the sides are exported from different sources.
Lecture 3: Parallel Algorithm Design
1 Parallel Parentheses Matching Plus Some Applications.
Yasuhiro Fujiwara (NTT Cyber Space Labs)
Chapter 3: The Efficiency of Algorithms Invitation to Computer Science, Java Version, Third Edition.
Partitioning and Divide-and-Conquer Strategies ITCS 4/5145 Parallel Computing, UNC-Charlotte, B. Wilkinson, Jan 23, 2013.
S. J. Shyu Chap. 1 Introduction 1 The Design and Analysis of Algorithms Chapter 1 Introduction S. J. Shyu.
Optimal Sum of Pairs Multiple Sequence Alignment David Kelley.
Sabegh Singh Virdi ASC Processor Group Computer Science Department
Advanced Topics in Algorithms and Data Structures Page 1 Parallel merging through partitioning The partitioning strategy consists of: Breaking up the given.
Introduction to Bioinformatics Burkhard Morgenstern Institute of Microbiology and Genetics Department of Bioinformatics Goldschmidtstr. 1 Göttingen, March.
Heuristic alignment algorithms and cost matrices
Dynamic Programming Reading Material: Chapter 7..
Developing Pairwise Sequence Alignment Algorithms Dr. Nancy Warter-Perez.
Whole Genome Alignment using Multithreaded Parallel Implementation Hyma S Murthy CMSC 838 Presentation.
Developing Pairwise Sequence Alignment Algorithms Dr. Nancy Warter-Perez June 23, 2005.
A fast parallel algorithm for finding the longest common sequence of multiple biosequences. Yixin Chen, Andrew Wan, Wei Liu Washington University / Yangzhou.
Performance Optimization of Clustal W: Parallel Clustal W, HT Clustal and MULTICLUSTAL Arunesh Mishra CMSC 838 Presentation Authors : Dmitri Mikhailov,
Sequence similarity.
Chapter 3: The Efficiency of Algorithms Invitation to Computer Science, C++ Version, Fourth Edition.
Chapter 3: The Efficiency of Algorithms
Dynamic Programming Reading Material: Chapter 7 Sections and 6.
Mining Long Sequential Patterns in a Noisy Environment Jiong Yang, Wei Wang, Philip S. Yu, Jiawei Han SIGMOD 2002.
P.Krusche / A. Tiskin - Efficient LLCS Computation using Bulk-Synchronous Parallelism Efficient Longest Common Subsequence Computation using Bulk-Synchronous.
Multiple Sequence Alignment
© 2006 Pearson Addison-Wesley. All rights reserved10 A-1 Chapter 10 Algorithm Efficiency and Sorting.
Case Study. DNA Deoxyribonucleic acid (DNA) is a nucleic acid that contains the genetic instructions used in the development and functioning of all known.
Multiple Sequence Alignment CSC391/691 Bioinformatics Spring 2004 Fetrow/Burg/Miller (Slides by J. Burg)
Developing Pairwise Sequence Alignment Algorithms
Multiple Alignment – Υλικό βασισμένο στο κεφάλαιο 14 του βιβλίου: Dan Gusfield, Algorithms on Strings, Trees and Sequences, Cambridge University Press.
Challenges Bit-vector approach Conclusion & Future Work A subsequence of a string of symbols is derived from the original string by deleting some elements.
Neural and Evolutionary Computing - Lecture 10 1 Parallel and Distributed Models in Evolutionary Computing  Motivation  Parallelization models  Distributed.
1 Chapter 24 Developing Efficient Algorithms. 2 Executing Time Suppose two algorithms perform the same task such as search (linear search vs. binary search)
RNA Secondary Structure Prediction Spring Objectives  Can we predict the structure of an RNA?  Can we predict the structure of a protein?
Sequence analysis: Macromolecular motif recognition Sylvia Nagl.
1 Longest Common Subsequence Problem and Its Approximation Algorithms Kuo-Si Huang ( 黃國璽 )
Multiple Alignment and Phylogenetic Trees Csc 487/687 Computing for Bioinformatics.
CS453 Lecture 3.  A sequential algorithm is evaluated by its runtime (in general, asymptotic runtime as a function of input size).  The asymptotic runtime.
Dynamic Programming.
Sequence Analysis CSC 487/687 Introduction to computing for Bioinformatics.
Approximate Alignment Vasileios Hatzivassiloglou University of Texas at Dallas.
Intelligent Database Systems Lab 1 Advisor : Dr. Hsu Graduate : Jian-Lin Kuo Author : Silvia Nittel Kelvin T.Leung Amy Braverman 國立雲林科技大學 National Yunlin.
Lecture 6. Pairwise Local Alignment and Database Search Csc 487/687 Computing for bioinformatics.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
Chapter 3 Computational Molecular Biology Michael Smith
1 CPSC 320: Intermediate Algorithm Design and Analysis July 28, 2014.
Protein Classification II CISC889: Bioinformatics Gang Situ 04/11/2002 Parts of this lecture borrowed from lecture given by Dr. Altman.
Parallel & Distributed Systems and Algorithms for Inference of Large Phylogenetic Trees with Maximum Likelihood Alexandros Stamatakis LRR TU München Contact:
Schreiber, Yevgeny. Value-Ordering Heuristics: Search Performance vs. Solution Diversity. In: D. Cohen (Ed.) CP 2010, LNCS 6308, pp Springer-
Time Parallel Simulations I Problem-Specific Approach to Create Massively Parallel Simulations.
Parallel and Distributed Simulation Time Parallel Simulation.
Pairwise Sequence Alignment Part 2. Outline Summary Local and Global alignments FASTA and BLAST algorithms Evaluating significance of alignments Alignment.
Memory Coherence in Shared Virtual Memory System ACM Transactions on Computer Science(TOCS), 1989 KAI LI Princeton University PAUL HUDAK Yale University.
Sequence Alignment.
Chapter 7 Dynamic Programming 7.1 Introduction 7.2 The Longest Common Subsequence Problem 7.3 Matrix Chain Multiplication 7.4 The dynamic Programming Paradigm.
Finding Motifs Vasileios Hatzivassiloglou University of Texas at Dallas.
Section Recursion  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
Multiple String Comparison – The Holy Grail. Why multiple string comparison? It is the most critical cutting-edge toοl for extracting and representing.
Efficient Signature Matching with Multiple Alphabet Compression Tables Publisher : SecureComm, 2008 Author : Shijin Kong,Randy Smith,and Cristian Estan.
9/6/07BCB 444/544 F07 ISU Dobbs - Lab 3 - BLAST1 BCB 444/544 Lab 3 BLAST Scoring Matrices & Alignment Statistics Sept6.
Advanced Sorting 7 2  9 4   2   4   7
Learning to Align: a Statistical Approach
Lecture 3: Parallel Algorithm Design
Parallel Programming By J. H. Wang May 2, 2017.
3. Brute Force Selection sort Brute-Force string matching
3. Brute Force Selection sort Brute-Force string matching
3. Brute Force Selection sort Brute-Force string matching
Presentation transcript:

31 May, NTU A Fast Multiple Longest Common Subsequence (MLCS) Algorithm 組員: 黃安婷 江蘇峰 李鴻欣 劉士弘 施羽芩 周緯志 林耿生 張世杰 潘彥謙 Qingguo Wang, Dmitry Korkin, and Yi Shang

Page-2 Outline Introduction Background knowledge Quick-DP –Algorithm –Complexity analysis –Experiments Quick-DPPAR –Parallel algorithm –Time complexity analysis –Experiments Conclusion

Introduction 江蘇峰

Page-4 The MLCS problem Multiple DNA sequencesLongest common subsequence

Page-5 Biological sequences GCAAGTCTAATACAAGGTTATA MAEGDNRSTNLLAAETASLEEQ Base sequence Amino acid sequence

Page-6 Find LCS in multiple biological sequences DNA sequences Protein sequences LCS Evolutionary conserved region Structurally common feature (Protein) Functional motif HemoglobinMyoglobin

Page-7 A new fast algorithm Quick-DP –For any given number of strings –Based on the dominant point approach (Hakata and Imai, 1998) –Using a divide-and-conquer technique –Greatly improving the computation time

Page-8 The currently fastest algorithm The divide-and-conquer algorithm Minimize the dominant point set (FAST-LCS, 2006 and parMLCS, 2008) Significant faster on the larger size problem Sequential algorithm Quick-DP Parallel algorithm Quick-DPPAR

Background knowledge - Dynamic programming approach - Dominant point approach Background knowledge - Dynamic programming approach - Dominant point approach 黃安婷

Page-10 The dynamic programming approach GTAATCTAAC G A T T A C A MLCS (in this case, “LCS”) = GATTAA

Page-11 Dynamic programming approach: complexity For two sequences, time and space complexity = O(n 2 ) For d sequences, time and space complexity = O(n d )  impractical! Need to consider other methods.

Page-12 Dominant point approach: definitions GTAATCTA G A T L = the score matrix p= [p 1, p 2 ] = a point in L L[p] = the value at position p of L a match at point p: a 1 [p 1 ] = a 2 [p 2 ] q = [q 1, q 2 ] p dominates q if p 1  q 1 and p 2  q 2 denoted by p  q strongly dominates: p < q A match at (2, 6) (1, 5)  (1, 6) a1a1 a2a2

Page-13 Dominant point approach: more definitions GTAATCTA G A T p is a k-dominant point if L[p] = k and there is no q such that L[q] = k and q  p D k = the set of all k-dominants D = the set of all dominant points A 3-dominant point Not a 3-dominant point

Page-14 Dominant point approach: more definitions GTAATCTA G A T a match p is an s-parent of q if q < p and there is no other match r of s such that q < r < p Par(q, s); Par(q,  ) p is a minimal element of A if no other point in A dominates p the minima of A = the set of minimal elements of A (2, 4) is a T-parent of (1, 3)

Page-15 The dynamic programming approach GTAATCTAAC G A T T A C A MLCS (in this case, “LCS”) = GATTAA

Page-16 Dominant point approach GTAATCTA G A T Finding the dominant points: (1) Initialization: D 0 = {[-1, -1]} (2) For each point p in D 0, find A = ∪ p Par(p,  ) (3) D 1 = minima of A (4) Repeat for D 2, D 3, etc

Page-17 Dominant point approach GTAATCTA G A T Finding the MLCS path from the dominant points: (1) Pick a point p in D 3 (2) Pick a point q in D 2, such that p is q’s parent (3) Continue until we reach D  MLCS = GAT

Page-18 Implementation of the dominant point approach Algorithm A, by K. Hakata and H. Imai Designed specifically for 3 sequences Strategy: (1) compute minima of each D k (s i ) (2) reduce the 3D minima problem into a 2D minima problem Time complexity = O(ns + Ds logs) Space complexity = O(ns + D) n = string length; s = # of different symbols; D = # of dominant matches

Background knowledge -Parallel MLCS Methods 周緯志

Page-20 Existing Parallel LCS/MLCS methods m, n are lengths of two input string and m ≦ n TimeProcessor (LARPBS)(Optical bus) [49] X. Xu, L. Chen, Y. Pan, and P. He O(mn/p) p,1 ≦ p ≦ max(m,n) CREW-PRAM model [1] A. Apostolico, M. Atallah, L. Larmore, and Mcfaddin O(log m log n)O(mn/ log m) [33] M. Lu and H. LinO(log 2 m + log n)mn/ log m (p.s. when log 2 m log log m ≦ log n) O(log n)mn/ log n [4] K.N. Babu and S. SaxenaO(log m)mn O(log 2 n)mn [34] G. Luce and J.F. Myoupon + 3m + pm(m+1)/2 cells (RLE: run-length-encoded) strings [19] V. Freschi and A. Bogliolo O(m+n)m+n m, n are lengths of two input string and m ≦ n TimeProcessor (FAST_LCS) [11] Y. Chen, A. Wan, and W. Liu O(|LCS(X1,X2,…Xn)|) length of multisequences

Page-21 FAST_LCS Successor Table –The operation of producing successors Pruning Operation

Page-22 FAST_LCS - Successor Table 1)SX(i,j) = {k|x k = CH(i), k>j } 2)Identical pair: X i =Y j =CH(k) e.g. X 2 =Y 5 =CH(3)=G, then denote it as (2,5) 3)All identical pairs of X and Y is denoted as S(X,Y) e.g. All identical pairs = S(X,Y) = {(1,2),(1,6),(2,5),(3,3),(4,1),(4,6),(5,2), (5,4),(5,7),(6,1),(6,6)} TX(i,j) It indicates the position of the next character identical to CH(i) G is A’s predecessor A is G’s successor

Page-23 4)Initial identical pairs 5)Define level 6)Pruning operation 1 on the same level, if (k,L)>(i,j), then (k,L) can be pruned 7)Pruning operation 2 on the same level, if (i 1, j), (i 2, j), i 1 <i 2, then (i 2, j) can be pruned 8)Pruning operation 3 if there are identical character pairs (i 1, j), (i 2, j), (i 3, j)…(i r,j) then (i 2, j)…(i r,j) can be pruned FAST_LCS – Define level and prune

Page-24 FAST_LCS – time complexity (FAST_LCS) [11] Y. Chen, A. Wan, and W. Liu Time complexity: O(|LCS(X1,X2,…Xn)|) length of multisequences

林耿生 Quick-DP - Algorithm - Find s-parent Quick-DP - Algorithm - Find s-parent

Page-26 Quick-DP

Page-27 Example: D 2 →D 3 T T A A 1. Par s 2. Minima(Par s )

Page-28 Find the s-parent

Quick-DP - Minima - Complexity Analysis Quick-DP - Minima - Complexity Analysis 張世杰

Page-30 Minima()

Page-31 Minima() Time Complexity Step1 : divide N points into subsets R and Q => O(N) Step2 : minimize R and Q individually => 2T(N/2, d) Step3 : remove points in R that are dominated by points in Q => T(N, d-1) Combine these, we have the following recurrence formula : T(N, d) = O(N) + 2T(N/2, d) + T(N, d-1)

Page-32 Minima() Time Complexity T(N, d) denote the complexity. T(N, 2) = O(N) if the point set is sorted. –The sorting of points takes time. –Presort the points at the beginning and maintain the order of the points later in each step. By induction on d, we can solve the recurrence formula and establish that :

Page-33 Complexity Total time complexity : Space complexity :

Experiments of Quick-DP 潘彥謙

Page-35 Experimental results of Quick-DP

Page-36 Random Three-Sequence Hakata & Imai’s algorithm[22] –A: only for 3-sequence –C: any number of sequences

Page-37 Random Three-Sequence

Page-38 Random Five Sequences Hakata & Imai’s C algorithm: –any number of sequences and alphabet size FAST-LCS[11]: –any number of sequences but only for alphabet size 4

Page-39 Random Five Sequences

Quick-DPPAR Algorithm 施羽芩

Page-41 Parallel MLCS Algorithm (Quick-DPPAR) Parallel Algorithm –The minima of parent set –The minima of s-parent set master slave 2 slave 1 slave 3 slave N p slave 1 Q Q R R Q Q R R Q Q R R Q Q R R

Page-42 Quick-DPPAR Step1 : The master processor computes master

Page-43 Quick-DPPAR Step2 : Every time the master processor computes a new set of k-dominants (k = 1, 2, 3,... ), it distributes evenly among all slave processors master slave 2 slave 1 slave 3 slave N p

Page-44 Quick-DPPAR Step3 : Each slave computes the set of parents and the corresponding minima of k-dominants that it has, and then, sends the result back to the master processor slave 2 slave 1 slave 3 slave N p Q Q R R Q Q R R Q Q R R Q Q R R

Page-45 Quick-DPPAR Step3 : Each slave computes the set of parents and the corresponding minima of k-dominants that it has, and then, sends the result back to the master processor master slave 2 slave 1 slave 3 slave N p

Page-46 Quick-DPPAR Step4 : The master processor collects each s-parent set, as the union of the parents from slave processors and distributes the resulting s-parent set among slaves master slave 2 slave 1 slave 3 slave N p

Page-47 Quick-DPPAR Step5 : Each slave processor is assigned to find the minimal elements only of one s-parent set master slave 2 slave 1 slave 3 slave N p

Page-48 Quick-DPPAR Step6 : Each slave processor computes the set of (k+1)-dominants of and sends it to the master slave 2 slave 1 slave 3 slave N p Q Q R R Q Q R R Q Q R R Q Q R R

Page-49 Quick-DPPAR Step7 : The master processor computes Go to step 2,step 2 until is empty master slave 2 slave 1 slave 3 slave N p

Time Complexity Analysis of Quick-DPPAR 李鴻欣

Page-51 Time Complexity Analysis

Page-52 Time Complexity Analysis dividing N points into two subsets R and Q minimizing R and Q individually removing points in R that are dominated by Q

Page-53 Time Complexity Analysis

Page-54 Time Complexity Analysis for computationfor commutation

Page-55 Time Complexity Analysis common to sequential Quick-DP exclusive for Quick-DPPAR (1) (2) (3)

Page-56 Time Complexity Analysis (1) & (2) (3)

Page-57 Time Complexity Analysis

Experiments of Quick-DPPAR 劉士弘

Page-59 Experiments of Quick-DPPAR The parallel algorithm Quick-DPPAR was implemented using multithreading in GCC –Multithreading provides fine-grained computation and efficient performance The implementation consists of one master thread and slave threads –1. The master thread distributes a set of dominant points evenly among slaves to calculate the parents and the corresponding minima –2. After all slave threads finish calculating their subsets of parents, they copy these subsets back to the memory of the master thread –3. the master thread assigns each slave to find the minimal elements of s-parents, –4. The set of minima is then assigned to be the st dominant set –Repeat 1-4 until an empty parent set is obtain

Page-60 Experiments of Quick-DPPAR We first evaluated the speedup of parallel algorithm Quick-DPPAR over sequential algorithm Quick-DP –Speed-up is defined here as the ratio of the execution time of the sequential algorithm over that one of the parallel algorithm

Page-61 Experiments of Quick-DPPAR

Page-62 Experiments of Quick-DPPAR Quick-DPPAR was compared with parMLCS, a parallel version of Hakata and Imai’s C algorithm, on multiple random sequences

Page-63 Experiments of Quick-DPPAR We also tested our algorithms on real biological sequences by applying our algorithms to find MLCS of various number of protein sequences from the family of melanin-concentrating hormone receptors (MCHRs)

Page-64 Experiments of Quick-DPPAR We compared Quick-DPPAR with current multiple sequence alignment programs used in practice, ClustalW (version 2) and MUSCLE (version 4) –As test data, we chose eight protein domain families from the Pfam database Calculated by MUSCLE

Page-65 Experiments of Quick-DPPAR For the protein families in Table 7, it took Quick-DPPAR 8.1 seconds, on average, to compute the longest common subsequences for a family While it took MUSCLE only 0.8 seconds to align sequences of a family The big advantage of Quick-DPPAR over ClustalW and MUSCLE is that Quick-DPPAR guarantees to find optimal solution

Conclusion 江蘇峰

Page-67 Summary Sequential Quick-DP –A fast divide-and-conquer algorithm Parallel Quick-DPPAR –Achieving near-linear speedup with respect to the sequential algorithm Readily applicable to detecting motifs of more than 10 proteins.

Q&A