I have attempted to write a program that assesses the alignment score of two sequences using an input that provides:
A sequence of letters indicating sequence A
2. A sequence of letters indicating sequence B
3. An indication of whether local (1) or global (0) alignment is sought.
4. A gap penalty for introducing gaps into A or B.
5. The symbol alphabets to be used (e.g. ATGC for DNA strands and 20 single-letter abbreviations for the proteins, but there could be other symbols)
6. Lines showing the score between an element in A and one in B.
But my tracebacks aligments that are displayed at the end are off. i have used i-2,j-2 for traceback because i-1, j-1 gave me out of range errors. Now as it iterates, where it should place a gap at the beginning, it places the last letter of the sequence. Can someone explain what is going on?
Attached File(s)
-
inputsample.txt (211bytes)
Number of downloads: 16 -
inputexplained.txt (1.11K)
Number of downloads: 22 -
code.txt (11.58K)
Number of downloads: 19

New Topic/Question
Reply



MultiQuote




|