Skip to content

Commit 2f05f4a

Browse files
author
Mengyao Zhao
committed
2 parents 26ebac0 + 7d84de2 commit 2f05f4a

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

src/.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*.*~
2+
example_c
3+
example_cpp
4+
libssw.so
5+
libsswjni.so
6+
ssw.jar
7+
ssw.o
8+
ssw/Aligner.class
9+
ssw/Alignment.class
10+
ssw/Example.class
11+
ssw_cpp.o
12+
ssw_test

src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ $(JAVA_JAR): $(JAVA_OBJ)
4141
jar cvfe $@ ssw.Example $^
4242

4343
%.class: %.java
44-
javac $<
44+
javac -cp ./ $<
4545

4646
ssw.o: ssw.c ssw.h
4747
$(CC) -c -o $@ $< $(CFLAGS)

src/ssw_cpp.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,24 @@ void BuildSwScoreMatrix(const uint8_t& match_score,
2626

2727
// The score matrix looks like
2828
// // A, C, G, T, N
29-
// score_matrix_ = { 2, -2, -2, -2, 0, // A
30-
// -2, 2, -2, -2, 0, // C
31-
// -2, -2, 2, -2, 0, // G
32-
// -2, -2, -2, 2, 0, // T
33-
// 0, 0, 0, 0, 0};// N
29+
// score_matrix_ = { 2, -2, -2, -2, -2, // A
30+
// -2, 2, -2, -2, -2, // C
31+
// -2, -2, 2, -2, -2, // G
32+
// -2, -2, -2, 2, -2, // T
33+
// -2, -2, -2, -2, -2};// N
3434

3535
int id = 0;
3636
for (int i = 0; i < 4; ++i) {
3737
for (int j = 0; j < 4; ++j) {
3838
matrix[id] = ((i == j) ? match_score : static_cast<int8_t>(-mismatch_penalty));
3939
++id;
4040
}
41-
matrix[id] = 0;
41+
matrix[id] = static_cast<int8_t>(-mismatch_penalty); // For N
4242
++id;
4343
}
4444

4545
for (int i = 0; i < 5; ++i)
46-
matrix[id++] = 0;
46+
matrix[id++] = static_cast<int8_t>(-mismatch_penalty); // For N
4747

4848
}
4949

0 commit comments

Comments
 (0)