Miguel Pignatelli1. 1. Centre for Therapeutic Target Validation and European Bioinformatics Institute, Wellcome Genome Campus, Hinxton, Cambridge CB10 1SD, UK.
Abstract
UNLABELLED: There is an increasing need for rich and dynamic biological data visualizations in bioinformatic web applications. New standards in web technologies, like SVG or Canvas, are now supported by most modern web browsers allowing the blossoming of powerful visualizations in biological data analysis. The exploration of different ways to visualize genomic data is still challenging due to the lack of flexible tools to develop them. Here, I present a set of libraries aimed at creating powerful tree- and track-based visualizations for the web. Its modularity and rich API facilitate the development of many different visualizations ranging from simple species trees to complex visualizations comprising per-node data annotations or even simple genome browsers. AVAILABILITY AND IMPLEMENTATION: The TnT libraries have been written in Javascript, licensed under the APACHE 2.0 license and hosted at https://github.com/tntvis CONTACT: mp@ebi.ac.uk.
UNLABELLED: There is an increasing need for rich and dynamic biological data visualizations in bioinformatic web applications. New standards in web technologies, like SVG or Canvas, are now supported by most modern web browsers allowing the blossoming of powerful visualizations in biological data analysis. The exploration of different ways to visualize genomic data is still challenging due to the lack of flexible tools to develop them. Here, I present a set of libraries aimed at creating powerful tree- and track-based visualizations for the web. Its modularity and rich API facilitate the development of many different visualizations ranging from simple species trees to complex visualizations comprising per-node data annotations or even simple genome browsers. AVAILABILITY AND IMPLEMENTATION: The TnT libraries have been written in Javascript, licensed under the APACHE 2.0 license and hosted at https://github.com/tntvis CONTACT: mp@ebi.ac.uk.
The web has become the preferred platform to present biological data to the scientific community. Several improvements in web technologies are enabling the blossoming of new web applications for visualising this data: First, support of well established standards like SVG and Canvas by all modern web browsers enables the creation of rich interactive visual displays. Second, the vast improvement in web browser performance has increased the complexity of visualizations. Third, the proliferation of RESTful services providing data from reference biological resources permits easy access to biological data directly from the browser. The direct availability of this data also facilitates the development of reusable visualizations embeddable directly in web pages.Reusability is another key component in modern web development and a strong trend in current biological visualizations. BioJS (Gómez ) aims to compile reusable widgets for biological data visualization. It compiles over 120 components at the time of writing (January 2016). However, writing reusable visualizations is a complex task in which the developer has to take into account the scope and the environment of the host application in which the visualization will be embedded.Representation of tree data structures has become very popular in different biological fields like phylogenetics or ontology visualization, while the representation of track-based annotations is central to genome browsers (Kent ; Yates ), sequence alignments (Larsson, 2014; Waterhouse ) or general display of coordinate-based features such as protein sequence domain (Finn ).Here, a new set of libraries aimed at creating configurable, dynamic and interactive re-usable visualizations of trees and track-based annotations is presented. They are collectively called TnT, standing for Trees and Tracks, and are distributed as independent npm packages for easier integration in web applications. The development of the TnT libraries have been driven by two main design principles: flexibility and reusability. Flexibility is achieved by exposing all its internals in a powerful and carefully designed API. Reusability is maximized by developing the libraries as independent units that can be combined.TnT is being used by Ensembl (Yates ) to display comparative genomics annotations and the Centre for Therapeutic Target Validation (http://www.targetvalidation.org) to display both genomic features and tree-based annotation in their websites.
2 Results
The TnT libraries have been written in Javascript using the D3 library (http://d3js.org) as its main dependency. It uses SVG to render all the visual elements in the browser. Figure 1 shows the interdependency graph of the different libraries. A short description of each one follows:
Fig. 1.
Interdependency graph showing the relationship between the different TnT libraries
Interdependency graph showing the relationship between the different TnT libraries
2.1 TnT Tree
This library is built on top of the D3 cluster layout and allows building dynamic and interactive trees for the web. It is composed of several configurable elements: a layout that defines the general shape of the tree. Tree nodes that can be configured independently in shape, size and color. Labels composed of text or images and data for loading Javascript objects or newick/nhx strings. PhyloCanvas (http://phylocanvas.org) is a similar project offering reusable and dynamic tree visualizations. It uses Canvas as its main technology and offers a rich API. TnT Tree versatility and integration with other TnT libraries (see below) are distinctive features not available in similar libraries. Documentation and examples for TnT Tree can be found at http://tntvis.github.io/tnt.tree/.
2.2 TnT Tree Node
This library provides methods for tree manipulation at the data level and is used by TnT Tree although it can be used independently for manipulating tree-like hierarchical structures. The methods included in TnT Tree Node range from computing the lowest common ancestor of a set of nodes to extracting subtrees. The documentation for this library can be found as part of the TnT Tree library documentation.
2.3 TnT Board
This library facilitates the creation and configuration of track-based visualizations. A board is an interactive container for tracks in which each panning and zooming event triggers new data and visualization updates. Separation of concerns between data and visualization updates is one of its main features. The library FeatureViewer (Garcia et al., 2014) offers similar functionalities for displaying UniProt data (Consortium, 2015) without the flexibility offered by TnT Board regarding data updates and visual representation. Documentation of TnT Board can be found at http://tntvis.github.io/tnt.board/.
2.4 TnT Genome
TnT Genome is a simple genome browser library built on top of TnT Board. TnT Genome exposes some additional elements to facilitate the creation of custom-made simple genome browsers like retrieving Ensembl data through its REST API (Yates ), visual representation of genes and transcripts and avoiding overlaps between these elements. There are many interactive, re-usable web-compatible genome browsers already available like Genoverse (http://www.genoverse.org), Genome Maps (Medina ) or Biodalliance (Down ). Compared to them, TnT Genome presents a more flexible lower level library to create custom-tailored, simple genome browsers. Documentation for this library can be found at http://tntvis.github.io/tnt.genome/
2.5 TnT Rest
A general Javascript library to interface with RESTful services. It is based on Promises and is used by TnT Genome to retrieve Ensembl data via its RESTful API (Yates ).
2.6 TnT
TnT bundles together TnT Tree and TnT Board and connects both allowing per-node annotation tracks. This library facilitates the creation of annotated trees like gene trees in Ensembl (Yates ) or Wasabi (Veidenberg ). Documentation for this library can be found at http://tntvis.github.io/tnt/.In summary, the TnT set of libraries offer a flexible way to create re-usable visualizations for the web in an integrated way. Being independent libraries yet able to interoperate is one of the main benefits over other available options.
Authors: Andrew M Waterhouse; James B Procter; David M A Martin; Michèle Clamp; Geoffrey J Barton Journal: Bioinformatics Date: 2009-01-16 Impact factor: 6.937
Authors: Andrew Yates; Kathryn Beal; Stephen Keenan; William McLaren; Miguel Pignatelli; Graham R S Ritchie; Magali Ruffier; Kieron Taylor; Alessandro Vullo; Paul Flicek Journal: Bioinformatics Date: 2014-09-17 Impact factor: 6.937
Authors: Andrew Yates; Wasiu Akanni; M Ridwan Amode; Daniel Barrell; Konstantinos Billis; Denise Carvalho-Silva; Carla Cummins; Peter Clapham; Stephen Fitzgerald; Laurent Gil; Carlos García Girón; Leo Gordon; Thibaut Hourlier; Sarah E Hunt; Sophie H Janacek; Nathan Johnson; Thomas Juettemann; Stephen Keenan; Ilias Lavidas; Fergal J Martin; Thomas Maurel; William McLaren; Daniel N Murphy; Rishi Nag; Michael Nuhn; Anne Parker; Mateus Patricio; Miguel Pignatelli; Matthew Rahtz; Harpreet Singh Riat; Daniel Sheppard; Kieron Taylor; Anja Thormann; Alessandro Vullo; Steven P Wilder; Amonida Zadissa; Ewan Birney; Jennifer Harrow; Matthieu Muffato; Emily Perry; Magali Ruffier; Giulietta Spudich; Stephen J Trevanion; Fiona Cunningham; Bronwen L Aken; Daniel R Zerbino; Paul Flicek Journal: Nucleic Acids Res Date: 2015-12-19 Impact factor: 16.971
Authors: Robert D Finn; Alex Bateman; Jody Clements; Penelope Coggill; Ruth Y Eberhardt; Sean R Eddy; Andreas Heger; Kirstie Hetherington; Liisa Holm; Jaina Mistry; Erik L L Sonnhammer; John Tate; Marco Punta Journal: Nucleic Acids Res Date: 2013-11-27 Impact factor: 16.971
Authors: Benedikt Rauscher; Florian Heigwer; Marco Breinig; Jan Winter; Michael Boutros Journal: Nucleic Acids Res Date: 2016-10-26 Impact factor: 16.971
Authors: Adrian M Altenhoff; Natasha M Glover; Clément-Marie Train; Klara Kaleb; Alex Warwick Vesztrocy; David Dylus; Tarcisio M de Farias; Karina Zile; Charles Stevenson; Jiao Long; Henning Redestig; Gaston H Gonnet; Christophe Dessimoz Journal: Nucleic Acids Res Date: 2018-01-04 Impact factor: 16.971