The batch-mode of the VisANT makes it possible for VisANT to be run quietly in the background without any user interaction. When VisANT is started in this mode, it will carry out a list of the processes specified in the command file (simply a text file). In addition to the commands detailed later in this document, it can be commented using any line started with "#". Although not required, it is suggested that the first line of a command file to be started with "#!batch commands". The batch mode must be started using command line such as:

java -Xmx512M -Djava.awt.headless=true -jar VisAnt.jar -b res/batch_cmd.txt
 

more information of command line can be found here.

Starting from version 3.39, all command files can also be directly loaded into VisANT as macros. A macro file is identified by VisANT if the first line of the file starts with #!batch commands. In the near future, this line will also allow user to specify the corresponding menus in VisANT for the macros listed in the file. Be aware that a line starting with #!batch commands can appear anywhere for any times in a command/macro file. However, except the first line, all other lines starting with #!batch commands is treated as general comments, providing user the great flexibility to test their macros using the add button with copy and paste as shown below:

When a command file is processed in VisANT with GUI, it is named as macro file, each command is named as macro. That is to say, a batch/command-file can be processed by VisANT in any running mode, with or without graphical user interface

Try a sample macro file that change the visualization of the nodes    Download the sample macro file

Note: You can always stop the macros by press the ESC key.

Batch mode is used to carry out targeted analyses without any user interface. This mode is generally preferred in two cases:

The data of the network is downloaded from http://www.functionalnet.org/mousenet/ and directly loaded into VisANT on a duocore computer with 2G memory and win XP. The command file and data used for this test can be downloaded here. Be aware that we specified the maximum memory size that are available on the test machine in the run.cmd: 1424M, which may not be required by this network and you can therefore reduce it in case necessary. In addition, VisANT can now directly read the zip file therefore the downloaded data is zipped. It takes 5+ hours for the test case to finish.

Note: The batch mode is still in its early release, not all functions are available as batch commands. Please feel free to email us if you need new functions as the batch commands.

Tip: By default, the batch mode will not read the startup VisML file as all other modes do. For this reason, you may want to read an empty startup network (in the format of VisML) to set the initial parameters you prefer.

 

Available commands

Input/Output  Topology  Layout  Selection  Metagraph  Expression  Database related queries   Edge weight  Edge Properties Node & Node Properties  Loop   Miscellaneous Enrichment analysis
 

Command

Description

Parameters

Example*

Input/output

read

This command reads a file with any format that supported by VisANT. Be aware that VisANT now supports the zip format (the zip file shall contain only one file). this command corresponding to the  File/Open menu and Open URL menu

The URL or the the file name and path to be read

read=res/expression.xml

read=grouping.txt.zip

read=http://visant.bu.edu/

sample/visml_files/start_up_1.xml

output

The command output is used to specify a file store all the output that will otherwise send to the screen. Some information such as output of shortest paths will also saved to the file. This command however will not trigged to save a network file.

the file name and path to write

output=out/cmd_out.txt

visml

The command save the network in the format of VisML with the specified by the command. It corresponding to the menu File/Save.

same as above

visml

=out/expression_loaded.xml

export_all

This command save all the nodes and edges of the current network in the format of Edge-List. It's function is same as the File/Save as Tab-delimited File/All

same as above

export_all=out/export_all.txt

export_nodes

This command save all the nodes of the current network in the format of Edge-List. It's function is same as the File/Save as Tab-delimited File/Nodes only

same as above

export_nodes

=out/export_nodes.txt
 

export_metanodes

This command save all the metanodes of the current network in the format of Edge-List. It's function is same as the File/Save as Tab-delimited File/Metanodes only

same as above

export_metanodes

=out/export_metanodes.txt
 

export_edges

This command save all the edges of the current network in the format of Edge-List. It's function is same as the File/Save as Tab-delimited File/Edge only

same as above

export_edges

=out/export_edges.txt

jpg

This command save the network as JPG image. It's function is same as the File/Save as the Image

same as above

jpg=out/has_expression.jpg

png

This command save the network as PNG image. It's function is same as the File/Save as the Image

same as above

png=out/has_expression.png

svg ** 

this command saves the network in the format of SVG

same as above

svg=out/query_forced.svg

