Search
test1.in
test1.out
test2.in
test2.out
compile.sh
alignment.sh
packages.txt
Implement the pairwise global alignment algorithm (Needleman-Wunch) and the pairwise local alignment algorithm (Smith-Waterman) in an arbitrary programming language (e.g., Python, Perl, Java). Required arguments are two input sequences in a FASTA format, a scoring matrix in CSV format (e.g., blosum62 file), and a gap penalization.
Program alignment.sh should accept the following arguments:
-g
-l
-s1
-s2
-e
-p
-pe
bash
./alignment.sh -g -s1 A0PQ23.fasta -s2 Q9CD83.fasta -e blosum62.csv -p 4
A0PQ23.fasta
Q9CD83.fasta
blosum62.csv
./alignment.sh -l -s1 EU078679.fasta -s2 CH954156.fasta -e blastmatrix.csv -p 4
EU078679.fasta
CH954156.fasta
blastmatrix.csv
The final alignment and the corresponding score print to STDOUT on three lines containing:
The result of the second call would be:
TTGACAGTACATAG TTGA-AGTTTGTAG 34
Your program needs to run in quadratic time and must not allocate more than a quadratic amount of memory. Submitting a code that does not compile may result in significant point reduction.
The alignment implementation must be solely your own work. However, you can you any external library of your choice for the following:
Don't forget that your code needs to compile!