620 likes | 748 Views
Bioinformatics PhD. Course. Summary (approximate). 1. Biological introduction. 2. Comparison of short sequences (<10.000 bps). 3 Comparison of large sequences (up to 250 000 000). 4 Sequence assembly. 5 Efficient data search structures and algorithms. 6 Proteins.
E N D
Bioinformatics PhD. Course Summary (approximate) • 1. Biological introduction • 2. Comparison of short sequences (<10.000 bps) • 3 Comparison of large sequences (up to 250 000 000) • 4 Sequence assembly • 5 Efficient data search structures and algorithms • 6 Proteins...
3. Comparison of large sequences Summary (more or less) • 3.1 Overview • 3.2 Suffix trees • 3.3 MUMs
Suffix trees Algorithms on strings, trees and sequences, Dan Gusfield Cambridge University Press http://sequence.rutgers.edu/st/
Suffix trees 7: s s,7 6: as s,6 5: aas a a as,5 as,3 as,3 ba ba baas,1 baas,1 ba ba as,4 as,4 baas,2 baas,2 s,7 s,6 as,5 Given string ababaas: Suffixes: 3: abaas 1: ababaas 4: baas 2: babaas What kind of queries can we do?
Applications of Suffix trees a ba baas,1 ba as,3 baas,2 as,4 s,7 s,6 as,5 1. Exact string matching • Does the sequence ababaas contain any ocurrence of the patterns abab, aab, and ab? ………………………… …………………………
Applications of Suffix trees a ba baas,1 ba as,3 baas,2 as,4 s,7 s,6 as,5 2. Finding the repeats within a sequence. …………………………
Quadratic Insertion algorithm ababaabbs,1 Given the string ababaabbs
Quadratic Insertion algorithm babaabbs,2 Given the string ababaabbs ababaabbs,1
Quadratic Insertion algorithm aba baabbs,1 Given the string ababaabbs ababaabbs,1 babaabbs,2
Quadratic Insertion algorithm abbs,3 aba baabbs,1 Given the string ababaabbs babaabbs,2
Quadratic Insertion algorithm abbs,3 aba baabbs,1 ba baabbs,2 Given the string ababaabbs babaabbs,2
Quadratic Insertion algorithm abbs,3 aba baabbs,1 ba abbs,4 baabbs,2 Given the string ababaabbs
Quadratic Insertion algorithm abbs,3 a aba baabbs,1 abbs,3 ba baabbs,1 abbs,4 abbs,4 Given the string ababaabbs ba baabbs,2
Quadratic Insertion algorithm abbs,5 a abbs,3 ba baabbs,1 abbs,4 abbs,4 Given the string ababaabbs ba baabbs,2
Quadratic Insertion algorithm abbs,5 a abbs,3 ba baabbs,1 abbs,4 abbs,4 Given the string ababaabbs ba baabbs,2
Quadratic Insertion algorithm abbs,5 a abbs,3 b a baabbs,1 abbs,4 abbs,4 Given the string ababaabbs ba ba baabbs,2
Quadratic Insertion algorithm abbs,5 a bs,6 abbs,3 b a baabbs,1 abbs,4 abbs,4 Given the string ababaabbs ba baabbs,2
Quadratic Insertion algorithm abbs,5 a bs,6 abbs,3 b a baabbs,1 abbs,4 abbs,4 Given the string ababaabbs ba baabbs,2
Quadratic Insertion algorithm abbs,5 a bs,6 bs,7 abbs,3 b a baabbs,1 b abbs,4 a baabbs,2 Given the string ababaabbs
Quadratic Insertion algorithm abbs,5 a bs,6 bs,7 abbs,3 b a baabbs,1 b abbs,4 a s,7 baabbs,2 Given the string ababaabbs
Quadratic Insertion algorithm abbs,5 a bs,6 bs,7 abbs,3 b a baabbs,1 b abbs,4 a s,7 s,7 baabbs,2 Given the string ababaabbs
Generalizad suffix tree the generalized suffix tree of ababaabb and aabaat … is the suffix tree of ababaabαaabaatβ, : A suffix tree of many strings … is called a generalized suffix tree … and is the suffix tree of the concatenation of strings. For instance,
Generalizad suffix tree abbα,5 a bα,6 bα,7 abbα,3 b a baabbα,1 b abbα,4 a α,7 α,7 baabbα,2 Construction of the suffix tree of ababaabbαaabaaβ: Given the suffix tree of ababaabα:
Generalizad suffix tree abbα,5 a bα,6 bα,7 abbα,3 b a baabbα,1 b abbα,4 a α,7 α,7 baabbα,2 Construction of the suffix tree of ababaabbαaabaaβ:
Generalizad suffix tree aaβ,1 bα,7 bα,6 abbα,3 b a baabbα,1 b abbα,4 a α,7 α,7 baabbα,2 Construction of the suffix tree of ababaabbαaabaaβ: ab a bα,5
Generalizad suffix tree aaβ,1 bα,7 bα,6 abbα,3 b a baabbα,1 b abbα,4 a α,7 α,7 baabbα,2 Construction of the suffix tree of ababaabbαaabaaβ: ab a bα,5
Generalizad suffix tree β,2 bα,7 bα,6 b abbα,4 a α,7 α,7 baabbα,2 Construction of the suffix tree of ababaabbαaabaaβ: aaβ,1 ab a bα,5 b a bbα,3 a baabbα,1
Generalizad suffix tree β,2 bα,7 bα,6 b abbα,4 a α,7 α,7 baabbα,2 Construction of the suffix tree of ababaabbαaabaaβ: aaβ,1 ab a bα,5 b a bbα,3 a baabbα,1
Generalizad suffix tree bα,7 bα,6 β,3 α,7 α,7 Construction of the suffix tree of ababaabbαaabaaβ: aaβ,1 ab a bα,5 β,2 b a bbα,3 a b baabbα,1 a a bbα,4 baabbα,2
Generalizad suffix tree bα,7 bα,6 β,3 α,7 α,7 Construction of the suffix tree of ababaabbαaabaaβ: aaβ,1 ab a bα,5 β,2 b a bbα,3 a b baabbα,1 a a bbα,4 baabbα,2
Generalizad suffix tree β,4 bα,7 bα,6 α,7 α,7 Construction of the suffix tree of ababaabbαaabaaβ: aaβ,1 a b a bα,5 β,2 b a bbα,3 a b baabbα,1 β,3 a a bbα,4 baabbα,2
Generalizad suffix tree β,4 bα,7 bα,6 α,7 α,7 Construction of the suffix tree of ababaabbαaabaaβ: aaβ,1 a b a bα,5 β,2 b a bbα,3 a b baabbα,1 β,3 a a bbα,4 baabbα,2
Generalizad suffix tree bα,6 bα,7 α,7 α,7 Construction of the suffix tree of ababaabbαaabaaβ: β,4 β,4 aaβ,1 a b a bα,5 β,2 b a bbα,3 a b baabbα,1 β,3 a a bbα,4 baabbα,2
Generalizad suffix tree bα,6 bα,7 α,7 α,7 Construction of the suffix tree of ababaabbαaabaaβ: β,4 β,4 aaβ,1 a b a bα,5 β,2 b a bbα,3 a b baabbα,1 β,3 a a bbα,4 baabbα,2
Generalizad suffix tree bα,6 bα,7 α,7 α,7 Construction of the suffix tree of ababaabbαaabaaβ: β,4 β,4 β,4 aaβ,1 a b a bα,5 β,2 b a bbα,3 a b baabbα,1 β,3 a a bbα,4 baabbα,2
Generalizad suffix tree β,4 β,4 β,4 aaβ,1 a b a bα,5 β,2 b bα,7 bα,6 a bbα,3 a b baabbα,1 β,3 a a bbα,4 baabbα,2 α,7 α,7 Generalized suffix tree of ababaabbαaabaaβ: What kind of queries can we do?
Applications of Suffix trees β,4 β,4 β,4 aaβ,1 a b a bα,5 β,2 b bα,7 bα,6 a bbα,3 a b baabbα,1 β,3 a a bbα,4 baabbα,2 α,7 α,7 1. The substring problem for a database of patterns DB • Does the DB contain any ocurrence of patterns abab, aab, and ab?
Applications of Suffix trees β,4 β,4 β,4 aaβ,1 a b a bα,5 β,2 b bα,7 bα,6 a bbα,3 a b baabbα,1 β,3 a a bbα,4 baabbα,2 α,7 α,7 2. The longest common substring of two strings
Applications of Suffix trees β,4 β,4 β,4 aaβ,1 a b a bα,5 β,2 b bα,7 bα,6 a bbα,3 a b baabbα,1 β,3 a a bbα,4 baabbα,2 α,7 α,7 3. Finding MUMs.
Linear Insertion algorithm: and the suffix-tree …... Given the string …………………………...... P1: the leaves of suffixes from have been inserted P2: the string is the longest string that can be spelt through the tree.
Insertion algorithm: example ababb...,5 a ababb...,3 ba baababb...,1 ba ababb...,4 baababb...,2 Given the string ababaababb...
Linear Insertion algorithm: ´ …... …... ´ Given the string …………………………...... P1: the leaves of suffixes from have been inserted P2: the string is the longest string that … P3: there is a pointer,called “suffix pointer” between any node and its longest no proper suffix node.
Insertion algorithm: example Given the string ababaababb... 6 7... ababb...,5 a ababb...,3 ba baababb...,1 ba ababb...,4 baababb...,2
Insertion algorithm: example Given the string ababaababb... 6 7 8... ababb...,5 a ababb...,3 ba baababb...,1 ababb...,4 ba baababb...,2
Insertion algorithm: example Given the string ababaababb... 6 7 8... ababb...,5 a ababb...,3 ba ababb...,1 b baababb...,1 baababb...,1 ababb...,4 ba b...,6 baababb...,2
Insertion algorithm: example Given the string ababaababb... 7 8... ababb...,5 a ababb...,3 ba ababb...,1 b ababb...,4 ba b...,6 baababb...,2
Insertion algorithm: example Given the string ababaababb... 7 8… ababb...,5 a ababb...,3 ba ababb...,1 b ababb...,4 ba b...,6 aababb...,2 b baababb...,2 baababb...,2 b...,7
Insertion algorithm: example a ababb...,1 b b...,6 aababb...,2 b b...,7 Given the string ababaababb... 8… ababb...,5 ababb...,3 ba ababb...,4 ba
Insertion algorithm: improving time Resume: Given the string ababaababb... 6 7 8... a ababb...,5 ababb...,3 ba baababb...,1 ba ababb...,4 baababb...,2 we have pointed to the following nodes
Insertion algorithm: improving time Resume: Given the string ababaababb... 6 7 8... ababb...,5 a ababb...,3 ba baababb...,1 ababb...,4 ba baababb...,2 we have pointed to the following nodes ba baababb...,1 ba baababb...,2