|
2.1 make sure you have
a web server installed and running. We use tomcat server in this
tutorial which is free. To test whether you have tomcat server
running with default configuration, try to open
http://127.0.0.1:8080, if a page
is opened, tomcat server is ready.
2.2
download
the zip package, and extract file to the tomcat_dir/webapps/ROOT,
a demo directory will be created. Here the tomcat_dir points to the
install directory of tomcat, such as "C:\Program Files\Apache
Software Foundation\Tomcat 5.5" for tomcat 5.5.
2.3. double-click the
VisAnt.jar in the demo directory to launch the VisANT, and use the
menu Files/Open to open
the network file in the demo directory named y2h_homo.xml, and
following the steps shown in the following picture to modify the
color of the nodes to the one you preferred, and then save the file
use the menu Files/Save:

2.4 close VisANT and
open the URL
http://127.0.0.1:8080/demo/, you will see a page looks similar
to the following:

2.5 Play around, you
can search interactions similar to the following:

2.6 you can also
change the species to the Yeast, and navigate the interaction
network, just like what you experienced in VisANT web site, although
there is NO database and
application server connected.
------------------- Detailed explanation --------------------
VisANT
can be easily be embedded in your web page as a java applet to
visualize the network/pathway. Furthermore, the network/pathway can
be controlled through scripting language such as java script or VB
script. In general, almost all functions available in VisANT can be carried
out through scripting function if necessary. For an example, the VisANT
home page's search function is carried out using search function in
VisANT:
<SCRIPT language="JavaScript">
<!--
function search(orf, spec){
document.visant.search(orf, spec);
}
function openFile(fname){
document.visant.openFile(fname);
}
//-->
</script>
the
java script search function actually calls the search API of VisANT
applet (by the object document.visant) and visant is the name
of the VisANT applet as specified by the Name attribute of Applet tag in the html page as
illustrated below:
<APPLET NAME="visant" codebase="."
ARCHIVE="./VisAnt.jar"
CODE="cagt.bu.visant.VisAntApplet.class" WIDTH=1 HEIGHT=1
align="right">
Note: because by default VisANT applet is invisible, its width
and height can be 1 or 0.
When
manipulating the behavior of embedded VisANT applet, it is very important to
cache the applet so that the applet
can be used in different pages without reloading it. To achieve this
goal, we suggest users to use frame pages. For an example, VisANT
home page use two-page-frame, the banner page with name
header and the main page with
name main, as specified
below:
<html>
<head>
<title>VisANT: An integrative platform for network/pathway analysis</title>
</head>
<frameset framespacing="0" border="0" frameborder="0" rows="102,*">
<frame name="header" scrolling="no" noresize target="main" src="banner2.htm">
<frame name="main" scrolling="auto" src="home2.htm" target="_self">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
the
banner page actually embeds the applet (
http://visant.bu.edu/banner2.htm ) and all default pages are
opened in the main
frame. The search button in the default main VisANT home page using
the following java script to call VisANT's search API using
following line:
parent.header.search(document.searchform.orf.value,
document.searchform.species.value)
Please
reference the source of page
http://visant.bu.edu/home2.htm for more detail about the usage
of this function.
Note: The main window of VisANT Applet by default is
invisible when embedding in the web
page, unless the parameter
visible
is set to be true.
VisANT provides an API showNetwork
to make the applet visible. This feature, combined with the hidden
frame that embeds the applet, enables unsynchronized loading of
VisANT applet and its
startup file, therefore the
loading time of the pages will not be affected by the applet.
Note: All available APIs that can be called by script languages
are available here.
In
order to fit the different requirements of the users, the user
interface of the VisANT applet is configurable through its
parameters, please reference
here for all configurable parameters.
In
case that the frame page is not preferred, users can hide the frame
page that embeds the applet. A sample web site of this usage can be
found
here
and the source of the pages can be downloaded here.
VisANT has provided
special functions to visualize user's interaction data sets. This
tutorial illustrates how to user VisANT to visualize the
interaction data set if the total interaction are less than
certain threshold, say 5000 (the only thing need to be considered
here is the loading time of the interaction data set in VisANT).
The special functions enable users to query the interactions
without the usage of database. All the files involved in this
tutorial can be downloaded here, the demo
pages can be tried out at
http://bioinfo.bu.edu:8080/demo/index.htm. It is highly
suggested for users to open a new browser
to try out the demo pages. Here are the steps to achieve the demo
pages:
-
Prepare the interaction data in VisANT and save them as the VisML
file. Please reference this
tutorial for how to add interaction data into VisANT. Please
also download the y2h interactome data used in this tutorial (prepared
from Predictome database,
one for Homo
Sapiens (761 nodes and 874 edges) and
one for
Saccharomyces cerevisiae (4216 nodes and 7842 edges). In
both file the node color and size has been customized, and
database connection has been turned off
by deselecting the Database online option under Files menu so that
searching and expansion of the node's interaction will not
start database query.
-
Prepare the pages. We need to prepare three pages: header.htm is
used to hold the VisANT applet and is invisible to the users;
main.htm is the page for the interaction data query; and the
index.htm is the frame page that holds header.htm and main.htm.
All pages used here have been zipped, and users can download the
zip file and extract to any web directory. The demo pages can then
be easily accessed using corresponding URL.
Header.htm: in the main.htm, we will use Homo Sapiens interaction
data set as the default interaction data set, therefore we set the
startup parameter as following:
<PARAM NAME=startup Value = 'y2h_homo.xml'>
which tells VisANT to load this file when it starts. The file is
located in the same directory as the VisAnt.jar. This is probably
the only parameter need to be customized for those users who want
to visualize their own interaction data.
In
addition, we also customized the Applet a little bit, for example,
we removed toolbar in VisANT by using following parameter:
<PARAM NAME='toolbar' Value = 'OFF'>
Please
reference here for the detailed explanation of all parameters.
index.htm: This
file is similar to the one shown above, one thing need to be
aware is the name of the two frames, the hidden page (header.htm)
is named as header while the main page (main.htm) is named as
name.
main.htm: This will be the main
for user to add on their own design of the page. The main.htm is
just be designed to illustrate how VisANT scriptable functions
can be used to visualize user's interaction data. The interface
of the demo pages shall look similar to the following figure:

When the above
page opens, VisANT will load the VisML file y2h_homo.xml
specified by parameter startup in the background. Clicking on
the two buttons shown above will trigger the java script
function as shown below:
<Button TYPE=BUTTON onClick="javascript:parent.header.searchInteraction(document.searchform.orf.value, 1)">
which in turn calls java script function searchInteraction(names,
level) defined in the header.htm:
function searchInteraction(names, level){
document.visant.showInteraction(names, level);
}
where
visant is the name of the applet and showInteraction is the VisANT
API that searches the interaction of a given protein and a given
level. The parameter level determines the maximum path of the
searched protein. Clear this function will show all connected
components of the searched protein If the value of this parameter is
big enough. Following figure shows the effect of this parameter:

The
searched interaction network supports exploratory navigation as
well, double-clicking over the node, or query the selected nodes,
will also reveal the interactions of the next level, as shown in
the following figure:

Java script
function can also be called through HTTP link, as shown with the
Show All Interactions:
<a href="javascript:parent.header.displayAll()">Show All Interactions</a>
As
there are two interaction data set, a drop-down list has been used
to allow user to select different species, and the value of each
selection corresponds to the VisML name of the different data set,
so that when the selection of the drop-down list changes, VisANT
will be notified to load the right file, as shown below:
<SELECT NAME="species" width="5" onchange="javascript:parent.header.openFileQuite(document.searchform.species.value)">
<OPTION SELECTED VALUE="y2h_homo.xml">Homo sapiens</OPTION>
<OPTION VALUE="y2h_yeast.xml">Saccharomyces cerevisiae</OPTION>
</SELECT>
Be
aware that the java script calls the function openFileQuite
instead of openFile to allow VisANT to load the file in quite,
otherwise, VisANT window will be brought to the foreground when a
file is loaded.
Note: The detailed behavior of three VisANT APIs illustrated
above are carried out by the the filter named "Filter the
Interaction Levels", which is available under Filter
menu in VisANT.
Advantage:
-
Simple, powerful & flexible, no server/database is involved, pages
can be host by any web server.
-
Searching is fast because all interactions are loaded in memory
Disadvantage
-
Can
not support very large data set, especially for those that have
multiple species, because long loading time will prevent smooth
usage.
-
Can
not take the benefits of all server dependent functions, such as
saving the network as high resolution graph etc.
|