For very large data sets with thousands of samples it is recommended to use GrapeTree for drawing Minimum Spanning Tree (MST).

Installation of GrapeTree in on Ubuntu Linux

The stand-alone version of GrapeTree can be installed via pip using the command line.

Button16 Important.png Important: The installation of GrapeTree on Windows Subsystem For Linux (WSL) seems to fail if miniconda (e.g., if you are using the SARS-CoV-2 option with SeqSphere+) is already installed!

  • Step 1: If python-pip is not installed already, run the following commands to install it:

sudo apt update && sudo apt install python-pip

  • Step 2: Run the following command to install GrapeTree version 2.0:

pip install grapetree==2.0

Respond with 'Y' to upcoming questions during the installation. After the installation is completed, it may be necessary to restart the computer.

Creating a GrapeTree MST from a SeqSphere+ Comparison Table

GrapeTree Export Menu
  • Step 1: Choose in the comparison table menu the function File | Export profile and metadata files for GrapeTree (tsv). This function will create two TSV files: one profile file, containing the allelic profiles and one metadata file, containing the epi metadata from the comparison table.
  • Step 2: The exported profile file can now be used to calculate a MST with GrapeTree and store it as NWK (Newick) file. Open a Linux terminal or start WSL Ubuntu from the Windows Start menu, browse to the folder where profile file is located and invoke from the command line the following command:

grapetree -n NUMBER_OF_PROCESSES -p PROFILE_FILE > NWK_FILE

where NUMBER_OF_PROCESSES is the number of cores that should be used for calculation (default 5), PROFILE_FILE is the path to the profile file, and NWK_FILE is the path for the desired output file in Newick format (file name should have extension ".nwk").


  • Step 3: The created NWK file can now be import to GrapeTree. Execute the GrapeTree local server with following command:

grapetree

Now open a Webbrowser (Firefox is recommended) and open the URL http://127.0.0.1:8000/


  • Step 4: The GrapeTree page will be shown. Press Load Files button and import first the NWK file and then metadata file created by SepSphere+. Further information about loading the files and modifying the tree layout can be found in the Grape Tree tutorial.

Runtime and Memory usage

Following table contains the runtime and memory usage for calculation and visualization of Mycobacterium tuberculosis samples.

No. of Samples Intel i7, 4 cores, WSL Intel Xeon, 5 cores Linux Intel Xeon, 10 cores, Linux
5k 2m (5GB) 2m (5GB) 1m (5GB)
10K 8m (18GB) 6m (18GB) 2m (18GB)
15k 14m(19GB) 10m (20GB) 7m (20GB)