Clone wiki

biobakery / graphlan

GraPhlAn Tutorial

GraPhlAn is a software tool for producing high-quality circular representations of taxonomic and phylogenetic trees. GraPhlAn focuses on concise, integrative, informative, and publication-ready representations of phylogenetically- and taxonomically-driven investigation.

GraPhlAn is available as a Galaxy module, a Homebrew formula, a Docker image, and included in bioBakery (VM and cloud).

We provide support for GraPhlAn users. Please join our Google group designated specifically for GraPhlAn users. Feel free to post any questions on the google group by posting directly or emailing graphlan-users@googlegroups.com.



Overview

The following figure shows the workflow of GraPhlAn.

GraPhlAn.png

1. GraPhlAn (Galaxy module)

For information about the input formats, and further options, please refer to the GraPhlAn documentation.

GraPhlAn requires an input tree and an annotation file. Download the following demo files for this tutorial:

Follow these steps to use GraPhlAn Galaxy to visualize results.

Step 1: Go to the Huttenhower Galaxy server: http://huttenhower.sph.harvard.edu/galaxy

Step 2: Upload the tree file

  • From the menu on the left-hand side, click on Get Data and then Upload File
  • Select the tree file guide.txt you just downloaded to your computer
  • Select the File Format as circl
  • Click on the Execute button to upload the tree
https://bitbucket.org/repo/49y6o9/images/4218449326-Screenshot%20from%202016-07-11%2015-06-50.png

Step 3: Annotate the tree

  • From the menu on the left-hand side, click on GraPhlAn and then Annotate tree
  • For Input file, select the tree you just uploaded guide.txt
  • From the Select Clade(s) list, select the clades you want to be displayed on the figure
  • In the text field Annotation Label, enter *
  • From the Annotation Label Clade Selector drop-down menu, select the Clade and its leaf nodes option
  • Click on the Execute button
https://bitbucket.org/repo/49y6o9/images/1693804870-Screenshot%20from%202016-07-11%2015-24-32.png

Step 4: Upload the annotation file

  • From the menu on the left-hand side, click on Get Data and then Upload File
  • Select the annotation file guide_rings.txt you just downloaded to your computer
  • Click on the Execute button to upload the annotation file
https://bitbucket.org/repo/49y6o9/images/2026880093-Screenshot%20from%202016-07-11%2015-38-52.png

Step 5: Add rings to the tree

  • From the menu on the left-hand side, click on GraPhlAn and then Add rings to the tree
  • Select the annotated tree (produced in the prior step) from the Input Tree drop-down menu
  • Select the annotation file you just uploaded from the Ring Input File drop-down menu
  • Click on the Execute button
https://bitbucket.org/repo/49y6o9/images/1582742557-Screenshot%20from%202016-07-11%2015-46-15.png

Step 6: Plot the tree

  • From the menu on the left-hand side, click on GraPhlAn and then Plot tree
  • Select the tree with rings (produced in the prior step)
  • Click on the Execute button
https://bitbucket.org/repo/49y6o9/images/3764378899-Screenshot%20from%202016-07-11%2015-59-10.png

The resulting image is shown below:

https://bitbucket.org/repo/49y6o9/images/510538251-Screenshot%20from%202016-07-11%2016-06-39.png

To look into more visualization options in GraPhlAn, please refer to the GraPhlAn documentation.


2. GraPhlAn (Brew/Docker/VM)

GraPhlAn can be installed with Homebrew or run from a Docker image. Please note, if you are using bioBakery (Vagrant VM or cloud) you do not need to install GraPhlAn because the tool and its dependencies are already installed.

Install with Homebrew: $ brew install biobakery/biobakery/graphlan

Install with Docker: $ docker run -it biobakery/graphlan bash

If you would like to install from source, refer to the GraPhlAn user manual for the dependencies and installation instructions.

For the purpose of this tutorial, we will use the following inputs: Input Tree: hmptree.xml, and Annotation file: annot.txt.

  • Run the following command to annotate the Input tree (hmptree.xml) using the annotation file (annot.txt). This will generate an annotated tree (hmptree.annot.xml)

    $ graphlan_annotate.py input/hmptree.xml hmptree.annot.xml --annot input/annot.txt
    
  • Run the following command to plot the annotated tree in the form of a cladogram.

    $ graphlan.py hmp.annot.xml hmptree.png --dpi 150 --size 14
    

The generated cladogram is shown below:

Screen Shot 2015-03-16 at 12.58.15 PM.png

Notes

For further information about manipulating the output, other input formats, and more options, please refer to the following wiki pages for more information.

Updated