Build Status

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


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({

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.

}, 1)
#=> {['Sponge'] => 7}


gem install bio-krona

Project home page

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

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


bio-krona is currently unpublished. However Krona itself is - see

This Biogem is published at #bio-krona


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