Week2n3_AlignmentDynamicProgramming

pdf

School

Florida State University *

*We aren’t endorsed by this school

Course

II

Subject

Computer Science

Date

Oct 30, 2023

Type

pdf

Pages

103

Report

Uploaded by faisalmd929

CAP5540/CIS4930 (Fall 2022) BIOINFORMATICS SEQUENCE ANALYSIS Week 2 & 3.1: Sequence Alignment (Dynamic Programming) Lecturer: Xian Mallory
Recap of last week We cannot sequence the DNA from the beginning to the end. DNA is broken into small fragments, whose order of A, C, G and T are to be determined by a sequencing machine. The resulting sequence of each fragment is called a read . In shotgun sequencing , a read loses its position on the DNA. In addition to the sequences of the small fragments of an individual’s DNA, we also have the human reference genome . To identify the differences between individual’s DNA and the human reference genome (for the purpose of detecting mutations that may cause genetic diseases etc), we need to align the reads to the reference genome.
Recap of last week (con’d): I/O of a mutation calling tool Input: 1) a reference genome, and 2) the sequences of an individual’s DNA, which is not exactly the same as the reference genome. Output: the “equivalent” regions on the reference for each read to maximize their similarity. Reference Individual’s Genome Fragments of individual’s genome
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Recap of last week (con’d): scoring scheme in alignment It is important to have a scoring scheme to quantify the evaluation of the alignments. Alignment A ACGGGTTTT ACGTGTTTT Alignment B ACGGGTTTT AAGTGTCTT mismatches/substitutions 8 6 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 A C G T A C G T Reward 1 for each match.
Recap of last week (con’d): indels in alignment Three strategies to handle indels: Strategy #1: give zero points for indels; Strategy #2: penalize the indels. Penalty is linear to the number of nucleotides being inserted or deleted. Strategy #3: penalize the number of indels, as well as the number of nucleotides being inserted or deleted. Alignment C ACGGGTTTT ACTTTAAT deleted inserted Score = ?
Recap of last week (con’d): sequence length in alignment Suppose V is the matching score, m and p are the sequence lengths for X and Y . The final alignment score S is V – m – p. ACGGGTTTT ACGTGTTTT 8 ATGGGAAAATTTTAGCTG ACGTGAGACTCATCGGAG 9 v.s. V = S = 8 – 9 – 9 = -10 9 – 18 – 18 = -27 9 nucleotides 18 nucleotides 9 nucleotides 18 nucleotides >
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Recap of last week (con’d): understand the score probabilistically Log odds ratio log ࠵?(࠵?, ࠵?|࠵?) ࠵?(࠵?, ࠵?|࠵?) = log ࠵? ࠵? ! , ࠵? ! |࠵? + ⋯ + log ࠵?(࠵? " , ࠵? " |࠵?) − ࠵? + ࠵? log(࠵?) Each term is corresponding to a score, e.g., ࠵? ࠵?, ࠵?|࠵? = 1, log 1 = 0 ; ࠵? ࠵?, ࠵?|࠵? = 1࠵? #$ , log 1e #$ = −6 sequence lengths constant ࠵? : matching model ࠵? : random model (unrelated / not matching)
Recap of last week (con’d): three types of alignment End-to-end matching ACGACTTTG ACTTTCG Part of the reads is aligned ACGACTTTG ACTTTCG ACGACTTTG ACTTTCG One read aligns to the overhang of another global alignment local alignment overlap alignment have a prior knowledge that these two sequences align with each other from beginning to the end do not know which subsequence of the reads align to each other align two reads that are sequenced from two overlapping genomic positions ( loci ) Application:
Materials for the next two weeks In the last week, we focused on the evaluation of the alignments , suppose we already have the alignments. But we didn’t discuss how to come up with the alignment originally. Today we will see how computers can be taught to come up with the alignments automatically . To make this happen, we need to compose the algorithms (a process or set of rules to be followed in calculations or other problem-solving operations). We will focus on one algorithm for alignment, called dynamic programming .
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Problem definition To align two sequences ࠵? !,…,’ and ࠵? !,…,( finding the best scoring alignment between ࠵? and ࠵?, Shall we do global, local or overlap alignment? We need a clear definition of the problem before looking into the algorithm to solve the problem. Let’s first focus on global alignment. End-to-end matching ACGACTTTG ACTTTCG global alignment in which all nucleotides of both sequences are included.
Dynamic programming (an algorithm) for pairwise global alignment Problem definition Input: sequences ࠵? (of length ࠵? ) and ࠵? (of length ࠵? ) Output: the alignment between ࠵? and ࠵? involving all nucleotides whose alignment score is the highest
Why shall we bother to come up with an algorithm? A naïve method is to score all alignments, and select the one with the highest score. But there will be exponential number of alignments to score (depending on ࠵? and ࠵? ), and it is unrealistic to calculate all of them when ࠵? and ࠵? are large. The dynamic programming algorithm saves us tremendous amount of computing time (and computer memory) for finding the highest- scoring alignment.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
How does dynamic programming work? Break a big problem into simpler subproblems , knowing that the optimal solution to the overall problem depends upon the optimal solution to its subproblems. End-to-end matching ACGACTTTG ACTTTCG global alignment
Dynamic programming: disintegrate a big problem into small subproblems Suppose we know the optimal alignment from subsequences ࠵? ) , ࠵? < ࠵? and ࠵? * , ࠵? < ࠵? how can this help with the optimal alignment finding between ࠵? and ࠵? ? At least we can know the optimal alignment between ࠵? {!,…,)} and ࠵? {!,…,*}
What does it mean? Let’s see an example. Suppose we know the optimal alignment between ACGACT and ACT is and the optimal score is F(ACGACT, ACT) the optimal alignment between ACGACT T and ACT is and the optimal score is F(ACGACT T , ACT) the optimal alignment between ACGACT and ACT T is and the optimal score is F(ACGACT, ACT T ) ACGACT TTG ACT TTCG Optimal score of ACGACT T and ACT T = ? ACGACTT TG ACT TTCG ACGACT TTG ACTT TCG F(ACGACT, ACT) F(ACGACT T , ACT) F(ACGACT, ACT T )
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Can we extend to the alignment between ACGACT T and ACT T ? ACGACT TTG ACT TTCG ACGACTT TG ACT TTCG ACGACT TTG ACTT TCG F(ACGACT, ACT) F(ACGACTT, ACT) F(ACGACT, ACTT) This T is a deletion in this alignment. This T is an insertion in this alignment. ACGACT AC - - - T ACGACTT AC - - -T- ACGACT T AC - - -T T ACGACTT - AC - - - T- T ACGACT- AC - - -TT ACGACT- T AC - - -TT - ACGACTT TG ACT T TCG ACGACT T TG ACT T TCG ACGACT T TG ACTT TCG
Which one will be used for the alignment btw. ACGACTT and ACTT? F(ACGACT, ACT) F(ACGACTT, ACT) F(ACGACT, ACTT) ACGACT AC - - -T ACGACTT AC - - -T- ACGACT T AC - - -T T ACGACTT - AC - - - T- T ACGACT- AC - - -TT ACGACT- T AC - - -TT - + s(T, T) score of aligning T to T F(ACGACT, ACT) - d gap penalty F(ACGACTT, ACT) - d gap penalty F(ACGACT, ACTT) 1 2 3 Whichever gives the highest score will give the best alignment btw. ACGACTT and ACTT. F(ACGACTT, ACTT) = max(࠵? ! , ࠵? - , ࠵? . ) ࠵? ! ࠵? " ࠵? # First, let’s compute the alignment score for each case.
Now let’s generalize it. ACGACT A - - -CT ACGACTT A - - -CT- ACGACT T A - - -CT T ACGACTT - A - - - CT- T ACGACT- A - - -CTT ACGACT- T A - - -CTT - + ࠵?(࠵? ! , ࠵? " ) - d - d 1 2 3 Notation: ࠵? ! : subsequence btw. the 1 st a nd ࠵? th nucleotide on ࠵? ; ࠵? " : subsequence btw. the 1 st a nd ࠵? th nucleotide on ࠵? ; Suppose ࠵? is the index of the nucleotide of the first sequence ࠵? , and ࠵? is the index of the nucleotide of the second sequence ࠵? . The optimal alignment score of ACGACTT and ACTT is ࠵?(࠵? ࠵? , ࠵? ࠵? ) , ࠵? = 7 , ࠵? = 4 . ࠵?(࠵? !#$ , ࠵? "#$ ) ࠵? $ = ࠵?(࠵? !#$ , ࠵? "#$ ) ࠵?(࠵? ! , ࠵? "#$ ) ࠵? % = ࠵?(࠵? ! , ࠵? "#$ ) ࠵?(࠵? !#$ , ࠵? " ) ࠵? & = ࠵?(࠵? !#$ , ࠵? " ) ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? !#$ , ࠵? "#$ + ࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵? ࠵? ! : the ࠵? th nucleotide on ࠵?; ࠵? " : the ࠵? th nucleotide on ࠵? ࠵?(࠵? ! , ࠵? " ) : score of aligning ࠵? ! and ࠵? "
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Matrix Representation ࠵? $ ࠵? % ࠵? & ? A C G A C T T T G A C T T T C G ࠵? = 9 for ࠵? ࠵? = 7 for ࠵?
To calculate ࠵? ! ? ? ? ࠵? $ ࠵? % ࠵? & ? A C G A C T T T G A C T T T C G ࠵? = 9 for ࠵? ࠵? = 7 for ࠵?
Entries necessary to calculate ࠵? ! . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ࠵? $ ࠵? % ࠵? & ? A C G A C T T T G A C T T T C G ࠵? ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
First of all, what is ࠵?(࠵? ! , ࠵? ! ) ? ? ࠵? $ ࠵? % ࠵? & ? A C G A C T T T G A C T T T C G ࠵? ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
We need an extra row and column ! ? ࠵? $ ࠵? % ࠵? & ? A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
How to define/initialize ࠵? ࠵? " , ࠵? # , ࠵? = 1 … ࠵? and ࠵? ࠵? $ , ࠵? " , ࠵? = 1 … ࠵? Depends on which problem we are trying to solve. Global, local or overlap alignment?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Initialization in global alignment
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Recap of global alignment End-to-end matching ACGACTTTG ACTTTCG have a prior knowledge that these two sequences align with each other from beginning to the end Application: Encourages end-to-end mapping. For any indels occurring at the beginning or the end of the sequence, penalize it. Penalty can be given in a linear manner.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 ࠵? $ ࠵? % ࠵? & ? A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -d ࠵? $ ࠵? % ࠵? & ? A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
What does it mean by saying ࠵? ࠵? ! , ࠵? " = −࠵? ? It means that if we treat the first nucleotide of ࠵? as being mapped to nowhere on ࠵? (thus a gap), the penalty is −࠵? .
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -d ࠵? $ ࠵? % ࠵? & ? A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d linear gap penalty
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -d -2d -3d -4d -5d -6d -7d -8d -9d -d -2d -3d ࠵? $ ࠵? % -4d ࠵? & ? -5d -6d -7d A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d linear gap penalty
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Suppose we use the following scoring scheme For indels, ࠵? = 1 For matches/mismatches: A C G T A C G T 1 -1 -1 -1 -1 1 -1 -1 -1 -1 1 -1 -1 -1 -1 1
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Now we will fill in the whole matrix according to 1) initialization of ࠵? ࠵? C , ࠵? D = −࠵?࠵?, ࠵? ࠵? E , ࠵? C = −࠵?࠵? 2) ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? !#$ , ࠵? "#$ + ࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵? ࠵? = 1 … ࠵?, ࠵? = 1 … ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 ? -2 -3 -4 -5 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d ࠵? ࠵? $ , ࠵? $ = max @ ࠵? ࠵? , ࠵? + ࠵? ࠵? $ , ࠵? $ = 0 + 1 = 1 ࠵? ࠵? $ , ࠵? − ࠵? = −1 − 1 = −2 ࠵? ࠵? , ࠵? $ − ࠵? = −1 − 1 = −2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 -2 -3 -4 -5 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d ࠵? ࠵? $ , ࠵? $ = max @ ࠵? ࠵? , ࠵? + ࠵? ࠵? $ , ࠵? $ = 0 + 1 = 1 ࠵? ࠵? $ , ࠵? − ࠵? = −1 − 1 = −2 ࠵? ࠵? , ࠵? $ − ࠵? = −1 − 1 = −2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 ? -2 -3 -4 -5 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d ࠵? ࠵? % , ࠵? $ = max @ ࠵? ࠵? $ , ࠵? + ࠵? ࠵? % , ࠵? $ = −1 − 1 = −2 ࠵? ࠵? % , ࠵? − ࠵? = −2 − 1 = −3 ࠵? ࠵? $ , ࠵? $ − ࠵? = 1 − 1 = 0
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -2 -3 -4 -5 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d ࠵? ࠵? % , ࠵? $ = max @ ࠵? ࠵? $ , ࠵? + ࠵? ࠵? % , ࠵? $ = −1 − 1 = −2 ࠵? ࠵? % , ࠵? − ࠵? = −2 − 1 = −3 ࠵? ࠵? $ , ࠵? $ − ࠵? = 1 − 1 = 0
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 ? -2 -3 -4 -5 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d ࠵? ࠵? & , ࠵? $ = max @ ࠵? ࠵? % , ࠵? + ࠵? ࠵? & , ࠵? $ = −2 − 1 = −3 ࠵? ࠵? & , ࠵? − ࠵? = −3 − 1 = −4 ࠵? ࠵? % , ࠵? $ − ࠵? = 0 − 1 = −1
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d ࠵? ࠵? & , ࠵? $ = max @ ࠵? ࠵? % , ࠵? + ࠵? ࠵? & , ࠵? $ = −2 − 1 = −3 ࠵? ࠵? & , ࠵? − ࠵? = −3 − 1 = −4 ࠵? ࠵? % , ࠵? $ − ࠵? = 0 − 1 = −1
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 ? -2 -3 -4 -5 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d ࠵? ࠵? ( , ࠵? $ = max @ ࠵? ࠵? & , ࠵? + ࠵? ࠵? ( , ࠵? $ = −3 + 1 = −2 ࠵? ࠵? ( , ࠵? − ࠵? = −4 − 1 = −5 ࠵? ࠵? & , ࠵? $ − ࠵? = −1 − 1 = −2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -2 -3 -4 -5 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d ࠵? ࠵? ( , ࠵? $ = max @ ࠵? ࠵? & , ࠵? + ࠵? ࠵? ( , ࠵? $ = −3 + 1 = −2 ࠵? ࠵? ( , ࠵? − ࠵? = −4 − 1 = −5 ࠵? ࠵? & , ࠵? $ − ࠵? = −1 − 1 = −2 This will result in two alignments (paths) with the same alignment score.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
We will then do the same thing row by row, or column by column, until we fill in the whole matrix.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 -3 -4 -5 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -4 -5 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -5 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -3 -1 -1 -1 -1 0 1 2 1 -6 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -3 -1 -1 -1 -1 0 1 2 1 -6 -4 -2 -2 -2 0 -1 0 1 1 -7 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -3 -1 -1 -1 -1 0 1 2 1 -6 -4 -2 -2 -2 0 -1 0 1 1 -7 -5 -3 -1 -2 -1 -1 -1 0 2 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Now that we have filled the whole matrix, how can we figure out the alignment? We do this by back tracing . In global alignment, we start from the bottom right entry and follow the arrows, but in a backward manner to find the optimal path.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -3 -1 -1 -1 -1 0 1 2 1 -6 -4 -2 -2 -2 0 -1 0 1 1 -7 -5 -3 -1 -2 -1 -1 -1 0 2 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d Global alignment’s back tracing always start from ࠵?(࠵? # , ࠵? $ ) !
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -3 -1 -1 -1 -1 0 1 2 1 -6 -4 -2 -2 -2 0 -1 0 1 1 -7 -5 -3 -1 -2 -1 -1 -1 0 2 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d We follow the arrows in a backward manner to trace the alignment path.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -3 -1 -1 -1 -1 0 1 2 1 -6 -4 -2 -2 -2 0 -1 0 1 1 -7 -5 -3 -1 -2 -1 -1 -1 0 2 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d We follow the arrows in a backward manner to trace the alignment path.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -3 -1 -1 -1 -1 0 1 2 1 -6 -4 -2 -2 -2 0 -1 0 1 1 -7 -5 -3 -1 -2 -1 -1 -1 0 2 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d We follow the arrows in a backward manner to trace the alignment path.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -3 -1 -1 -1 -1 0 1 2 1 -6 -4 -2 -2 -2 0 -1 0 1 1 -7 -5 -3 -1 -2 -1 -1 -1 0 2 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d We follow the arrows in a backward manner to trace the alignment path.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -3 -1 -1 -1 -1 0 1 2 1 -6 -4 -2 -2 -2 0 -1 0 1 1 -7 -5 -3 -1 -2 -1 -1 -1 0 2 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d We follow the arrows in a backward manner to trace the alignment path.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -3 -1 -1 -1 -1 0 1 2 1 -6 -4 -2 -2 -2 0 -1 0 1 1 -7 -5 -3 -1 -2 -1 -1 -1 0 2 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d For multiple paths, we label all of them. They will be equally good alignments.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -3 -1 -1 -1 -1 0 1 2 1 -6 -4 -2 -2 -2 0 -1 0 1 1 -7 -5 -3 -1 -2 -1 -1 -1 0 2 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d For multiple paths, we label all of them. They will be equally good alignments.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -1 1 0 -1 -2 -3 -4 -5 -6 -7 -2 0 2 1 0 -1 -2 -3 -4 -5 -3 -1 1 1 0 -1 0 -1 -2 -3 -4 -2 0 0 0 -1 0 1 0 -1 -5 -3 -1 -1 -1 -1 0 1 2 1 -6 -4 -2 -2 -2 0 -1 0 1 1 -7 -5 -3 -1 -2 -1 -1 -1 0 2 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d In global alignment, we shall back trace it to the upper top entry: ࠵?(࠵? % , ࠵? % ) Notice in this slide, I added the arrows on the initialized entries as well, which has only one choice.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Given all the back tracing, how can we write the alignment between ࠵? and ࠵? ? We do this by putting the matching/mismatching nucleotides corresponding to each other, whereas for the deleted nucleotide, we use symbol “-” to show that the nucleotide is absent at a certain position.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: First, we write the sequences on the upper and bottom rows. ACGACTTTG ACTTTCG
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: First, we write the sequences on the upper and bottom rows. ACGACTTTG ACTTTCG Second, we start from the lower bottom and identify matches/mismatches and indels between the two sequences. a match diagonal: match; horizontal: - on Y; vertical: - on X
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: First, we write the sequences on the upper and bottom rows. ACGACTTTG ACTTTCG Second, we start from the lower bottom and identify matches/mismatches and indels between the two sequences. a match diagonal: match; horizontal: - on Y; vertical: - on X
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: First, we write the sequences on the upper and bottom rows. ACGACTTT-G ACTTTCG Second, we start from the lower bottom and identify matches/mismatches and indels between the two sequences. a gap For an indel, add a “-” at the deleted position on the corresponding sequence. diagonal: match; horizontal: - on Y; vertical: - on X
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: First, we write the sequences on the upper and bottom rows. Second, we start from the lower bottom and identify matches/mismatches and indels between the two sequences. For an indel, add a “-” at the deleted position on the corresponding sequence. We then continue until all the nucleotides find their matches/mismatches or indels. ACGACTTT-G - - - ACTTTCG Optimal alignment #1 diagonal: match; horizontal: - on Y; vertical: - on X
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: What about this path? Can you write down the alignment? Optimal alignment #2 diagonal: match; horizontal: - on Y; vertical: - on X
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: ACGACTTT-G A- - -CTTTCG Here is alignment #2. diagonal: match; horizontal: - on Y; vertical: - on X
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: Can you practice on the 3 rd alignment? Optimal alignment #3 diagonal: match; horizontal: - on Y; vertical: - on X
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Global alignment: Here is alignment #3 . ACGACTTT-G AC- - -TTTCG diagonal: match; horizontal: - on Y; vertical: - on X
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
In total there are three equally optimal global alignment! All have score 2. ACGACTTT-G - - - ACTTTCG ACGACTTT-G AC- - -TTTCG ACGACTTT-G A- - -CTTTCG
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
The dynamic programming algorithm for global alignment is called Needleman-Wunsch algorithm.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Summary of global alignment (or Needleman- Wunsch algorithm) Initialization: Penalize the gaps in the beginning of the two sequences. In our case, we used linear gap penalty: ࠵? ࠵? , ࠵? " = −࠵?࠵?, ࠵? ࠵? ! , ࠵? = −࠵?࠵? Recursion or recursive function: Back tracing: Start from the lower right entry; End at the top left entry. ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? !#$ , ࠵? "#$ + ࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Problem definition for local alignment To align two sequences ࠵? !,…,’ and ࠵? !,…,( finding the best scoring alignment between ࠵? and ࠵?, in which only the subsequences of nucleotides shall be included. Part of the reads is aligned ACGACTTTG ACTTTCG local alignment
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Dynamic programming for pairwise local alignment Problem definition Input: sequences ࠵? (of length ࠵? ) and ࠵? (of length ࠵? ) Output: the alignment between ࠵? and ࠵? involving subsequences of nucleotides for both ࠵? and ࠵? whose alignment score is the highest
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
How about the local alignment between ࠵? and ࠵? ? A few differences from global alignment: ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? !#$ , ࠵? "#$ + ࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵? ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? ࠵? !#$ , ࠵? "#$ + ࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵? No penalties for indels in the beginning of the two sequences, i.e., 0’s for all initial entries ࠵? ) , ࠵? = 1, … , ࠵?, ࠵? * , ࠵? = 1, … , ࠵? The back tracing can start from anywhere, whichever entry has the highest value in the matrix. Back tracing stops at the first zero. For ࠵?(࠵? ) , ࠵? * ) , instead of: We use:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Local alignment: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d In local alignment, we use 0’s for all initializations. We use ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? ࠵? !#$ , ࠵? "#$ +࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Local alignment: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d In local alignment, we use 0’s for all initializations. We use ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? ࠵? !#$ , ࠵? "#$ +࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Local alignment: 0 0 0 0 0 0 0 0 0 0 0 1 ? 0 0 0 0 0 0 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d In local alignment, we use 0’s for all initializations. We use ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? ࠵? !#$ , ࠵? "#$ +࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Local alignment: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d In local alignment, we use 0’s for all initializations. We use ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? ࠵? !#$ , ࠵? "#$ +࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Local alignment: 0 0 0 0 0 0 0 0 0 0 0 1 0 ? 0 0 0 0 0 0 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d In local alignment, we use 0’s for all initializations. We use ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? ࠵? !#$ , ࠵? "#$ +࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Local alignment: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d In local alignment, we use 0’s for all initializations. We use ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? ࠵? !#$ , ࠵? "#$ +࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵? coming from nowhere, thus no arrows
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Now we try to fill in the whole matrix for local alignment.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Local alignment: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 2 1 0 2 1 0 0 0 0 0 1 1 0 1 3 2 1 0 0 0 0 0 0 0 2 4 3 2 0 0 0 0 0 0 1 3 5 4 0 0 1 0 0 1 0 2 4 4 0 0 0 2 1 0 0 1 3 5 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d Back tracing starts from the entry (entries) with the highest value. We use ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? ࠵? !#$ , ࠵? "#$ +࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Local alignment: ACGACTTT-G ACTTTCG optimal local alignment #1 In back tracing of local alignment, we stop at the first zero. In the corresponding alignment, we don’t penalize the indel in the beginning of the two sequences. ACGACTTTG ACTTTCG optimal local alignment #2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
The dynamic programming algorithm for local alignment is called Smith-Waterman algorithm.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Summary of local alignment (or Smith- Waterman algorithm) Initialization: No penalty on the gaps in the beginning of the two sequences. Thus ࠵? ࠵? , ࠵? " = 0, ࠵? ࠵? ! , ࠵? = 0 Recursion or recursive function: Back tracing: Start from the entry/entries with the highest score; End at the first entry with score zero. ࠵? ࠵? ! , ࠵? " = max 0 ࠵? ࠵? !#$ , ࠵? "#$ + ࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Now, let’s move on to overlap alignment.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Problem definition for overlap alignment To align two sequences ࠵? !,…,’ and ࠵? !,…,( finding the best scoring alignment between ࠵? and ࠵?, in which either one end for both ࠵? and ࠵? in different directions, or both ends for either ࠵? or ࠵? are involved. One end of a read aligns to the overhang of another Part of one read aligns to the other entire read Case #1 Case #2 Case #3 Case #4
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Dynamic programming for pairwise overlap alignment Problem definition Input: sequences ࠵? (of length ࠵? ) and ࠵? (of length ࠵? ) Output: the alignment between ࠵? and ࠵? involving subsequences of nucleotides that extend to either one end for both ࠵? and ࠵? in different directions, or both ends for either ࠵? or ࠵? whose alignment score is the highest One end of a read aligns to the overhang of another (case #1 and #2 in the previous slide) Part of one read aligns to the other entire read (case #3 and #4 in the previous slide)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Lastly, let’s look at overlap alignment between ࠵? and ࠵?. Similarities from global and local alignment: ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? !#$ , ࠵? "#$ + ࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵? Initialization: the same as local alignment. Thus no penalties for indels in the beginning of the two sequences, i.e., 0’s for all initial entries ࠵? 0 , ࠵? = 1, … , ࠵?, ࠵? 1 , ࠵? = 1, … , ࠵? . The back tracing starts at the end of either ࠵? or ࠵? , and ends at the start of either ࠵? or ࠵? . For ࠵?(࠵? 0 , ࠵? 1 ) , it is the same as the global alignment. Thus Only this has never seen before.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Overlap alignment 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d In overlap alignment, we use 0’s for all initializations. We use ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? !#$ , ࠵? "#$ +࠵? ࠵? ! , ࠵? " ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Overlap alignment 0 0 0 0 0 0 0 0 0 0 0 ? ? ? 0 0 0 0 0 0 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d In overlap alignment, we use 0’s for all initializations. We use ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? !#$ , ࠵? "#$ +࠵? ࠵? ! , ࠵? " ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Overlap alignment 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 0 0 0 0 0 0 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d In overlap alignment, we use 0’s for all initializations. We use ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? !#$ , ࠵? "#$ +࠵? ࠵? ! , ࠵? " ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Now we try to fill in the whole matrix for overlap alignment.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Overlap alignment 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 1 0 -1 -1 -1 -1 0 0 2 1 0 2 1 0 -1 -2 0 -1 1 1 0 1 3 2 1 0 0 -1 0 0 0 0 2 4 3 2 0 -1 -1 -1 -1 -1 1 3 5 4 0 -1 0 -1 -2 0 0 2 4 4 0 -1 -1 1 0 -1 -1 1 3 5 A C G A C T T T G A C T T T C G ࠵? ࠵? ࠵? ࠵? , ࠵? " , ࠵? = 1 … ࠵? ࠵? ࠵? ! , ࠵? , ࠵? = 1 … ࠵? Gap penalty = d In overlap alignment, we use 0’s for all initializations. We use ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? !#$ , ࠵? "#$ +࠵? ࠵? ! , ࠵? " ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵? Back tracing starts from the maximum entry in the rightmost column and bottom row in the matrix.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Overlap alignment Back tracing starts from the maximum entry in the rightmost column and bottom row in the matrix, and ends at the first row or first column in the matrix. In the corresponding alignment, we don’t show indels that overhang the sequence; do show indels within the alignment ACGACTTT-G ACTTTCG overhang
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Four cases of back tracing in overlap alignment ࠵? ࠵? Start Rightmost column Last row Last row Rightmost column End First row First column First row First column 0 0 0 0 0 0 0 start end 0 0 0 0 0 0 0 start end 0 0 0 0 0 0 0 start end ࠵? ࠵? 0 0 0 0 0 0 0 start end Case #1 Case #2 Case #3 Case #4
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Summary of overlap alignment Initialization: No penalty on the gaps in the beginning of the two sequences. Thus ࠵? ࠵? , ࠵? " = 0, ࠵? ࠵? ! , ࠵? = 0 Recursion or recursive function: Back tracing: Start from the entry/entries on the rightmost column or bottom row that has/have the highest score; End at the first column or first row. ࠵? ࠵? ! , ࠵? " = max ࠵? ࠵? !#$ , ࠵? "#$ + ࠵?(࠵? ! , ࠵? " ) ࠵? ࠵? ! , ࠵? "#$ − ࠵? ࠵? ࠵? !#$ , ࠵? " − ࠵? like local alignment like global alignment unique for overlap alignment
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Summary of pairwise alignment using DP. Global Local Overlap Initialization Linear indel penalties No penalty, all zeros No penalty, all zeros Sub-problems to problem Only diagonal, upper and left Additionally a zero in max Only diagonal, upper and left Start of back tracing The bottom right entry Any entry with the max. value Entry on the rightmost column or the bottom row that has the max. value End of back tracing The top left entry Whenever it hits a zero Whenever it hits the first row or the first column
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Summary of dynamic programming algorithm Definition: An algorithm to solve a big problem by breaking it into smaller sub-problems. Application: only applicable to problems whose optimal solution of a big problem depends on the optimal solution of its sub-problems For example, pairwise sequence alignment Warning: Not every problem can be solved by dynamic programming, like maximum matching problem and finding the longest path problem in a graph. What is essential? Initialization (numbers on the first row/column of the matrix) A process of constructing the optimal solution of the problem from its sub-problems In our case, it is the equations. Rule of back tracing
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
A little about computational complexity It is important to know how many operations we have to compute for an algorithm. It gives us some idea of how much time the algorithm will take to finish. However, the number of operations depends not only the algorithm, but also on the inputs, i.e., in our cases, the sequences length, which are ࠵? and ࠵?. To take into account the input size, we use big-O notations. For example, in dynamic programming algorithm for the three types of alignments we showed, each of them requires filling in a (࠵? +1)*(p+1) matrix, and each entry takes just one operation, which is a “max” calculation. So the big-O notations for these three alignments using dynamic programming algorithm is O(mp). Here “+1” is eliminated as we usually consider the case when ࠵? or ࠵? is very large, and ”+1” is so small that they can be ignored compared with the majority of computations.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Which computational complexity is considered good? Suppose ࠵? and ࠵? are both very large and that they are very close to each other, and here I use ࠵? to represent both of them. The quadratic one, ࠵? ࠵? - , although can be tolerated, is not a very good algorithm. In fact, anything bigger than ࠵? ࠵? - is horrible, as it will take months/years to run on a human genome, which is three billions base pairs long. The linear one, ࠵? ࠵? is considered as very good. The optimal one, ࠵? log(࠵?) is very hard to come up with, if not impossible. The constant is almost nonexistent for sequence alignment.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Would you push the limit down and save computational time / lives?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help

Browse Popular Homework Q&A

Q: 3 14 1 2 Problem 1. Let A = -2 0 1 and B-3 1 1 1 2 2 2-4 Compute the following matrices: (i) A+B,…
Q: point) Consider the function shown in the following graph. The function is defined for all real…
Q: < 6 (a) (b) Part A The measure of the angles of a triangle are 4x°, 60° and 2xº. The value of x is…
Q: A sled is pulled up to the top of a hill. The sketch above indicates the shape of the hill. At the…
Q: Evaluate the following integral: [²91²+71+4d²
Q: What problem would be caused by moving the beaker during the devlopment of the chromatogram?
Q: True or False: One way to increase the power of a hypothesis test is to increase the sample size. O…
Q: Problem II Find the inverse of the following matrix. 1 1 1 1 1 1 1 1 2 1 0-10 2 100 -1 20 21. 25.…
Q: 77. x(x - 1) = 0. 78. x² + 2y² + 1 = 0. 79. xyz = 0.
Q: Company Miami just paid annual dividend of $25 today. The dividend is expected to grow at 8% for the…
Q: Convert the following circuit to a Boolean equation (do not simplify):
Q: A company purchased a computer on July 1, 2025 for $50,000. The estimated useful life of the…
Q: Find the distance from the point (1,-3,6) to the line ä(t) = (4, -5,0)t + (-8, -7,1).
Q: Hawthorn Company purchased a piece of equipment for $35,000 and has accumulated depreciation of…
Q: When considering the time value of money in making an investment decision, an investor would…
Q: You drive your car a total of 30 km at an average velocity of 30 km/hr. How many hours were you…
Q: 3. Same question for and the choice b = (³). 2x-y-z = b₁ x + 2z = b₂
Q: Linda needs to have her car towed. Little Town Auto charges a flat fee of $65 plus $3 per mile…
Q: Solve sin(3z)cos(8x) – cos(3x)sin(8z) = – 0.75 for the smallest positive solution. x = Give your…
Q: Joni planted two tree saplings in their garden on the same day. One tree sapling started out 25…
Q: The company rented furnished office space by paying $2,300 cash for the first month's (April) rent.
Q: A restaurant manager wants to purchase 200 sets of dishes. One design costs $20 per set, while…