I'm trying to write a code to algin 2 sequences where gaps are for free in the beginning and the end of the second sequence i.e.
s1 = CATACGTCGACGGCT s2 = ACGACGT**AAAAC**
I need to stop at some point(T for example) in s2 where the two sequences don't match anymore ( global alignment with free gaps at start and end)
I used a semi global alignment approach s1 in row, s2 in column , initialize the first row to 0 , initialize the 1st column as gaps accumulation
Questions :1- what is the best way to chose the beginning of trace back , is it the maximum of the last row ? 2- for this problem filling the matrix is like local alignment (minimum =0) or like the global one ore negative values are allowed ?