Resource: Combining tools and databases into a single GreenMamba web resource

In the four previous blog posts I introduced the GreenMamba framework (download) and showed how it can be used to turn a simple tab-delimited files or command-line tools into web resources with a bare minimum of effort. In this post I will show how easy it is to configure multiple databases or tools to run under the same Mamba server and how to make them accessible as a single web resource.

To illustrate this, I will take the Instances database and the Motifs tool and turn them into a web resource called ELM (the name of the database from which the instance data and motifs were obtained in the first place). The following inifile is all it takes to do so:

host : localhost
port : 8080
plugins : ./greenmamba

database : greenmamba/examples/instances.tsv

command : greenmamba/examples/ $motif @fasta
page_home : greenmamba/examples/motifs_home.html

tools : Motifs; Instances;

The [SERVER] section is exactly as in all the previous examples, instructing the Mamba server to run on localhost port 8080 and to import the GreenMamba plugin. The [Instances] section configures a simple database called Instances based on the tab-delimited file instances.tsv, and the [Motifs] section configures a web tool called Motifs that runs the Perl script These two sections are unchanged compared to the previous blog posts and have here simply been put into inifile, which is how one hosts multiple databases or tools under the same Mamba server. The last section, [ELM], is the only new part. It instructs GreenMamba to configure a metatool called ELM that combines the two tools Motifs and Instances.

Starting the Mamba server with this inifile and accessing http://localhost:8080/HTML/ELM yields the following web interface:

As you can see, what used to be a tool called Motifs has now become a tab within the resource ELM that shows the same (customized) input form. Similarly, the database Instances has become a tab within the same resource:

If you press the submit button for Motifs or Instances, you will get output that is formatted as it was when using Motifs and Instances as separate resources, the only change being that the header says ELM. In the next blog post, I will show how the design of GreenMamba web resources can be further customized and how design changes are consistently applied throughout all the individual tools that make up the metatool.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s