Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Generate a standalone HTML file with an interactive phylogenetic tree using PhyloCanvas

Project description

Standalone HTML Interactive Phylogenetic Tree Viz Documentation Status

Generate a standalone HTML file with an interactive phylogenetic tree using PhyloCanvas

See test shiptv HTML output here:

Phylogenetic tree of 5 FMDV genomes

Phylogenetic tree of 5 FMDV genomes

Phylogenetic tree of IAV HA gene sequences

Phylogenetic tree of IAV HA gene sequences


  • Interactively view your tree in the browser with metadata highlighted beside your tree using PhyloCanvas.
  • Automatically retrieve metadata from a GenBank file!
  • Visualize your own metadata! Provide a tab-delimited table as input with --user-sample-metadata /path/to/your-table.tsv
  • Highlight branches with low support in the browser.
  • Collapse branches with low support (e.g. -C 95 for IQ-TREE trees with UFBoot -bb 1000 to collapse branches with less than 95% support).


Show help

shiptv --help

Help output

Usage: shiptv [OPTIONS]

  Create HTML tree visualization with metadata.

  The metadata for reference genomes can be extracted from the specified
  Genbank file.

  Any leaf names that are present in the tree but not present in the Genbank
  file are assumed to be user samples and are flagged as such in the
  metadata table as "user_sample"="Yes".

  -r, --ref-genomes-genbank FILE  Reference genome sequences Genbank file
  -n, --newick FILE               Phylogenetic tree Newick file  [required]
  -N, --output-newick PATH        Output Newick file
  -o, --output-html PATH          Output HTML tree path  [required]
  -m, --output-metadata-table PATH
                                  Output metadata table path  [required]
  --leaflist PATH                 Optional leaf names to select from
                                  phylogenetic tree for pruned tree
                                  visualization. One leaf name per line.
  --genbank-metadata-fields PATH  Optional fields to extract from Genbank
                                  source metadata. One field per line.
  --user-sample-metadata PATH     Optional tab-delimited metadata for user
                                  samples to join with metadata derived from
                                  reference genome sequences Genbank file.
                                  Sample IDs must be in the first column.
  --metadata-fields-in-order PATH
                                  Optional list of fields in order to output
                                  in metadata table and HTML tree
                                  visualization. One field per line.
  --dont-fix-metadata             Do not automatically fix metadata (only on
                                  Genbank file metadata)
  -C, --collapse-support FLOAT    Collapse internal branches below specified
                                  bootstrap support value (default -1 for no
  --help                          Show this message and exit.

With a reference sequence Genbank file, a Newick format phylogenetic tree tree.nwk, output a tree.html standalone HTML interactive phylogenetic tree visualization and a metadata-table.tsv tab-delimited table of metadata from

shiptv -r -n tree.nwk -o tree.html -m metadata-table.tsv


This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.


0.2.0 (2019-06-28)

  • Added low support branch highlighting in tree HTML file
  • Added option to collapse low support branches (-C/–collapse-support)
  • Added option to output modified Newick tree file (-N/–output-newick)
  • Fixed date/time parsing from Genbank files (#1)

0.1.0 (2019-05-10)

  • First release on PyPI.

Project details

Download files

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

Files for shiptv, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size shiptv-0.3.0-py2.py3-none-any.whl (28.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size shiptv-0.3.0.tar.gz (430.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page