Skip to content

Latest commit

 

History

History
88 lines (68 loc) · 2.02 KB

README.md

File metadata and controls

88 lines (68 loc) · 2.02 KB

Sequence Aligner

Generation

Dependencies

There are no dependencies The project is made with c++17 with STL data types

Compilation

There are two ways to produce the nwalign binary. To produce the binary with the first implementation (ignoring o), do:

$ make nwalign_simple

To produce the binary with the second implementation (that is a bit slower but takes o into account), do:

$ make nwalign

By default, the second version is made doing

$ make

The second version being the most complete, it will be the one used in the usage and example parts. We just made possible to compile a faster version, since it is possible to prefer it to the second one in a realistic context.

Since the substitution matrices are stored in files in the project (in matrices/), the project folder must not be moved after compiling, since the absolute path of the matrices folder is given at compile time. However, the nwalign binary can be executed from anywhere.

To remove the produced files, just do:

$ make clean

Usage

To compute the alignment score of two sequences, do:

$ ./nwalign score <seq1> <seq2>

To get the alignment of two sequences, do:

$ ./nwalign align <seq1> <seq2>

You can also set the values $e$ and $o$ of $\gamma(x) = ex + o$ To do so, do:

./nwalign --gamma=<e>,<o> <cmd> <seq1> <seq2>

Examples

Here are some example of usage:

$ ./nwalign score TTAATCGGATCGGATC GAAATCGCTAA
-2.0
$ ./nwalign align TTAATCGGATCGGATC GAAATCGCTAA
TTAATCGGATCGGATC
GAAATC-G--C-TA-A
$ ./nwalign score HDGDYSCDKSLZIKZDYHQNNS FEZFKEILPMMSCGTDTGZ
8.0
$ ./nwalign align HDGDYSCDKSLZIKZDYHQNNS FEZFKEILPMMSCGTDTGZ
HDGDYSCDKS-L-ZIK--ZDYHQNNS
FE-ZF---KEILPMMSCGTD---TGZ
$ ./nwalign --gamma=-2,-2 score GCTDHFYEHDYZHDTCGZTDFZDTLM DZGDYGCCZPIKZASKDDY
-3.0
$ ./nwalign --gamma=-2,-2 align GCTDHFYEHDYZHDTCGZTDFZDTLM DZGDYGCCZPIKZASKDDY
GCTDHFYEHDYZHDTC---GZTDFZDTLM
---D---ZGDY--GCCZPIKZAS-KDD-Y