demo code of AsMac Algorithm
Download C++
library SeqAn
Or use the attached version:
unzip seqan.zip
Compile the c++ code in folder CppAlign.
cd CppAlign
g++ -I "seqan_library_dir" -std=c++1z -o align main.cpp read_fasta.cpp
Then generate alignment distance result for the input sequences.
./align ../data/training_seq.fa 0
This might cost more than 1 day. The demo code use the finished result: training_dist_prepared.txt
cd ..
python setup_softnw.py build_ext --inplace
This will compile the _softnw.pyx
file to a .so
file. This file is required to run the jupyter-notebook
demo
The algorithm demo is written in Python 3.7
, model constructed by torch 1.6.0
Simply run the notebook file demo.ipynb
The code is a demo for the Continuous Sequence Matching model introduced in the paper: Predicting Alignment Distances via Continuous Sequence Matching