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
Where | xxx is a String |
Description | Redraws the current RNA secondary using one of the implemented algorithms. Supported algorithms are line ,circular ,radiate and naview . |
Example | -algorithm naview |
Where | xxx is a String |
Description | Defines 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" |
Where | xxx is a String |
Description | Applies 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" |
Where | xxx is a boolean |
Description | Annotates each and every helix in the RNA with a unique "Hn" label. |
Example | -autoHelices True |
Where | xxx is a boolean |
Description | Annotates each and every interior loop of the RNA with a unique "In" label. |
Example | -autoInteriorLoops True |
Where | xxx is a boolean |
Description | Annotates each and every terminal loop of the RNA with a unique "Tn" label. |
Example | -autoTerminalLoops True |
Where | xxx is a String |
Description | Creates 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)" |
Where | xxx is a Color |
Description | Lets the user pick a custom color for rendering the phosphate-sugar backbone (aka skeleton) of the RNA. |
Example | -backbone #FF0000 |
Where | xxx is a Color |
Description | Defines the background color used within this panel. |
Example | -background #99AA0F |
Where | xxx is a Color |
Description | Default value for inner base color |
Example | -baseInner #334455 |
Where | xxx is a Color |
Description | Sets the color used to draw the nucleotide name |
Example | -baseName #334455 |
Where | xxx is a Color |
Description | Sets the color used to draw base numbers |
Example | -baseNum #334455 |
Where | xxx is a Color |
Description | Default value for outer base color |
Example | -baseOutline #334455 |
Where | xxx is a String |
Description | Defines 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 |
Where | xxx 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" |
Where | xxx is a Color |
Description | Sets the default value for base-pair colors. |
Example | -bp #334455 |
Where | xxx is a Double |
Description | In linear drawing mode, defines the vertical increment used to separate two successive, nested base-pairs. |
Example | -bpIncrement 1.3 |
Where | xxx is a String |
Description | Lets 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 |
Where | xxx is a String |
Description | Attaches 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;" |
Where | xxx is a List |
Description | Assigns 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" |
Where | xxx is a String |
Description | Sets 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." |
Where | xxx is a Real |
Description | Sets 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" |
Where | xxx is a Real |
Description | Sets 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" |
Where | xxx is a String |
Description | Sets 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 |
Where | xxx is a Integer |
Description | Sets the number of columns in a multipanel layout (See Multiple Panels section below). |
Example | -columns 2 |
Where | xxx 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 |
Where | xxx is a Boolean |
Description | Toggles on/off backbone drawing. |
Example | -drawBackbone false |
Where | xxx is a Boolean |
Description | Displays/hide the outline of a nucleotide base. |
Example | -drawBases True |
Where | xxx is a Boolean |
Description | Switches on/off the display of non-canonical base-pairs. |
Example | -drawNC False |
Where | xxx 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 |
Where | xxx is a Boolean |
Description | Toggles on/off error messages, e.g. when unexpected values are encountered. |
Example | -error True |
Where | xxx is a Boolean |
Description | Displays/hide the outline of a nucleotide base. |
Example | -fillBases True |
Where | xxx is a String |
Description | Sets 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" |
Where | xxx is a String |
Description | Sets 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 "((...))" |
Where | xxx is a boolean |
Description | In radiate drawing mode, redraws the whole structure, aligning to a baseline the base featured on the exterior loops (aka "dangling ends") . |
Example | -flat true |
Where | xxx is a Color |
Description | Defines 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 |
Where | xxx is a String |
Description | Highlights 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" |
Where | xxx is a Boolean |
Description | If true , prohibits any modification performed by the user, except for basic cosmetic operations. Default to true . |
Example | -modifiable False |
Where | xxx is a Color |
Description | Defines and uses a special color to render non-standard bases (Anything but A,C,G or U) |
Example | -nsBasesColor #00FFFF |
Where | xxx is a Integer |
Description | Sets 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 |
Where | xxx is a Real |
Description | Chooses 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" |
Where | xxx is a Double |
Description | Rotates the whole RNA of a certain angular increment. (Doesn't rotate the captions) |
Example | -rotation 1.0 |
Where | xxx is a Integer |
Description | Sets the number of rows in a multipanel layout (See Multiple Panels section below). |
Example | -rows 2 |
Where | xxx is a String |
Description | Sets 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" |
Where | xxx is a String |
Description | Sets 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 "((...))" |
Where | xxx is a String |
Description | Sets 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" |
Where | xxx is a Real |
Description | Lets 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 |
Where | xxx is a Real |
Description | Set the distance between consecutive bases |
Example | -spaceBetweenBases "1.0" |
Where | xxx is a String |
Description | Sets 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 "((...))" |
Where | xxx is a String |
Description | Lets the user type a new title, displayed on the bottom of the panel. |
Example | -title "My RNA" |
Where | xxx is a Color |
Description | Selects the color used for rendering the panel title. |
Example | -titleColor #808080 |
Where | xxx is a Integer |
Description | Lets the user select the font family, style and size used for displaying the title. |
Example | -titleSize 10 |
Where | xxx is a String |
Description | Loads 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" |
Where | xxx is a Boolean |
Description | Toggles on/off warning messages. |
Example | -warning True |
Where | xxx is a Double |
Description | Defines 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 |