print_statistics

The command prints out the network statistics: current only the number of nodes and edges. The command will print to the file specified by the output command if there is any before it.

N/A

print_statistics

println

Print out a line of string to the screen. If output file is specified, the string will be print out to the specified file

the string to print

println=---------

Node & Node PropertiesUpdated

delete_selected_nodesUpdated This command removes all selected nodes. It's function is same as the Edit/Delete Selected Nodes. If the parameter quite is not specified, a conformation window will be popped out quite delete_selected_nodes

delete_selected_nodes=quite

delete_invisible_nodesUpdated This command removes all invisible nodes if they do not belong to a metanode. It's function is same as the Edit/Delete Invisible Nodes. If the parameter quite is not specified, a conformation window will be popped out same as above delete_invisible_nodes

delete_invisible_nodes=quite

delete_selected_edgesNew This command removes all selected edges. It's function is same as the Edit/Delete Selected Edges. If the parameter quite is not specified, a conformation window will be popped out same as above delete_selected_edges

delete_selected_edges=quite

set_node_property

Customize the property of selected nodes. Format:

property_name:value

property name

set_node_property= node_color:blue

 

set_node_property= node_size:15

Edge Properties

set_edge_property

customize the property of selected edges. Format:

property_name:value

property name

set_node_property= edge_color:255,12,120

Topology

topo_export_degree

Export the degree distribution as tab-delimited text file. The function is same as the menu Topology/Global Statistics/Export Degree Distribution

same as above

topo_export_degree

=out/topo_export_degree.txt

topo_export_in_degree

Export the in-degree distribution as tab-delimited text file. The function is same as the menu Topology/Global Statistics/Export In-Degree Distribution

same as above

topo_export_in_degree

=out/topo_export_in_degree.txt

topo_export_out_degree

Export the out-degree distribution as tab-delimited text file. The function is same as the menu Topology/Global Statistics/Export Out-Degree Distribution

same as above

topo_export_out_degree

=out/topo_out_in_degree.txt

topo_export_cluster_coe

Export the distribution of clustering coefficient as tab-delimited text file. The function is same as the menu Topology/Global Statistics/Export Clustering Coefficient Distribution

same as above

topo_export_cluster_coe

=out/topo_cluster_coe.txt

topo_export_average_cluster_coe

Export the distribution of average clustering coefficient as tab-delimited text file. The function is same as the menu Topology/Global Statistics/Export Average Clustering Coefficient Distribution

same as above

topo_average_cluster_coe

=out/topo_average_coe.txt

shortest_path

This command detects the shortest paths between selected nodes. The command is ignored if there is no node being selected. The result will be printed to the screen, or the file specified by the output command

N/A

shortest_path

Layout

layout

This command has 5 different types of parameters

  • circle: performs circle layout

  • scramble: performs random layout

  • spoke: performs spoke layout

  • spring_embedded_relaxing:N:  performs spring-embedded layout with N iterations

  • elegant_relaxing:N: performs elegant relaxing layout for N iterations

  • relaxing:N: performs relaxing layout for N iterations

layout=circle

layout=scramble

layout=spoke

layout=

spring_embedded_relaxing:100

layout=elegant_relaxing:150

layout=relaxing:90

fit_to_page

fit the network to the current size of the network panel

N/A

fit_to_page

Selection

select_node

The command selects the nodes specified by the node names. Nodes do not exist in the current network will be ignored

name of the nodes separated by ","

select_node=

YIL111W,YMR042W,YDR522C

select_all_node

selects all the nodes

N/A

select_all_node

select_all_metanode select all visible metanodes N/A select_all_metanode
select_all_metanode_expanded select all visible expanded metanodes N/A select_all_metanode_expanded
select_all_metanode_collapsed select all visible collapsed metanodes N/A select_all_metanode_collapsed
reverse_node_selection reverse the node selection N/A reverse_node_selection
select_edge selected edges between specified nodes. If only one node is specified, all the edges connecting the node will be selected name of the nodes separated by "," select_edge=YDR522C

select_edge=YIL111W,YMR042W

select_all_edge select all visible edges N/A select_all_edge
reverse_edge_selection reverse the edge selection N/A reverse_edge_selection
deselect_all_edge clear selection of the selected edges N/A deselect_all_edge
deselect_all_node clear selection of the selected nodes N/A deselect_all_node

select_linkedNew

select nodes that are linked to the selected nodes

N/A

select_linked

clear_selection

clear all the selections for both edges and nodes

N/A

clear_selection

Metagraph

group_selected group selected nodes as a metanode name of the metanode, optional

group_selected=myGroup

group_selected

ungroup_selected ungroup selected nodes. If the selected node is a metanode, ungroup the metanode; otherwise, ungroup the selected nodes from a metanode N/A ungroup_selected

group_subnetwork

group disconnected subnetwork into metanodes

N/A

group_subnetwork

metanode_collapse_all

collapse all metanodes.

N/A

metanode_collapse_all

metanode_expand_all

expand all metanodes

N/A

metanode_expand_all

co_metanode_network transfer the metanodes as an interaction with fully connected components N/A co_metanode_network

Expression

clear_expression

remove all expression values attached to the network

N/A

clear_expression

expression_experiement

set the current expression experiment. The command will be ignored If the number exceeds the total number of experiments

the sequence number of the expression

expression_experiement=2

Edge weight 

min_edge_weight

set the minimum edge weight, default is 0, may be overwritten by VisML file

numerical value

min_edge_weight=0.2

max_edge_weight

set the maximum edge weight, default is 1.0, may be overwritten by VisML file

numerical value

max_edge_weight=0.9

edge_weight_normalization

Reset all edge weights to the range between 0-1 with max number =1 and min number =0

N/A

edge_weight_normalization

Database related queries  

database

change the target database, the default value is Predictome, the available selections so far is: fln

The name of the database is case insensitive. The command will not change the drop-down list of the database shown in the toolbar

Predictome

fln

database=fln

login

login VisANT server

user name and password delimited using ":"

login=zjhu@bu.edu:myPasswd

query_selected_nodes**

query the interaction of the selected nodes if they have not been queried against database

N/A

query_selected_nodes

query_internal**

Query the interactions between selected nodes

N/A

query_internal

name_normalization**

resolve the name of the selected nodes

N/A

name_normalization

name_update**

same as name_normalization, but will query database regardless whether the node name has been resolved before

N/A

name_update

forced_query**

query the interaction of the selected nodes regardless whether they have not been queried against database or not.

N/A

forced_query

method_based_query**

load the interactions annotated under specified method

method ID

method_based_query=M0010

go_annotation**

Reference our publication for the detailed explanation of different options

The selected gene nodes are annotated using most specific GO terms N/A go_annotation
The selected gene nodes are are annotated using GO terms having more than a user-specified number of genes type:gene_limit, gene_limit_cutoff: integer go_annotation=type:gene_limit, gene_limit_cutoff:100
The selected gene nodes are are annotated using GO terms having more than a user-specified number of genes, and the descendent terms having fewer than the specified number of genes type:informative, informative_cutoff: integer go_annotation=type:informative, informative_cutoff:200
loop

VisANT supports simple loop, with the initial requests from the users to monitor the real-time change of the network. The format of the loop is simple, as shown in the following example:
Example 1:loop with variables, e.g. k in the following line. k will start with 1, stop at 5, and increase 1 each iteration, there is 1 second delay:
loop=k:1:5:1, delay=1000
read=http://visant.bu.edu/other_formats/gml_test#k#.txt
loop_end

In summary, above example reads 6 files within in about 6 seconds with file name varied with loop variable represented by #k#.   
Try the loop macros    This sample uses a lot of loops
Example 2, infinity loop (with no loop variable) that reads the file named out.gml, if you want it to stop, quit VisANT, delay 2.5 second after each read:
loop=, delay=2500
read=out.gml
loop_end

Above macros monitors the change of out.gml, here is the program package that will constantly update the out.gml. To start, unpack the package in the same directory as macro file, and start with the command in a shell/dos window: java Producer

Miscellaneous 

species

set the current species of the network

species ID

species=hsa

exit

stop the processing of the commands

N/A

exit

pause

pause for 2 second by default, or at a given milliseconds

none or number for milliseconds

pause

pause=700

font_style

global control for the font style of the node labels

bold, plain, italic, bold+italic

font_style=bold

