Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential indexing issue? #1

Open
TransGirlCodes opened this issue Mar 15, 2018 · 1 comment
Open

Potential indexing issue? #1

TransGirlCodes opened this issue Mar 15, 2018 · 1 comment

Comments

@TransGirlCodes
Copy link

TransGirlCodes commented Mar 15, 2018

On this line:

traceback[0] = matrix[i-1][j-1]+similarityScore(seqA[i-1],seqB[j-1]);

There is the possibility of indexing into a matrix or string with a j of -1 when the loop does its first iteration, as j is initialized as 0 for the start of the inner loop, should j be set to one to start the inner loop?

@jianshu93
Copy link

On this line:

traceback[0] = matrix[i-1][j-1]+similarityScore(seqA[i-1],seqB[j-1]);

There is the possibility of indexing into a matrix or string with a j of -1 when the loop does its first iteration, as j is initialized as 0 for the start of the inner loop, should j be set to one to start the inner loop?

I agree and I try the sequences "CAGTATCGCA" and "AAGTTAGCAG", manually local alignment returns a score of 5 (I believe it is correct) but this script returns 4, I think It is due to the index problem you mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants