Skip to content

Instantly share code, notes, and snippets.

@dansondergaard
Created October 5, 2012 10:52
Show Gist options
  • Save dansondergaard/3839231 to your computer and use it in GitHub Desktop.
Save dansondergaard/3839231 to your computer and use it in GitHub Desktop.
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