COMBINATORIAL PATTERN MATCHING

Size: px
Start display at page:

Download "COMBINATORIAL PATTERN MATCHING"

Transcription

1 COMBINATORIAL PATTERN MATCHING

2 OUTLINE: EXACT MATCHING Tabulating patterns in long texts Short patterns (direct indexing) Longer patterns (hash tables) Finding exact patterns in a text Brute force (run time) Efficient algorithms (pattern preprocessing) Single pattern: Knuth-Morris-Platt Multiple patterns: Aho-Corasick algorithm Efficient algorithms (text preprocessing) Suffix trees Burrows Wheeler Transform-based

3 OUTLINE: APPROXIMATE MATCHING Algorithms for approximate pattern matching Heuristics behind BLAST Statistics behind BLAST Alternatives to BLAST: BLAT, PatternHunter etc.

4 STRING ENCODING It is often necessary to index strings; a convenient way to do this is first to convert strings to integers. Given a string s of length n on alphabet A (0..c-1), with c= A characters, we can define a map code(s) [0, ), as code(s) s[1]c n 1 + s[2]c n s[n 1]c + s[n] There are c L different L-mers, but at most n-l+1 different L-mers in a text of length n A 0 C 1 G 2 T 3 AGT A=0*16 G=2*4 T=3 11 ATA A=0*16 T=3*4 A=0 12 TGG T=3*16 G=2*4 G=2 58

5 TABULATING SHORT PATTERNS If the L is small (e.g. 3 or 4), i.e. the total number of patterns is not too large and many of them are likely to be found in the input text then we could use direct indexing to tabulate/locate strings efficiently The distribution of short strings in genetic sequences is biologically informative, e.g. Synonymous codons (triplets of nucleotides, 64 patterns) are often used preferentially in organisms (transcriptional selection, secondary structure, etc) The distribution of short nucleotide k-mers (e.g. L=4, 256 patterns) can be useful for detecting horizontal (from species to species) gene transfer and gene finding The location of short amino-acid strings (e.g. L=3, 8000 patterns) is useful for finding seeds for BLAST

6 SHORT PATTERN SCAN Data : Alphabet A, Text T, pattern length p Result: Frequency of each pattern in text R array( A p ); n len(t ); for i:=1 to n-p+1 do R [code (T [i : i + p 1])] + = 1; end return R; O(L): naive O(1): if using the previous code to compute the current one

7 TABULATING/LOCATING LONGER PATTERNS Finding repeats/motifs: ATGGTCTAGGTCCTAGTGGTC Flanking sequences in genomic rearrangements Motifs: promoter regions, functional sites, immune targets Cellular immunity targets in pathogens (e.g. protein 9 mers) There are too many patterns to store in an array, and even if we could, then the array would be very sparse E.g. ~512,000,000,000 amino-acid 9-mers, but in an average HIV-1 sequence (~3 aa. kb long) there are at most ~3000 unique 9-mers

8 HASH TABLES Allow to efficiently (O(1) on average) store and retrieve a small subset of a large universe of records. Hash tables implement associative arrays (dictionaries) in a variety of languages (Python, Perl etc) The universe (records): e.g. 512,000,000,000 amino-acid 9-mers Hash function: record hash key Note: because there are more keys than array indices, this function is NOT one to one The storage: Hash Table (array) << the size of the universe

9 A SIMPLE HASH FUNCTION A reasonable hash function (on integer records i) is: i i mod P P is a prime number and also the natural size of the hash table Hash keys range from o to P-1 If the records are uniformly distributed, so will be their hash keys P=101 4-mer (256 possible) Integer code Hash Key ACGT CCCA TGCC COLLISION

10 COLLISIONS Collisions are frequent even for sparsely populated lightly loaded hash tables load level α = (number of entries in hash table)/(table size) The birthday paradox: what is the probability that two people out of a random group of n (<365) people share a birthday (in hash table terms, what is the probability of a collision if people=records and hash keys=birthdays)? P (n) = n n α P(n)

11 DEALING WITH COLLISIONS Several strategies to deal with collisions: the simplest one is chaining Each hash key is associated with a linked list of all records sharing the hash key Hash Key 0 CGCC AAAA Hash Key 1 Hash Key 2... AAAC 4-mer (256 possible) Integer code Hash Key AAAA 0 0 AAAC 1 1 CGCC 101 0

12 HASH TABLE PERFORMANCE Retrieving/storing a record in a hash table of size m with load factor α Worst case - all records have the same key: O(m) Expected run time is O (1), assuming uniformly distributed records and hash keys Record is not in the table Record is in the table EN = e α + α + O (1/m) ES =1+α/2+O (1/m) This is because the probability of having many collisions with the same key is quite low (even though the probability of SOME collisions in high)

13 EXACT PATTERN MATCHING Motivation: Searching a database for a known pattern Goal: Find all occurrences of a pattern in a text Input: Pattern P = p[1] p[n] and text T = t[1] t[m] (n m) Output: All positions 1< i < (m n + 1) such that the n-letter substring of text T[i][i+n-1] starting at i matches the pattern P Desired performance: O(n+m)

14 BRUTE FORCE PATTERN MATCHING Data : Pattern P, Text T Result: The list of positions in T where P occurs n len(p ); m len(t ); for i:=1 to m-n+1 do if T[i:i+n-1] = P then output i; end end Substring comparison can take from 1 to n (left-to-right) string comparisons Text: GGCATC; Pattern: GCAT i=1 (2 comparisons) G G C A T C G C A A i=2 (4 comparisons) G G C A T C G C A T i=3 (1 comparison) G G C A T C G C A T

15 BRUTE FORCE RUN TIME Worst case: O(nm). This can be achieved, for example, by searching for P=AA...C in text T=AA...A, because each substring comparison takes exactly n steps Expected on random text: O(1). This is because the substring comparison takes on average 1 q n comparisons (q = 1/alphabet size) 1 q For n = 20 and q = 1/4 (nucleotides), substring comparison will take on average 4/3 operations. Genetic texts are not random, so the performance may degrade.

16 IMPROVING THE RUN TIME The search pattern can be preprocessed in O(n) time to eliminate backtracking in the text and hence guarantee O(n+m) run time A variety of procedures, starting with the Knuth-Morris-Pratt algorithm in 1977, take this approach. Makes use of the observation that if a string comparison fails at pattern position i, then we can shift the pattern i-b(i) positions, where b(i) depends on the pattern and continue comparing at position the same or the next position in the text, thus avoiding backtracking. These types of algorithms are popular in text editors/mutable texts, because they do not require the preprocessing of (large) text A C A A C G A C A C G A C C A C A A C A G C A A T G A C G A C A C G A C A C A SHIFT A C A A C G A C A C G A C C A C A A C A G C A A T G A C G A C A C G A C A C A

17 EXACT MULTIPLE PATTERN MATCHING The problem: given a dictionary of D patterns P 1,P 2,..., P D (total length n) and text T report all occurrences of every pattern in the text. Arises, for instance when one is comparing multiple patterns against a database Assuming an efficient implementation of individual pattern comparison, this problem can be solved in O(Dm+n) time by scanning the text D times. Aho and Corasick (1975) showed how this can be done efficiently in O(m+n) time. Uses the idea of a trie (from the word retrieval), or prefix trie Intuitively, we can reduce the amount of work by exploiting repetitions in the patterns.

18 PREFIX TRIE Patterns: ape, as, ease. Constructed in O(n) time, one word at a time. Root Root Root Properties of a trie a a a e Stores a set of words in a tree 1 2 p 2 p 1 s 4 2 p 1 4 s 5 6 a Each edge is labeled with a letter Each node labeled with a state (order of creation) 3 e 3 e 3 e 7 s Any two edges sharing a parent node have distinct labels 8 e Each word can be spelled by tracing a path from the root to a leaf

