Assignment 2
Due: 7:00 PM on Wedsnesday, March 9, 2005
Write and document a Java program PSA for performing
the various types of semi-global pairwise sequence alignment discussed
in class relative
to DNA sequences. The various types of alignment will be invoked using
command-line arguments as
java PSA code seq1-file seq2-file cost-matrix-file
where the cost-matrix is a similarity matrix and code is
a four-digit binary code that is interpreted as follows:
- Digit #1 = 1 (0): (Don't) ignore initial indels in seq1.
- Digit #2 = 1 (0): (Don't) ignore initial indels in seq2.
- Digit #3 = 1 (0): (Don't) ignore final indels in seq1.
- Digit #4 = 1 (0): (Don't) ignore final indels in seq2.
Note that pairwise global alignment relative to a similarity
cost matrix corresponds to semi-global alignment with the
code 0000.
The only line in each DNA sequence file will be the sequence itself
written in capital letters over the alphabet {A,G,C,T}. Each
cost-matrix file will specify a 5 x 5 matrix on 5 lines (one per row),
where the rows in order correspond to the symbols, A, G, C, T, and
indel. Your program should print out the completed dynamic-programming
matrix associated with such an alignment as well as one of the
optimal alignments obtained by traceback in this matrix.
You may assume that all sequences are less than 20 symbols
long, that no DNA sequence file is empty, and that all files are
formatted correctly.
Output for this program relative to the
files
DNAseq1.dat,
DNAseq2.dat,
DNAseq3.dat,
DNAseq4.dat,
DNAseq5.dat,
cms1.dat, and
cms2.dat
is shown in script file
out.PSA.
Submission
Please hand in printed copies of your Java source code
files.
You must also submit these files electronically using the
submit-assignment command.
Note that each
such file must have the following comment block
at the top, where
the X's are replaced with the appropriate information. For instance,
my code for PSA.java would begin with the
following comment block:
/////////////////////////////////////////////////////////////////
// CS 4762 (Winter 2005), Assignment #2 //
// Program File Name: PSA.java //
// Student Name: Todd Wareham //
// Login Name: harold //
// MUN #: 8008765 //
/////////////////////////////////////////////////////////////////
You do not have to develop your code on our CS departmental systems.
However, as your code will be compiled and tested on our CS departmental
systems as part of the assignment marking process,
you should ensure that your code compiles and runs correctly on at
least one of these systems.
- Feb 28, 4:15pm
Changed due date of Assignment #2 to March 9.
- Jan 28, 10:00am
Text of Assignment #2 posted.
Created: November 24, 2004
Last Modified: February 28, 2005