Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Programmatic interface to krona visualisations

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
README.md

bio-krona

Build Status

This biogem is built around Krona, a flashy way of representing hierarchical data.

Usage

bio-krona is a pretty simple gem, at this stage, and only implements two useful methods. The first, the static method Bio::Krona#html is to call the krona software itself (specifically, ktImportText) to generate the visualisation in HTML form.

require 'bio-krona'

html = Bio::Krona.html({
      ['Sponge','Amphimedon']=>3,
      ['Sponge','Calciums']=>4,
    })

It takes as input a hash, where the keys are arrays representing the metadata, and the values are the weightings. In the example above, the data has two levels of hierarchy - first Sponge, second Ampphimedon/Calciums.

The second method collapse implements a pre-processing step that might be of use when the data is overly complex. It collapses the data so that only a limited number of hierarchy levels are accounted for. The weightings are preseverd by adding up the individual abundances.

Bio::Krona.collapse({
   ['Sponge','Amphimedon']=>3,
   ['Sponge','Calciums']=>4,
}, 1)
#=> {['Sponge'] => 7}

Installation

gem install bio-krona

Project home page

Information on the source tree, documentation, examples, issues and how to contribute, see

http://github.com/wwood/bioruby-krona

The BioRuby community is on IRC server: irc.freenode.org, channel: #bioruby.

Cite

bio-krona is currently unpublished. However Krona itself is - see http://krona.sourceforge.net

Biogems.info

This Biogem is published at #bio-krona

Copyright

Copyright (c) 2012 Ben J. Woodcroft. See LICENSE.txt for further details.

Something went wrong with that request. Please try again.