Git Product home page Git Product logo

ruby-edlib's Introduction

ruby-edlib

Gem Version test DOI

Edlib - A lightweight and super fast C/C++ library for sequence alignment using edit distance

Installation

gem install edlib

The Gem compiles the edlib source code inside the gem at installation. If you want to use the latest edlib, see Development.

Usage

require "edlib"

a = Edlib::Aligner.new(mode: :hw, task: :path)
a.align("AACG", "TCAACCTG")

# {
#  :edit_distance   => 1,
#  :alphabet_length => 4,
#  :locations       => [[2, 4], [2, 5]],
#  :alignment       => [0, 0, 0, 1],
#  :cigar           => "3=1I"
# }
keyword argument description
k edit distance is not larger than k [-1]
mode global (NW) , prefix (SHW) , infix (HW) ["NW"]
task DISTANCE, LOC, PATH ["DISTANCE"]
additional_equalities List of pairs of characters, where each pair defines two characters as equal. [NULL]
a.align("AACG", "TCAACCTG", nice: true)

# {
#   :edit_distance=>1,                                                 
#   :alphabet_length=>4,                                               
#   :locations=>[[2, 4], [2, 5]],                                      
#   :alignment=>[0, 0, 0, 1],                                          
#   :cigar=>"3=1I",                                                    
#   :query_aligned=>"AACG",                                            
#   :match_aligned=>"|||-",                                            
#   :target_aligned=>"AAC-"
# }        

Documentation

https://kojix2.github.io/ruby-edlib/

Development

Pull requests welcome!

git clone https://github.com/kojix2/ruby-edlib # Please fork repo
cd ruby-edlib
bundle install
bundle exec rake compile
bundle exec rake test

Use latest edlib

git clone https://github.com/kojix2/ruby-edlib
cd ruby-edlib
bundle install
bundle exec rake edlib:update # Download latest edlib.h and edlib.cpp
bundle exec rake compile
bundle exec rake test

ruby-edlib's People

Contributors

kojix2 avatar

Watchers

 avatar  avatar

ruby-edlib's Issues

Can not install it: undefined symbol: __gxx_personality_v0 - /root/.gem/gems/edlib-0.0.1/lib/edlib/edlib.so (LoadError)

require "edlib"

Error is:

 /root/.gem/gems/edlib-0.0.1/lib/edlib.rb:1:in `require_relative': /root/.gem/gems/edlib-0.0.1/lib/edlib/edlib.so:
 undefined symbol: __gxx_personality_v0 - /root/.gem/gems/edlib-0.0.1/lib/edlib/edlib.so (LoadError)

I just compiled upstream edlib from source and it installed fine. Source I used for this was:

https://github.com/Martinsos/edlib/releases

The lib/ I have after compiling the above, has:

libedlib.a

No idea where the symbol should be __gxx_personality_v0 though. This error comes when I do
the above require call.

Anyway just reporting this to let you know.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.