Skip to content

Commit

Permalink
v1.4.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wym6912 committed Jul 11, 2023
1 parent 486bfcf commit 7b915c9
Show file tree
Hide file tree
Showing 388 changed files with 188,918 additions and 810 deletions.
35 changes: 5 additions & 30 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,8 @@ sub_example
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su

#data
data/*
test_data/cons.fa
*.dot
*.png
*.pdf

#tags
tags
cscope.*

# python
dist/*
pyabpoa.egg-info/*
python/build/*
python/dist/*
python/example.png
python/pyabpoa.c
python/pyabpoa.egg-info/*
python/src/*

# eval file
evaluation/msa_abPOA
evaluation/msa_spoa
#evaluation/racon_abPOA
#evaluation/racon_spoa
# Visual Studio Files
.vs/*
.vscode/*
x64/*
*.aps
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "include/getopt9"]
path = include/getopt9
url = git@github.com:wym6912/getopt9.git
25 changes: 4 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#CC = gcc
EXTRA_FLAGS = -Wno-unused-function -Wno-misleading-indentation -DUSE_SIMDE -DSIMDE_ENABLE_NATIVE_ALIASES
EXTRA_FLAGS = -Wno-unused-function -Wno-misleading-indentation -DUSE_SIMDE -DSIMDE_ENABLE_NATIVE_ALIASES -static
CFLAGS = -Wall -O3 $(EXTRA_FLAGS)

SIMD_FLAG = -march=native
Expand All @@ -8,7 +8,7 @@ ifneq ($(armv7),) # for ARMv7
SIMD_FLAG = -march=armv7-a -mfpu=neon -D__AVX2__
else
ifneq ($(armv8),) # for ARMv8
ifneq ($(aarch64),) # for Aarch64
ifneq ($(aarch64),) # for Aarch64
SIMD_FLAG = -march=armv8-a+simd -D__AVX2__
else # for Aarch32
SIMD_FLAG = -march=armv8-a+simd -mfpu=auto -D__AVX2__
Expand All @@ -33,7 +33,7 @@ ifneq ($(pg),)
CFLAGS += -pg
endif

LIB = -lm -lz -lpthread
LIB = -lm
ifneq ($(PREFIX),)
OUT_PRE_DIR = $(PREFIX)
else
Expand All @@ -60,19 +60,14 @@ FLAG_AVX2 = -mavx2

ifneq ($(sse2),)
SIMD_FLAG=$(FLAG_SSE2)
py_SIMD_FLAG = SSE2=1
else ifneq ($(sse41),)
SIMD_FLAG=$(FLAG_SSE41)
py_SIMD_FLAG = SSE41=1
else ifneq ($(avx2),)
SIMD_FLAG=$(FLAG_AVX2)
py_SIMD_FLAG = AVX2=1
#else ifneq ($(avx512f),)
# SIMD_FLAG=$(FLAG_AVX512F)
# py_SIMD_FLAG = AVX512f=1
#else ifneq ($(avx512bw),)
# SIMD_FLAG=$(FLAG_AVX512BW)
# py_SIMD_FLAG = AVX512BW=1
endif

.c.o:
Expand All @@ -83,11 +78,10 @@ ifneq ($(gdb),)
BIN = $(BIN_DIR)/gdb_abpoa
endif
ABPOALIB = $(LIB_DIR)/libabpoa.a
# TODO add example
EXAMPLE = example


all: $(BIN)
all: $(BIN)
abpoa: $(BIN)
libabpoa: $(ABPOALIB)
example: $(EXAMPLE)
Expand All @@ -113,16 +107,5 @@ $(SRC_DIR)/simd_check.o:$(SRC_DIR)/simd_check.c $(SRC_DIR)/simd_instruction.h
$(SRC_DIR)/simd_abpoa_align.o:$(SRC_DIR)/simd_abpoa_align.c $(SRC_DIR)/abpoa_graph.h $(SRC_DIR)/abpoa_align.h $(SRC_DIR)/simd_instruction.h $(SRC_DIR)/utils.h
$(CC) -c $(CFLAGS) $(SIMD_FLAG) -I$(INC_DIR) $< -o $@

install_py: python/cabpoa.pxd python/pyabpoa.pyx python/README.md
${py_SIMD_FLAG} python setup.py install

sdist: install_py
${py_SIMD_FLAG} python setup.py sdist #bdist_wheel

publish_pypi: clean_py sdist
twine upload dist/*

clean:
rm -f $(SRC_DIR)/*.[oa] $(LIB_DIR)/*.[oa] $(BIN)
clean_py:
rm -rf build/ dist/ pyabpoa.egg-info/ python/pyabpoa.c
125 changes: 97 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,73 @@
[![PyPI](https://img.shields.io/pypi/dm/pyabpoa.svg?label=pip%20install)](https://pypi.python.org/pypi/pyabpoa)
[![Published in Bioinformatics](https://img.shields.io/badge/Published%20in-Bioinformatics-blue.svg)](https://dx.doi.org/10.1093/bioinformatics/btaa963)
[![GitHub Issues](https://img.shields.io/github/issues/yangao07/abPOA.svg?label=Issues)](https://github.com/yangao07/abPOA/issues)
[![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)
<!-- [![PyPI](https://img.shields.io/pypi/v/pyabpoa.svg?style=flat)](https://pypi.python.org/pypi/pyabpoa) -->
# Modified by wym6912
[![Latest Release](https://img.shields.io/github/release/malabz/abPOA.svg?label=Release)](https://github.com/malabz/abPOA/releases/latest)
[![Github All Releases](https://img.shields.io/github/downloads/malabz/abPOA/total.svg?label=Download)](https://github.com/malabz/abPOA/releases)
[![BioConda Install](https://img.shields.io/conda/dn/wym6912/abpoa.svg?style=flag&label=BioConda%20install)](https://anaconda.org/wym6912/abpoa)

Modified by wym6912 wym6912@outlook.com

## Updates (v1.4.1.1)

- Add Windows compile support in `Visual Studio 2022`
- Fix RNA sequences when outputting `U` to `T` in `MSA-RC` format
- Add compile flag `-static` in all programs when using `cc`/`gcc`/`clang` compilers
- Remove `gz` dependency
- Remove `python` support

## Windows support

Add `Visual Studio 2022` support with defined these macros in `.vcxproj` files:

```c
#define USE_SIMDE
#define SIMDE_ENABLE_NATIVE_ALIASES
#define __AVX2__
#define WIN32_LEAN_AND_MEAN // fix conflict values
```
### For development in Windows
abPOA is not only a stand-alone tool for MSA and consensus calling, it can also work as a library. [`example.c`](example.c) shows how to use the C APIs of abPOA to take a set of sequences as input and perform MSA and consensus calling, and [`abPOA_example.vcxproj`](abPOA_example.vcxproj) shows how to use the libraries. Basically, the library project `lib_abPOA.vcxproj` with two header files [`abpoa.h`](include/abpoa.h) and [`simd_instruction.h`](include/simd_instruction.h) are needed to make the abPOA library work in your VS project.
## Getting started
### Linux
Download the [latest release](https://github.com/malabz/abPOA/releases):
```bash
wget https://github.com/malabz/abPOA/releases/download/v1.4.1.1/abPOA-v1.4.1.1.tar.gz
tar -zxvf abPOA-v1.4.1.1.tar.gz && cd abPOA-v1.4.1.1
```
Make from source and run with test data:
```bash
make; ./bin/abpoa ./test_data/seq.fa > cons.fa
```
Or, install via `conda` and run with test data:
```bash
conda install -c wym6912 abpoa
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.

Make programs from `Visual Studio 2022`:
- First of all, download and install [`Visual Studio 2022`](https://visualstudio.microsoft.com/vs/).
- Open `abpoa.sln` in `Visual Studio 2022`, then choose `Build` -> `Build Solution`.
- Open `x64\Debug` folder, you will find `abpoa.exe`.
- Note: If you want to release this solution, please switch it to `Release` mode. Select `Properties`, choose `Configuration Properties`, then press `Configuration Manager...` button, change `Active Solution configuration` to `Release`. You can find `abpoa.exe` in `x64\Release` folder.

Or, install via `conda` and run with test data:
```posh
conda install -c wym6912 abpoa
abpoa ./test_data/seq.fa > cons.fa
```

# RAW README

## Updates (v1.4.1)

- Take quality score in FASTQ format file as weight (-Q)
Expand All @@ -29,32 +93,37 @@ abpoa ./test_data/seq.fa > cons.fa
```
## Table of Contents

- [Introduction](#introduction)
- [Installation](#install)
- [Installing abPOA via conda](#conda)
- [Building abPOA from source files](#build)
- [Pre-built binary executable file for Linux/Unix](#binary)
- [General usage](#usage)
- [To generate one consensus sequence](#gen_1cons)
- [To generate multiple consensus sequences](#gen_mcons)
- [To generate row-column multiple sequence alignment](#gen_msa)
- [To generate graph information in GFA format](#gen_gfa)
- [To align sequence to an existing graph in GFA/MSA format](#aln_to_gfa)
- [To generate a plot of the alignment graph](#gen_plot)
- [Input](#input)
- [Output](#output)
- [Consensus sequence](#cons)
- [Row-column multiple sequence alignment](#msa)
- [Full graph information](#gfa)
- [Plot of alignment graph](#plot)
- [Algorithm description](#description)
- [Adaptive banding](#banding)
- [Minimizer-based seeding and partition](#seeding)
- [Minimizer-based progressive tree](#tree)
- [Multiple conensus sequences](#mcons)
- [For development](#dev)
- [Evaluation datasets](#eval)
- [Contact](#contact)
- [abPOA: adaptive banded Partial Order Alignment](#abpoa-adaptive-banded-partial-order-alignment)
- [Updates (v1.4.1)](#updates-v141)
- [Getting started](#getting-started)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Installation](#installation)
- [Installing abPOA via conda](#installing-abpoa-via-conda)
- [Building abPOA from source files](#building-abpoa-from-source-files)
- [Pre-built binary executable file for Linux/Unix](#pre-built-binary-executable-file-for-linuxunix)
- [General usage](#general-usage)
- [To generate consensus sequence](#to-generate-consensus-sequence)
- [To generate multiple consensus sequences](#to-generate-multiple-consensus-sequences)
- [To generate row-column multiple sequence alignment in FASTA format](#to-generate-row-column-multiple-sequence-alignment-in-fasta-format)
- [To generate graph information in GFA format](#to-generate-graph-information-in-gfa-format)
- [To align sequence to an existing graph in GFA/MSA format](#to-align-sequence-to-an-existing-graph-in-gfamsa-format)
- [To generate a plot of the alignment graph](#to-generate-a-plot-of-the-alignment-graph)
- [Input](#input)
- [Output](#output)
- [Consensus sequence](#consensus-sequence)
- [Row-column multiple sequence alignment](#row-column-multiple-sequence-alignment)
- [Full graph information](#full-graph-information)
- [Plot of alignment graph](#plot-of-alignment-graph)
- [Algorithm description](#algorithm-description)
- [Adaptive banding](#adaptive-banding)
- [Minimizer-based seeding mode](#minimizer-based-seeding-mode)
- [Minimizer-based progressive tree](#minimizer-based-progressive-tree)
- [Multiple consensus sequences](#multiple-consensus-sequences)
- [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 added abPOA.rc
Binary file not shown.
71 changes: 71 additions & 0 deletions abPOA.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.6.33801.468
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abPOA", "abPOA.vcxproj", "{824A11D7-BE30-4803-B58B-8E6EFC14FDF0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "getopt", "include\getopt9\src\getopt.vcxproj", "{A2169BC8-CF99-40BF-83F3-B0E38F7067BD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib_abPOA", "lib_abPOA.vcxproj", "{A193F522-5FE5-4012-BEEA-ACFC6BE9FC72}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abPOA_example", "abPOA_example.vcxproj", "{3102064C-3B1D-4104-BF65-113E01A0FAC6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "abPOA_sub_example", "abPOA_sub_example.vcxproj", "{3C4CFBB1-36E1-4237-9DD5-3EE3A9EBB83E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{824A11D7-BE30-4803-B58B-8E6EFC14FDF0}.Debug|x64.ActiveCfg = Debug|x64
{824A11D7-BE30-4803-B58B-8E6EFC14FDF0}.Debug|x64.Build.0 = Debug|x64
{824A11D7-BE30-4803-B58B-8E6EFC14FDF0}.Debug|x86.ActiveCfg = Debug|Win32
{824A11D7-BE30-4803-B58B-8E6EFC14FDF0}.Debug|x86.Build.0 = Debug|Win32
{824A11D7-BE30-4803-B58B-8E6EFC14FDF0}.Release|x64.ActiveCfg = Release|x64
{824A11D7-BE30-4803-B58B-8E6EFC14FDF0}.Release|x64.Build.0 = Release|x64
{824A11D7-BE30-4803-B58B-8E6EFC14FDF0}.Release|x86.ActiveCfg = Release|Win32
{824A11D7-BE30-4803-B58B-8E6EFC14FDF0}.Release|x86.Build.0 = Release|Win32
{A2169BC8-CF99-40BF-83F3-B0E38F7067BD}.Debug|x64.ActiveCfg = Debug|x64
{A2169BC8-CF99-40BF-83F3-B0E38F7067BD}.Debug|x64.Build.0 = Debug|x64
{A2169BC8-CF99-40BF-83F3-B0E38F7067BD}.Debug|x86.ActiveCfg = Debug|Win32
{A2169BC8-CF99-40BF-83F3-B0E38F7067BD}.Debug|x86.Build.0 = Debug|Win32
{A2169BC8-CF99-40BF-83F3-B0E38F7067BD}.Release|x64.ActiveCfg = Release|x64
{A2169BC8-CF99-40BF-83F3-B0E38F7067BD}.Release|x64.Build.0 = Release|x64
{A2169BC8-CF99-40BF-83F3-B0E38F7067BD}.Release|x86.ActiveCfg = Release|Win32
{A2169BC8-CF99-40BF-83F3-B0E38F7067BD}.Release|x86.Build.0 = Release|Win32
{A193F522-5FE5-4012-BEEA-ACFC6BE9FC72}.Debug|x64.ActiveCfg = Debug|x64
{A193F522-5FE5-4012-BEEA-ACFC6BE9FC72}.Debug|x64.Build.0 = Debug|x64
{A193F522-5FE5-4012-BEEA-ACFC6BE9FC72}.Debug|x86.ActiveCfg = Debug|Win32
{A193F522-5FE5-4012-BEEA-ACFC6BE9FC72}.Debug|x86.Build.0 = Debug|Win32
{A193F522-5FE5-4012-BEEA-ACFC6BE9FC72}.Release|x64.ActiveCfg = Release|x64
{A193F522-5FE5-4012-BEEA-ACFC6BE9FC72}.Release|x64.Build.0 = Release|x64
{A193F522-5FE5-4012-BEEA-ACFC6BE9FC72}.Release|x86.ActiveCfg = Release|Win32
{A193F522-5FE5-4012-BEEA-ACFC6BE9FC72}.Release|x86.Build.0 = Release|Win32
{3102064C-3B1D-4104-BF65-113E01A0FAC6}.Debug|x64.ActiveCfg = Debug|x64
{3102064C-3B1D-4104-BF65-113E01A0FAC6}.Debug|x64.Build.0 = Debug|x64
{3102064C-3B1D-4104-BF65-113E01A0FAC6}.Debug|x86.ActiveCfg = Debug|Win32
{3102064C-3B1D-4104-BF65-113E01A0FAC6}.Debug|x86.Build.0 = Debug|Win32
{3102064C-3B1D-4104-BF65-113E01A0FAC6}.Release|x64.ActiveCfg = Release|x64
{3102064C-3B1D-4104-BF65-113E01A0FAC6}.Release|x64.Build.0 = Release|x64
{3102064C-3B1D-4104-BF65-113E01A0FAC6}.Release|x86.ActiveCfg = Release|Win32
{3102064C-3B1D-4104-BF65-113E01A0FAC6}.Release|x86.Build.0 = Release|Win32
{3C4CFBB1-36E1-4237-9DD5-3EE3A9EBB83E}.Debug|x64.ActiveCfg = Debug|x64
{3C4CFBB1-36E1-4237-9DD5-3EE3A9EBB83E}.Debug|x64.Build.0 = Debug|x64
{3C4CFBB1-36E1-4237-9DD5-3EE3A9EBB83E}.Debug|x86.ActiveCfg = Debug|Win32
{3C4CFBB1-36E1-4237-9DD5-3EE3A9EBB83E}.Debug|x86.Build.0 = Debug|Win32
{3C4CFBB1-36E1-4237-9DD5-3EE3A9EBB83E}.Release|x64.ActiveCfg = Release|x64
{3C4CFBB1-36E1-4237-9DD5-3EE3A9EBB83E}.Release|x64.Build.0 = Release|x64
{3C4CFBB1-36E1-4237-9DD5-3EE3A9EBB83E}.Release|x86.ActiveCfg = Release|Win32
{3C4CFBB1-36E1-4237-9DD5-3EE3A9EBB83E}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C3BE6674-A98F-467B-83AF-D1FD3B7E3C08}
EndGlobalSection
EndGlobal
Loading

0 comments on commit 7b915c9

Please sign in to comment.