0.0
No commit activity in last 3 years
No release in over 3 years
A simple gem to perform fast pairwise sequence alignment using seqan
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.1
 Project Readme

BioSeqAlign

A gem to perform pairwise sequence alignment using the seqan library. Currently, local alignment, global alignment, prefix-suffix alignment (overhang), and fitting alignment (semi-global) are implemented.

Gem Version Build Status

Why use this gem?

If you need to perform pairwise alignment in Ruby, use the align gem (https://github.com/justfalter/align), it's a very nice Ruby implementation. However, if you need a faster alternative, i.e., performing many alignments, bioseqalign can help. Since it uses SeqAn C++ library, it can be much faster than pure Ruby. Alternatively, if you need to perform fitting or prefix-suffix alignment, these are supported without modification.

Requirements

This gem relies on the following gems/libraries

Install

This gem requires SeqAn to be installed on the system, on ubuntu, this can be done by

apt-get install seqan-dev

To install the gem, run

gem install bioseqalign

If you do not have permissions to install SeqAn system-wide, and require a user directory install of seqan-dev, you can specify the path by:

gem install bioseqalign -- --with-seqan-include=/home/username/seqan-1.4.1/

Note, has only been tested with seqan version 1.4+, it can be found here.

Example

Once you install the gem, you can start using it. If you want to perform a fitting alignment, you can try the following.

require 'bioseqalign'

BioSeqAlign.fitAlignStr("AAAAAAAAGCTGAAAAAAAA", "GCTG")

Which would produce the following output

["AAAAAAAAGCTGAAAAAAAA", "--------GCTG--------"]

If you just want the score

BioSeqAlign.fitAlignScore("AAAAAAAAGCTGAAAAAAAA", "GCTG")

Which returns a value of

4