➰ minigraph - the sequence-to-graph mapper - for Ruby
🚧 under development
gem install ruby-minigraph
Compiling from source
git clone --recursive https://github.com/kojix2/ruby-minigraph
cd ruby-minigraph
bundle install
bundle exec rake minigraph:build
bundle exec rake install
require "minigraph"
Minigraph.execute("--version")
Only low-level functions are provided at this time.
require "minigraph"
MG = Minigraph
n_threads = 4
target = "ext/minigraph/test/MT-human.fa"
queries = ["ext/minigraph/test/MT-orangeA.fa"]
opt = MG::FFI::MapOpt.new
ipt = MG::FFI::IdxOpt.new
gpt = MG::FFI::GGOpt.new
MG::FFI.mg_opt_set(0, ipt, opt, gpt)
g = MG::FFI.gfa_read(target)
ptr = FFI::MemoryPointer.new(:pointer, queries.length)
ptrs = queries.map{ FFI::MemoryPointer.from_string(_1) }
ptr.write_array_of_pointer(ptrs)
MG::FFI.mg_map_files(g, 1, ptr, ipt, opt, n_threads)
MG::FFI.gfa_destroy(g)
git clone --recursive https://github.com/kojix2/ruby-minigraph
# git clone https://github.com/kojix2/ruby-minigraph
# cd ruby-minigraph
# git submodule update -i
cd ruby-minigraph
bundle install
bundle exec rake minigraph:build
bundle exec rake test
ruby-minigraph is a library under development and there are many points to be improved. If you improve the source code, please feel free to send us your pull request. Typo corrections are also welcome.
Bug reports and pull requests are welcome on GitHub at https://github.com/kojix2/ruby-minigraph.