Skip to content

graphlan

ljmciver edited this page May 23, 2022 · 10 revisions

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 Conda package, 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.


Table of contents


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

image

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

image

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

image

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

image

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

image

The resulting image is shown below:

image

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


2. GraPhlAn (Conda/Docker/VM)

GraPhlAn can be installed with Conda 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 Conda: $ conda install -c 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:

  • 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 hmptree.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.

Clone this wiki locally