You are on page 1of 1

PROJECT TITLE: Project 1 DNA Sequence alignment.

DATE: 11/24/2014
AUTHOR: Venkata Suhas Maringanti
USER INSTRUCTIONS:
a) Compile Main.java using javac Main.java on the command line
b) Use input redirection during execution for the input. for example, java Main
< input.txt
c) Prints the best alignment of the two strings with the minimum edit distance i
n the format
described in the project write-up.
OVERVIEW OF THE PROJECT:
a) Data Structures used:
1) 2-dimensional array - Used for storing the similarity matrix and the
penalty matrix
for calculating the minimum edit distance and for track back to print
the best alignment.
b) Java APIs used:
1) Math.min(a, b) - Used for calculating the minimum of a and b. Used in
the calculation of the minimum edit distance.
2) StringBuilder(StringBuffer) - A mutable sequence of characters. Used
for printing the best alignment.
Special functions used : reverse() - returns the reverse of a StringB
uffer.
toString() - converts the StringBuffer to St
ring type.
append() - appends the specified string to t
he character sequence.
c) Summary of the implementation:
1) Used the idea of dynamic programming to design and analyze the algori
thm.
2) Implemented the Penalty matrix(penMatrix) using a 2-dimensional array
.
3) After filling the penMatrix according to the algorithm, penMatrix[m][
n] holds the value of the minimum edit distance,
where m and n are the lengths of the respective strings.
4) In order to print the best alignment, used a track back approach star
ting from the bottom most cell penMatrix[m][n]. Check
the values of the neighbors of penMatrix[i][j] and track back accordi
ngly until we reach the end of the strings.
5) Running time : O(m*n)
6) Classes used : Main.

You might also like