Skip to content

Commit

Permalink
Fixing a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmed Moustafa committed Jul 4, 2013
1 parent 7ea13e0 commit 127ddf7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/jaligner/NeedlemanWunschGotoh.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ public static Alignment align(Sequence s1, Sequence s2, Matrix matrix,
// Initializes the boundaries of the traceback matrix.
for (int i = 1, k = n; i < m; i++, k += n) {
pointers[k] = Directions.UP;
lengths[k] = (short) i;
lengths[k] = i;
}
for (int j = 1; j < n; j++) {
pointers[j] = Directions.LEFT;
lengths[j] = (short) j;
lengths[j] = j;
}

Cell cell = construct(_s1, _s2, scores, o, e, pointers, lengths);
Expand Down Expand Up @@ -203,10 +203,10 @@ private static Cell construct(Sequence s1, Sequence s2, float[][] matrix,
pointers[l] = Directions.DIAGONAL;
} else if (v[j] == g[j]) {
pointers[l] = Directions.UP;
lengths[l] = (short) lengthOfVerticalGap[j];
lengths[l] = lengthOfVerticalGap[j];
} else if (v[j] == h) {
pointers[l] = Directions.LEFT;
lengths[l] = (short) lengthOfHorizontalGap;
lengths[l] = lengthOfHorizontalGap;
}

} // loop columns
Expand Down

0 comments on commit 127ddf7

Please sign in to comment.