Wasabi REST API

The Wasabi web interface communicates with the Wasabi server using REST API.  Here we show a couple of ideas how Wasabi can be integrated with other tools and methods. For the examples below, you need a Wasabi user ID (the last six characters of the Wasabi URL) and a data set, preferably in HSAML or phyloxml format such that it contains both the alignment and the phylogeny (an example data set is available here or in the default Wasabi analyses  library).

URL

With  http://wasabiapp.org:8000/FooBar?url=http://tinyurl.com/wasabi-example  pasted to the URL box, the web browser downloads the data set from the remote address and opens it for the user FooBar. The address after url= can be anything that is visible to the browser, e.g. an ftp site or a DropBox file.

Note that you can use multiple url= sources (e.g. separate files for tree and sequence data) and use complex addresses (e.g. from Ensembl REST API) as long as any & symbols it contains are encoded to %26.

Unix tools + scripting language

On a typical Unix system command-line tools can be bundled together using a scripting language such as Perl. Let’s assume that a 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.

Python

A simple python program to upload and open alignment files in the Wasabi browser is available in the downloads folder. With the command  open_in_wasabi.py -u FooBar -x 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.