19 SEARCHING TEXT FOR MULTIPLE PATTERNS USING A TRIE: THREADING Suppose we want to search the text appease for the occurrences of patterns ape, as and ease, given their trie. The naive way to do it is to thread (i.e. spell the word using tree edges from the root) the text starting at position i, until either: A leaf (or specially marked terminal node) is reached (a match has been found) Spelling cannot be completed (no match)

20 I=1: NO MATCH APPEASE I=4: MATCH APPEASE I=5: MATCH APPEASE Root Root Root a e a e a e p s a p s a p s a p e s e s e s X 3 7 e 3 e 7 e 3 7 e 8 But we already knew this, because as 8is a part ease! If we take advantage of this, there will be no need to backtrack in the text, and the algorithm will run in O(n+m). The Aho-Corasick algorithm implements exactly this idea using a finite state automaton starting with the trie and adding shortcuts 8

21 SUFFIX TREES A trie that is built on every suffix of a text T (length m), and collapses all interior nodes that have a single child is called a suffix tree. A very powerful data structure, e.g. given a suffix tree and a pattern P (length n), all k occurrences of P in T can be found in time O(n +k), i.e. independently of the size of the text (but it figures into the construction cost of tree T) A suffix tree can be built in linear time O (m)

22 BUILDING A SUFFIX TREE Example bananas#. It is convenient to terminate the text with a special character, so that no suffix is a prefix of another suffix (e.g. as in banana). This guarantees that spelling any suffix from the root will end at a leaf. Construct the suffix tree in two phases from the longest to the shortest suffix: Phase 1: Spell as much of the suffix from the root as possible Phase 2: If stopped in the middle of an edge, break the edge and add a new branch spell the rest of the suffix along that branch. Label the leaf with the starting position of the suffix.

23 BANANAS# ANANAS# NANAS# ANAS# Root Root Root Root bananas# bananas# ananas# bananas# ananas# nanas# bananas# ana nanas# N1 3 nas# s# 2 4 NAS# AS# S# AND # Root Root Root bananas# a na bananas# a na s# # bananas# ana na 1 N3 N2 1 N3 N N1 N2 na s# nas# s# na s# nas# s# nas# s# nas# s# N N nas# s# nas# s#

24 SUFFIX TREE PROPERTIES Exactly m leaves for text of size m (counting the terminator) Each interior node has at least two children (except possibly the root); edges with the same parent spell substrings starting with different letters. bananas# a Root na s# # The size of the tree is O(m) 1 N3 N2 7 8 Can be constructed in O(m) time This uses the obser vation that during construction, not every suffix has to be spelled all the way from the root (which would lead to quadratic time); suffix links can short circuit the process 2 N1 nas# s# 4 na 6 s# 3 nas# s# 5 Is also memory efficient (about ~5m*sizeof(long) bytes for text without too much difficulty)

25 MATCHING PATTERNS USING SUFFIX TREES Consider the problem of finding pattern an in the text bananas# Root Two matches: positions 2 and 4 bananas# a na s# # Thread the pattern onto the tree 1 N3 N2 7 8 Completely spelled: report the index of every leaf below the point where spelling stopped. This is because the pattern is a prefix of every suffix spelled by traversing the rest of the subtree. a N1 n 6 s# 3 nas# s# 5 Incompletely spelled: no match 2 nas# s# 4 Runs in O(n+k) time, where n is the length of the pattern, and k is the number of matches.

26 FINDING LONGEST COMMON SUBSTRINGS USING SUFFIX TREES Given two texts: T and U find the longest continuous substring that is common to both texts N0 Can be done in O (len (T) + len (U)) time. $ %TCGA$ A CG G T Construct a suffix tree on T %U$ 10 5 $ N3 CGT%TCGA$ A$ N4 T%TCGA$ N5 A$ T%TCGA$ N6 %TCGA$ CGA$ Find the deepest internal node whose children refer to suffixes starting in T and in U E.g. T = ACGT, U = TCGA

27 SHORT READ MAPPING Next generation sequencing (NGS) technologies (454, Solexa, SOLiD) generate gigabases of short ( bp) reads per run A fundamental bioinformatics task in NGS analysis is to map all the reads to a reference genome: i.e. find all the coordinates in the known genome where a given read is located ATGGTCTAGGTCCTAGTGGTC Can take a LONG time to map 15,000,000 reads to a 3 gigabase genome!

28 BURROWS-WHEELER TRANSFORM BASED MAPPERS In 1994, Burrows and Wheeler described a lossless text transformation (block sorter), which makes the text easily compressible and is the algorithmic basis of BZIP2 Surprisingly, this transform is also very useful for finding all instances of a given (short) string in a large text, while using very little memory A number of NGS read mappers now use BWT transformed reference genomes to accelerate mapping by several orders of magnitude.

29 BWT Given an input text T=t[1]...t[N], we construct N left-shift rotations of the input text, sort them lexicographically, and map the input text to the last column of the sorted rotations: E.g. input ABRACA is mapped to CARAAB Note: sorted rotations make it very easy to find all instances of text in a string (also the idea behind suffix arrays) ROTATIONS SORTED A B R A C A B R A C A A R A C A A B A C A A B R C A A B R A A A B R A C A A B R A C A B R A C A A C A A B R B R A C A A C A A B R A R A C A A B

