Implementation of Needleman-Wunsch pairwise alignment of DNA sequences in R language. It supports sequences with ambigious base counts and gapped sequences. Moreover, this library provides two function to read and write FASTA files.
Installation:
devtools::install_github("Takheer/NWPA")
Usage of align
:
align("example_1.fas", "alignedSequences.fas")
Will align two first sequences from example_1.fas
file and will write them aligned into alignedSequences.fas
Default settings are 1
for match
, 0
for mismatch
and -1
for gap
insertion/deletion
You can also set your own values:
align("example_1.fas", "alignedSequences.fas", match=0, mismatch=-2, gap=-1)