Skip to content

R package for creating and displaying interactive hierarchical Krona charts

License

Notifications You must be signed in to change notification settings

markschl/taxplore

Repository files navigation

taxplore: R package for generating and displaying Krona charts

This R package provides functions for creating Krona charts and displaying/embedding them as HTML widget in different contexts or using them in Shiny applications.

Krona charts are commonly used as interactive visualizations of the taxa in metagenomic and metabarcoding (microbiota) samples, but can in principle be used to visualize all kinds of hierarchical data.

This package and does not require any additional software to be installed. It aims to be as flexible as possible.

The snapshot feature allows embedding chart snapshots in non-interactive documents such as PDF or Word (see tutorial).

Installation

To install the R package:

# install.packages('remotes')
remotes::install_github('markschl/taxplore')

The KronaTools software collection is not needed. This package includes a copy of the Krona JavaScript and is able to generate charts that are (nearly) identical to the ones generated by KronaTools.

Documentation

The documentation is at https://markschl.github.io/taxplore.

Two in-depth tutorials are available:

Usage overview

library(taxplore)

There are two main functions:

make_krona

This function generates Krona charts from hierarchical data in data frames/matrices, phyloseq objects or hierarchical list data structures.

Example:

data(grasslandfungi.records)
make_krona(grasslandfungi.record_tax, outfile = 'krona_chart.html')

plot_krona

Display the hierarchical charts, either as interactive plots launched from the console, or embedded in R-Markdown/Quarto documents or Shiny applications. It accepts the same input data as make_krona(), or can be used to display pre-generated charts.

plot_krona(grasslandfungi.records)

Third-party software

This project includes unmodified copy of some files from https://github.com/marbl/Krona, notably the JavaScript code and images included in the HTML charts.

In addition, a “minified” version of the script is provided (see installation script). When embedding charts, additional JavaScript code is sometimes injected for adjusting settings and taking static snapshots.

KRONA is a trademark of its respective owners (see KRONA_LICENSE). This project is not affiliated with the Krona authors. The documentation and some function names still contain “Krona” as a term to describe these charts.

Reference: Ondov BD, Bergman NH, and Phillippy AM. Interactive metagenomic visualization in a Web browser. BMC Bioinformatics. 2011 Sep 30; 12(1):385.

Similar projects

  • taxburst is a Python-based alternative to KronaTools

About

R package for creating and displaying interactive hierarchical Krona charts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published