DNA Sequence Alignment with Affine Gap Penalty and Word-based Approach, Assignments of Computer Science

An assignment for a computer science course focusing on dna sequence alignment using dynamic programming. The assignment includes implementing a local alignment algorithm with affine gap penalty for two input dna sequences, experimenting with the program, and performing word-based alignment. Students are required to write a program that takes input fasta files and a substitution matrix, and outputs the optimal local alignment with a statement of the score and alignment positions. For word-based alignment, students must write down the recurrences and initialization for a dynamic programming algorithm, and implement the algorithm to find the optimal alignment of two given sequences.

Typology: Assignments

Pre 2010

Uploaded on 03/16/2009

koofers-user-805
koofers-user-805 🇺🇸

9 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Assignment 2: Due on Tuesday, October 7, by 11:59 PM
Note: Solution to the programming questions should be emailed to the instructor. See below for
how to create a subdirectory for each problem in the assignment. Your em ail should contain the
location of these sub-directories on the csil systems.
Note: See the course web page for the late turn-in policy. Also note that you may request a 3-day
extension at most once in the semester, by informing the instructor by e-mail.
Note: Collabor ation policy for
this
assignment – you may discuss the assignment with at most one
other student. See “Basic Information” link on the course web page for more details. (In shor t, you
may discuss, but must
do
the assignment on your own.)
1.
Local alignment with affine gap penalty
(30 points). Your task is to implement a dynamic
programming algorithm that finds the optimal local alignment of two input DNA sequences,
with affine gap penalty. The pro gram should take as input:
a. Two “Fasta” format files, each with one DNA sequence (format description as per previous
assignment).
b. A text file containing a 4 x 4 matrix of substitution scores, to be used in the alignment (see
sample below)
c. Two (non-positive) real numbers representing the “gap open” and “gap extend”
parameters.
The program will be run from the Linux comm and-line as:
<programfilename> <fastafilename1> <fastafilename2> <substitutionmatrixfile> <gopen>
<gextent>
The output of the program should be a textual display of the optimal local alignment (any one,
if more than one optimal solutions exist). In particular:
a. First, there should be a statement of the for m: “The optimal local alignment between given
sequences has score X and extends from position ? to position ? in sequence (name) and from
position ? to position ? in sequence (name).
b. Next, the alignment should be output in the following format:
A C C C - - A C - - A T - A . . . A T
A C - C G G A C A T A T T A . . . A T
G C C C - - G C - - G T - G . . . G T
G C - C G G G C G T G T T G . . . G T
pf3

Partial preview of the text

Download DNA Sequence Alignment with Affine Gap Penalty and Word-based Approach and more Assignments Computer Science in PDF only on Docsity!

Assignment 2 : Due on Tuesday, October 7, by 11:59 PM Note : Solution to the programming questions should be emailed to the instructor. See below for how to create a subdirectory for each problem in the assignment. Your email should contain the location of these sub-directories on the csil systems. Note : See the course web page for the late turn-in policy. Also note that you may request a 3-day extension at most once in the semester, by informing the instructor by e-mail. Note : Collaboration policy for this assignment – you may discuss the assignment with at most one other student. See “Basic Information” link on the course web page for more details. (In short, you may discuss, but must do the assignment on your own.)

  1. Local alignment with affine gap penalty (30 points). Your task is to implement a dynamic programming algorithm that finds the optimal local alignment of two input DNA sequences, with affine gap penalty. The program should take as input: a. Two “Fasta” format files, each with one DNA sequence (format description as per previous assignment). b. A text file containing a 4 x 4 matrix of substitution scores, to be used in the alignment (see sample below) c. Two (non-positive) real numbers representing the “gap open” and “gap extend” parameters. The program will be run from the Linux command-line as: The output of the program should be a textual display of the optimal local alignment (any one, if more than one optimal solutions exist). In particular: a. First, there should be a statement of the form: “The optimal local alignment between given sequences has score X and extends from position? to position? in sequence (name) and from position? to position? in sequence (name). b. Next, the alignment should be output in the following format: A C C C - - A C - - A T - A... A T A C - C G G A C A T A T T A... A T G C C C - - G C - - G T - G... G T G C - C G G G C G T G T T G... G T

In other words, if the alignment length is greater than the width of your output (say 60 characters, for easy readability), the alignment should be split over multiple lines with a clear spacing between consecutive fragments of the alignment. The program should have a reasonable level of commenting, for the instructor to understand the flow at a high level. In the directory that you submit for this problem (call it “problem1”), create a text file named “README” that has clear instructions on how to run (and if needed compile) the code. Example of a nucleotide substitution matrix: A C G T A 91 - 114 - 31 - 123 C - 114 100 - 125 - 31 G - 31 - 125 100 - 114 T - 123 - 31 - 114 91

  1. Experimenting with your alignment program (20 points). Use the random sequence simulator from Assignment 1 to create two sequences of length L each. (If you wish, you may ask another student for their simulator code.) Run your alignment program on these two sequences with fixed values of gap open and gap extend parameters. Find out the length and alignment score of the optimal local alignment. Now repeat this 1000 times, each time extracting the length and alignment score. Calculate the mean and standard deviation of each of these two measures. Now, vary the gap extend parameter (keeping the gap open fixed) and repeat the above exercise. Output the mean and standard deviation of the length and alignment score, for each value of the gap extend penalty. Choose a reasonable set of 10 values for your gap extend parameter. Repeat this for 10 different values of the gap open parameter (keeping the gap extend fixed). In other words, you are trying to investigate how the optimal alignment expected by chance depends upon each of the two gap-related parameters. In the directory that you submit for this problem (call it “problem2”), create a text file named “README” that has the above output.