Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

kojix2/ruby-minigraph

Repository files navigation

ruby-minigraph

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.

About

The seq-to-graph mapper and graph generator for Ruby

Resources

Readme

License

MIT license

Stars

Watchers

Forks

Sponsor this project

Packages

Contributors