grapetree
GrapeTree is a fully interactive, tree visualization program, which supports facile manipulations of both tree layout and metadata. Click the first link to launch: https://achtman-lab.github.io/GrapeTree/MSTree_holder.html
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 8 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
5 of 11 committers (45.5%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.5%) to scientific vocabulary
Keywords
Repository
GrapeTree is a fully interactive, tree visualization program, which supports facile manipulations of both tree layout and metadata. Click the first link to launch: https://achtman-lab.github.io/GrapeTree/MSTree_holder.html
Basic Info
- Host: GitHub
- Owner: achtman-lab
- License: gpl-3.0
- Language: JavaScript
- Default Branch: master
- Homepage: https://genome.cshlp.org/content/28/9/1395
- Size: 27.8 MB
Statistics
- Stars: 83
- Watchers: 7
- Forks: 27
- Open Issues: 24
- Releases: 0
Topics
Metadata Files
README.md
GrapeTree
Launch a local version of GrapeTree!
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 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 accepted manuscript in Genome Research: https://doi.org/10.1101/gr.232397.117
Installing and Running GrapeTree
There are number of different ways to interact with GrapeTree, for best results install via pip :
pip install grapetree
grapetree
We also have ready-made binaries for download here: https://github.com/achtman-lab/GrapeTree/releases
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 GrapeTreewin.zip and then open the extracted folder and run GrapeTreewin.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
GrapeTree requires Python 2.7 or Python 3.6 and some additional python modules (listed in requirements.txt). The easiest way to install these modules is with pip:
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.
\GrapeTree>python grapetree.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).
Tests
To run tests, run pytests in the top level directory. ``` pytest
```
Usage - Command line module for generating Trees
```
grapetree -h usage: MSTrees.py [-h] --profile FNAME [--method TREE] [--matrix MATRIX_TYPE] [--recraft] [--missing HANDLER] [--wgMLST] [--heuristic HEURISTIC] [--nproc NUMBEROF_PROCESSES] [--check]
For details, see "https://github.com/achtman-lab/GrapeTree/blob/master/README.md". In brief, GrapeTree generates a NEWICK tree to the default output (screen) or a redirect output, e.g., a file.
optional arguments: -h, --help show this help message and exit --profile FNAME, -p FNAME [REQUIRED] An input filename of a file containing MLST or SNP character data, OR a fasta file containing aligned sequences. --method TREE, -m TREE "MSTreeV2" [DEFAULT] "MSTree" "NJ": FastME V2 NJ tree "RapidNJ": RapidNJ for very large datasets "distance": p-distance matrix in PHYLIP format. --matrix MATRIXTYPE, -x MATRIXTYPE "symmetric": [DEFAULT: MSTree and NJ] "asymmetric": [DEFAULT: MSTreeV2]. --recraft, -r Triggers local branch recrafting. [DEFAULT: MSTreeV2]. --missing HANDLER, -y HANDLER ONLY FOR symmetric DISTANCE MATRIX. 0: [DEFAULT] ignore missing data in pairwise comparison. 1: Remove column with missing data. 2: treat data as an allele. 3: Absolute number of allelic differences. --heuristic HEURISTIC, -t HEURISTIC Tiebreak heuristic used only in MSTree and MSTreeV2 "eBurst" [DEFAULT: MSTree] "harmonic" [DEFAULT: MSTreeV2] --nproc NUMBEROFPROCESSES, -n NUMBEROF_PROCESSES Number of CPU processes in parallel use. [DEFAULT]: 5. --check, -c Only calculate the expected time/memory requirements. ``` NOTE: * Detailed descriptions for --matrix, --recraft and --heuristic
Inputs
profile
The profile file is a tab-delimited text file.
Follow an example here: https://github.com/achtman-lab/GrapeTree/blob/master/examples/simulated_data.profile ```
Strain Gene1 Gene2 Gene3 Gene4 Gene5 Gene6 Gene_7 ...
0 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 ... 2 1 2 2 2 2 2 2 ... ... ``` The first row is required and represents column labels. It has to start with a '#'. Collumn labels that start with a '#' are treated as comments and will not be used in downstream analysis. The first column needs to be unique identifiers for strains. Each of the remaining rows presents a different strain.
Use '-' or '0' to represent missing alleles.
Aligned FASTA
An aligned FASTA file contains multiple sequences of the same length in FASTA format. Many sequence alignment tools, e.g., MAFFT and MUSCLE, use FASTA as a default format for their outputs.
Find an example here: http://wwwabi.snv.jussieu.fr/public/Clustal2Dna/fastali.html
Note that GrapeTree supports only p-distance for the moment.
metadata
The metadata file is either a tab-delimited or a comma-delimited text file. This is only used for tree presentation in the standardalone version.
Follow an example here: https://github.com/achtman-lab/GrapeTree/blob/master/examples/simulated_data.metadata.txt
ID Country Year
0 China 1983
1 China 1984
...
The first row is required and describes the labels of the columns. If a column labeled with "ID" presents, it will be used to correlate metadata with profiles, otherwise the first column will be used.
outputs
tree
The tree is described in NEWICK format. https://en.wikipedia.org/wiki/Newick_format
distance matrix
Use the option '--method distance' to generate a distance matrix without calculating the tree. The matrix is presented in PHYLIP format. http://evolution.genetics.washington.edu/phylip/doc/distance.html
Command line examples
MSTree V2
python grapetree.py -p examples/simulated_data.profile -m MSTreeV2
NJ tree
python grapetree.py -p examples/simulated_data.profile -m NJ
distance matrix
python grapetree.py -p examples/simulated_data.profile -m distance
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/.
External programs
Detailed information for the standard NJ implemented in FastME V2: http://www.atgc-montpellier.fr/fastme/
Citation
EnteroMSTree - GrapeTree has been formally accepted by Genome Research. Please use the citation:
Z Zhou, NF Alikhan, MJ Sergeant, N Luhmann, C Vaz, AP Francisco, JA Carrico, M Achtman (2018) "GrapeTree: Visualization of core genomic relationships among 100,000 bacterial pathogens", Genome Res; doi: https://doi.org/10.1101/gr.232397.117
Owner
- Name: achtman-lab
- Login: achtman-lab
- Kind: organization
- Repositories: 5
- Profile: https://github.com/achtman-lab
GitHub Events
Total
- Issues event: 3
- Watch event: 4
- Issue comment event: 1
- Push event: 1
- Fork event: 1
Last Year
- Issues event: 3
- Watch event: 4
- Issue comment event: 1
- Push event: 1
- Fork event: 1
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Zhemin Zhou | z****u@w****k | 285 |
| zheminzhou | z****u | 54 |
| martin | m****t@w****k | 45 |
| Nabil Alikhan | N****n | 33 |
| Nabil Alikhan | n****l@h****m | 29 |
| Nabil-Fareed Alikhan | b****n@g****m | 8 |
| nluhmann | n****n@w****k | 3 |
| zheminzhou | z****n | 2 |
| nluhmann | n****n@t****e | 1 |
| Fabien Pertuy | P****F | 1 |
| Keith Jolley | k****y@z****k | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 85
- Total pull requests: 23
- Average time to close issues: 4 months
- Average time to close pull requests: 3 months
- Total issue authors: 29
- Total pull request authors: 7
- Average comments per issue: 0.44
- Average comments per pull request: 0.17
- Merged pull requests: 20
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 2
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- happykhan (31)
- zheminzhou (12)
- nluhmann (8)
- crarlus (4)
- sekhwal (3)
- peterjc (2)
- bifidoman (2)
- LordRust (2)
- hrydbeck (1)
- mabouelk (1)
- mlarjim (1)
- chrisgulvik (1)
- emmadoughty (1)
- peflanag (1)
- kringwa2 (1)
Pull Request Authors
- happykhan (10)
- zheminzhou (6)
- nluhmann (3)
- PertuyF (1)
- bryan-brancotte (1)
- kjolley (1)
- IvanPenyaHuguet (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 125 last-month
- Total docker downloads: 14
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 16
- Total maintainers: 3
pypi.org: grapetree
Web interface of GrapeTree, which is a program for phylogenetic analysis.
- Homepage: https://github.com/achtman-lab/GrapeTree
- Documentation: https://grapetree.readthedocs.io/
- License: GNU General Public License v3 (GPLv3)
-
Latest release: 1.6.1
published about 6 years ago