set_network_size

set the size of the network canvas

width, height

set_network_size=1000, 800

clear_network

remove all nodes and edges

N/A

clear_network

*Each commands must be presented in the same line.

** These commands require internet connection and are required to have a valid user login using the command login to avoid potential abuse of VisANT server. We may reject the query if abuse occurs. If you do not have a VisANT account, registration is free:

http://visant.bu.edu:8080/vserver/register.jsp

 

List of node/edge properties.  Try the sample network    Try the sample macro file    Download the sample macro file

Note: unless otherwise specified, all properties are applied to the selected nodes only

Name

Comment/Value

List of node properties

node_color

there can be two type of the value:

1.color name, including: black, blue, cyan, darkgray, gray, green, lightgray, magenta, orange, pink, red, yellow

2. RGB value in the format r_value,g_value,b_value, such as node_color:255,0,0

Example: set_node_property=node_color:25,255,105

               set_node_property=node_color:red

label_color

similar to above, Example: set_node_property=label_color:25,255,105

fixed

determine whether the position of the node is fixed or not: true or false, e.g. set_node_property=fixed:true

label_on

determine whether the node label is visible or not: true or false, e.g. set_node_property=label_on:true

label_size

the size of node label, integer, range: 6-26, e.g. set_node_property=label_size:16

label_position

the position of the label, value including: center, left, right, above, below, e.g. set_node_property=label_position:center

node_label

the label of the node, e.g. set_node_property=node_label:My new Label

label_style

the value of the style can be plain, bold, italic, bold+italic, e.g., set_node_property=label_style:bold+italic

node_size

the size of the node, integer, range: 0-30, e.g., set_node_property=node_size:30

node_width

the width of the node for the shape of circle, rectangle, rectangle_3d, round_rectangle, it has the same effect as node_size if the node shape is triangle, diamond, hexagon, octagon, square,  and ball.

not applicable if the node shape is rectangle_fit, rectangle_3d_fit, or round_rectangle_fit

Example: set_node_property=node_width:45

node_height

the width of the node for the shape of circle, rectangle, rectangle_3d, round_rectangle.

not applicable if the node shape is  triangle, diamond, hexagon, octagon, square, ball, rectangle_fit, rectangle_3d_fit, or round_rectangle_fit

Example:set_node_property=node_height:20

node_dimension

A combination of node_width and node_height, delimited using ',', e.g., set_node_property=node_dimension:70,40

node_shape

By default VisANT determines the shape of node based on its data type (protein, gene, RNA etc.). This command allows user to change the node shape to one of the following: circle, rectangle, rectangle_3d, round_rectangle, triangle, diamond, hexagon, octagon, square, ball, rectangle_fit, rectangle_3d_fit, or round_rectangle_fit.and auto. If auto allows VisANT to determine the node shape based on data type.

Example: set_node_property=node_shape:rectangle_fit

expanded_node_shape

Only applicable to metanodes. Two options are available: round_rectangle, convex_polygon.

Example: set_node_property=expanded_node_shape:convex_polygon

desc

set the description of the node, if there are multiple lines, use \n to separate the line.

Example:  set_node_property=desc:this is first line\nThis is second line

extend_symbol_on

determine whether the +/- of the node is visible or not: true or false

kegg_symbol_on

determine whether the KEGG pathwhay symbol of the node is visible or not: true or false

List of edge properties 

edge_color

see comments of the node_color. Example: set_edge_property=edge_color:255,0,0

label_on

turn on/off the edge label: true or false

edge_weight

set the weight of the edge: double value between 0-1, e.g., set_edge_property=edge_weight:0.6

desc

set the description of the node, if there are multiple lines, use \n to separate the line

Example:  set_edge_property=desc:this is first line\nThis is second line

opacity

global control, set the transparency of the edges: 0-155, set it to -1 to disable if you no long need it because it will significantly impact the performance.

exclude_metaedge_weight

global control, exclude the metaedge when filter out the edges based their weights: true or false

color_for_weight

global control, turn on/off the option to visualize the edge weight using the edge color: true or false

thickness_for_weight

global control, turn on/off the option to visualize the edge weight using the edge thickness: true or false

Total visit since Dec. 1st, 2008:

Hit Counter by Digits