30 WHY BOTHER? The text output by BWT tends to contain runs of the same character and be easily compressible by arithmetic, run-length or Huffman coders, e.g. final char sorted rotations (L) a n to decompress. It achieves compression o n to perform only comparisons to a depth o n transformation} This section describes o n transformation} We use the example and o n treats the right-hand side as the most a n tree for each 16 kbyte input block, enc a n tree in the output stream, then encodes i n turn, set $L[i]$ to be the i n turn, set $R[i]$ to the o n unusual data. Like the algorithm of Man a n use a single set of probabilities table e n using the positions of the suffixes in i n value at a given point in the vector $R e n we present modifications that improve t e n when the block size is quite large. Ho i n which codes that have not been seen in i n with $ch$ appear in the {\em same order i n with $ch$. In our exam o n with Huffman or arithmetic coding. Bri o n with figures given by Bell \cite{bell}.

31 INVERSE BWT The beauty of BWT is that knowing only the output and the position of which sorted row contained the original string, the input can be reconstructed in no worse than O(N log (N)) time. Step 1: reconstruct the first column of rotations (F) from the last column (L). To do so, we simply sort the characters in L. Step 2: determine the mapping of predecessor characters and recover the input character by character from the last one PREDECESSOR CHARACTERS: RIGHT SHIFT MATRIX M (M ). ROTATIONS (M) A A B R A C A B R A C A A C A A B R B R A C A A C A A B R A R A C A A B SORTED STARTING WITH THE 2ND CHARACTER C A A B R A A A B R A C R A C A A B A B R A C A A C A A B R B R A C A A

32 M M A A B R A C A B R A C A A C A A B R B R AZC A A C A A B R A R A C A A B C A A B R A A A B R A C R A C A A B A B R A C A A C A A B R B R A C A A Both M and M contain every rotation of input text T, i.e. permutations of the same set of strings. For each row i in M, the last character (L[i]) is the cyclic predecessor of the first character (F[i]) in the original text We wish to define a transformation, Z(i), that maps the i-th row of M to the corresponding row in M (i.e. its cyclic predecessor), using the following observations M is sorted lexicographically, which implies that all rows of M beginning with the same character are also sorted lexicographically, for example rows 1,3,4 (all begin with A). The row of the i-th occurrence of character X in the last column of M corresponds to the row of the i-th occurrence of character X in the first column of M Z: [0,1,2,3,4,5] [4,0,5,1,2,3] F L L F PREDECESSOR

33 Z: [0,1,2,3,4,5] [4,0,5,1,2,3] In the original string T, the character that preceded the i-th character of the last column L (BWT output) is L[Z[i]] INPUT: T A B R A C A BWT (T) = L C A R A A B For example, for R (i=2), the predecessor in T is L[Z[2]] = L[5] = B For B (i=5), it is L[Z[5]] = L[3] = A If we know the position of the last character of T in L, we can unwind the input by repeated application of Z. Can use an inverse of Z to generate the input string forward

34 Software!""# $%&'()%* )+,%-. /0-1(),2"3,4551),63,78+9:-),;!< Open Access Ultrafast and memory-efficient alignment of short DNA sequences to the human genome =)& $ D%-FG)8' 7**8)55H,>)&+)8,I08,=909&I08(%+9:5,%&*,>0(@1+%+90&%-,=90-0'J3,4&5+9+1+),I08,7*E%&:)*,>0(@1+)8,D+1*9)53,K&9E)859+J,0I,A%8J-%&*3,>0--)'), C%8L3,AM,!"NO!3,KD7., Opportunistic Data Structures with Applications Uses BWT and opportunistic data structures (i.e. data structures working directly on compressed data) to build a compressed index of a genome Storage requirements for T=t[1]...t[N] are character bits/ Searching or k occurrences of a pattern (length m) can implemented in time O(m + k log N), > 0 Paolo Ferragina Giovanni Manzini its space occupan O(H k (T )) + o(1) for any fixed k). G

35 HASHING VS BWT AND OPPORTUNISTIC DATA STRUCTURES Table 1 Bowtie alignment performance versus SOAP and Maq Platform CPU time Wall clock time Reads mapped per hour (millions) Peak virtual memory footprint (megabytes) Bowtie speed-up Reads aligned (%) Bowtie -v 2 Server 15 m 7 s 15 m 41 s , SOAP 91 h 57 m 35 s 91 h 47 m 46 s , Bowtie PC 16 m 41 s 17 m 57 s , Maq 17 h 46 m 35 s 17 h 53 m 7 s Bowtie Server 17 m 58 s 18 m 26 s , Maq 32 h 56 m 53 s 32 h 58 m 39 s The performance and sensitivity of Bowtie v0.9.6, SOAP v1.10, and Maq v0.6.6 when aligning 8.84 M reads from the 1,000 Genome project (National

36 INEXACT PATTERN MATCHING Homologous biological sequences are unlikely to match exactly; evolution drives them apart with mutations for example. Exact algorithms (e.g. local alignments) are quadratic in time and are too slow for comparing/searching large genomic sequences. Pattern matching with errors is a fundamental problem in bioinformatics finding homologs in a database. Well-performing heuristics are frequently used.

37 EXAMPLE: LONGEST COMMON SUBSTRING (LCS) IN INFLUENZA A VIRUS (IAV) H5N1 HEMAGGLUTININ LENGTH OF LCS (N=957 FROM 2005+) PROPORTION OF SEQUENCES WITH LCS Suffix trees can be adapted to efficiently find LCS from a proportion of a set of sequences as well. The longest fully conserved nucleotide substring in viruses sampled in 2005 or later is merely 8 nucleotides long This poses significant challenges for even straightforward tasks, such as diagnostic probe design

38 K-DIFFERENCES MATCHING The k-mismatch problem: given a text T (length m), a pattern P (length n) and the maximum tolerable number of mismatches k, output all locations i in T where there are at most k differences between P and T[i:i+n-1] The k-differences problem: can also match characters to indels (cost 1) -- a generalization. Both can be easily solved in O(nm) time, by either brute force or dynamic programming Viskin and Landau (1985) propose an O(m+nk) time algorithm for the k-differences problem by combining dynamic programming with text and pattern preprocessing using suffix trees of T%P$.

39 QUERY MATCHING If the pattern is long (e.g. a new gene sequence), it may be beneficial to look for substrings of the pattern that approximately match the reference (e.g. all genes in GenBank).

40 QUERY MATCHING Approximately matching strings share some perfectly matching substrings (L-mers). Instead of searching for approximately matching strings (difficult, quadratic) search for perfectly matching substrings (easy, linear). Extend obtained perfect matches to obtain longer approximate matches that are locally optimal. This is the idea behind probably the most important bioinformatics tool: Basic Local Alignment Search Tool (Altschul, S., Gish, W., Miller, W., Myers, E. & Lipman, D.J.), 1990 Three primary questions: How to select L? How to extend the seed? How to confirm that the match is biologically relevant?

41 keyword Query: KRHRKVLRDNIQGITKPAIRRLARRGGVKRISGLIYEETRGVLKIFLENVIRD neighborhood score threshold (T = 13) extension GVK 18 GAK 16 GIK 16 GGK 14 GLK 13 GNK 12 GRK 11 GEK 11 GDK 11 Query: 22 VLRDNIQGITKPAIRRLARRGGVKRISGLIYEETRGVLK DN +G + IR L G+K I+ L+ E+ RG++K Sbjct: 226 IIKDNGRGFSGKQIRNLNYGIGLKVIADLV-EKHRGIIK 263 High-scoring Pair (HSP) Neighborhood words

42 SELECTING SEED SIZE L If strings X and Y (each length n), match with k<n mismatches, then the longest perfect match between them has at least ceil (n/(k+1)) characters. Easy to show by the following observation: if there are k+1 bins and k objects then at least one of the bins will be empty. Partition the strings into k+1 equal length substrings -- at least one of them will have no mismatches. In fact, if the longest perfect match is expected to be quite a bit longer (at least if the mismatches are randomly distributed), e.g. about 40 for n = 100, k = 5 (expected minimum is 17).

43 SELECTING SEED SIZE L Smaller L: easier to find, but decreased performance, and, importantly, specificity two random sequences are more likely to have a short common substring Larger L: could miss out many potential matches, leading to decreased sensitivity. By default BLAST uses L (w, word size) of 3 for protein sequences and 11 for nucleotide sequences. MEGABLAST (a faster version of BLAST for similar sequences) uses longer seeds.

44 HOW TO EXTEND THE MATCH? Gapped local alignment (blastn) Simple (gapless) extension (original BLAST) Greedy X-drop alignment (MEGABLAST)... A tradeoff between speed and accuracy

45 HOW TO SCORE MATCHES? Biological sequences are not random some letters are more frequent than others (e.g. in HIV-1 40% of the genome is A) some mismatches are more common than others in homologous sequences (e.g. due to selection, chemical properties of the residues etc), and should be weighed differently. A R N D C Q E G H I L K M F P S T W Y V A R N D C Q E G H I L K M F P S T W Y V BLAST introduces a weighting function on residues: δ (i,j) which assigns a score to a pair of residues. HIV-WITHIN For nucleotides it is 5 for i=j and -4 otherwise. For proteins it is based on a large training dataset of homologous sequences (Point Accepted Mutations matrices). PAM120 is roughly equivalent to substitutions accumulated over 120 million years of evolution in an average protein

46 HOW TO COMPUTE SIGNIFICANCE? Before a search is done we need to decide what a good cutoff value H for a match is. It is determined by computing the probability that two random sequences will have at least one match scoring H or greater. Uses Altschul-Dembo-Karlin statistics ( )

47 STATISTICS OF SCORES Given a segment pair H between two sequences, comprised of r- character substrings T 1 and T 2, we compute the score of the H as: s(h) = r i=1 We are interested in finding out how likely the maximal score for any segment pair of two random sequences is to exceed some threshold X Dembo and Karlin (1990) showed that δ(t 1 [i],t 2 [i]) The mean value for the maximum score between two segment pairs of two random sequences (lengths n and m), assuming a few things about δ (i,j)), is approximately M = log(nm)/λ SOLVES i,j p i q j exp(λδ(p i,q j )) =0

48 STATISTICS OF SCORES (CONT D) For biological sequences, high scoring real matches should greatly exceed the random expectation and the probability that this happens (x is the difference between the mean and the expectation) is Prob{S(H) >x+ mean} K exp( λ x) K and λ are expressions that depend on the scoring matrix and letter frequencies, and the distribution is similar to other extreme value distributions. One can show that the expected number of HSPs high scoring segment pairs, exceeding the threshold S is E = Kmne λs

49 Mean HSP Random Mutated Count Log(mn) Score

50 E-VALUES Because thresholds are determined by the algorithm internally, it is better to normalize the result as follows: S = λs log K log 2 BIT SCORE E = nm2 S E-VALUE POISSON DISTRIBUTION FOR THE NUMBER K OF HSPS WITH SCORES S PROBABILITY OF FINDING AT LEAST ONE: exp E E k /k! 1 exp E

51 TIMELINE 1970: Needleman-Wunsch global alignment algorithm 1981: Smith-Waterman local alignment algorithm 1985: FASTA 1990: BLAST (basic local alignment search tool) 2000s: BLAST has become too slow in genome vs. genome comparisons - new faster algorithms evolve! BLAT Pattern Hunter

52 BLAT VS. BLAST BLAT (BLAST-Like Alignment Tool): same idea as BLAST - locate short sequence hits and extend (developed by J Kent at UCSC) BLAT builds an index of the database and scans linearly through the query sequence, whereas BLAST builds an index of the query sequence and then scans linearly through the database Index is stored in RAM resulting in faster searches Longer K-mers and greedier extensions specifically designed for highly similar sequences (e.g > 95% nucleotide, >85% protein)

53 BLAT INDEXING Here is an example with k = 3: Genome: cacaattatcacgaccgc 3-mers (non-overlapping): cac aat tat cac gac cgc Index: aat 3 gac 12 cac 0,9 tat 6 cgc 15 cdna (query sequence): aattctcac 3-mers (overlapping): aat att ttc tct ctc tca cac Position of 3-mer in query, genome Hits: aat 4 cac 1,10 clump: cacaattatcacgaccgc Multiple instances map to single index!

Combinatorial Pattern Matching

Combinatorial Pattern Matching Combinatorial Pattern Matching Outline Hash Tables Repeat Finding Exact Pattern Matching Keyword Trees Suffix Trees Heuristic Similarity Search Algorithms Approximate String Matching Filtration Comparing

More information

Example of repeats: ATGGTCTAGGTCCTAGTGGTC Motivation to find them: Genomic rearrangements are often associated with repeats Trace evolutionary

Example of repeats: ATGGTCTAGGTCCTAGTGGTC Motivation to find them: Genomic rearrangements are often associated with repeats Trace evolutionary Outline Hash Tables Repeat Finding Exact Pattern Matching Keyword Trees Suffix Trees Heuristic Similarity Search Algorithms Approximate String Matching Filtration Comparing a Sequence Against a Database

More information

As of August 15, 2008, GenBank contained bases from reported sequences. The search procedure should be

As of August 15, 2008, GenBank contained bases from reported sequences. The search procedure should be 48 Bioinformatics I, WS 09-10, S. Henz (script by D. Huson) November 26, 2009 4 BLAST and BLAT Outline of the chapter: 1. Heuristics for the pairwise local alignment of two sequences 2. BLAST: search and

More information

Combinatorial Pattern Matching. CS 466 Saurabh Sinha

Combinatorial Pattern Matching. CS 466 Saurabh Sinha Combinatorial Pattern Matching CS 466 Saurabh Sinha Genomic Repeats Example of repeats: ATGGTCTAGGTCCTAGTGGTC Motivation to find them: Genomic rearrangements are often associated with repeats Trace evolutionary

More information

24 Grundlagen der Bioinformatik, SS 10, D. Huson, April 26, This lecture is based on the following papers, which are all recommended reading:

24 Grundlagen der Bioinformatik, SS 10, D. Huson, April 26, This lecture is based on the following papers, which are all recommended reading: 24 Grundlagen der Bioinformatik, SS 10, D. Huson, April 26, 2010 3 BLAST and FASTA This lecture is based on the following papers, which are all recommended reading: D.J. Lipman and W.R. Pearson, Rapid

More information

BLAST & Genome assembly

BLAST & Genome assembly BLAST & Genome assembly Solon P. Pissis Tomáš Flouri Heidelberg Institute for Theoretical Studies May 15, 2014 1 BLAST What is BLAST? The algorithm 2 Genome assembly De novo assembly Mapping assembly 3

More information

Combinatorial Pattern Matching

Combinatorial Pattern Matching Combinatorial Pattern Matching Outline Exact Pattern Matching Keyword Trees Suffix Trees Approximate String Matching Local alignment is to slow Quadratic local alignment is too slow while looking for similarities

More information

COS 551: Introduction to Computational Molecular Biology Lecture: Oct 17, 2000 Lecturer: Mona Singh Scribe: Jacob Brenner 1. Database Searching

COS 551: Introduction to Computational Molecular Biology Lecture: Oct 17, 2000 Lecturer: Mona Singh Scribe: Jacob Brenner 1. Database Searching COS 551: Introduction to Computational Molecular Biology Lecture: Oct 17, 2000 Lecturer: Mona Singh Scribe: Jacob Brenner 1 Database Searching In database search, we typically have a large sequence database

More information

BLAST: Basic Local Alignment Search Tool Altschul et al. J. Mol Bio CS 466 Saurabh Sinha

BLAST: Basic Local Alignment Search Tool Altschul et al. J. Mol Bio CS 466 Saurabh Sinha BLAST: Basic Local Alignment Search Tool Altschul et al. J. Mol Bio. 1990. CS 466 Saurabh Sinha Motivation Sequence homology to a known protein suggest function of newly sequenced protein Bioinformatics

More information

Computational Molecular Biology

Computational Molecular Biology Computational Molecular Biology Erwin M. Bakker Lecture 3, mainly from material by R. Shamir [2] and H.J. Hoogeboom [4]. 1 Pairwise Sequence Alignment Biological Motivation Algorithmic Aspect Recursive

More information

An Analysis of Pairwise Sequence Alignment Algorithm Complexities: Needleman-Wunsch, Smith-Waterman, FASTA, BLAST and Gapped BLAST

An Analysis of Pairwise Sequence Alignment Algorithm Complexities: Needleman-Wunsch, Smith-Waterman, FASTA, BLAST and Gapped BLAST An Analysis of Pairwise Sequence Alignment Algorithm Complexities: Needleman-Wunsch, Smith-Waterman, FASTA, BLAST and Gapped BLAST Alexander Chan 5075504 Biochemistry 218 Final Project An Analysis of Pairwise

More information

BLAST & Genome assembly

BLAST & Genome assembly BLAST & Genome assembly Solon P. Pissis Tomáš Flouri Heidelberg Institute for Theoretical Studies November 17, 2012 1 Introduction Introduction 2 BLAST What is BLAST? The algorithm 3 Genome assembly De

More information

String Matching. Pedro Ribeiro 2016/2017 DCC/FCUP. Pedro Ribeiro (DCC/FCUP) String Matching 2016/ / 42

String Matching. Pedro Ribeiro 2016/2017 DCC/FCUP. Pedro Ribeiro (DCC/FCUP) String Matching 2016/ / 42 String Matching Pedro Ribeiro DCC/FCUP 2016/2017 Pedro Ribeiro (DCC/FCUP) String Matching 2016/2017 1 / 42 On this lecture The String Matching Problem Naive Algorithm Deterministic Finite Automata Knuth-Morris-Pratt

More information

Alignment of Long Sequences

Alignment of Long Sequences Alignment of Long Sequences BMI/CS 776 www.biostat.wisc.edu/bmi776/ Spring 2009 Mark Craven craven@biostat.wisc.edu Pairwise Whole Genome Alignment: Task Definition Given a pair of genomes (or other large-scale

More information

NGS Data and Sequence Alignment

NGS Data and Sequence Alignment Applications and Servers SERVER/REMOTE Compute DB WEB Data files NGS Data and Sequence Alignment SSH WEB SCP Manpreet S. Katari App Aug 11, 2016 Service Terminal IGV Data files Window Personal Computer/Local

More information

EECS730: Introduction to Bioinformatics

EECS730: Introduction to Bioinformatics EECS730: Introduction to Bioinformatics Lecture 04: Variations of sequence alignments http://www.pitt.edu/~mcs2/teaching/biocomp/tutorials/global.html Slides adapted from Dr. Shaojie Zhang (University

More information

Algorithms in Bioinformatics: A Practical Introduction. Database Search

Algorithms in Bioinformatics: A Practical Introduction. Database Search Algorithms in Bioinformatics: A Practical Introduction Database Search Biological databases Biological data is double in size every 15 or 16 months Increasing in number of queries: 40,000 queries per day

More information

Short Read Alignment Algorithms

Short Read Alignment Algorithms Short Read Alignment Algorithms Raluca Gordân Department of Biostatistics and Bioinformatics Department of Computer Science Department of Molecular Genetics and Microbiology Center for Genomic and Computational

More information

Bioinformatics for Biologists

Bioinformatics for Biologists Bioinformatics for Biologists Sequence Analysis: Part I. Pairwise alignment and database searching Fran Lewitter, Ph.D. Director Bioinformatics & Research Computing Whitehead Institute Topics to Cover

More information

Applications of Suffix Tree

Applications of Suffix Tree Applications of Suffix Tree Let us have a glimpse of the numerous applications of suffix trees. Exact String Matching As already mentioned earlier, given the suffix tree of the text, all occ occurrences

More information

CISC 636 Computational Biology & Bioinformatics (Fall 2016)

CISC 636 Computational Biology & Bioinformatics (Fall 2016) CISC 636 Computational Biology & Bioinformatics (Fall 2016) Sequence pairwise alignment Score statistics: E-value and p-value Heuristic algorithms: BLAST and FASTA Database search: gene finding and annotations

More information

11/5/13 Comp 555 Fall

11/5/13 Comp 555 Fall 11/5/13 Comp 555 Fall 2013 1 Example of repeats: ATGGTCTAGGTCCTAGTGGTC Motivation to find them: Phenotypes arise from copy-number variations Genomic rearrangements are often associated with repeats Trace

More information

Lecture Overview. Sequence search & alignment. Searching sequence databases. Sequence Alignment & Search. Goals: Motivations:

Lecture Overview. Sequence search & alignment. Searching sequence databases. Sequence Alignment & Search. Goals: Motivations: Lecture Overview Sequence Alignment & Search Karin Verspoor, Ph.D. Faculty, Computational Bioscience Program University of Colorado School of Medicine With credit and thanks to Larry Hunter for creating

More information

Sequence Alignment & Search

Sequence Alignment & Search Sequence Alignment & Search Karin Verspoor, Ph.D. Faculty, Computational Bioscience Program University of Colorado School of Medicine With credit and thanks to Larry Hunter for creating the first version

More information

TCCAGGTG-GAT TGCAAGTGCG-T. Local Sequence Alignment & Heuristic Local Aligners. Review: Probabilistic Interpretation. Chance or true homology?

TCCAGGTG-GAT TGCAAGTGCG-T. Local Sequence Alignment & Heuristic Local Aligners. Review: Probabilistic Interpretation. Chance or true homology? Local Sequence Alignment & Heuristic Local Aligners Lectures 18 Nov 28, 2011 CSE 527 Computational Biology, Fall 2011 Instructor: Su-In Lee TA: Christopher Miles Monday & Wednesday 12:00-1:20 Johnson Hall

More information

Introduction to Computational Molecular Biology

Introduction to Computational Molecular Biology 18.417 Introduction to Computational Molecular Biology Lecture 13: October 21, 2004 Scribe: Eitan Reich Lecturer: Ross Lippert Editor: Peter Lee 13.1 Introduction We have been looking at algorithms to

More information

Biology 644: Bioinformatics

Biology 644: Bioinformatics Find the best alignment between 2 sequences with lengths n and m, respectively Best alignment is very dependent upon the substitution matrix and gap penalties The Global Alignment Problem tries to find

More information

Chapter 7. Space and Time Tradeoffs. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

Chapter 7. Space and Time Tradeoffs. Copyright 2007 Pearson Addison-Wesley. All rights reserved. Chapter 7 Space and Time Tradeoffs Copyright 2007 Pearson Addison-Wesley. All rights reserved. Space-for-time tradeoffs Two varieties of space-for-time algorithms: input enhancement preprocess the input

More information

BLAST, Profile, and PSI-BLAST

BLAST, Profile, and PSI-BLAST BLAST, Profile, and PSI-BLAST Jianlin Cheng, PhD School of Electrical Engineering and Computer Science University of Central Florida 26 Free for academic use Copyright @ Jianlin Cheng & original sources

More information

Suffix links are stored for compact trie nodes only, but we can define and compute them for any position represented by a pair (u, d):

Suffix links are stored for compact trie nodes only, but we can define and compute them for any position represented by a pair (u, d): Suffix links are the same as Aho Corasick failure links but Lemma 4.4 ensures that depth(slink(u)) = depth(u) 1. This is not the case for an arbitrary trie or a compact trie. Suffix links are stored for

More information

Mapping Reads to Reference Genome

Mapping Reads to Reference Genome Mapping Reads to Reference Genome DNA carries genetic information DNA is a double helix of two complementary strands formed by four nucleotides (bases): Adenine, Cytosine, Guanine and Thymine 2 of 31 Gene

More information

11/5/09 Comp 590/Comp Fall

11/5/09 Comp 590/Comp Fall 11/5/09 Comp 590/Comp 790-90 Fall 2009 1 Example of repeats: ATGGTCTAGGTCCTAGTGGTC Motivation to find them: Genomic rearrangements are often associated with repeats Trace evolutionary secrets Many tumors

More information

BLAST - Basic Local Alignment Search Tool

BLAST - Basic Local Alignment Search Tool Lecture for ic Bioinformatics (DD2450) April 11, 2013 Searching 1. Input: Query Sequence 2. Database of sequences 3. Subject Sequence(s) 4. Output: High Segment Pairs (HSPs) Sequence Similarity Measures:

More information

Indexing and Searching

Indexing and Searching Indexing and Searching Introduction How to retrieval information? A simple alternative is to search the whole text sequentially Another option is to build data structures over the text (called indices)

More information

L4: Blast: Alignment Scores etc.

L4: Blast: Alignment Scores etc. L4: Blast: Alignment Scores etc. Why is Blast Fast? Silly Question Prove or Disprove: There are two people in New York City with exactly the same number of hairs. Large database search Database (n) Query

More information

From Smith-Waterman to BLAST

From Smith-Waterman to BLAST From Smith-Waterman to BLAST Jeremy Buhler July 23, 2015 Smith-Waterman is the fundamental tool that we use to decide how similar two sequences are. Isn t that all that BLAST does? In principle, it is

More information

Database Searching Using BLAST

Database Searching Using BLAST Mahidol University Objectives SCMI512 Molecular Sequence Analysis Database Searching Using BLAST Lecture 2B After class, students should be able to: explain the FASTA algorithm for database searching explain

More information

Scoring and heuristic methods for sequence alignment CG 17

Scoring and heuristic methods for sequence alignment CG 17 Scoring and heuristic methods for sequence alignment CG 17 Amino Acid Substitution Matrices Used to score alignments. Reflect evolution of sequences. Unitary Matrix: M ij = 1 i=j { 0 o/w Genetic Code Matrix:

More information

Lecture 5: Suffix Trees

Lecture 5: Suffix Trees Longest Common Substring Problem Lecture 5: Suffix Trees Given a text T = GGAGCTTAGAACT and a string P = ATTCGCTTAGCCTA, how do we find the longest common substring between them? Here the longest common

More information

17 dicembre Luca Bortolussi SUFFIX TREES. From exact to approximate string matching.

17 dicembre Luca Bortolussi SUFFIX TREES. From exact to approximate string matching. 17 dicembre 2003 Luca Bortolussi SUFFIX TREES From exact to approximate string matching. An introduction to string matching String matching is an important branch of algorithmica, and it has applications

More information

6.047 / Computational Biology: Genomes, Networks, Evolution Fall 2008

6.047 / Computational Biology: Genomes, Networks, Evolution Fall 2008 MIT OpenCourseWare http://ocw.mit.edu 6.047 / 6.878 Computational Biology: Genomes, Networks, Evolution Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

More information

CSED233: Data Structures (2017F) Lecture12: Strings and Dynamic Programming

CSED233: Data Structures (2017F) Lecture12: Strings and Dynamic Programming (2017F) Lecture12: Strings and Dynamic Programming Daijin Kim CSE, POSTECH dkim@postech.ac.kr Strings A string is a sequence of characters Examples of strings: Python program HTML document DNA sequence

More information

CMSC423: Bioinformatic Algorithms, Databases and Tools. Exact string matching: Suffix trees Suffix arrays

CMSC423: Bioinformatic Algorithms, Databases and Tools. Exact string matching: Suffix trees Suffix arrays CMSC423: Bioinformatic Algorithms, Databases and Tools Exact string matching: Suffix trees Suffix arrays Searching multiple strings Can we search multiple strings at the same time? Would it help if we

More information

Computational Molecular Biology

Computational Molecular Biology Computational Molecular Biology Erwin M. Bakker Lecture 2 Materials used from R. Shamir [2] and H.J. Hoogeboom [4]. 1 Molecular Biology Sequences DNA A, T, C, G RNA A, U, C, G Protein A, R, D, N, C E,

More information

Study of Data Localities in Suffix-Tree Based Genetic Algorithms

Study of Data Localities in Suffix-Tree Based Genetic Algorithms Study of Data Localities in Suffix-Tree Based Genetic Algorithms Carl I. Bergenhem, Michael T. Smith Abstract. This paper focuses on the study of cache localities of two genetic algorithms based on the

More information

FINDING APPROXIMATE REPEATS WITH MULTIPLE SPACED SEEDS

FINDING APPROXIMATE REPEATS WITH MULTIPLE SPACED SEEDS FINDING APPROXIMATE REPEATS WITH MULTIPLE SPACED SEEDS FINDING APPROXIMATE REPEATS IN DNA SEQUENCES USING MULTIPLE SPACED SEEDS By SARAH BANYASSADY, B.S. A Thesis Submitted to the School of Graduate Studies

More information

Basic Local Alignment Search Tool (BLAST)

Basic Local Alignment Search Tool (BLAST) BLAST 26.04.2018 Basic Local Alignment Search Tool (BLAST) BLAST (Altshul-1990) is an heuristic Pairwise Alignment composed by six-steps that search for local similarities. The most used access point to

More information

Algorithms and Data Structures

Algorithms and Data Structures Algorithms and Data Structures Charles A. Wuethrich Bauhaus-University Weimar - CogVis/MMC May 11, 2017 Algorithms and Data Structures String searching algorithm 1/29 String searching algorithm Introduction

More information

Lecture 7 February 26, 2010

Lecture 7 February 26, 2010 6.85: Advanced Data Structures Spring Prof. Andre Schulz Lecture 7 February 6, Scribe: Mark Chen Overview In this lecture, we consider the string matching problem - finding all places in a text where some

More information

Heuristic methods for pairwise alignment:

Heuristic methods for pairwise alignment: Bi03c_1 Unit 03c: Heuristic methods for pairwise alignment: k-tuple-methods k-tuple-methods for alignment of pairs of sequences Bi03c_2 dynamic programming is too slow for large databases Use heuristic

More information

Suffix trees and applications. String Algorithms

Suffix trees and applications. String Algorithms Suffix trees and applications String Algorithms Tries a trie is a data structure for storing and retrieval of strings. Tries a trie is a data structure for storing and retrieval of strings. x 1 = a b x

More information

splitmem: graphical pan-genome analysis with suffix skips Shoshana Marcus May 7, 2014

splitmem: graphical pan-genome analysis with suffix skips Shoshana Marcus May 7, 2014 splitmem: graphical pan-genome analysis with suffix skips Shoshana Marcus May 7, 2014 Outline 1 Overview 2 Data Structures 3 splitmem Algorithm 4 Pan-genome Analysis Objective Input! Output! A B C D Several

More information

Dynamic Programming: Sequence alignment. CS 466 Saurabh Sinha

Dynamic Programming: Sequence alignment. CS 466 Saurabh Sinha Dynamic Programming: Sequence alignment CS 466 Saurabh Sinha DNA Sequence Comparison: First Success Story Finding sequence similarities with genes of known function is a common approach to infer a newly

More information

Lectures by Volker Heun, Daniel Huson and Knut Reinert, in particular last years lectures

Lectures by Volker Heun, Daniel Huson and Knut Reinert, in particular last years lectures 4 FastA and the chaining problem We will discuss: Heuristics used by the FastA program for sequence alignment Chaining problem 4.1 Sources for this lecture Lectures by Volker Heun, Daniel Huson and Knut

More information

Data structures for string pattern matching: Suffix trees

Data structures for string pattern matching: Suffix trees Suffix trees Data structures for string pattern matching: Suffix trees Linear algorithms for exact string matching KMP Z-value algorithm What is suffix tree? A tree-like data structure for solving problems

More information

Short Read Alignment. Mapping Reads to a Reference

Short Read Alignment. Mapping Reads to a Reference Short Read Alignment Mapping Reads to a Reference Brandi Cantarel, Ph.D. & Daehwan Kim, Ph.D. BICF 05/2018 Introduction to Mapping Short Read Aligners DNA vs RNA Alignment Quality Pitfalls and Improvements

More information

Suffix Array Construction

Suffix Array Construction Suffix Array Construction Suffix array construction means simply sorting the set of all suffixes. Using standard sorting or string sorting the time complexity is Ω(DP (T [0..n] )). Another possibility

More information

FastA & the chaining problem

FastA & the chaining problem FastA & the chaining problem We will discuss: Heuristics used by the FastA program for sequence alignment Chaining problem 1 Sources for this lecture: Lectures by Volker Heun, Daniel Huson and Knut Reinert,

More information

Compares a sequence of protein to another sequence or database of a protein, or a sequence of DNA to another sequence or library of DNA.

Compares a sequence of protein to another sequence or database of a protein, or a sequence of DNA to another sequence or library of DNA. Compares a sequence of protein to another sequence or database of a protein, or a sequence of DNA to another sequence or library of DNA. Fasta is used to compare a protein or DNA sequence to all of the

More information

Reconstructing long sequences from overlapping sequence fragment. Searching databases for related sequences and subsequences

Reconstructing long sequences from overlapping sequence fragment. Searching databases for related sequences and subsequences SEQUENCE ALIGNMENT ALGORITHMS 1 Why compare sequences? Reconstructing long sequences from overlapping sequence fragment Searching databases for related sequences and subsequences Storing, retrieving and

More information

GSNAP: Fast and SNP-tolerant detection of complex variants and splicing in short reads by Thomas D. Wu and Serban Nacu

GSNAP: Fast and SNP-tolerant detection of complex variants and splicing in short reads by Thomas D. Wu and Serban Nacu GSNAP: Fast and SNP-tolerant detection of complex variants and splicing in short reads by Thomas D. Wu and Serban Nacu Matt Huska Freie Universität Berlin Computational Methods for High-Throughput Omics

More information

Project Proposal. ECE 526 Spring Modified Data Structure of Aho-Corasick. Benfano Soewito, Ed Flanigan and John Pangrazio

Project Proposal. ECE 526 Spring Modified Data Structure of Aho-Corasick. Benfano Soewito, Ed Flanigan and John Pangrazio Project Proposal ECE 526 Spring 2006 Modified Data Structure of Aho-Corasick Benfano Soewito, Ed Flanigan and John Pangrazio 1. Introduction The internet becomes the most important tool in this decade

More information

Bioinformatics explained: BLAST. March 8, 2007

Bioinformatics explained: BLAST. March 8, 2007 Bioinformatics Explained Bioinformatics explained: BLAST March 8, 2007 CLC bio Gustav Wieds Vej 10 8000 Aarhus C Denmark Telephone: +45 70 22 55 09 Fax: +45 70 22 55 19 www.clcbio.com info@clcbio.com Bioinformatics

More information

FASTA. Besides that, FASTA package provides SSEARCH, an implementation of the optimal Smith- Waterman algorithm.

FASTA. Besides that, FASTA package provides SSEARCH, an implementation of the optimal Smith- Waterman algorithm. FASTA INTRODUCTION Definition (by David J. Lipman and William R. Pearson in 1985) - Compares a sequence of protein to another sequence or database of a protein, or a sequence of DNA to another sequence

More information

Dynamic Programming Part I: Examples. Bioinfo I (Institut Pasteur de Montevideo) Dynamic Programming -class4- July 25th, / 77

Dynamic Programming Part I: Examples. Bioinfo I (Institut Pasteur de Montevideo) Dynamic Programming -class4- July 25th, / 77 Dynamic Programming Part I: Examples Bioinfo I (Institut Pasteur de Montevideo) Dynamic Programming -class4- July 25th, 2011 1 / 77 Dynamic Programming Recall: the Change Problem Other problems: Manhattan

More information

Computational Genomics and Molecular Biology, Fall

Computational Genomics and Molecular Biology, Fall Computational Genomics and Molecular Biology, Fall 2015 1 Sequence Alignment Dannie Durand Pairwise Sequence Alignment The goal of pairwise sequence alignment is to establish a correspondence between the

More information

Sequence alignment theory and applications Session 3: BLAST algorithm

Sequence alignment theory and applications Session 3: BLAST algorithm Sequence alignment theory and applications Session 3: BLAST algorithm Introduction to Bioinformatics online course : IBT Sonal Henson Learning Objectives Understand the principles of the BLAST algorithm

More information

FastA and the chaining problem, Gunnar Klau, December 1, 2005, 10:

FastA and the chaining problem, Gunnar Klau, December 1, 2005, 10: FastA and the chaining problem, Gunnar Klau, December 1, 2005, 10:56 4001 4 FastA and the chaining problem We will discuss: Heuristics used by the FastA program for sequence alignment Chaining problem

More information

LCP Array Construction

LCP Array Construction LCP Array Construction The LCP array is easy to compute in linear time using the suffix array SA and its inverse SA 1. The idea is to compute the lcp values by comparing the suffixes, but skip a prefix

More information

4. Suffix Trees and Arrays

4. Suffix Trees and Arrays 4. Suffix Trees and Arrays Let T = T [0..n) be the text. For i [0..n], let T i denote the suffix T [i..n). Furthermore, for any subset C [0..n], we write T C = {T i i C}. In particular, T [0..n] is the

More information

String Patterns and Algorithms on Strings

String Patterns and Algorithms on Strings String Patterns and Algorithms on Strings Lecture delivered by: Venkatanatha Sarma Y Assistant Professor MSRSAS-Bangalore 11 Objectives To introduce the pattern matching problem and the important of algorithms

More information

EECS 4425: Introductory Computational Bioinformatics Fall Suprakash Datta

EECS 4425: Introductory Computational Bioinformatics Fall Suprakash Datta EECS 4425: Introductory Computational Bioinformatics Fall 2018 Suprakash Datta datta [at] cse.yorku.ca Office: CSEB 3043 Phone: 416-736-2100 ext 77875 Course page: http://www.cse.yorku.ca/course/4425 Many

More information

New Implementation for the Multi-sequence All-Against-All Substring Matching Problem

New Implementation for the Multi-sequence All-Against-All Substring Matching Problem New Implementation for the Multi-sequence All-Against-All Substring Matching Problem Oana Sandu Supervised by Ulrike Stege In collaboration with Chris Upton, Alex Thomo, and Marina Barsky University of

More information

Bioinformatics. Sequence alignment BLAST Significance. Next time Protein Structure

Bioinformatics. Sequence alignment BLAST Significance. Next time Protein Structure Bioinformatics Sequence alignment BLAST Significance Next time Protein Structure 1 Experimental origins of sequence data The Sanger dideoxynucleotide method F Each color is one lane of an electrophoresis

More information

CS 284A: Algorithms for Computational Biology Notes on Lecture: BLAST. The statistics of alignment scores.

CS 284A: Algorithms for Computational Biology Notes on Lecture: BLAST. The statistics of alignment scores. CS 284A: Algorithms for Computational Biology Notes on Lecture: BLAST. The statistics of alignment scores. prepared by Oleksii Kuchaiev, based on presentation by Xiaohui Xie on February 20th. 1 Introduction

More information

Index-assisted approximate matching

Index-assisted approximate matching Index-assisted approximate matching Ben Langmead Department of Computer Science You are free to use these slides. If you do, please sign the guestbook (www.langmead-lab.org/teaching-materials), or email

More information

Exact String Matching. The Knuth-Morris-Pratt Algorithm

Exact String Matching. The Knuth-Morris-Pratt Algorithm Exact String Matching The Knuth-Morris-Pratt Algorithm Outline for Today The Exact Matching Problem A simple algorithm Motivation for better algorithms The Knuth-Morris-Pratt algorithm The Exact Matching

More information

Highly Scalable and Accurate Seeds for Subsequence Alignment

Highly Scalable and Accurate Seeds for Subsequence Alignment Highly Scalable and Accurate Seeds for Subsequence Alignment Abhijit Pol Tamer Kahveci Department of Computer and Information Science and Engineering, University of Florida, Gainesville, FL, USA, 32611

More information

Accurate Long-Read Alignment using Similarity Based Multiple Pattern Alignment and Prefix Tree Indexing

Accurate Long-Read Alignment using Similarity Based Multiple Pattern Alignment and Prefix Tree Indexing Proposal for diploma thesis Accurate Long-Read Alignment using Similarity Based Multiple Pattern Alignment and Prefix Tree Indexing Astrid Rheinländer 01-09-2010 Supervisor: Prof. Dr. Ulf Leser Motivation

More information

USING AN EXTENDED SUFFIX TREE TO SPEED-UP SEQUENCE ALIGNMENT

USING AN EXTENDED SUFFIX TREE TO SPEED-UP SEQUENCE ALIGNMENT IADIS International Conference Applied Computing 2006 USING AN EXTENDED SUFFIX TREE TO SPEED-UP SEQUENCE ALIGNMENT Divya R. Singh Software Engineer Microsoft Corporation, Redmond, WA 98052, USA Abdullah

More information

OPEN MP-BASED PARALLEL AND SCALABLE GENETIC SEQUENCE ALIGNMENT

OPEN MP-BASED PARALLEL AND SCALABLE GENETIC SEQUENCE ALIGNMENT OPEN MP-BASED PARALLEL AND SCALABLE GENETIC SEQUENCE ALIGNMENT Asif Ali Khan*, Laiq Hassan*, Salim Ullah* ABSTRACT: In bioinformatics, sequence alignment is a common and insistent task. Biologists align

More information

Proceedings of the 11 th International Conference for Informatics and Information Technology

Proceedings of the 11 th International Conference for Informatics and Information Technology Proceedings of the 11 th International Conference for Informatics and Information Technology Held at Hotel Molika, Bitola, Macedonia 11-13th April, 2014 Editors: Vangel V. Ajanovski Gjorgji Madjarov ISBN

More information

Divya R. Singh. Faster Sequence Alignment using Suffix Tree and Data-Mining Techniques. February A Thesis Presented by

Divya R. Singh. Faster Sequence Alignment using Suffix Tree and Data-Mining Techniques. February A Thesis Presented by Faster Sequence Alignment using Suffix Tree and Data-Mining Techniques A Thesis Presented by Divya R. Singh to The Faculty of the Graduate College of the University of Vermont In Partial Fulfillment of

More information

4. Suffix Trees and Arrays

4. Suffix Trees and Arrays 4. Suffix Trees and Arrays Let T = T [0..n) be the text. For i [0..n], let T i denote the suffix T [i..n). Furthermore, for any subset C [0..n], we write T C = {T i i C}. In particular, T [0..n] is the

More information

Global Alignment Scoring Matrices Local Alignment Alignment with Affine Gap Penalties

Global Alignment Scoring Matrices Local Alignment Alignment with Affine Gap Penalties Global Alignment Scoring Matrices Local Alignment Alignment with Affine Gap Penalties From LCS to Alignment: Change the Scoring The Longest Common Subsequence (LCS) problem the simplest form of sequence

More information

An introduction to suffix trees and indexing

An introduction to suffix trees and indexing An introduction to suffix trees and indexing Tomáš Flouri Solon P. Pissis Heidelberg Institute for Theoretical Studies December 3, 2012 1 Introduction Introduction 2 Basic Definitions Graph theory Alphabet

More information

Wilson Leung 01/03/2018 An Introduction to NCBI BLAST. Prerequisites: Detecting and Interpreting Genetic Homology: Lecture Notes on Alignment

Wilson Leung 01/03/2018 An Introduction to NCBI BLAST. Prerequisites: Detecting and Interpreting Genetic Homology: Lecture Notes on Alignment An Introduction to NCBI BLAST Prerequisites: Detecting and Interpreting Genetic Homology: Lecture Notes on Alignment Resources: The BLAST web server is available at https://blast.ncbi.nlm.nih.gov/blast.cgi

More information

12 Algorithms in Bioinformatics I, WS 06, ZBIT, D. Huson, October 18, 2006

12 Algorithms in Bioinformatics I, WS 06, ZBIT, D. Huson, October 18, 2006 12 Algorithms in Bioinformatics I, WS 06, ZBIT, D. Huson, October 18, 2006 3 Sequence comparison by compression This chapter is based on the following articles, which are all recommended reading: X. Chen,

More information

Read Mapping. Slides by Carl Kingsford

Read Mapping. Slides by Carl Kingsford Read Mapping Slides by Carl Kingsford Bowtie Ultrafast and memory-efficient alignment of short DNA sequences to the human genome Ben Langmead, Cole Trapnell, Mihai Pop and Steven L Salzberg, Genome Biology

More information

University of Waterloo CS240 Spring 2018 Help Session Problems

University of Waterloo CS240 Spring 2018 Help Session Problems University of Waterloo CS240 Spring 2018 Help Session Problems Reminder: Final on Wednesday, August 1 2018 Note: This is a sample of problems designed to help prepare for the final exam. These problems

More information

Long Read RNA-seq Mapper

Long Read RNA-seq Mapper UNIVERSITY OF ZAGREB FACULTY OF ELECTRICAL ENGENEERING AND COMPUTING MASTER THESIS no. 1005 Long Read RNA-seq Mapper Josip Marić Zagreb, February 2015. Table of Contents 1. Introduction... 1 2. RNA Sequencing...

More information

Lecture 3: February Local Alignment: The Smith-Waterman Algorithm

Lecture 3: February Local Alignment: The Smith-Waterman Algorithm CSCI1820: Sequence Alignment Spring 2017 Lecture 3: February 7 Lecturer: Sorin Istrail Scribe: Pranavan Chanthrakumar Note: LaTeX template courtesy of UC Berkeley EECS dept. Notes are also adapted from

More information

Lecture 12: January 6, Algorithms for Next Generation Sequencing Data

Lecture 12: January 6, Algorithms for Next Generation Sequencing Data Computational Genomics Fall Semester, 2010 Lecture 12: January 6, 2011 Lecturer: Ron Shamir Scribe: Anat Gluzman and Eran Mick 12.1 Algorithms for Next Generation Sequencing Data 12.1.1 Introduction Ever

More information

Burrows Wheeler Transform

Burrows Wheeler Transform Burrows Wheeler Transform The Burrows Wheeler transform (BWT) is an important technique for text compression, text indexing, and their combination compressed text indexing. Let T [0..n] be the text with

More information

Next Generation Sequencing

Next Generation Sequencing Next Generation Sequencing Based on Lecture Notes by R. Shamir [7] E.M. Bakker 1 Overview Introduction Next Generation Technologies The Mapping Problem The MAQ Algorithm The Bowtie Algorithm Burrows-Wheeler

More information

.. Fall 2011 CSC 570: Bioinformatics Alexander Dekhtyar..

.. Fall 2011 CSC 570: Bioinformatics Alexander Dekhtyar.. .. Fall 2011 CSC 570: Bioinformatics Alexander Dekhtyar.. PAM and BLOSUM Matrices Prepared by: Jason Banich and Chris Hoover Background As DNA sequences change and evolve, certain amino acids are more

More information

SlopMap: a software application tool for quick and flexible identification of similar sequences using exact k-mer matching

SlopMap: a software application tool for quick and flexible identification of similar sequences using exact k-mer matching SlopMap: a software application tool for quick and flexible identification of similar sequences using exact k-mer matching Ilya Y. Zhbannikov 1, Samuel S. Hunter 1,2, Matthew L. Settles 1,2, and James

More information

BLAST MCDB 187. Friday, February 8, 13

BLAST MCDB 187. Friday, February 8, 13 BLAST MCDB 187 BLAST Basic Local Alignment Sequence Tool Uses shortcut to compute alignments of a sequence against a database very quickly Typically takes about a minute to align a sequence against a database

More information

B L A S T! BLAST: Basic local alignment search tool. Copyright notice. February 6, Pairwise alignment: key points. Outline of tonight s lecture

B L A S T! BLAST: Basic local alignment search tool. Copyright notice. February 6, Pairwise alignment: key points. Outline of tonight s lecture February 6, 2008 BLAST: Basic local alignment search tool B L A S T! Jonathan Pevsner, Ph.D. Introduction to Bioinformatics pevsner@jhmi.edu 4.633.0 Copyright notice Many of the images in this powerpoint

More information

ICB Fall G4120: Introduction to Computational Biology. Oliver Jovanovic, Ph.D. Columbia University Department of Microbiology

ICB Fall G4120: Introduction to Computational Biology. Oliver Jovanovic, Ph.D. Columbia University Department of Microbiology ICB Fall 2008 G4120: Computational Biology Oliver Jovanovic, Ph.D. Columbia University Department of Microbiology Copyright 2008 Oliver Jovanovic, All Rights Reserved. The Digital Language of Computers

More information