Command-line standalone version

VARNA can also be used as a standalone application for producing pictures in a non-interactive way. This can be useful for automating the creation of pictures from within another job. For such an application, the VARNAcmd class was coded, and should be invoked in the following way:

java -cp VARNAvX-Y.jar fr.orsay.lri.varna.applications.VARNAcmd
  [-i inputFile|-sequenceDBN XXX -structureDBN YYY] -o outFile [opts]
Where:
  • inFile: An input file using one of the supported formats (Vienna, CT, BPSeq or RNAML).
  • XXX: An RNA sequence.
  • YYY: A well-parenthesized expression with dots whose size matches that of the input sequence.
  • outFile: An output file whose format is guessed from the extension.

Available options

Many additional options are supported, matching the syntax of the Applet's parameters. Namely, if param is a valid parameter for the VARNA Applet, then -param will have the exact same arguments and effects in the standalone, command-line version. Here is the complete list of these options:

-algorithm -annotations -applyBasesStyleXon -autoHelices -autoInteriorLoops -autoTerminalLoops -auxBPs -backbone -background -baseInner -baseName -baseNum -baseOutline -basesStyleX -border -bp -bpIncrement -bpStyle -chemProb -colorMap -colorMapCaption -colorMapMax -colorMapMin -colorMapStyle -columns -comparisonMode -drawBackbone -drawBases -drawNC -drawTertiary -error -fillBases -firstSequence -firstStructure -flat -gapsColor -highlightRegion -modifiable -nsBasesColor -periodNum -resolution -rotation -rows -secondSequence -secondStructure -sequenceDBN -spaceBetweenBases -spaceBetweenBases -structureDBN -title -titleColor -titleSize -url -warning -zoom

Details

-algorithm xxx
Wherexxx is a String
DescriptionRedraws the current RNA secondary using one of the implemented algorithms.
Supported algorithms are line,circular,radiate and naview.
Example-algorithm naview

-annotations xxx
Wherexxx is a String
DescriptionDefines a set of annotations of the form
text1:opt1=val1,...;type=T2,opt2=val2;...
where texti is the annotation caption, and the options alter the way each annotation is rendered.
The first and most important one is the type=[P,B,H,L] one, which specifies whether the annotation is:
  • Static (P)
  • Anchored on a base (B)
  • Anchored on an helix (H)
  • Anchored on a loop (L)
