Skip to content

Commit

Permalink
v1.4.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
wym6912 committed Aug 22, 2023
1 parent 1cbade4 commit 355a188
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 10 deletions.
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@

Modified by wym6912 wym6912@outlook.com

## Updates (v1.4.1.5)

- Try to fix a bug on processing 0 length sequence
- Add sequence comment print

## Updates (v1.4.1.4)

- Fix a critical bug on freeing SIMD varibles in Windows programs
Expand Down Expand Up @@ -58,8 +63,8 @@ abPOA is not only a stand-alone tool for MSA and consensus calling, it can also
Download the [latest release](https://github.com/malabz/abPOA/releases):
```bash
wget https://github.com/malabz/abPOA/releases/download/v1.4.1.3/abPOA-v1.4.1.3.tar.gz
tar -zxvf abPOA-v1.4.1.3.tar.gz && cd abPOA-v1.4.1.3
wget https://github.com/malabz/abPOA/releases/download/v1.4.1.5/abPOA-v1.4.1.5.tar.gz
tar -zxvf abPOA-v1.4.1.5.tar.gz && cd abPOA-v1.4.1.5
```
Make from source and run with test data:
```bash
Expand All @@ -73,7 +78,7 @@ abpoa ./test_data/seq.fa > cons.fa

### Windows

Download the [latest release](https://github.com/malabz/abPOA/releases/download/v1.4.1.1/abPOA-v1.4.1.1.tar.gz) and use `Bandizip`, `WinRAR` or any other archive manager software.
Download the [latest release](https://github.com/malabz/abPOA/releases/download/v1.4.1.5/abPOA-v1.4.1.5.tar.gz) and use `Bandizip`, `WinRAR` or any other archive manager software.

Make programs from `Visual Studio 2022`:
- First of all, download and install [`Visual Studio 2022`](https://visualstudio.microsoft.com/vs/).
Expand Down Expand Up @@ -111,8 +116,20 @@ abpoa ./test_data/seq.fa > cons.fa
## Table of Contents

- [abPOA: adaptive banded Partial Order Alignment](#abpoa-adaptive-banded-partial-order-alignment)
- [Updates (v1.4.1)](#updates-v141)
- [Modified by wym6912](#modified-by-wym6912)
- [Updates (v1.4.1.5)](#updates-v1415)
- [Updates (v1.4.1.4)](#updates-v1414)
- [Updates (v1.4.1.3)](#updates-v1413)
- [Updates (v1.4.1.2)](#updates-v1412)
- [Updates (v1.4.1.1)](#updates-v1411)
- [Windows support](#windows-support)
- [For development in Windows](#for-development-in-windows)
- [Getting started](#getting-started)
- [Linux](#linux)
- [Windows](#windows)
- [RAW README](#raw-readme)
- [Updates (v1.4.1)](#updates-v141)
- [Getting started](#getting-started-1)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Installation](#installation)
Expand Down Expand Up @@ -140,7 +157,6 @@ abpoa ./test_data/seq.fa > cons.fa
- [For development](#for-development)
- [Evaluation datasets](#evaluation-datasets)
- [Contact](#contact)
- [Windows modification](#windows-modification)

## <a name="introduction"></a>Introduction
abPOA is an extended version of [Partial Order Alignment (POA](10.1093/bioinformatics/18.3.452))
Expand Down
Binary file modified abPOA.rc
Binary file not shown.
Binary file modified abPOA_profile.rc
Binary file not shown.
2 changes: 1 addition & 1 deletion src/abpoa.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ char PROG[20] = "abpoa";
#define _bO BOLD UNDERLINE "O" NONE
#define _bA BOLD UNDERLINE "A" NONE
char DESCRIPTION[200] = _ba "daptive " _bb "anded " _bP "artial " _bO "rder " _bA "lignment";
char VERSION[20] = "1.4.1.4";
char VERSION[20] = "1.4.1.5";
char CONTACT[30] = "gaoy1@chop.edu";

const struct option abpoa_long_opt [] = {
Expand Down
31 changes: 31 additions & 0 deletions src/abpoa_align.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ int abpoa_poa(abpoa_t *ab, abpoa_para_t *abpt, uint8_t **seqs, int **weights, in
uint8_t *qseq, *rc_qseq; int *weight, *rc_weight;
// uint8_t *seq1;
for (i = 0; i < n_seq; ++i) {
if(seq_lens[i] == 0) continue;
qlen = seq_lens[i]; qseq = seqs[i]; weight = weights[i]; read_id = exist_n_seq + i;
#ifdef __DEBUG__
fprintf(stderr, "seq: # %d\n", i);
Expand Down Expand Up @@ -507,9 +508,39 @@ int abpoa_msa1(abpoa_t *ab, abpoa_para_t *abpt, char *read_fn, FILE *out_fp) {
// always reset graph before perform POA
int max_len = 0;
for (i = 0; i < abs->n_seq; ++i) {
if (! abs->seq[i].l)
{
_err_simple_func_printf("Warning: Found a sequence length = 0. Program maybe generate wrong consensus sequence and wrong gfa.");
continue;
}
else if (abs->seq[i].l == 1 && abs->seq[i].s[0] == 13)
{
_err_simple_func_printf("Warning: Found a sequence length = 0. Program maybe generate wrong consensus sequence and wrong gfa.");
continue;
}
if (abs->seq[i].l > max_len) max_len = abs->seq[i].l;
}

if (max_len == 0)
{
if (abpt->out_cons)
err_printf("Warning: no consensus sequence generated.\n");
if (abpt->out_gfa)
err_printf("Warning: no gfa generated.\n");
if (abpt->out_msa)
{
for(i = 0; i < abs->n_seq; ++i)
{
if (abs->name[i].l + abs->comment[i].l > 0) {
fprintf(out_fp, ">%s %s\n", abs->name[i].l ? abs->name[i].s : "", abs->comment[i].l ? abs->comment[i].s : "");
} else {
fprintf(out_fp, ">Seq_%d\n", i+1);
}
fputc('\n', out_fp);
}
}
return 0;
}
// detect u and t
int has_st = 0, has_su = 0;

Expand Down
6 changes: 3 additions & 3 deletions src/abpoa_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ void abpoa_output_rc_msa(abpoa_t *ab, abpoa_para_t *abpt, FILE *out_fp) {
abpoa_seq_t *abs = ab->abs; abpoa_cons_t *abc = ab->abc;
if (abc->msa_len <= 0) return;
for (i = 0; i < abs->n_seq; ++i) {
if (abs->name[i].l > 0) {
if (abs->is_rc[i]) fprintf(out_fp, ">%s_reverse_complement\n", abs->name[i].s);
else fprintf(out_fp, ">%s\n", abs->name[i].s);
if (abs->name[i].l + abs->comment[i].l > 0) {
if (abs->is_rc[i]) fprintf(out_fp, ">%s_reverse_complement %s\n", abs->name[i].l ? abs->name[i].s : "", abs->comment[i].l ? abs->comment[i].s : "");
else fprintf(out_fp, ">%s %s\n", abs->name[i].l ? abs->name[i].s : "", abs->comment[i].l ? abs->comment[i].s : "");
} else {
fprintf(out_fp, ">Seq_%d\n", i+1);
}
Expand Down
2 changes: 1 addition & 1 deletion src/abpoa_profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ char PROG[20] = "abpoa_profile";
#define _bO BOLD UNDERLINE "O" NONE
#define _bA BOLD UNDERLINE "A" NONE
char DESCRIPTION[200] = _ba "daptive " _bb "anded " _bP "artial " _bO "rder " _bA "lignment profile-profile mode";
char VERSION[20] = "1.4.1.4";
char VERSION[20] = "1.4.1.5";
char CONTACT[30] = "gaoy1@chop.edu";

int need_prealign;
Expand Down
5 changes: 5 additions & 0 deletions test_data/all_0_len.fasta
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
> seq1

> seq2

> seq3
8 changes: 8 additions & 0 deletions test_data/has_0_len.fasta
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
> seq1

> seq2
AC
> seq3

> seq4
AG

0 comments on commit 355a188

Please sign in to comment.