RNASUBOPT(1)
πΈ RNASUBOPT(1) πΈ
Section 1 Β· User Commands π
β¨ NAME β¨
okay so the name here is RNAsubopt, and this page is basically the manual for RNAsubopt 2.7.0 π
β¨ SYNOPSIS β¨
RNAsubopt [OPTION]...
bestie, that's the whole thing: RNAsubopt plus as many OPTIONs as you want π
β¨ DESCRIPTION β¨
RNAsubopt 2.7.0 π¦
calculate suboptimal secondary structures of RNAs π§¬
okay so RNAsubopt reads RNA sequences from stdin and, in the default -e mode, calculates all the suboptimal secondary structures inside a range of energy you pick, measured above the minimum free energy (mfe) π₯ It prints each structure in dot-bracket notation, followed by its energy in kcal/mol, to stdout.
β οΈ Be careful, bestie! The number of structures returned grows exponentially with both sequence length and energy range. It can get WILD π
If you use the -p option instead, RNAsubopt makes Boltzmann weighted samples of secondary structures. Main character energy π
-h,--helpβ the classic "show me the help and then leave" π- Prints help and exits.
--detailed-helpβ the deep dive π«Ά- Prints help with all the details and hidden options, then exits.
--full-helpβ help, but a little extra- Prints help including hidden options, then exits.
-V,--versionβ what version are we on? β¨- Prints the version and exits.
-v,--verboseβ chatty mode π£οΈ (default=off)- Lowers the log level setting so even INFO messages get passed through.
π I/O Options π
Command line options for input and output (pre-)processing π
-i,--infile=filenameβ read from a file instead of stdin π- The default is to read from stdin, but with this you can point RNAsubopt at an input file name and it'll read from there instead.
-o,--outfile[=filename]β output goes to a file instead of stdout πΎ- You can send all output to output files instead of printing it to stdout.
- The default filename is
"RNAsubopt_output.sub"if no FASTA header comes before the input sequences and--auto-idis inactive. - Otherwise, output files use the scheme
prefix.sub, where the prefix comes from the sequence id π§ - You can give a single output file name for all the data made from the input by passing an optional string as the argument.
- If a file with that same name already exists, the output gets appended to it, not overwritten π
- Note: any special characters in the filename get swapped for the filename delimiter, so there's no way to pass a whole directory path through this option yet. (See also
--filename-delim.)
--noconvβ don't swapTforUπ« (default=off)- Stops RNAsubopt from automatically substituting nucleotide
TwithU.
- Stops RNAsubopt from automatically substituting nucleotide
--auto-idβ make up an ID for each sequence β¨ (default=off)- By default, RNAsubopt figures out an ID from the input sequence data, if the input file format allows that. Usually the IDs live in the FASTA header.
- If this flag is on, RNAsubopt ignores any IDs it finds in the input and generates its own ID for each sequence π«Ά
- That generated ID is a prefix plus an increasing number.
- You can also use this flag to add a FASTA header to the output, even if the input doesn't have one.
--id-prefix=STRINGβ the prefix for auto-generated IDs (also used in output file names) π· (default=sequence)- Each sequence's FASTA id gets prefixed with whatever string you give. The ids look like
>prefix_xxxx, wherexxxxis the sequence number. - Note: setting this parameter implies
--auto-id.
- Each sequence's FASTA id gets prefixed with whatever string you give. The ids look like
--id-delim=CHARβ swap out the delimiter between the prefix and the number π― (default=_)- This lets you change the default
_between the prefix string and the increasing number in auto-generated IDs. (Also used in output file names.)
- This lets you change the default
--id-digits=INTβ how many digits the counter gets π’ (default=4)- Auto-generated alignment IDs get an increasing number that starts at 1.
- That number is always left-padded with leading zeros, so it takes up a set width. This parameter lets you pick that width.
- We allow numbers in the range
[1:18]. - This option implies
--auto-id.
--id-start=LONGβ pick the first number in auto-generated IDs π (default=1)- Auto-generated sequence IDs usually start at 1, but this lets you choose a different starting number.
- Negative numbers are not allowed, bestie π
- Setting this parameter means RNAsubopt ignores any IDs from the input data, so it turns on the
--auto-idflag too.
--filename-delim=CHARβ the delimiter used in cleaned-up filenames π§Ό (default=ID-delimiter)- When RNAsubopt sanitizes filenames (swapping out invalid characters), this is the character it uses.
- The default delimiter is ALWAYS the first character of the "ID delimiter" you set with
--id-delim. - If the delimiter is a whitespace character or empty, the invalid characters just get removed instead of substituted.
- These characters are illegal in filenames: backslash
\, slash/, question mark?, percent sign%, asterisk*, colon:, pipe symbol|, double quote", and the triangular brackets<and>π ββοΈ
--filename-fullβ use the whole FASTA header for filenames π (default=off)- By default, output filenames are limited to the first word of the sequence ID. This flag turns that off.
- Example: an input with the FASTA header
>NM_0001 Homo Sapiens some geneusually makes output files with the prefixNM_0001, likeNM_0001.sub, without the extra stuff from the header. - With this flag set, nothing gets truncated, so the output filenames get the full FASTA header as their prefix.
- Heads up: invalid characters (like whitespace) still get substituted with a delimiter or just removed. (See also
--filename-delim.)
--log-level=levelβ set the log level threshold π (default=2)- By default, log messages are filtered so only warnings (level 2) or errors (level 3) get printed.
- Higher values mean less info gets logged.
- Log-level
5turns off ALL messages, even errors and other critical stuff π
--log-file[=filename]β send log messages to a file instead of stderr ποΈ (default=RNAsubopt.log)- Log messages go to a file instead of stderr.
--log-timeβ add timestamps to log messages β° (default=off)--log-callβ add the file and line of the log-calling function π (default=off)- Includes the file and line of whatever function made the log call.
π Algorithms π
Pick the algorithms you want to run on the given RNA sequence(s) π§ͺ
-e,--deltaEnergy=rangeβ suboptimal structures inside an energy range π- Computes suboptimal structures with energies inside a certain range of the optimum, measured in kcal/mol.
- The default is only calculating the mfe structure.
--deltaEnergyPost=rangeβ only print structures in range AFTER re-evaluation π―- Only prints structures whose energy is within the range of the mfe after the post re-evaluation of energies.
- This is super handy with
-logML,-d1, or-d3π While-esets the range BEFORE energies get re-evaluated, this one sets the maximum energy AFTER re-evaluation.
-s,--sortedβ sort the suboptimal structures ποΈ (default=off)- Structures get sorted by energy in ascending order first.
- Within groups that have the same energy, structures get sorted in ascending lexicographical order of their dot-bracket notation.
- See
--en-onlyif you want to turn off that second step. - > β οΈ Sorting happens in memory, so it can totally run you out of RAM! This is especially true if a LOT of structures get produced or the RNA sequence is pretty long. In those cases, it's better to use an external sort method, like the UNIX
sortcommand.
--en-onlyβ only sort by free energy π (default=off)- Used together with
--sorted, this flag turns off the second sorting criterion, so structures get sorted ONLY by free energy and not also by lexicographic order within each energy band. - This can save some time when you don't need lexicographic order.
- Used together with
-p,--stochBT=numberβ randomly draw structures by their Boltzmann probability π²- Instead of producing ALL suboptimals in an energy range, this makes a random sample of suboptimal structures.
- The structures get drawn with probabilities equal to their Boltzmann weights, using stochastic backtracking in the partition function.
- The
-eand-poptions are mutually exclusive, so you can't use both together π
--stochBT_en=numberβ same vibe as--stochBT, plus extras β¨- Works like
--stochBT, but it also prints the free energies and probabilities of the backtraced structures.
- Works like
--random-seed=INTβ set the seed for the random number generator π±--betaScale=DOUBLEβ scale the Boltzmann factors π‘οΈ (default=1.)- The number you give here scales the thermodynamic temperature in the Boltzmann factors, independently from the temperature of each individual loop energy contribution.
- The Boltzmann factors then become
exp(- dG/(kT*betaScale)), wherekis the Boltzmann constant,dGis the free energy contribution of the state, andTis the absolute temperature.
-N,--nonRedundantβ turn on the non-redundant sampling strategy π§ (default=off)-S,--pfScale=DOUBLEβ the scale used to estimate the ensemble free energy π (default=1.07)- In the partition function calculation, RNAsubopt uses
scale*mfeas an estimate for the ensemble free energy, which helps avoid overflows. - The default is
1.07. Useful values are1.0to1.2. - This is occasionally needed for long sequences.
- In the partition function calculation, RNAsubopt uses
-c,--circβ treat the RNA as a circle instead of a line π (default=off)- Assumes a circular RNA molecule, instead of a linear one.
β¨ OPTIONS β¨
-D,--dosβ okay so this one computes the density of states instead of secondary structures π It turns on evaluation of how many secondary structures there are in certain energy bands around the MFE π₯ (default=off)-z,--zukerβ this gives you Zuker suboptimals instead of all suboptimal structures inside an energy band around the MFE π (default=off)-g,--gquadβ incorporates G-Quadruplex formation π¦ (default=off)- ngl, there's no G-quadruplex prediction for stochastic backtracking or Zuker-style suboptimals yet π
π Structure Constraints π
Bestie, these are the command line options for the structure constraints feature π
--maxBPspan=INTβ sets the maximum base pair span π§ (default is-1)-C,--constraint[=filename]β calculates structures that follow your constraints π«Ά (default is the empty string,'')- the program reads the sequence first, then a string of constraints written with these symbols:
.β no constraint for this base|β the base has to be pairedxβ the base is unpaired<β base i is paired with a base j where j>i>β base i is paired with a base j where j<i- matching brackets
(and)β base i pairs with base j
- except for
|, these constraints throw out every pair that clashes with them. That's usually enough to enforce things, but sometimes a base will stay unpaired even with constraints on it π Also, PF folding ignores the|type of constraint.
- the program reads the sequence first, then a string of constraints written with these symbols:
--batchβ uses constraints across multiple sequences π (default=off)- normally, constraints from an input file only apply to one input sequence, so RNAsubopt stops and quits after the first sequence is done. With this switch, it processes multiple input sequences and applies the same constraints to each one β¨
--canonicalBPonlyβ removes non-canonical base pairs from the structure constraint πΈ (default=off)--enforceConstraintβ enforces the base pairs given by round brackets(and)in the structure constraint π₯ (default=off)--shape=filenameβ uses SHAPE reactivity data to guide structure predictions π--shapeMethod=methodβ picks how SHAPE reactivity data gets incorporated π (default=D)- these methods turn SHAPE reactivities into pseudo energy contributions:
Dβ converts using the linear equation from Deigan et al 2009. Pseudo energy terms get applied to every nucleotide in a stacked pair. You can tell this method by the capitalDin the parameter, so--shapeMethod="D"is the default. The slopemand interceptbcan be changed if you need to, otherwise m=1.8 and b=-0.6. To tweak them, like m=1.9 and b=-0.7, use something like--shapeMethod="Dm1.9b-0.7". You can also set just one of them, like--shapeMethod="Dm1.9"or--shapeMethod="Db-0.7"πZβ converts SHAPE reactivities to pseudo energies following Zarringhalam et al 2012. The reactivities become pairing probabilities through linear mapping, and any difference from the observed pairing probabilities gets penalized during the folding recursion. You can change how big those penalties are with the factor beta, like--shapeMethod="Zb0.8"π¦Wβ applies a given vector of perturbation energies to unpaired nucleotides, following Washietl et al 2012. You can make these perturbation vectors with RNApvmin π§
- these methods turn SHAPE reactivities into pseudo energy contributions:
--shapeConversion=methodβ picks how SHAPE reactivity gets converted π«Ά (default=O)- this is handy when you're doing the SHAPE incorporation from Zarringhalam et al. These methods turn SHAPE reactivities into the probability that a nucleotide is unpaired:
Mβ linear mapping from Zarringhalam et al.Cβ a cutoff approach that splits nucleotides into paired and unpaired (e.g."C0.25")Sβ skips the normalizing step, since your input data already holds probabilities of being unpaired instead of raw reactivity values πLβ a linear model that turns the reactivity into a probability of being unpaired (e.g."Ls0.68i0.2"for a slope of 0.68 and an intercept of 0.2) β¨Oβ a linear model that turns the log of the reactivity into a probability of being unpaired (e.g."Os1.6i-2.29"for a slope of 1.6 and an intercept of -2.29) π
- this is handy when you're doing the SHAPE incorporation from Zarringhalam et al. These methods turn SHAPE reactivities into the probability that a nucleotide is unpaired:
--commands=filenameβ reads extra commands from a file πΈ- commands cover hard and soft constraints, plus structure motifs in hairpin and internal loops that need to be treated differently. You can also set commands for unstructured and structured domains π
π Energy Parameters π
Energy parameter sets can be adapted or loaded from input files you provide π§
-T,--temp=DOUBLEβ rescales energy parameters to a temperature of temp C π‘οΈ (default=37.0, so 37C is the default)-P,--paramFile=paramfileβ reads energy parameters from paramfile instead of using the default parameter set π- different sets of energy parameters for RNA and DNA should come with your distribution. Check the RNAlib documentation for details on the file format. You can load DNA parameters without specifying an input file at all by using the placeholder file name
DNAβ¨
- different sets of energy parameters for RNA and DNA should come with your distribution. Check the RNAlib documentation for details on the file format. You can load DNA parameters without specifying an input file at all by using the placeholder file name
-4,--noTetraβ doesn't include the special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins π (default=off)- this is mostly for testing
--salt=DOUBLEβ sets the salt concentration in molar (M) π§ (default is 1.021M)-m,--modifications[=STRING]β lets you use modified bases inside the RNA sequence string π¦ (default=7I6P9D)- modified bases get treated differently, meaning they use their matching energy corrections and/or pairing partner rules when those exist. The modified bases in your input sequence have to be marked with their one-letter code. If you don't add any extra arguments, every available correction gets applied. Otherwise you can limit it to a subset of modifications or one-letter codes. For example,
-mP6only corrects for pseudouridine and m6A bases π - the currently supported one-letter codes and their energy corrections are:
7β 7-deaza-adenonsine (7DA)Iβ Inosine6β N6-methyladenosine (m6A)Pβ Pseudouridine9β Purine (a.k.a. nebularine)Dβ Dihydrouridine
- modified bases get treated differently, meaning they use their matching energy corrections and/or pairing partner rules when those exist. The modified bases in your input sequence have to be marked with their one-letter code. If you don't add any extra arguments, every available correction gets applied. Otherwise you can limit it to a subset of modifications or one-letter codes. For example,
--mod-file=STRINGβ uses extra modified base data from a JSON file π
π Model Details π
You can tweak the energy model and pairing rules even more with these parameters π«Ά
-d,--dangles=INTβ decides how to treat "dangling end" energies for bases next to helices in free ends and multi-loops π (default=2)-d1β only unpaired bases can take part in at most one dangling end-d2β skips that check, so dangling energies get added for bases next to a helix on both sides no matter what. This is the default for mfe and partition function folding (-p) π-d0β ignores dangling ends altogether (mostly for debugging) π-d3β mfe folding allows coaxial stacking of adjacent helices in multi-loops. The implementation won't allow coaxial stacking of the two enclosed pairs in a loop of degree 3, and this only works for mfe folding π₯- > heads up: with
-d1and-d3, only the MFE computations use this setting. The partition function uses the-d2setting, so dangling ends get treated differently π
--noLPβ produces structures without lonely pairs (helices of length 1) π¦ (default=off)- for partition function folding, this only disallows pairs that can only occur isolated. Other pairs may still show up now and then as helices of length 1
--noGUβ doesn't allow GU pairs πΈ (default=off)--noClosingGUβ doesn't allow GU pairs at the end of helices π§ (default=off)--logMLβ recomputes the energies of structures with a logarithmic energy function for multi-loops before output β¨ (default=off)- this doesn't affect structure generation, only the energies that get printed. Since logML lowers energies somewhat, some structures may go missing π
--nsp=STRINGβ allows other pairs on top of the usual AU, GC, and GU pairs π- the argument is a comma-separated list of extra allowed pairs. If the first character is a
-, then AB means both AB and BA are allowed pairs. For example,--nsp="-GA"allows GA and AG pairs. Nonstandard pairs get a stacking energy of 0 π
- the argument is a comma-separated list of extra allowed pairs. If the first character is a
--energyModel=INTβ sets the energy model π- this one's rarely used. It folds sequences from the artificial ABCD... alphabet, where A pairs with B, C with D, and so on. Use
--energyModel 1for GC pairs or--energyModel 2for AU pairs π
- this one's rarely used. It folds sequences from the artificial ABCD... alphabet, where A pairs with B, C with D, and so on. Use
--helical-rise=FLOATβ sets the helical rise of the helix in Angstrom units π (default=2.8)- > use with caution! This value gets reset automatically to 3.4 if DNA parameters are loaded with
-P DNAand no other value is given π
- > use with caution! This value gets reset automatically to 3.4 if DNA parameters are loaded with
--backbone-length=FLOATβ sets the average backbone length for looped regions in Angstrom units π¦ (default=6.0)- > use with caution! This value gets reset automatically to 6.76 if DNA parameters are loaded with
-P DNAand no other value is given π
- > use with caution! This value gets reset automatically to 6.76 if DNA parameters are loaded with
β¨ REFERENCES β¨
okay so bestie, if you end up using this program in your work, you'll want to cite the papers that made it possible ππ these are the receipts, no cap π
R. Lorenz, S.H. Bernhart, C. Hoener zu Siederdissen, H. Tafer, C. Flamm, P.F. Stadler and I.L. Hofacker (2011), "ViennaRNA Package 2.0", Algorithms for Molecular Biology: 6:26 πΈ
I.L. Hofacker, W. Fontana, P.F. Stadler, S. Bonhoeffer, M. Tacker, P. Schuster (1994), "Fast Folding and Comparison of RNA Secondary Structures", Monatshefte f. Chemie: 125, pp 167-188 π¦
R. Lorenz, I.L. Hofacker, P.F. Stadler (2016), "RNA folding with hard and soft constraints", Algorithms for Molecular Biology 11:1 pp 1-13 π₯
S. Wuchty, W. Fontana, I. L. Hofacker and P. Schuster (1999), "Complete Suboptimal Folding of RNA and the Stability of Secondary Structures", Biopolymers: 49, pp 145-165 π
M. Zuker (1989), "On Finding All Suboptimal Foldings of an RNA Molecule", Science 244.4900, pp 48-52 β
Y. Ding, and C.E. Lawrence (2003), "A statistical sampling algorithm for RNA secondary structure prediction", Nucleic Acids Research 31.24, pp 7280-7301 π§
The energy parameters are taken from these lovelies too π
D.H. Mathews, M.D. Disney, D. Matthew, J.L. Childs, S.J. Schroeder, J. Susan, M. Zuker, D.H. Turner (2004), "Incorporating chemical modification constraints into a dynamic programming algorithm for prediction of RNA secondary structure", Proc. Natl. Acad. Sci. USA: 101, pp 7287-7292 π
D.H Turner, D.H. Mathews (2009), "NNDB: The nearest neighbor parameter database for predicting stability of nucleic acid secondary structure", Nucleic Acids Research: 38, pp 280-282 π
β¨ AUTHOR β¨
The brains behind this bad boy are Ivo L Hofacker, Stefan Wuchty, Walter Fontana, and Ronny Lorenz ππ«Ά
β¨ REPORTING BUGS β¨
Okay, real talk: if something looks wrong, our program is probably right and nature is the one being sus ππ If you do find a bug, send your comments to rna@tbi.univie.ac.at π
RNAsubopT 2.7.0 Β· February 2026 Β· RNASUBOPT(1) β ta-da, that's a wrap, bestie! ππ
π¦ where this page comes from
- ubuntu resolute: vienna-rna 2.7.0+dfsg-2 Β· non-free
- ubuntu stonking: vienna-rna 2.7.0+dfsg-2 Β· non-free
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms