Tools and Algorithms in Bioinformatics

Similar documents
Tools and Algorithms in Bioinformatics

Sara C. Madeira. Universidade da Beira Interior. (Thanks to Ana Teresa Freitas, IST for useful resources on this subject)

Algorithms in Bioinformatics FOUR Pairwise Sequence Alignment. Pairwise Sequence Alignment. Convention: DNA Sequences 5. Sequence Alignment

CSE : Computational Issues in Molecular Biology. Lecture 6. Spring 2004

Computational Biology

In-Depth Assessment of Local Sequence Alignment

Bioinformatics (GLOBEX, Summer 2015) Pairwise sequence alignment

Bioinformatics for Biologists

Sequence Database Search Techniques I: Blast and PatternHunter tools

Algorithms in Bioinformatics

3. SEQUENCE ANALYSIS BIOINFORMATICS COURSE MTAT

Bioinformatics and BLAST

Quantifying sequence similarity

Sequence Alignment: A General Overview. COMP Fall 2010 Luay Nakhleh, Rice University

CISC 889 Bioinformatics (Spring 2004) Sequence pairwise alignment (I)

Lecture 2, 5/12/2001: Local alignment the Smith-Waterman algorithm. Alignment scoring schemes and theory: substitution matrices and gap models

Alignment principles and homology searching using (PSI-)BLAST. Jaap Heringa Centre for Integrative Bioinformatics VU (IBIVU)

Basic Local Alignment Search Tool

Pairwise & Multiple sequence alignments

Large-Scale Genomic Surveys

Sequence Alignments. Dynamic programming approaches, scoring, and significance. Lucy Skrabanek ICB, WMC January 31, 2013

Sequence analysis and Genomics

THEORY. Based on sequence Length According to the length of sequence being compared it is of following two types

Grundlagen der Bioinformatik, SS 08, D. Huson, May 2,

Chapter 5. Proteomics and the analysis of protein sequence Ⅱ

Introduction to Bioinformatics

Single alignment: Substitution Matrix. 16 march 2017

Sequence analysis and comparison

BIO 285/CSCI 285/MATH 285 Bioinformatics Programming Lecture 8 Pairwise Sequence Alignment 2 And Python Function Instructor: Lei Qian Fisk University

Alignment & BLAST. By: Hadi Mozafari KUMS

Practical considerations of working with sequencing data

Lecture 4: Evolutionary Models and Substitution Matrices (PAM and BLOSUM)

Local Alignment Statistics

Collected Works of Charles Dickens

Bioinformatics. Scoring Matrices. David Gilbert Bioinformatics Research Centre

Week 10: Homology Modelling (II) - HHpred

CONCEPT OF SEQUENCE COMPARISON. Natapol Pornputtapong 18 January 2018

Introduction to sequence alignment. Local alignment the Smith-Waterman algorithm

Sequence Analysis 17: lecture 5. Substitution matrices Multiple sequence alignment

Module: Sequence Alignment Theory and Applications Session: Introduction to Searching and Sequence Alignment

Fundamentals of database searching

EECS730: Introduction to Bioinformatics

Scoring Matrices. Shifra Ben-Dor Irit Orr

Biochemistry 324 Bioinformatics. Pairwise sequence alignment

Sequence Alignment Techniques and Their Uses

Tiffany Samaroo MB&B 452a December 8, Take Home Final. Topic 1

Heuristic Alignment and Searching

Pairwise Alignment. Guan-Shieng Huang. Dept. of CSIE, NCNU. Pairwise Alignment p.1/55

Bioinformatics Exercises

Substitution matrices

BLAST. Varieties of BLAST

Protein Bioinformatics. Rickard Sandberg Dept. of Cell and Molecular Biology Karolinska Institutet sandberg.cmb.ki.

BLAST: Target frequencies and information content Dannie Durand

Pairwise sequence alignment

Lecture 5,6 Local sequence alignment

Bioinformatics for Computer Scientists (Part 2 Sequence Alignment) Sepp Hochreiter

Sequence Alignment: Scoring Schemes. COMP 571 Luay Nakhleh, Rice University

Lecture 4: Evolutionary models and substitution matrices (PAM and BLOSUM).

Pairwise sequence alignments

Study and Implementation of Various Techniques Involved in DNA and Protein Sequence Analysis

Similarity or Identity? When are molecules similar?

Administration. ndrew Torda April /04/2008 [ 1 ]

20 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, Global and local alignment of two sequences using dynamic programming

Sequence Comparison. mouse human

Sequence comparison: Score matrices

Homology Modeling. Roberto Lins EPFL - summer semester 2005

Sequence comparison: Score matrices. Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas

Pairwise sequence alignments. Vassilios Ioannidis (From Volker Flegel )

Sequence comparison: Score matrices. Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas

Global alignments - review

BLAST Database Searching. BME 110: CompBio Tools Todd Lowe April 8, 2010

Sequence alignment methods. Pairwise alignment. The universe of biological sequence analysis

Sequence Alignment (chapter 6)

Genomics and bioinformatics summary. Finding genes -- computer searches

Motivating the need for optimal sequence alignments...

Protein function prediction based on sequence analysis

An Introduction to Sequence Similarity ( Homology ) Searching

Scoring Matrices. Shifra Ben Dor Irit Orr

7.36/7.91 recitation CB Lecture #4

Advanced topics in bioinformatics

8 Grundlagen der Bioinformatik, SoSe 11, D. Huson, April 18, 2011

A profile-based protein sequence alignment algorithm for a domain clustering database

C E N T R. Introduction to bioinformatics 2007 E B I O I N F O R M A T I C S V U F O R I N T. Lecture 5 G R A T I V. Pair-wise Sequence Alignment

RELATIONSHIPS BETWEEN GENES/PROTEINS HOMOLOGUES

Homology Modeling (Comparative Structure Modeling) GBCB 5874: Problem Solving in GBCB

8 Grundlagen der Bioinformatik, SS 09, D. Huson, April 28, 2009

Introduction to protein alignments

InDel 3-5. InDel 8-9. InDel 3-5. InDel 8-9. InDel InDel 8-9

First generation sequencing and pairwise alignment (High-tech, not high throughput) Analysis of Biological Sequences

Genome Annotation. Qi Sun Bioinformatics Facility Cornell University

5. MULTIPLE SEQUENCE ALIGNMENT BIOINFORMATICS COURSE MTAT

Introduction to Comparative Protein Modeling. Chapter 4 Part I

Introduction to Computation & Pairwise Alignment

BLAST: Basic Local Alignment Search Tool

CSE 549: Computational Biology. Substitution Matrices

1.5 Sequence alignment

Bioinformatics Chapter 1. Introduction

Local Alignment: Smith-Waterman algorithm

SEQUENCE alignment is an underlying application in the

Whole Genome Alignments and Synteny Maps

Transcription:

Tools and Algorithms in Bioinformatics GCBA815, Fall 2013 Week3: Blast Algorithm, theory and practice Babu Guda, Ph.D. Department of Genetics, Cell Biology & Anatomy Bioinformatics and Systems Biology Core University of Nebraska Medical Center Database Searching Boolean operators AND, OR, NOT 1

PubMed keyword search using Boolean operators Search String # of Hits Kinase 585,556 Drosophila 79,923 Kinase OR Drosophila 654,830 Kinase AND Drosophila 10,649 Kinase NOT Drosophila 574,907 Drosophila NOT Kinase 69,274 Drosophila NOT kinase NOT melanogaster 34,189 Searching Biological Databases Searching is done to find the relatedness between the query and the entries in the database For nucleic acids and proteins, the relatedness is defined by homology. A Query sequence is used to search against each entry, a subject in a database Two sequences are said to be homologous when they possess sequence identity above a certain threshold Thresholds can be defined by length, percentage identity, E-value, Bit-score, r.m.s.d. (for structures), etc., or a combination of one or more of these, depending on the objective of the search 2

BLAST output Pair-wise Alignments Basic Elements in Searching Biological Databases Sensitivity versus Specificity/selectivity Scoring Scheme, Gap penalties Distance/Substitution Matrices (PAM, BLOSSUM Series) Search Parameters (E-value, Bit score) Handling Data Quality Issues (Filtering, Clustering) Type of Algorithm (Smith-Waterman, Needleman-Wunsch) 3

Sensitivity vs. Specificity Confusion Matrix Sensitivity: Attempts to report ALL true positives Sensitivity = True Positives / (True Positives + False Negatives) = TP/(TP+FN) (1-sensitivity) gives false negative rate Specificity: Attempts to report ALL true negatives Specificity = True Negatives / (True Negatives + False Positives) = TN/(TN+FP) (1-specificity) gives false positive rate Known positives are used to test sensitivity and known negatives for specificity In database searching, specificity and sensitivity always compete. Depending on the objective of the search, a tradeoff point should be chosen. Basic Elements in Searching Biological Databases Sensitivity versus Specificity/selectivity Scoring Scheme, Gap penalties Distance/Substitution Matrices (PAM, BLOSSUM Series) Search Parameters (E-value, Bit score) Handling Data Quality Issues (Filtering, Clustering) Type of Algorithm (Smith-Waterman, Needleman-Wunsch) 4

Scoring Scheme Match Match between identical letters or letters of the same group Mismatch Match between letters of different groups Gap Match between a letter and a gap Alignment score is the sum of match, mismatch and gap penalty scores Say, you are aligning two sequences A and B Sequence A : PQVNNTVNRT / Sequence B : PVNRT 1 2 3 PQVNNTVNRT PQVNNTVNRT PQVNNTVNRT P-VNRT---- P-V-N---RT P-----VNRT Scoring Scheme 1 2 3 Match 5, Mismatch 2 Gaps 0 22 25 25 Match 5, Mismatch 2 Gaps 3 7 10 10 Match 5, Mismatch 2 GapI -5, GapE -1 9 8 16 Proportional gap penalties Penalty P = na, EPAPRAEWVSTVHGSTIEQNEQI EPA----WVST---------EQI Proportional penalty= -65 Affine penalty = (-10)+(-11) = -21 Gap Penalties where, n is number of gaps and a is gap penalty Affine gap penalties Penalty P = a + mb, where, a is gap initiation penalty b is gap extension penalty, and m represents the number of extended gaps EPAPRAEWVSTVHGSTIEQNEQI E--P-A-WV-----ST-E---QI Proportional penalty= -65 Affine penalty = (-30)+(-7) = -37 Gap a = - 5 Gap b = - 1 In the proportional scheme, both these alignments score the same, while in the affine penalty scheme, the first one scores much higher 5

Basic Elements in Searching Biological Databases Sensitivity versus Specificity/selectivity Scoring Scheme, Gap penalties Distance/Substitution Matrices (PAM, BLOSSUM Series) Search Parameters (E-value, Bit score) Handling Data Quality Issues (Filtering, Clustering) Type of Algorithm (Smith-Waterman, Needleman-Wunsch) Terminology in Nucleotide Substitutions AGCT: A/G are purines and C/T are pyrimidines Transitions vs Transversions Transition: Aà G or Cà T or vice versa Transversions: Aà T or Aà C or G à T or Gà C or vice versa Synonymous vs Non-synonymous substitutions Synonymous: CCC à CCG, both code for Proline Non-synonymous: UGC à UGG Cysteine à Tryptophan 6

Factors Affecting Amino Acid Replacements Each amino acid is coded by a triplet codon Each codon can undergo 9 possible single-base substitutions So in theory, point mutations in the 61 sense codons can lead to 549 (61 x 9) single-base substitutions Of these, 392 are non-synonymous (missense), 134 are synonymous and 23 are nonsense mutations Protein substitution matrices are built based on non-synonymous replacements only Protein substitution matrices reflect evolutionarily tested and accepted substitutions 7

Bias in the frequency of non-synonymous substitutions Structure of the genetic code itself Physical and chemical properties of the amino acid (C, W, M) Variation in the gene copy number or pseudogenes Gene function (Histone has the lowest mutation rate) Species life span (Rodents vs Humans) Bias in the frequency of synonymous substitutions Abundance of trna species (Rare vs Abundant trna species) Distance/Substitution Matrices Unitary matrices/minimum distance matrices PAM (Percent Accepted Mutations) BLOSUM (BLOcks SUbstitution Matrix) Terminology Global alignment Alignments with the highest score are found at the expense of local similarity Local alignment Alignments in which the highest scoring subsequences are found anywhere in the alignment 8

PAM (Percent Accepted Mutations) Developed by Dayhoff and co-workers PAM 30, 60, 100, 200, 250 Built from globally aligned, closely related sequences (85% similarity) A database of 1572 changes in 71 groups of closely related proteins PAM 1 matrix incorporates amino acid replacements that would be expected if one mutation had occurred per 100 amino acids of sequence i.e., corresponds to roughly one percent divergence in a protein Evolutionary tree is built from aligned sequences and relative frequency (Q ij ) of replacement for each pair of amino acids (i, j) is calculated. PAM (Percent Accepted Mutations) A similarity ratio R ij for each pair is calculated as R ij = Q ij / P i P j where P i and P j are observed (natural) frequencies of amino acids i and j in the set of proteins where replacements are counted Substitution score S ij = log 2 (R ij ) S ij >0 means, replacements are favored during evolution Real value 10 1 1 0 0.1-1 0.001-3 Log value S ij <0 means, evolutionary selection is against the replacement Average relative frequencies of amino acids in animal proteins A C D E F G H I K L M N P Q R S T V W Y 7.09 1.77 5.22 6.74 3.74 6.71 2.39 4.80 6.89 8.64 2.28 4.25 5.97 4.52 5.92 7.96 5.34 5.91 0.97 2.90 9

BLOSUM (BLOcks SUbstitution Matrix) Developed by Henikoff and Henikoff (1992) Blosum 30, 62, 80 Built from BLOCKS database From the most conserved regions of aligned sequences 2000 blocks from 500 families Blosum 62 is the most popular. Here, 62 means that the sequences used in creating the matrix are at least 62% identical Higher Blosum number - Built from closely related sequences Lower Blosum number - Built from distant sequences 10

Major Differences between PAM and BLOSUM PAM Built from global alignments Built from small amout of Data Counting is based on minimum replacement or maximum parsimony Perform better for finding global alignments and remote homologs Higher PAM series means more divergence BLOSUM Built from local alignments Built from vast amout of Data Counting based on groups of related sequences counted as one Better for finding local alignments Lower BLOSUM series means more divergence 11

Basic Elements in Searching Biological Databases Sensitivity versus Specificity/selectivity Scoring Scheme, Gap penalties Distance/Substitution Matrices (PAM, BLOSSUM Series) Search Parameters (E-value, Bit score) Handling Data Quality Issues (Filtering, Clustering) Type of Algorithm (Smith-Waterman, Needleman-Wunsch) Meaning of E-value in Database Searches E- Value (Expectation value) The number of equal or higher scores expected at random for a given High Scoring Pair (HSP) E-value of 10 for a match means, in a database of current size, one might expect to see 10 matches with a similar or better score, simply by chance E-value is the most commonly used threshold in database searches. Only those matches with E-values smaller than the set threshold will be reported in the output E-value ranges between 0 to higher, lower the E-value, better the reliability of a match. 12

Meaning of Bit Score Bit Score Raw scores have no meaning without the knowledge of the scoring scheme used. Raw score are normalized to get Bit scores by incorporating information about the scoring scheme used and the search space used (size of database) Bit score is normalized score and hence it is independent of the size of the database, while E- values are very sensitive to the database size. Generally bit scores of 40 are higher are considered reliable. Basic Elements in Searching Biological Databases Sensitivity versus Specificity/selectivity Scoring Scheme, Gap penalties Distance/Substitution Matrices (PAM, BLOSSUM Series) Search Parameters (E-value, Bit score) Handling Data Quality Issues (Filtering, Clustering) Type of Algorithm (Smith-Waterman, Needleman-Wunsch) 13

Filtering low complexity sequences Filters out short repeats and low complexity regions from the query sequences before searching the database Filtering helps to obtain statistically significant results and reduce the background noise resulting from matches with repeats and low complexity regions The output shows which regions of the query sequence were masked Filtering low-complex regions Low complex regions in protein sequences are those that have repeating residues of the same or a few different residues in a stretch. In database searches low complex regions on the query sequence are masked (with X) to avoid random hits and to emphasize on significant hits Tools used SEG NSEG (DNA sequences) PSEG (Protein sequences) XNU (For masking repeats <10 in length) DUST ( DNA sequences) CAST (Proteins) 14

Basic Elements in Searching Biological Databases Sensitivity versus Specificity/selectivity Scoring Scheme, Gap penalties Distance/Substitution Matrices (PAM, BLOSSUM Series) Search Parameters (E-value, Bit score) Handling Data Quality Issues (Filtering, Clustering) Type of Algorithm (Smith-Waterman, Needleman-Wunsch) Choice of the Searching Algorithm An ideal algorithm should have Good specificity and sensitivity Should be fast running Should not use too much memory Greedy algorithms are very sensitive, but very slow. Heuristic algorithms are relatively fast, but loose some sensitivity. It s always a challenge for a programmer to develop algorithms that fulfill both of these requirements 15

Needleman-Wunsch algorithm (JMB 48:443-53, 1970) Very greedy algorithm, so very sensitive Implements Dynamic programming Provides global alignment between the two sequences Smith-Waterman algorithm (JMB 147:195-97, 1981) A set of heuristics were applied to the above algorithm to make it less greedy, so it is less sensitive but runs faster Implements Dynamic programming Provide local alignment between two sequences Both BLAST and FASTA use this algorithm with varying heuristics applied in each case FASTA (FAST Algorithm) The fist step is application of heuristics and the second step is using dynamic programming First, the query sequence and the database sequence are cut into defined length words and a word matching is performed in all-to-all combinations Word size is 2 for proteins and 6 for nucleic acids If the initial score is above a threshold, the second score is computed by joining fragments and using gaps of less than some maximum length If this second score is above some threshold, Smith-Waterman alignment is performed within the regions of high identities (known as high-scoring pairs) 16

Protein and nucleotide substitution matrices BLAST (Basic Local Alignment Search Tool) The fist step is application of heuristics and the second step is using dynamic programming First, the query sequence and the database sequence are cut into defined length words and a word matching is performed in all combinations Words that score above a threshold are used to extend the word list 7 words Expanded list- 47 words Word Expanded List ql ql, qm, hl ln ln nf nf, af, ny, df, qf, ef, gf, hf, kf, sf, tf fs fs, fa, fn, fd, fg, fp, ft, ys gw gw, aw, rw, nw, dw, qw, ew, hw, iw, kw, mw, pw, sw, tw, vw 17

BLAST continued... BLAST is a local alignment algorithm Several High Scoring Segments are found, with the maximum scoring segment used to define a band in the path graph Smith-Waterman algorithm is performed on several possible segments to obtain optimal alignment The word size for Protein is 3 and for Nucleic acid is 11 Finding High Scoring Pairs (HSPs) 18

Comparison of BLAST and FASTA BLAST uses an expanded list to compensate for the loss of sensitivity from increased word size BLAST is more sensitive than FASTA for protein searches while FASTA is more sensitive than BLAST for nucleic acid searches Both BLAST and FASTA run faster than the original Needleman-Waunch algorithm at the cost of loss of sensitivity Both algorithms fail to find optimal alignments that fall outside of the defined band width Essential Elements of an Alignment Algorithm Defining the problem (Global, semi-global, local alignment) Scoring scheme (Gap penalties) Distance Matrix (PAM, BLOSUM series) Scoring/Target function (How scores are calculated) Good programming language to test the algorithm 19

Types of Alignments Global - When two sequences are of approximately equal length. Here, the goal is to obtain maximum score by completely aligning them Semi-global - When one sequence matches towards one end of the other. Ex. Searches for 5 or 3 regulatory sequences Local - When one sequence is a sub-string of the other or the goal is to get maximum local score Protein motif searches in a database Local vs Global alignments 20

Pair-wise sequence comparison Different Alignment Paths Sequence T S T S T S T S 21

Whole genome sequence comparison Scoring System for Alignments Scoring Weights Matches +10 -These are arbitrary values, but Mismatches +4 the real values come from distance matrices (PAM, BLOSUM etc) Gap Penalties Gap Initiation - 10 - Arbitrarily chosen but, optimized Gap Extension - 2 for a particular Distance matrix Rules of Thumb for Affine Gap Penalties Gap Initiation Penalty should be 2 to 3 times the largest negative score in a distance matrix table Gap Extension Penalty should be 0.3 to 0.l times the Initiation Penalty 22

Similarity Score Similarity score is the sum of pair-wise scores for matches/ mismatches and gap penalties Scoring Weights Matches +10 Mismatches +4 Gap Initiation -10 Gap Extension -2 Global Alignment EPSGFPAWVSTVHGQEQI E----PAWVST-----QI Score: (9 x 10) + (0 x 4) - (2 x -10 + 7 x -2) Score = 90-34 = 56 Scoring/Target function The scoring function calculates the similarity score. The goal of the algorithm is to maximize similarity score Global Alignment EPSGFPAWVSTVHGQEQI E----PAWVST-----QI Score: (9 x 10) + (2 x -10 + 7 x -2) Score = 90 + (-34) = 56 Scoring Weights Matches +10 Mismatches +4 Gap Initiation -10 Gap Extension -2 Local Alignment EPSGFPAWVSTVHGQEQI E----PAWVST-----QI Score: (6 x 10) + (2 x 0 + 10 x 0) Score = 60 + 0 = 60 Scoring Weights Matches +10 Mismatches +4 Gap Initiation -10 Gap Extension -2 No terminal gap penalty 23

Different types of BLAST programs Program Query Database Comparison blastn nucleotide nucleotide nucleotide blastp protein protein protein blastx nucleotide protein protein tblastn protein nucleotide protein tblastx nucleotide nucleotide protein megablast nucleotide nucleotide nucleotide PHI-Blast protein protein protein PSI-Blast Protein-Profile protein protein RPS-Blast protein Profiles protein 24