280 likes | 459 Views
Practical multiple sequence algorithms. Sushmita Roy BMI/CS 576 www.biostat.wisc.edu/bmi576/ Sushmita Roy sroy@biostat.wisc.edu Sep 23rd, 2014. RECAP. Scores for multiple sequence alignment Sum of pairs Minimum entropy based
E N D
Practical multiple sequence algorithms Sushmita Roy BMI/CS 576 www.biostat.wisc.edu/bmi576/ Sushmita Roy sroy@biostat.wisc.edu Sep 23rd, 2014
RECAP • Scores for multiple sequence alignment • Sum of pairs • Minimum entropy based • Heuristic algorithms for performing multiple sequence alignment • Progressive • Star alignment • Guide tree-based • ClustalW • Iterative • MUSCLE
Goals for today • General description of iterative algorithms • A practical implementation • MUSCLE
Iterative algorithms for multiple sequence alignment • Key idea: revisit the alignments • Algorithms vary depending upon how exactly the alignments are changing between iterations
Simple iterative algorithm (Also called the Barton-Sternberg alignment algorithm) • Align two sequences with highest alignment score using standard dynamic programming techniques for pairwise alignment • Repeat until all sequences are in the alignment • Find the sequence most similar to current alignment • Add to alignment. • For all sequences xi, • Remove xi from alignment, re-align to the partial alignment of {x1...xn}\xi. • Repeat 3 until the score does not improve OR we have executed a fixed number of steps
MUSCLE: Multiple Sequence Comparison by log-expectation • Progressive + iterative • Has three main stages • Stage1: Draft Progressive • Stage 2: Improved Progressive • Stage 3: Refinement: • Select pairs of subtrees and re-align the alignment for the subtrees. • Keep if it improves alignment • Each stage returns an alignment • Could be terminated anywhere
Steps in MUSCLE Stage 1: Draft progressive Stage 2: Improved progressive Stage 3: Refinement
MUSCLE Stage 1 1.1 Compute k-mer distance matrix 1.2 Use UPGMA to make tree (TREE1) (We will see this in a bit) 1.3. Use guide tree to make first MSA
K-mer distance D • K-mer distance is defined from common fractional k-mer count (F) • For two sequences x and y • D=1-F
Stage 2: Improved progressive 2.1 Recompute similarity of sequences of pairs using mutual alignment in MSA 2.2 Construct a phylogenetic tree (TREE2) using an alignment-based distance 2.3 Build a new progressive alignment only for subtrees where branching order has changed between TREE1 and TREE2 2.4 Repeat 2.3 until number of “reordered nodes” does not decrease.
Stage 2.1. Recomputing pairwise sequence similarity from a multiple alignment Derived pairwise alignment Fraction identity TGTTAAC TGT-AAC 6/7 An MSA Exclude gaps in both sequences -TGTTAAC -TGT-AAC -TGT--AC ATGT---C ATGT-GGC TGTTAAC TGT--AC 5/7 -TGTTAAC ATGT---C 4/8 -TGTTAAC ATGT-GGC 4/8 … …
Stage 2.2: Phylogenetic tree creation Construct a phylogenetic tree using a Kimura distance D: fractional identity of sequences
Stage 2.3 Re-align only when branching order is changed Recompute alignment for these nodes Branching order same Branching order different: x branches before v
Stage 3: Iterative Refinement 3.1 Delete an edge 3.2 Extract profiles from subtrees 3.3 Re-align profiles 3.4 Update MSA if its score is better than current MSA
3.1 Selecting a branch • Select a branch in order of decreasing distance from the root 1 MQTIF MQTIF LH-IW 5 2 LHIW MQTIF LH-IW LQS-WL-S-W LQSW 6 3 LQSW L-SW 4 LSF Branch selection order: 1,2,3,4,5,6
3.2 Extracting a profile 1 LHIW Re-align profiles for subtrees MQTIF MQTIF LH-IW 5 2 LHI-W MQTIF LQS-WL-S-W LHIW MQTIF LH-IW LQS-WL-S-W MQTIF LQS-WL-S-W Delete branch 2 LQSW 6 3 Is score better? LQSW L-SW 4 yes LSF Keep new alignment Discard
Summary of MUSCLE • Three stage algorithm • Stage 1: Draft progressive • k-mer distance • UPGMA tree (TREE1) • Guide tree based alignment (MSA1) • Stage 2: Improved progressive • Distance derived from MSA1 • UPGMA tree (TREE2) • Redo alignment for nodes with changed orderings • Repeat until number of re-ordered nodes does not change • Stage 3: Iterative refinement • Generate subtree profiles • Realign profiles • Keep realignment if of higher score • Repeat until no more improvement or fixed number of steps. • MUSCLE-fast: Stage 1 • MUSCLE-p: Stage1 and 2 Note different convergence criteria in Stages 2 and 3
Accuracy scores of different MSA algorithms on benchmark datasets Accuracy measures the fraction of residues correctly aligned with the reference alignment Edgar, 2004, BMC Bioinformatics
Summary of algorithms • ClustalW • Lots of heuristics for gaps • One guide tree and then alignment • Weights sequences • Dynamically selects scoring matrix depending upon sequence identity • MUSCLE • Three-stage algorithm: Draft, Improved, Iterative refinement • Two guide trees • Uses k-mer distance for first tree • Selectively re-aligns using second tree • Refines iteratively by working on subtree-associated alignments • Fast and has as good or better quality alignments
How do MUSCLE and CLUSTALW work in practice • Consider coding sequences of 15 yeast species • Consider promoter sequences of 15 yeast species • Align with MUSCLE and CLUSTALW
Protein sequence alignment MUSCLE CLUSTALW
Promoter sequence alignment MUSCLE CLUSTALW
Comparing alignment of promoters to shuffled sequences in CLUSTALW Original sequences Shuffled sequences
Comparing alignment of promoters to shuffled sequences in MUSCLE Original sequences Shuffled sequences
Conclusion • Algorithms seemed similar for protein/coding sequences • Algorithms gave different alignments for DNA sequence • Possibly DNA sequence is harder to align • DNA sequence in non-coding regions are even harder to align
Summary of sequence alignment • Pairwise alignment • Algorithms • Global: (Needleman-Wunsch) • Local: (Smith-Waterman) • Heuristic search to align large number of sequences • BLAST • Multiple sequence alignment • Star alignment • Progressive alignment with guide tree: CLUSTALW • Progressive + Iterative alignment with guide tree: MUSCLE