From 87404d48d3755d6c5184be8da0005b6e6c3fea59 Mon Sep 17 00:00:00 2001 From: muchabi Date: Tue, 19 Apr 2016 14:35:44 -0400 Subject: [PATCH 1/4] Remove unnecessary new line printed to stderr --- src/ssw.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ssw.c b/src/ssw.c index df4122a..bf31ba5 100644 --- a/src/ssw.c +++ b/src/ssw.c @@ -294,8 +294,6 @@ static alignment_end* sw_sse2_byte (const int8_t* ref, if (maxColumn[i] == terminate) break; } -fprintf(stderr, "\n"); - /* Trace the alignment ending position on read. */ uint8_t *t = (uint8_t*)pvHmax; int32_t column_len = segLen * 16; From 6cd58ef0b304ec523ac51d0731e1ed9ccecd6c36 Mon Sep 17 00:00:00 2001 From: Wanping Lee Date: Sun, 1 May 2016 03:55:41 +0000 Subject: [PATCH 2/4] Give N penalty. --- src/ssw_cpp.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ssw_cpp.cpp b/src/ssw_cpp.cpp index b21d354..581179f 100644 --- a/src/ssw_cpp.cpp +++ b/src/ssw_cpp.cpp @@ -26,11 +26,11 @@ void BuildSwScoreMatrix(const uint8_t& match_score, // The score matrix looks like // // A, C, G, T, N - // score_matrix_ = { 2, -2, -2, -2, 0, // A - // -2, 2, -2, -2, 0, // C - // -2, -2, 2, -2, 0, // G - // -2, -2, -2, 2, 0, // T - // 0, 0, 0, 0, 0};// N + // score_matrix_ = { 2, -2, -2, -2, -2, // A + // -2, 2, -2, -2, -2, // C + // -2, -2, 2, -2, -2, // G + // -2, -2, -2, 2, -2, // T + // -2, -2, -2, -2, -2};// N int id = 0; for (int i = 0; i < 4; ++i) { @@ -38,12 +38,12 @@ void BuildSwScoreMatrix(const uint8_t& match_score, matrix[id] = ((i == j) ? match_score : static_cast(-mismatch_penalty)); ++id; } - matrix[id] = 0; + matrix[id] = -mismatch_penalty; // For N ++id; } for (int i = 0; i < 5; ++i) - matrix[id++] = 0; + matrix[id++] = -mismatch_penalty; // For N } From 474a36da49dddac4d9cd9bda766b5d430fc8d247 Mon Sep 17 00:00:00 2001 From: Wanping Lee Date: Mon, 2 May 2016 22:29:19 +0000 Subject: [PATCH 3/4] iFix the bug of N penalty. --- src/ssw_cpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ssw_cpp.cpp b/src/ssw_cpp.cpp index 581179f..7bd3beb 100644 --- a/src/ssw_cpp.cpp +++ b/src/ssw_cpp.cpp @@ -38,12 +38,12 @@ void BuildSwScoreMatrix(const uint8_t& match_score, matrix[id] = ((i == j) ? match_score : static_cast(-mismatch_penalty)); ++id; } - matrix[id] = -mismatch_penalty; // For N + matrix[id] = static_cast(-mismatch_penalty); // For N ++id; } for (int i = 0; i < 5; ++i) - matrix[id++] = -mismatch_penalty; // For N + matrix[id++] = static_cast(-mismatch_penalty); // For N } From b8b56b762fd46b96ef178a828d485e076fa25f38 Mon Sep 17 00:00:00 2001 From: Adam Kiezun Date: Tue, 10 May 2016 22:37:10 -0400 Subject: [PATCH 4/4] fix make java, add gitignore --- src/.gitignore | 12 ++++++++++++ src/Makefile | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/.gitignore diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..c0117fa --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,12 @@ +*.*~ +example_c +example_cpp +libssw.so +libsswjni.so +ssw.jar +ssw.o +ssw/Aligner.class +ssw/Alignment.class +ssw/Example.class +ssw_cpp.o +ssw_test diff --git a/src/Makefile b/src/Makefile index 3c02692..f726378 100644 --- a/src/Makefile +++ b/src/Makefile @@ -41,7 +41,7 @@ $(JAVA_JAR): $(JAVA_OBJ) jar cvfe $@ ssw.Example $^ %.class: %.java - javac $< + javac -cp ./ $< ssw.o: ssw.c ssw.h $(CC) -c -o $@ $< $(CFLAGS)