0.0
No release in over a year
Ruby bindings for minigraph (bioinformatics)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

ruby-minigraph

Gem Version test Docs Latest The MIT License DOI

minigraph - the sequence-to-graph mapper - for Ruby

🚧 under development

Installation

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

Quick Start

require "minigraph"

Minigraph.execute("--version")

APIs

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)

Development

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

Contributing

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.

License

MIT License.