Web visualization tool for (meta)genome assembly graphs
Switch branches/tags
Nothing to show
Clone or download
fedarko Add MetaCarvel's license
It's a good idea to be specific.

Also, since this doesn't impact any code, let me try this: [ci skip]
Latest commit 2286bd6 Nov 11, 2018



Build Status

Screenshot of MetagenomeScope's standard mode, showing a region of a biofilm assembly graph

MetagenomeScope is an interactive visualization tool designed for metagenomic sequence assembly graphs. The tool aims to display a hierarchical layout of the input graph while emphasizing the presence of small-scale details that can correspond to interesting biological features in the data.

To this end, MetagenomeScope highlights certain "structural patterns" of contigs in the graph, splits the graph into its connected components (only displaying one connected component at a time), and uses Graphviz' dot tool to hierarchically lay out each connected component of the graph.

MetagenomeScope also contains a bunch of other features intended to simplify exploratory analysis of assembly graphs, including tools for scaffold visualization, path finishing, and (optionally) SPQR tree decomposition of biconnected components in the graph.

MetagenomeScope is composed of two main components:

  1. The preprocessing script (contained in the graph_collator/ directory of this repository), a mostly Python script that takes as input an assembly graph file and produces a SQLite .db file that can be visualized in the viewer interface. collate.py is the main script that needs to be run here. This preprocessing step takes care of structural pattern detection, graph layout, and (optionally) SPQR tree generation.

    • Currently, this supports LastGraph (Velvet), GML (MetaCarvel), and GFA input files. Support for SPAdes FASTG files should be ready very soon, as well.
    • See the installation instructions page on MetagenomeScope's wiki for information on installing the system requirements and setting up the the preprocessing script on your system.
    • If the -spqr option is passed to collate.py, it uses the C++ code in spqr.cpp to interface with OGDF to generate SPQR tree decompositions of biconnected components in the graph for MetagenomeScope's "decomposition mode." Since this requires some C++ code to be compiled, the use of -spqr in MetagenomeScope necessitates a few extra system requirements. See the installation instructions wiki page for more information on installing these and building the SPQR script.
  2. The viewer interface (contained in the viewer/ directory of this repository), a client-side web application that reads a .db file generated by collate.py and renders the resulting graph using Cytoscape.js. The viewer interface includes a "control panel" supporting various features for interacting with the graph.

    • Since MetagenomeScope's viewer interface is a client-side web application, you should be able to access it from most modern web browsers (mobile browsers also work, although using a desktop browser is generally recommended), either locally (if the viewer interface code is downloaded on your computer) or over HTTP/HTTPS (if the viewer interface code is hosted on a server).

The bifurcated nature of the tool lends it a few advantages that have proved beneficial when analyzing large graphs:

  • The user can save a .db file generated by the preprocessing script and visualize that file an arbitrary number of later times, without incurring the costs of layout, pattern detection, etc. twice
  • The user can host the viewer interface and a number of .db files on a server, allowing many users to view graphs with the only costs incurred being those of rendering the graphs in question


A demo of MetagenomeScope's viewer interface is available at mgsc.umiacs.io. You can use the "Demo .db file" button to load sample assembly graph files that are already hosted with the demo.

See this page on the wiki for instructions on customizing your own hosted version of MetagenomeScope's viewer interface.


Documentation on MetagenomeScope -- including up-to-date installation instructions for the preprocessing script -- is available at its GitHub wiki, located here.


MetagenomeScope is licensed under the GNU GPL, version 3.

License information for MetagenomeScope's dependencies is included in the root directory of this repository, in DEPENDENCY_LICENSES.txt. License copies for dependencies distributed/linked with MetagenomeScope -- when not included with their corresponding source code -- are available in the dependency_licenses/ directory.

A note about copyright years

The copyright years at the top of each of MetagenomeScope's code files are given as a hyphenated range (e.g. 20xx-20yy) with the understanding that each year included in this range represents a "copyrightable year" in which a version of MetagenomeScope's code was publicly released on GitHub. (This note is included per the GPL guidelines here.)


See the acknowledgements page on the wiki for a list of acknowledgements for MetagenomeScope's codebase.


MetagenomeScope was created by members of the Pop Lab in the Center for Bioinformatics and Computational Biology at the University of Maryland, College Park.

Feel free to email mfedarko (at) ucsd (dot) edu with any questions, suggestions, comments, concerns, etc. regarding the tool. You can also open an issue in this repository, if you'd like.