diff --git a/README.md b/README.md
index c7d6dfa..e57cbe4 100644
--- a/README.md
+++ b/README.md
@@ -8,15 +8,15 @@
[![Build Status](https://img.shields.io/travis/yangao07/abPOA/master.svg?label=Master)](https://travis-ci.org/yangao07/abPOA)
[![License](https://img.shields.io/badge/License-MIT-black.svg)](https://github.com/yangao07/abPOA/blob/master/LICENSE)
-## Updates (v1.2.4)
+## Updates (v1.2.5)
-- Fix an overflow bug
+- Fix a bug in abpoa_poa
## Getting started
Download the [latest release](https://github.com/yangao07/abPOA/releases):
```
-wget https://github.com/yangao07/abPOA/releases/download/v1.2.4/abPOA-v1.2.4.tar.gz
-tar -zxvf abPOA-v1.2.4.tar.gz && cd abPOA-v1.2.4
+wget https://github.com/yangao07/abPOA/releases/download/v1.2.5/abPOA-v1.2.5.tar.gz
+tar -zxvf abPOA-v1.2.5.tar.gz && cd abPOA-v1.2.5
```
Make from source and run with test data:
```
@@ -65,7 +65,7 @@ abPOA supports three alignment modes (global, local, extension) and flexible sco
It right now supports SSE2/SSE4.1/AVX2/AVX512F/AVX512BW vectorization and more advanced instructions
will be supported in the future.
-For more information, please refer to our [preprint paper](https://doi.org/10.1101.2.40.05.07.083196).
+For more information, please refer to our [preprint paper](https://doi.org/10.1101.2.50.05.07.083196).
## Installation
@@ -80,9 +80,9 @@ You can also build abPOA from source files.
Make sure you have gcc (>=6.4.0) and zlib installed before compiling.
It is recommended to download the [latest release](https://github.com/yangao07/abPOA/releases).
```
-wget https://github.com/yangao07/abPOA/releases/download/v1.2.4/abPOA-v1.2.4.tar.gz
-tar -zxvf abPOA-v1.2.4.tar.gz
-cd abPOA-v1.2.4; make
+wget https://github.com/yangao07/abPOA/releases/download/v1.2.5/abPOA-v1.2.5.tar.gz
+tar -zxvf abPOA-v1.2.5.tar.gz
+cd abPOA-v1.2.5; make
```
Or, you can use `git clone` command to download the source code.
This gives you the latest version of abPOA, which might be still under development.
@@ -94,8 +94,8 @@ cd abPOA; make
### Pre-built binary executable file for Linux/Unix
If you meet any compiling issue, please try the pre-built binary file:
```
-wget https://github.com/yangao07/abPOA/releases/download/v1.2.4/abPOA-v1.2.4_x64-linux.tar.gz
-tar -zxvf abPOA-v1.2.4_x64-linux.tar.gz
+wget https://github.com/yangao07/abPOA/releases/download/v1.2.5/abPOA-v1.2.5_x64-linux.tar.gz
+tar -zxvf abPOA-v1.2.5_x64-linux.tar.gz
```
## General usage
diff --git a/setup.py b/setup.py
index 90590f3..a08c5c9 100644
--- a/setup.py
+++ b/setup.py
@@ -49,7 +49,7 @@
description = "pyabpoa: SIMD-based partial order alignment using adaptive band",
long_description = long_description,
long_description_content_type="text/markdown",
- version = "1.2.4",
+ version = "1.2.5",
url = "https://github.com/yangao07/abPOA",
author = "Yan Gao",
author_email = "gaoy286@mail.sysu.edu.cn",
diff --git a/src/abpoa.c b/src/abpoa.c
index 57d49cc..a5560f6 100644
--- a/src/abpoa.c
+++ b/src/abpoa.c
@@ -16,7 +16,7 @@ char PROG[20] = "abpoa";
#define _bO BOLD UNDERLINE "O" NONE
#define _bA BOLD UNDERLINE "A" NONE
char DESCRIPTION[100] = _ba "daptive " _bb "anded " _bP "artial " _bO "rder " _bA "lignment";
-char VERSION[20] = "1.2.4";
+char VERSION[20] = "1.2.5";
char CONTACT[30] = "gaoy286@mail.sysu.edu.cn";
const struct option abpoa_long_opt [] = {
diff --git a/src/abpoa_align.c b/src/abpoa_align.c
index 7442ffc..d650fe6 100644
--- a/src/abpoa_align.c
+++ b/src/abpoa_align.c
@@ -279,22 +279,23 @@ int abpoa_poa(abpoa_t *ab, abpoa_para_t *abpt, uint8_t **seqs, int *seq_lens, in
fprintf(stderr, "seq: # %d\n", i);
#endif
res.graph_cigar = 0; res.n_cigar = 0;
- abpoa_align_sequence_to_graph(ab, abpt, qseq, qlen, &res);
- if (abpt->amb_strand && (res.best_score < MIN_OF_TWO(qlen, ab->abg->node_n-2) * abpt->max_mat * .3333)) { // TODO .3333
- rc_qseq = (uint8_t*)_err_malloc(sizeof(uint8_t) * qlen);
- for (j = 0; j < qlen; ++j) {
- if (qseq[qlen-i-1] < 4) rc_qseq[i] = 3 - qseq[qlen-i-1];
- else rc_qseq[i] = 4;
- }
- abpoa_res_t rc_res; rc_res.n_cigar = 0, rc_res.graph_cigar = 0;
- simd_abpoa_align_sequence_to_graph(ab, abpt, rc_qseq, qlen, &rc_res);
- if (rc_res.best_score > res.best_score) {
- abpoa_res_copy(&res, &rc_res);
- qseq = rc_qseq;
- abs->is_rc[read_id] = 1;
- }
- if (rc_res.n_cigar) free(rc_res.graph_cigar);
- }
+ if (abpoa_align_sequence_to_graph(ab, abpt, qseq, qlen, &res) >= 0) {
+ if (abpt->amb_strand && (res.best_score < MIN_OF_TWO(qlen, ab->abg->node_n-2) * abpt->max_mat * .3333)) { // TODO .3333
+ rc_qseq = (uint8_t*)_err_malloc(sizeof(uint8_t) * qlen);
+ for (j = 0; j < qlen; ++j) {
+ if (qseq[qlen-j-1] < 4) rc_qseq[j] = 3 - qseq[qlen-j-1];
+ else rc_qseq[j] = 4;
+ }
+ abpoa_res_t rc_res; rc_res.n_cigar = 0, rc_res.graph_cigar = 0;
+ simd_abpoa_align_sequence_to_graph(ab, abpt, rc_qseq, qlen, &rc_res);
+ if (rc_res.best_score > res.best_score) {
+ abpoa_res_copy(&res, &rc_res);
+ qseq = rc_qseq;
+ abs->is_rc[read_id] = 1;
+ }
+ if (rc_res.n_cigar) free(rc_res.graph_cigar);
+ }
+ }
abpoa_add_graph_alignment(ab, abpt, qseq, qlen, NULL, res, read_id, tot_n_seq, 1);
if (abs->is_rc[read_id]) free(qseq);
if (res.n_cigar) free(res.graph_cigar);
diff --git a/src/simd_abpoa_align.c b/src/simd_abpoa_align.c
index 6369b94..c61e591 100644
--- a/src/simd_abpoa_align.c
+++ b/src/simd_abpoa_align.c
@@ -1266,7 +1266,7 @@ int abpoa_cg_dp(SIMDi *q, SIMDi *dp_h, SIMDi *dp_e1, SIMDi *dp_e2, SIMDi *dp_f1,
}
tot_dp_sn += (end_sn - beg_sn + 1);
#ifdef __DEBUG__
- fprintf(stderr, "index: %d (node: %d): beg, end: %d, %d\n", index_i, node_id, beg, end);
+ // fprintf(stderr, "index: %d (node: %d): beg, end: %d, %d\n", index_i, node_id, beg, end);
#endif
/* loop query */
// new init start
@@ -1560,7 +1560,7 @@ int abpoa_cg_global_align_sequence_to_graph_core(abpoa_t *ab, int beg_node_id, i
// printf("dp_sn: %d\n", tot_dp_sn);
// printf("dp_sn: %d, node_n: %d, seq_n: %d\n", tot_dp_sn, graph->node_n, qlen);
abpoa_global_get_max(graph, beg_index, end_node_id, index_map, DP_H2E2F, 5*dp_sn, qlen, dp_end, &best_score, &best_i, &best_j);
- simd_abpoa_print_cg_matrix(int32_t, beg_index, end_index);
+ // simd_abpoa_print_cg_matrix(int32_t, beg_index, end_index);
fprintf(stderr, "best_score: (%d, %d) -> %d\n", best_i, best_j, best_score);
res->best_score = best_score;
abpoa_cg_backtrack(DP_H2E2F, pre_index, pre_n, dp_beg, dp_end, dp_sn, abpt->m, mat, gap_ext1, gap_ext2, gap_oe1, gap_oe2, beg_index, best_i, best_j, qlen, graph, abpt, query, res);