Interfacing VARNA using JavaScript

Recent changes in Java security policy might prevent you from running VARNA.
Check out this page for details and ways to solve the problem.

Dynamically addressing VARNA using JavaScript

VARNA can be used in slave mode, i.e. be controlled by a browser using a set of functions implemented in the dedicated VARNA.js JavaScript library. The list of functions currently supported is not completely exhaustive at the moment, so do not hesitate to send me an email if your favorite option is missing.
The following interactions illustrate the syntax of various features of the library. Note that each call to a function requires the identifier of the applet, which has to be provided at the declaration of the applet (here id="VA").

Sequence & structure

Sequence: or
setSeq('VA','AAA')
eraseSeq('VA')

Set structure:
setStructSmooth('VA','(.)')


Set struct. & seq. with a text link.
setRNASmooth('VA','GAC','(.)')

Title

Title: or
setTitle('VA','Hurray!')
setTitle('VA','')
Color Maps

Color Map
toggleShowColorMap('VA')

Set values:
setColorMapValues('VA',..)

Set style:
Blue Red
Green Energy
Heat B & W
Custom (See HTML code)
setColorMap('VA','red')
setCustomColorMap('VA',..)

Set bounds:Min=
setColorMapMinValue('VA',0)
Max=
setColorMapMaxValue('VA',75)
Probing Glyphs

Create
addChemProb(i,j,k,l,m,n)


resetChemProb()

Selection


getCurrentSelection('VA')


setSelection('VA',[1,10])

Previous page: Comparing RNAs
Next page: JS Interactions II