The Wasabi web interface communicates with a web browser and its backend server using REST API (web address parameters). URL parameters are useful for customizing Wasabi and integrating it with other tools. For many examples below, you need a Wasabi user ID (the 6-character code at the end of user-specific Wasabi address) and a data set, preferably both the sequence alignment and its phylogeny (example dataset).

URL parameters

Wasabi can be given commands in a web browser using URL parameters. For example, the web address http://wasabiapp.org:8000/userID?url=http://tinyurl.com/wasabi-example in a web browser will open Wasabi, and the parameter url=... will tell Wasabi to download and import a data file from the tinyurl address (replace userID with your Wasabi user id). The file link after url= can be anything that is accessible by browser, e.g. an ftp site or a DropBox file. You can use multiple url= sources (e.g. separate files for tree and sequence data) and complex URLs (e.g. from Ensembl REST API) as long as any “&“symbols in the file link are encoded to  “%26“.

Wasabi can be customized on launch also with other URL parameters:

  • id=analysisID  opens a dataset or a collection of datasets from any Wasabi user’s analysis library. Example: http://wasabiapp.org:8000?id=tiger
  • disable=menubar/data/tools/zoom/undo/logo/tree/seq/sharing/animations/import/export/save/library
    disables Wasabi user interface elements and features. Example: disable=tools,logo,sharing disables the tools menu, sharing links and Wasabi logo.
  • zoomlevel=1...6 sets the visualization window zoom level (smaller level shows more data)
  • colorscheme=rainbow/greyscale/Taylor/Zappo/Clustal sets the sequence coloring
  • font=Arial/Georgia/Tahoma/Verdana sets the font for drawing sequences
  • maskcolor=dark/light/white sets the coloring of masked sites
  • nodelabel/leaflabel=label/branchlength/species/accession/C/S/... displays metadata next to tree nodes or as leaf labels. Supports phyloXML or Newick NHX tags.

Metadata parameters

Wasabi supports metadata tags embedded in various dataset file formats (Nexus, PhyloXML, extended Newick) that can be used to customize data visualization. For example, a phylogeny node that is marked in datafile with <color>red</color> (PhyloXML) or [&&NHX:C=red] (Newick) will be colored red in Wasabi.

In addition to standard Newick NHX tags, Wasabi supports:

  • C/BC=red/255.0.0  colors the tree node/leaf (C) or its branch (BC). Use color names or rgb codes.
  • Co=Y  collapses the connected subtree.
  • Vis=Y  displays the ancestral sequence of the tree node (if included in dataset).
  • ND/G/TR/PR=id  sets the leaf sequence node/gene/transcript/protein ID.
  • PVAL=number  associated p-value.
  • NL=S/B/GN/NDG/PVAL/...  displays the specified metadata tag as tree node/leaf label

Using Wasabi from command line

Communication to Wasabi server and its graphic interface via REST API parameters allow Wasabi integration to command-line pipelines (shown here for Linux/MacOS systems).

Let’s assume that a Perl script called upload.pl looks like this:

With the command  perl upload.pl FooBar my_alignment.xml  this script uploads data set my_alignment.xml to the Wasabi library of user FooBar and opens that in a web browser. A python version of the script is available in the downloads folder. Use with the command  open_in_wasabi.py -u FooBar -x my_alignment.xml