The key component of this tool is a graphic interface with a 2D map that displays large
amounts of alignments between metagenomic sequences from one or more samples and a reference
genome (). Users can explore alignment
data by interactively operating the 2D map in a similar way as in Google Maps.
Screenshots of the MGAviewer
MGAviewer is an HTML5 web application. It works in all major modern browsers, including
Chrome, Firefox, Safari and Internet Explorer 9, without the need of installing any extra
software or plugin. It uses jQuery (http://jquery.com/
customized version of jQuery plotting plugin, Flot (http://code.google.com/p/flot/
). We extended Flot to make it support drawing
(‘site.js’) is responsible for setting up plot parameters, placing and
responding to additional controls and fetching data.
MGAviewer fetches alignment data from a user’s local computer or from a web server on
demand via AJAX. It then draws the plot in an HTML5 Canvas element. Every time a user
interaction event is triggered, e.g. zooming in/out, panning and resizing of the plot, the
plot image is simply redrawn using data already loaded, unless additional data are required.
This is in contrast to many other web-based genome browsers where plot images are generated
on the server side and then retrieved by browser on demand; in MGAviewer a plot is drawn
locally in browser. This results in no network traffic for most user operations and
therefore dramatically improves the responsiveness of user interactions, especially on slow
Alignment data are stored in JSON (a lightweight data-interchange format used by
identity, name, e-value, etc. We provide scripts to generate JSON files from raw alignment
results by BLAST (Altschul et al.,
) and FR-HIT (Niu et
) and also from alignments in SAM format. These scripts need
installation of BioPython package. Converters for other programs like BLAT (Kent, 2002
) can be easily implemented.
MGAviewer can be used as standalone software by simply opening the directory that contains
these JSON files, MGAviewer scripts and a master HTML file (see user’s guide for
details). It can also be hosted on a web server. The plot itself can be embedded in any