Created
October 5, 2012 10:52
-
-
Save dansondergaard/3839231 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int scoreMatrixRead(ScoreMatrix *sm, char x, char y) { | |
int idx, jdx; | |
switch (tolower(x)) { | |
case 'a': idx = 0; break; | |
case 'c': idx = 1; break; | |
case 'g': idx = 2; break; | |
case 't': idx = 3; break; | |
} | |
switch (tolower(y)) { | |
case 'a': jdx = 0; break; | |
case 'c': jdx = 1; break; | |
case 'g': jdx = 2; break; | |
case 't': jdx = 3; break; | |
} | |
return sm->matrix[idx][jdx]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment