Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ public static Last[][] setScoreVector(int x, int xb, int yb, int ye, int gep, in
if (x == xb) {
pointers = new Last[ye + 1][1];
} else {
pointers = new Last[ye + 1][];
pointers = new Last[ye + 1][1];
pointers[0] = new Last[1];
for (int y = 1; y < scores[x].length; y++) {
pointers[y][0] = setScorePoint(x, y, gep, subs[y], scores);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,16 @@ public void testLinearAlignment() throws CompoundNotFoundException {
PairwiseSequenceAligner<DNASequence, NucleotideCompound> aligner = Alignments.getPairwiseAligner(query, target, PairwiseSequenceAlignerType.GLOBAL, gapP, matrix);
Assert.assertEquals(String.format("GTAAAA-G----------%nG-AAAACGTTTTTTTTTT%n"), aligner.getPair().toString());;
}
/**
* @author aegugup
*/
@Test
public void testLinearAlignmentLocal() throws CompoundNotFoundException {
DNASequence query = new DNASequence("TGTTACGG", DNACompoundSet.getDNACompoundSet());
DNASequence target = new DNASequence("GGTTGACTA", DNACompoundSet.getDNACompoundSet());
SubstitutionMatrix<NucleotideCompound> matrix = SubstitutionMatrixHelper.getNuc4_4();
SimpleGapPenalty gapP = new SimpleGapPenalty((short)0, (short)8);
PairwiseSequenceAligner<DNASequence, NucleotideCompound> aligner = Alignments.getPairwiseAligner(query, target, PairwiseSequenceAlignerType.LOCAL, gapP, matrix);
Assert.assertEquals(String.format("GTT-AC%nGTTGAC%n"), aligner.getPair().toString());;
}
}