For static annotations, a position needs be specified through options y and y. For every other type, a supporting base needs be specified through option anchor. The type default to L.
Additionally, cosmetic factors such as the font size (size=int) and color (color=#HHHHHH) can be specified to customize the rendering of annotations.
Example-annotations "L1:anchor=19"

-applyBasesStyleXon xxx
Wherexxx is a String
DescriptionApplies a custom base style to a list of bases.
E.g.: <parameter name="applyBasesStyle5on"
value="1,6,7,10"/>
will apply the 5th base style, defined with basesStyle5 to bases numbered 1, 6, 7 and 10.
Example-applyBasesStyleXon "1,2,5"

-autoHelices xxx
Wherexxx is a boolean
DescriptionAnnotates each and every helix in the RNA with a unique "Hn" label.
Example-autoHelices True

-autoInteriorLoops xxx
Wherexxx is a boolean
DescriptionAnnotates each and every interior loop of the RNA with a unique "In" label.
Example-autoInteriorLoops True

-autoTerminalLoops xxx
Wherexxx is a boolean
DescriptionAnnotates each and every terminal loop of the RNA with a unique "Tn" label.
Example-autoTerminalLoops True

-auxBPs xxx
Wherexxx is a String
DescriptionCreates a set of additional base-pairs, possibly defining and using custom styles for the additional base-pairs.
E.g.: (1,10);(2,11):thickness=4
will create a base-pair (1,10) using current style and a base-pairs (2,11) with a thickness of 4 points. Admissible options for a base-pair custom style are:
  • edge5, edge3: Edge (5' or 3') used for interaction in non-canonical base-pairs, as defined by the Leontis/Westhof classification of base-pairs. Admissible values are wc (Watson/Crick edge), h (Hoogsteen edge) and s (Sugar edge).
  • stericity: Orientation of the strands. Admissible values are cis and trans
  • color: Base-pair color
  • Thickness: Base-pair thickness
Example-auxBPs "(1,10);(2,11)"

-backbone xxx
Wherexxx is a Color
DescriptionLets the user pick a custom color for rendering the phosphate-sugar backbone (aka skeleton) of the RNA.
Example-backbone #FF0000

-background xxx
Wherexxx is a Color
DescriptionDefines the background color used within this panel.
Example-background #99AA0F

-baseInner xxx
Wherexxx is a Color
DescriptionDefault value for inner base color
Example-baseInner #334455

-baseName xxx
Wherexxx is a Color
DescriptionSets the color used to draw the nucleotide name
Example-baseName #334455

-baseNum xxx
Wherexxx is a Color
DescriptionSets the color used to draw base numbers
Example-baseNum #334455

-baseOutline xxx
Wherexxx is a Color
DescriptionDefault value for outer base color
Example-baseOutline #334455

-basesStyleX xxx
Wherexxx is a String
DescriptionDefines a custom base-style, to be applied later to a set of bases (See applyBasesStyle). Styles are numbered starting from 1 using a specific syntax.
E.g.: <parameter name="basesStyle3"
value="fill=#FF0000,outline=#00FF00"/>
will create a base-style numbered 3, having red inner color and green outline.
For each base style, four parameters can be assigned:
  • fill colors the inner part of base
  • outline the outline of the base
  • label will color the base text
  • number color the base number
Example-basesStyleX fill=#FF0000

-border xxx
Wherexxx is a Dimension
Description Sets the width and height of the panel border, i.e. the gap between the panel boundaries and those of the surface used to draw the RNA.
Example-border "20x30"

-bp xxx
Wherexxx is a Color
DescriptionSets the default value for base-pair colors.
Example-bp #334455

-bpIncrement xxx
Wherexxx is a Double
DescriptionIn linear drawing mode, defines the vertical increment used to separate two successive, nested base-pairs.
Example-bpIncrement 1.3

-bpStyle xxx
Wherexxx is a String
DescriptionLets the user picks his/her favorite style for base-pairs rendering, chosen among:
  • none, base-pairs are not drawn, but can be implicitly seen from "ladders", ie helix structures
  • line (Line), a simple line is used to draw any base-pair, regardless of its type
  • rnaviz, a small square is drawn at equal distance of the two partners
  • lw (Leontis/Westhof), both canonical and non-canonical base-pairs are rendered according to the Leontis/Westhof nomenclature.
Example-bpStyle lw

-chemProb xxx
Wherexxx is a String
DescriptionAttaches a sequence of chemical probing annotations of the form:
a1-b1:opt1=v1,...;a2-b2:opt1=v1,...
where a1 and b1 are adjacent bases, and each option is chosen among:
  • glyph=[arrow|dot|pin|triangle]: Sets the shape of the annotation
  • dir=[in|out]: The direction of the annotation
  • intensity=real: The annotation intensity (i.e. thickness)
  • color=color: The color used to draw the annotation
Example-chemProb "11-12:glyph=dot;"

-colorMap xxx
Wherexxx is a List
DescriptionAssigns a list of real values, used for color map rendering, to the bases of an RNA. The values are assigned sequentially in the 5' to 3' order. If list is shorter than the list of bases, the remaining bases will remain unaffected. Default value for each base is 0.0.
Example-colorMap "0.1;2;3.5"

-colorMapCaption xxx
Wherexxx is a String
DescriptionSets the caption of current color map. Setting the caption to the empty strings hides the color map caption (ie no space is used for the caption).
Example-colorMapCaption "Boltz. prob."

-colorMapMax xxx
Wherexxx is a Real
DescriptionSets the upper bound of the color map to a given value. That way, the color map can span between natural values (e.g. [0,10]) no matter what the actual values are.
Example-colorMapMax "10.0"

-colorMapMin xxx
Wherexxx is a Real
DescriptionSets the lower bound of the color map to a given value. That way, the color map can span between natural values (e.g. [0,10]) no matter what the actual values are.
Example-colorMapMin "0.0"

-colorMapStyle xxx
Wherexxx is a String
DescriptionSets the color map palette to be used within a color map drawing. One can either choose a predefined palette of define a custom palette. Predefined palettes are: "red", "blue", "green", "heat", "energy", and "bw". A custom palette is defined as a semi-colon-separated sequence of (value/rgb color) couples (e.g. "0:#000000;1:#FFFFFF" for a black to white color map). The colors are obtained from a set of values through linear interpolations on each RGB component. For instance, a custom map "0:#000000;1:#808080" going from black (#000000) to gray (#808080) will assign a dark gray color (#404040) to a base of value "0.5". Also, the color map range is automatically scaled as to match the range of base values, so it should not be necessary to manually account for the range.
Example-colorMapStyle heat

-columns xxx
Wherexxx is a Integer
DescriptionSets the number of columns in a multipanel layout
(See Multiple Panels section below).
Example-columns 2

-comparisonMode xxx
Wherexxx is a Boolean
Description Toggles on/off "comparison mode", where two previously aligned secondary structures can be jointly drawn within a single "super-secondary structure". Both sequences and structures MUST be specified within this mode, using the firstSequence, secondSequence, firstStructure and secondStructure applet parameters. Additionally, the merged secondary structures must currently be without any crossing interactions (e.g. pseudoknots), and merging them should give a secondary structure.
Example-comparisonMode True

-drawBackbone xxx
Wherexxx is a Boolean
DescriptionToggles on/off backbone drawing.
Example-drawBackbone false

-drawBases xxx
Wherexxx is a Boolean
DescriptionDisplays/hide the outline of a nucleotide base.
Example-drawBases True

-drawNC xxx
Wherexxx is a Boolean
DescriptionSwitches on/off the display of non-canonical base-pairs.
Example-drawNC False

-drawTertiary xxx
Wherexxx is a Boolean
Description Toggles on/off display of "non-planar" base-pairs, i.e. pseudoknots. Since there is no canonical definition of pseudoknotted portions, a maximal planar subset is extracted from the input structure, defined to be the planar portion, and used as a scaffold for the drawing algorithms. The remaining base-pairs can either be displayed or not with this option.
Example-drawTertiary True

-error xxx
Wherexxx is a Boolean
DescriptionToggles on/off error messages, e.g. when unexpected values are encountered.
Example-error True

-fillBases xxx
Wherexxx is a Boolean
DescriptionDisplays/hide the outline of a nucleotide base.
Example-fillBases True

-firstSequence xxx
Wherexxx is a String
DescriptionSets the gapped nucleotide sequence (gap character is ".") for the first RNA sequence/structure in comparison mode. Note that both sequences and structures MUST be specified, using the firstSequence, secondSequence, firstStructure and secondStructure applet parameters, and that the comparison mode must be activated using the comparisonMode parameter.
Example-firstSequence "GG.AG..C"

-firstStructure xxx
Wherexxx is a String
DescriptionSets the secondary structure for the first displayed RNA in Dot-Bracket Notation (DBN). The dot character "." is used both for unpaired nucleotides and for gaps. Pseudoknots are not currently supported in comparison mode (but they are supported for single structures). Note that both sequences and structures MUST be specified, using the firstSequence, secondSequence, firstStructure and secondStructure applet parameters, and that the comparison mode must be activated using the comparisonMode parameter. Also, the two structures must be compatible, i.e. their joint structure should represent a valid (e.g. pseudoknot-free) secondary structure .
Example-firstStructure "((...))"

-flat xxx
Wherexxx is a boolean
DescriptionIn radiate drawing mode, redraws the whole structure, aligning to a baseline the base featured on the exterior loops (aka "dangling ends") .
Example-flat true

-gapsColor xxx
Wherexxx is a Color
DescriptionDefines and uses a special color to draw "Gaps" bases in comparison mode. "Gaps" bases correspond to insertion/deletions in one of the structures.
Example-gapsColor #8FFF00

-highlightRegion xxx
Wherexxx is a String
DescriptionHighlights a region by drawing a polygon of predefined radius, fill color and outline color around it. The highlight can be further edited in the annotation submenu.
Each region consist in an interval followed by options. Some features can be customized for each region using the following, comma-separated, assignations:
  • radius=real: Thickness of the highlight
  • fill=color: The color used to fill the highlight
  • outline=color: The color used to draw the line around the highlight
Example-highlightRegion "10-16:fill=#FF0000"

-modifiable xxx
Wherexxx is a Boolean
DescriptionIf true, prohibits any modification performed by the user, except for basic cosmetic operations. Default to true.
Example-modifiable False

-nsBasesColor xxx
Wherexxx is a Color
DescriptionDefines and uses a special color to render non-standard bases (Anything but A,C,G or U)
Example-nsBasesColor #00FFFF

-periodNum xxx
Wherexxx is a Integer
DescriptionSets the interval between two successive base numbers. More specifically, if k is the period, then the first and last bases of the RNA are numbered, along with each base whose number is a multiple of k. The base number is used for this operation as opposed to the base index, which might differ if bases are missing in the RNA.
Example-periodNum 10

-resolution xxx
Wherexxx is a Real
DescriptionChooses the resolution of a bitmap export, i.e. the multiplier in the number of pixels in each dimension of the exported picture.
Example-resolution "2.0"

-rotation xxx
Wherexxx is a Double
DescriptionRotates the whole RNA of a certain angular increment. (Doesn't rotate the captions)
Example-rotation 1.0

-rows xxx
Wherexxx is a Integer
DescriptionSets the number of rows in a multipanel layout
(See Multiple Panels section below).
Example-rows 2

-secondSequence xxx
Wherexxx is a String
DescriptionSets the gapped nucleotide sequence (gap character is ".") for the second RNA sequence/structure in comparison mode. Note that both sequences and structures MUST be specified, using the firstSequence, secondSequence, firstStructure and secondStructure applet parameters, and that the comparison mode must be activated using the comparisonMode parameter.
Example-secondSequence "G..G..C"

-secondStructure xxx
Wherexxx is a String
DescriptionSets the secondary structure for the second displayed RNA in Dot-Bracket Notation (DBN). The dot character "." is used both for unpaired nucleotides and for gaps. Pseudoknots are not currently supported in comparison mode (but they are supported for single structures). Note that both sequences and structures MUST be specified, using the firstSequence, secondSequence, firstStructure and secondStructure applet parameters, and that the comparison mode must be activated using the comparisonMode parameter. Also, the two structures must be compatible, i.e. their joint structure should represent a valid (e.g. pseudoknot-free) secondary structure .
Example-secondStructure "((...))"

-sequenceDBN xxx
Wherexxx is a String
DescriptionSets the raw nucleotide sequence for the displayed RNA Each base must be encoded in a single character. Letters others than [A,C,G,U] are tolerated
Example-sequenceDBN "GGAGUCC"

-spaceBetweenBases xxx
Wherexxx is a Real
DescriptionLets the user define the multiplier used for inter-base distance. Since the applet adapts it zoom factor to the dimension of the RNA bounding box, this option might be mistaken for a increase of the base radius.
Example-spaceBetweenBases 1.0

-spaceBetweenBases xxx
Wherexxx is a Real
DescriptionSet the distance between consecutive bases
Example-spaceBetweenBases "1.0"

-structureDBN xxx
Wherexxx is a String
DescriptionSets the secondary structure of the displayed RNA in Dot-Bracket Notation (DBN). Valid structures in DBN format are well-parenthesized words consisting of dots '.', opening '(' and closing ')' parentheses. Dotted positions will be unpaired, whereas matching parenthesized positions will represent base-pairing nucleotides. Pseudoknots can be specified by using the two alternative parentheses system '{}' and '[]'.
Example-structureDBN "((...))"

-title xxx
Wherexxx is a String
DescriptionLets the user type a new title, displayed on the bottom of the panel.
Example-title "My RNA"

-titleColor xxx
Wherexxx is a Color
DescriptionSelects the color used for rendering the panel title.
Example-titleColor #808080

-titleSize xxx
Wherexxx is a Integer
DescriptionLets the user select the font family, style and size used for displaying the title.
Example-titleSize 10

-url xxx
Wherexxx is a String
DescriptionLoads and displays a file that describes a secondary structure of RNA in this panel. Supported files are in Vienna dot-bracket notation, MFold/Unafold Connect format, Gutell's BPSeq format, and RNAML as produced by RNAView.
Example-url "http://varna.lri.fr/ex1.ct"

-warning xxx
Wherexxx is a Boolean
DescriptionToggles on/off warning messages.
Example-warning True

-zoom xxx
Wherexxx is a Double
DescriptionDefines the level of zoom and zoom increment used to display the RNA within this panel. For zoom levels greater than one, the arrows or the mouse (middle button or both button simultaneously) can be used to scroll visible portion.
Example-zoom 1.2

Previous page: How to...
Next page: Applet Parameters