Skip to main content

Web interface of GrapeTree, which is a program for phylogenetic analysis.

Project description

GrapeTree
=========

Click here for the `live demo of GrapeTree! <https://achtman-lab.github.io/GrapeTree/MSTree_holder.html>`_
**************************************************************************************************************
|Build Status| |License| |Doc Status|

GrapeTree is an integral part of EnteroBase and we advise that you use GrapeTree
through EnteroBase for the best results. However, many people have asked for a
stand-alone GrapeTree version that they could use offline or integrate into the
other applications.

The stand-alone version emulates the EnteroBase version through a lightweight
webserver running on your local computer. You will be interacting with the
program as you would in EnteroBase; through a web browser. We recommend
`Google Chrome <https://www.google.com/chrome/index.html>`_ for best results.

**For detailed help please see:** http://enterobase.readthedocs.io/en/latest/grapetree/grapetree-about.html

**For a formal description, please see the preprint:** https://www.biorxiv.org/content/early/2017/11/09/216788

Installing and Running GrapeTree
--------------------------------
There are number of different ways to interact with GrapeTree, the easiest is to
install with pip or download the software here: https://github.com/achtman-lab/GrapeTree/releases

**Installing with pip**

.. code-block::

pip install grapetree
grapetree

**Running on Mac: Download GrapeTree_mac.zip**

You will need to unzip GrapeTree_mac.zip (just double click). Inside there will
be an app you can drag into your Applications folder. You may be warned about
Security settings, if you right click on the GrapeTree app and then click "Open"
it should be fine.

**Running on Windows: Download GrapeTree_win.zip**

Once downloaded, you will need to untzip GrapeTree_win.zip and then open the
extracted folder and run GrapeTree_win.exe. When you run it the first time on
windows you might get a prompt about security. On Windows 10, click the small
text: "More info", and then the button "Run Anyway".

**Running from Source code**

EnteroMSTree - GrapeTree requires `Python 2.7 <https://www.python.org/downloads/release/python-2712/>`_ and some additional python modules (listed in requirements.txt). The easiest way
to install these modules is with pip:

.. code-block::

pip install -r requirements.txt
chmod +x binaries/

On Linux or MacOSX you need to make sure the binaries in binaries/ can be
executed. To run GrapeTree;

#. Navigate to the directory where you installed GrapeTree.
#. Run it through python as below.

.. code-block::

\GrapeTree>python main.py
* Running on http://127.0.0.1:8000/ (Press CTRL+C to quit)

The program will automatically open your web browser and you will see the
GrapeTree Splash Screen. If at anytime you want to restart the page you can
visit http://localhost:8000 in your web browser. To
view a tree (newick or Nexus) or create a tree from an allele profile, just drag
and drop the file into the browser window.

Configuration
-------------
Runtime behaviour can be configured in grapetree/config.py.

Developers may wish to look at the `JavaScript documentation (JSDoc) <https://achtman-lab.github.io/GrapeTree/documentation/developer/index.html>`_.

Tests
-----
To run tests, run pytests in the top level directory.

.. code-block::

pytest

Usage - Command line module for generating Trees - MSTrees.py
-------------------------------------------------------------

.. code-block::

usage: MSTrees.py [-h] --profile PROFILE [--method METHOD]
[--matrix MATRIX_TYPE] [--recraft]
[--missing HANDLE_MISSING] [--wgMLST]
[--heuristic HEURISTIC] [--n_proc N_PROC] [--check]

Parameters for command line version of GrapeTree.
You can drag the Newick output into the web interface.

optional arguments:
-h, --help show this help message and exit
--profile PROFILE, -p PROFILE
A file contains either MLST / SNP profiles or multile aligned sequences in
fasta format.
--method METHOD, -m METHOD
backend algorithms to call. Allowed values are "MSTreeV2" [default], "MSTree"
and "NJ"
--matrix MATRIX_TYPE, -x MATRIX_TYPE
Either "symmetric" [default for MSTree and NJ]
or "asymmetric" [default for MSTreeV2].
--recraft, -r Allows local branch recrafting after tree construction. Default in MSTreeV2.
--missing HANDLE_MISSING, -y HANDLE_MISSING
Alternative ways of handling missing data.
0: missing data are ignored in pairwise comparisons [default].
1: Columns that have missing data are ignored in the whole analysis.
2: missing data are treated as a special value (allele).
3: Naive counting of absolute differences between profiles.
--wgMLST, -w Use when > 20 % of values in the input are missing.
--heuristic HEURISTIC, -t HEURISTIC
Tiebreak rules between co-optimal edges. Only used in MSTree [default: eBurst]
and MSTreeV2 [default: harmonic]
--n_proc N_PROC, -n N_PROC
Number of processes. Default: 5.
--check, -c Do not calculate the tree but only show the expected time/memory consumption.


License
-------
Copyright Warwick University This program is free software: you can
redistribute it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but without
any warranty; without even the implied warranty of merchantability or fitness
for a particular purpose. See the GNU General Public License for more
details.

You should have received a copy of the GNU General Public License along with
this program. If not, see http://www.gnu.org/licenses/.


Citation
--------
If you use GrapeTree please cite the preprint:

Z Zhou, NF Alikhan, MJ Sergeant, N Luhmann, C Vaz, AP Francisco, JA Carrico,
M Achtman (2017) "GrapeTree: Visualization of core genomic relationships
among 100,000 bacterial pathogens", bioRxiv 216788; doi:
https://doi.org/10.1101/216788

.. |Build Status| image:: https://travis-ci.org/achtman-lab/GrapeTree.svg?branch=master
:target: https://travis-ci.org/achtman-lab/GrapeTree
:alt: Build status

.. |License| image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg
:target: https://www.gnu.org/licenses/gpl-3.0
:alt: GPLv3

.. |Doc status| image:: https://readthedocs.org/projects/enterobase/badge/
:target: http://enterobase.readthedocs.io/en/latest/grapetree/grapetree-about.html
:alt: Build status of documentation

Keywords: bioinformatics,microbial,genomics,MLST,visulisation
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grapetree-1.3.2.tar.gz (3.0 MB view details)

Uploaded Source

File details

Details for the file grapetree-1.3.2.tar.gz.

File metadata

  • Download URL: grapetree-1.3.2.tar.gz
  • Upload date:
  • Size: 3.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for grapetree-1.3.2.tar.gz
Algorithm Hash digest
SHA256 df96af423af1cd58fbd75a27a146de227e153c58031f2e669f4cb15e221ab885
MD5 274576b80524df35263b15929bc21969
BLAKE2b-256 d08f10d52d0fa5e5a030ce9338e5ac95e25b5914a9de089a34b6e53b5c0be642

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page