Skip to content

Commit 846fc91

Browse files
committed
Fix ssw_init to not depend on subMat
1 parent 06b27a0 commit 846fc91

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/alignment/StripedSmithWaterman.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,9 +1413,9 @@ void SmithWaterman::ssw_init(const Sequence* q,
14131413
memset(profile->pos_aa_rev, 0x80, q->L*32); // do we need it?
14141414
int rowIdx = 0;
14151415
for (int i = 0; i < profile->query_length; i++) {
1416-
for (int aa = 0; aa < subMat->alphabetSize; aa++) {
1416+
for (int aa = 0; aa < m->alphabetSize; aa++) {
14171417
int score = profile->mat_rev[aa * profile->query_length + i];
1418-
// int idx = rowIdx + (subMat->num2aa[aa] - 'A'); //orig
1418+
// int idx = rowIdx + (m->num2aa[aa] - 'A'); //orig
14191419
int idx = rowIdx + aa; //new
14201420
profile->pos_aa_rev[idx] = static_cast<int8_t>(score);
14211421
}
@@ -1427,11 +1427,10 @@ void SmithWaterman::ssw_init(const Sequence* q,
14271427
block->query_bias_arr[i] = profile->composition_bias_rev[i];
14281428
}
14291429

1430-
for (int aa1 = 0; aa1 < subMat->alphabetSize; aa1++) {
1431-
for (int aa2 = 0; aa2 < subMat->alphabetSize; aa2++) {
1430+
for (int aa1 = 0; aa1 < m->alphabetSize; aa1++) {
1431+
for (int aa2 = 0; aa2 < m->alphabetSize; aa2++) {
14321432
// instead of num2aa, use aa directly
1433-
block_set_aamatrix_num(block->mat_aa, aa1, aa2,
1434-
subMat->subMatrix[aa1][aa2]);
1433+
block_set_aamatrix_num(block->mat_aa, aa1, aa2, m->subMatrix[aa1][aa2]);
14351434
}
14361435
}
14371436
}

0 commit comments

Comments
 (0)