RNACOFOLD(1)
π RNACOFOLD(1) π
π NAME π
RNAcofold - manual page for RNAcofold 2.7.0
πΈ SYNOPSIS πΈ
RNAcofold [OPTION]... [FILE]...
β¨ DESCRIPTION β¨
RNAcofold 2.7.0 π¦
okay so this is the one that calculates secondary structures of two RNAs with dimerization π
It works a lot like RNAfold, but you get to give it two RNA sequences that are allowed to team up and form a dimer structure π«Ά RNA sequences get read from stdin in the usual format, so each line is one sequence, except lines starting with > which hold the name of the next sequence. To get the hybrid structure of two molecules, you glue the two sequences together with the & character as the separator π₯
RNAcofold can compute minimum free energy (mfe) structures, and it can also do the partition function (pf) and the base pairing probability matrix, which you turn on with the -p switch π Dimer formation depends on concentration, so RNAcofold can also work out equilibrium concentrations for all five monomer and (homo/hetero)-dimer species, as long as you give it the input concentrations for the monomers π
The output is the mfe structure in bracket notation, plus PostScript structure plots and "dot plot" files with the pair probabilities. For all the juicy details on those, check the RNAfold man page π§ In the dot plots, a cross marks the chain break between the two concatenated sequences β The program keeps reading new sequences until it hits a line with just the single character @, or until it reaches end of file π
-h,--helpβ print the help menu and exit π--detailed-helpβ print the help, including all the details and the hidden options, then exit π§--full-helpβ print the help, including the hidden options, then exit π-V,--versionβ print the version and exit πΈ-v,--verboseβ be verbose β¨ (default=off)- this lowers the log level so even INFO messages get passed through π¦
π«§ I/O Options π«§
Command line options for input and output (pre-)processing π
--output-format=format-characterβ change the default output format π (default=(default=`V'))- the supported output formats are ViennaRNA format (
V) and Delimiter-separated format (D), which is also known asCSVπ
- the supported output formats are ViennaRNA format (
--csv-delim=delimiterβ change the delimiting character for the Delimiter-separated output format, likeCSVπ (default=(default=`,'))- Delimiter-separated output defaults to comma separated values (
CSV), so all the data in one data set is separated by a comma π This option lets you swap in a different delimiting character π«Ά - if you want tab-separated data instead, use
$'\t'as the delimiting character π¦
- Delimiter-separated output defaults to comma separated values (
--csv-noheaderβ skip the header for Delimiter-separated output, like CSV πΈ (default=off)-j,--jobs[=number]β split batch input into jobs and process them in parallel using multiple threads π₯ A value of0means use as many parallel threads as you have computation cores π (default=(default=`0'))- normally input gets processed one sequence pair at a time, serially π With this switch, many sequence pairs can be computed at once π RNAcofold makes as many parallel computation slots as you ask for, then hands out the input sequences from your input file(s) to the open slots β¨
- heads up: this uses more memory, since input alignments have to be kept in memory until an empty compute slot opens up, and every running job needs its own dynamic programming matrices π
--unorderedβ don't try to keep the output in the same order as the input while parallel processing is going π¦ (default=off)- when parallel input processing (the
--jobsflag) is on, the order things get processed in depends on the host machine's job scheduler π So any output to stdout or to files will most likely not match the order of the input data sets π By default, RNAcofold uses a special data structure to keep results in input order, but that costs memory, since all the output has to be held until there are chunks of consecutive, ordered output ready π«Ά If you set this flag, RNAcofold stops buffering and prints each result as soon as it has been computed π₯
- when parallel input processing (the
--noconvβ don't automatically swap the nucleotideTforUπ (default=off)--auto-idβ automatically generate an ID for each sequence π (default=off)- by default, RNAcofold figures out an ID from the input sequence data when the input file format allows it π Sequence IDs usually live in the FASTA header of the input sequences β¨ With this flag on, RNAcofold ignores any IDs it finds in the input and makes its own ID for each sequence π§ That ID is a prefix plus an increasing number πΈ This flag can also add a FASTA header to the output, even if the input doesn't have one π
--id-prefix=STRINGβ set the prefix for automatically generated IDs, which also shows up in the output file names π (default=(default=`sequence'))- if you set this, every sequence gets the prefix you give it π¦ So the output files follow this naming scheme:
prefix_xxxx_ss.ps(secondary structure plot),prefix_xxxx_dp.ps(dot-plot),prefix_xxxx_dp2.ps(stack probabilities), and so on, wherexxxxis the sequence number π - heads up: setting this implies
--auto-idβ
- if you set this, every sequence gets the prefix you give it π¦ So the output files follow this naming scheme:
--id-delim=CHARβ change the delimiter between the prefix and the increasing number in automatically generated IDs, which also affects output file names π«Ά (default=(default=`_'))- the default delimiter is
_between the prefix string and the number π
- the default delimiter is
--id-digits=INTβ choose how many digits the counter gets in automatically generated alignment IDs π₯ (default=(default=`4'))- auto-generated IDs start at 1 and get left-padded with zeros, so the number takes up a set width π With this parameter you can pick that width, and the allowed range is [1:18] π This option implies
--auto-idπ
- auto-generated IDs start at 1 and get left-padded with zeros, so the number takes up a set width π With this parameter you can pick that width, and the allowed range is [1:18] π This option implies
--id-start=LONGβ pick the first number used in automatically generated IDs π§ (default=(default=`1'))- the counter usually starts at 1, but you can set it to whatever you need πΈ Negative numbers are not allowed π Setting this also means any IDs from the input data get ignored, so it turns on the
--auto-idflag too π¦
- the counter usually starts at 1, but you can set it to whatever you need πΈ Negative numbers are not allowed π Setting this also means any IDs from the input data get ignored, so it turns on the
--filename-delim=CHARβ change the delimiting character used in sanitized filenames π (default=(default=`ID-delimiter'))- this is the character that swaps in for invalid characters when filenames get sanitized π The default delimiter is ALWAYS the first character of the "ID delimiter" you pass in with
--id-delimπ If the delimiter is a whitespace character or empty, invalid characters just get removed instead of substituted π - these count as illegal in filenames: backslash
'\', slash'/', question mark'?', percent sign'%', asterisk'*', colon':', pipe symbol'|', double quote'"', and the triangular brackets'<'and'>'π«
- this is the character that swaps in for invalid characters when filenames get sanitized π The default delimiter is ALWAYS the first character of the "ID delimiter" you pass in with
--filename-fullβ use the full FASTA header to make filenames π (default=off)- this turns off the default behavior of limiting output filenames to the first word of the sequence ID π«Ά For example, an input with the FASTA header
>NM_0001 Homo Sapiens some genenormally gives output files with the prefixNM_0001and nothing else from the header, likeNM_0001_ss.psfor secondary structure plots β¨ With this flag set, nothing gets truncated, so the output filenames get the full FASTA header as their prefix π§ Heads up though: invalid characters (like whitespace) will be swapped for a delimiting character or just removed (see also--filename-delim) β
- this turns off the default behavior of limiting output filenames to the first word of the sequence ID π«Ά For example, an input with the FASTA header
--log-level=levelβ set the log level threshold π£ (default=(default=`2'))- by default, log messages are filtered so only warnings (level 2) or errors (level 3) get printed π Higher values mean less information comes through π Log-level 5 turns off all messages, even errors and other critical info π
--log-file[=filename]β print log messages to a file instead of stderr π (default=(default=`RNAcofold.log'))--log-timeβ include a time stamp in log messages π°οΈ (default=off)--log-callβ include the file and line of the function that called the log π (default=off)
In addition to the MFE structure, we also print a coarse picture of the pair probabilities as a pseudo bracket string, plus the ensemble free energy π§Ά. We throw in the centroid structure (the one derived from the pair probabilities), its free energy, and its distance to the ensemble. Then we wrap up with the frequency of the MFE structure and the structural diversity, which is the mean distance between the structures in the ensemble πΈ. For the nitty-gritty on these, check the RNAlib docs for pf_fold(), mean_bp_dist() and centroid() π
.
Heads up, though! Unless you also pass -d2 or -d0, the partition function and MFE calculations use a slightly different energy model π. More on that in the dangling end options section below.
Passing a value to this option changes how the partition function gets calculated β¨. If you want the partition function without the pair probabilities, use -p0. It saves about 50% runtime π and still prints the ensemble free energy, dG=-kT ln(Z).
-a,--all_pf[=INT]β Ooh, this one goes big π. It computes the partition function and free energies not only for the AB hetero-dimer (your two input sequences), but also for the AA and BB homo-dimers and the A and B monomers π¦.- (default=
1) - The output gets the free energy for each species, plus 5 dot plots with the conditional pair probabilities:
ABname5.ps,AAname5.ps, and so on π. These files also store the ensemble free energy as a comment, so you can use them later π«Ά. - Using
-aautomatically switches on-pπ. - Pass
0as the argument to turn off base pair probability computations entirely. Then no dot plot files get made π.
- (default=
--betaScale=DOUBLEβ Sets the scaling of the Boltzmann factors π.- (default=
1.) - This lets you scale the thermodynamic temperature in the Boltzmann factors separately from the temperature of each individual loop energy contribution β¨. The Boltzmann factors become
exp(- dG/(kT*betaScale)), wherekis the Boltzmann constant,dGis the free energy contribution of the state, andTis the absolute temperature.
- (default=
-S,--pfScale=DOUBLEβ In the partition function calculation, we usescale*mfeas an estimate for the ensemble free energy π§ . This keeps things from overflowing π.- (default=
1.07) - The default is
1.07. Useful values are1.0to1.2. You'll occasionally need this for long sequences π.
- (default=
-c,--concentrationsβ Everything from-a, plus reading in initial monomer concentrations and computing the expected equilibrium concentrations of the 5 possible species: AB, AA, BB, A and B π§ͺ.- (default=off)
- Start concentrations get read from stdin (unless you use
-f) in [mol/l] π. Equilibrium concentrations are given relative to the sum of the two inputs β¨. You can give an arbitrary number of initial concentrations, one pair per line.
-f,--concfile=filenameβ Point this at a file with initial concentrations for the two sequences π.- The table can have arbitrarily many lines, each with just two numbers: the concentration of sequence A and the concentration of sequence B π .
- This option automatically toggles
-c(and therefore-aand-p, see above) π₯.
--centroidβ Computes the centroid structure π¦.- (default=off)
- On top of the MFE structure, this finds the centroid representative of the structure ensemble. We use the base pair distance as our distance measure, and report the structure that minimizes its Boltzmann weighted base pair distance to the rest of the ensemble π.
- Computing the centroid needs equilibrium base pair probabilities, so this option implies
-pπ«Ά. - For historical reasons, the centroid structure output is deactivated by default π.
--MEA[=gamma]β Computes the MEA (maximum expected accuracy) structure π―.- (default=
1.) - The expected accuracy comes from the pair probabilities. Each base pair
(i,j)gets a score of2*gamma*p_ij, and an unpaired base scores the probability of not forming a pair π§©. gammatunes how much you care about correctly predicted pairs versus unpaired bases. With small values ofgamma, the MEA structure only keeps pairs with a very high probability π.- Using
--MEAimplies-pfor computing the pair probabilities β¨.
- (default=
--bppmThreshold=cutoffβ Sets the threshold for which base pair probabilities show up in the PostScript output πΌοΈ.- (default=
1e-5) - By default, only pairs with a probability above
1e-5appear as squares in the dot plot. Change the threshold to another value to show more or less data πΈ.
- (default=
-g,--gquadβ Brings G-Quadruplex formation into the structure prediction algorithm π.- (default=off)
β¨ Structure Constraints β¨
These are the command line options that let you play with the structure constraints feature of this program π.
--maxBPspan=INTβ Sets the maximum base pair span π.- (default=
-1)
- (default=
-C,--constraint[=filename]β Calculates structures subject to constraints π§·.- (default=empty string)
- The program reads the sequence first, then a string of constraints encoded with these symbols:
.means no constraint for this base π€·ββοΈ|means the corresponding base has to be paired πxmeans the base is unpaired π ββοΈ<means base i is paired with a base j where j>i β¬οΈ>means base i is paired with a base j where j<i β¬οΈ- Matching brackets
(and)mean base i pairs with base j π§΅
- Except for
|, constraints disallow all pairs that conflict with the constraint π«. This is usually enough to enforce it, but sometimes a base stays unpaired even with constraints π¬. - > PF folding ignores constraints of type
|. Don't rely on them there! β οΈ
--batchβ Uses constraints for multiple sequences π°.- (default=off)
- Normally, constraints from an input file only apply to a single input sequence. So RNAcofold stops and quits after the first input sequence is processed π. With this switch on, RNAcofold 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 with the linear equation from Deigan et al 2009 π. Pseudo energy terms get applied to every nucleotide in a stacked pair. This method is recognized by a capitalDin the parameter, so--shapeMethod="D"is the default π. The slopemand interceptbcan be changed if needed; otherwisem=1.8andb=-0.6. To change them, for example tom=1.9andb=-0.7, use a string 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 according to Zarringhalam et al 2012 π. Reactivities become pairing probabilities through a linear mapping, and any deviation from the observed pairing probabilities gets penalized during the folding recursion π€. You can adjust how big those penalties are with the factorbeta, like--shapeMethod="Zb0.8"β¨.'W'β Applies a given vector of perturbation energies to unpaired nucleotides, according to Washietl et al 2012 π¦. You can calculate these perturbation vectors with RNApvmin π§.
- (default=
--shapeConversion=methodβ Picks how SHAPE reactivity gets converted π.- (default=
O) - This matters when you're doing SHAPE incorporation the Zarringhalam et al way π§ . These methods turn SHAPE reactivities into the probability that a nucleotide is unpaired:
'M'β Linear mapping according to Zarringhalam et al π.'C'β A cutoff approach that splits nucleotides into paired and unpaired, for example"C0.25"πͺ.'S'β Skips the normalizing step, since your input data already holds probabilities of being unpaired rather than raw reactivity values π.'L'β A linear model that turns reactivity into a probability of being unpaired, for example"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, for example"Os1.6i-2.29"for a slope of 1.6 and an intercept of -2.29 π.
- (default=
--commands=filenameβ Reads additional 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 user-provided input files π§ͺ.
-T,--temp=DOUBLEβ Rescales the energy parameters to a temperature oftempC π‘οΈ.- (default=
37.0) - The default is 37C π₯.
- (default=
-P,--paramFile=paramfileβ Reads energy parameters fromparamfileinstead of the default parameter set π.
Okay so RNA and DNA each need their own set of energy parameters π, and those should come bundled with your distribution π. Check the RNAlib docs if you want the file format details π€. Also, the placeholder file name DNA loads DNA parameters without you having to specify any input file at all β¨ iconic shortcut, bestie π§¬.
-4,--noTetraβ Skip the special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins π ββοΈ(default=off). Mostly for testing π§ͺ.--salt=DOUBLEβ Set the salt concentration in molar (M) π§. The default is1.021Mβ¨.--saltInit=DOUBLEβ Give a salt correction for duplex initialization, in kcal/mol π‘οΈ.-m,--modifications[=STRING]β Modified bases in your RNA sequence string get special treatment π¦(default=7I6P9D'). The energy corrections and/or pairing partner rules get used when they're available. The modified bases in your input have to be marked with their one-letter code. If you don't add any extra arguments, every available correction gets applied. If you want to limit it, pass a subset of codes, like-mP6`, which only corrects for pseudouridine and m6A bases π .
Currently supported one-letter codes and their energy corrections are:
'7': 7-deaza-adenonsine (7DA)'I': Inosine'6': N6-methyladenosine (m6A)'P': Pseudouridine'9': Purine (a.k.a. nebularine)'D': Dihydrouridine--mod-file=STRINGβ Load extra modified base data from a JSON file π.
𧬠Model Details π§¬
Tweak the energy model and pairing rules even more with the parameters below π₯.
-d,--dangles=INTβ This is how you decide what happens to "dangling end" energies for bases sitting next to helices in free ends and multi-loops πΈ(default=2'). With-d1, only unpaired bases can take part in at most one dangling end. With-d2, that check gets skipped, and dangling energies are added for bases adjacent to a helix on both sides no matter what. This is the default for mfe and partition function folding (-p).-d0ignores dangling ends altogether, which is mostly for debugging π. With-d3`, mfe folding lets adjacent helices in multi-loops coaxially stack π₯. Right now the implementation won't allow coaxial stacking of the two enclosed pairs in a loop of degree 3, and it only works for mfe folding.
Heads up: with-d1and-d3, only the MFE computations use this setting. The partition function uses the-d2setting instead, so dangling ends get treated differently between the two π.
--noLPβ Produce structures with no 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 pop up now and then as helices of length 1.--noGUβ Do not allow GU pairs π ββοΈ(default=off).--noClosingGUβ Do not allow GU pairs at the end of helices π(default=off).--nsp=STRINGβ Allow other pairs on top of the usual AU, GC, and GU pairs β¨. The argument is a comma separated list of the extra pairs you want. If the first character is-, thenABimplies thatABandBAare both allowed pairs. For example,--nsp="-GA"lets GA and AG pairs happen π¦. Nonstandard pairs get a stacking energy of 0.--energyModel=INTβ Set the energy model π§. This one is rarely used. It lets you fold sequences from the artificial ABCD... alphabet, where A pairs with B, C with D, and so on. You can also use the energy parameters for GC (--energyModel 1) or AU (--energyModel 2) pairs.--helical-rise=FLOATβ Set the helical rise of the helix in Angstrom π(default=2.8'). **Use with caution!** This value gets reset automatically to3.4if you load DNA parameters with-P DNA` and don't give a further value π.--backbone-length=FLOATβ Set the average backbone length for looped regions in Angstrom π(default=6.0'). **Use with caution!** This value gets reset automatically to6.76if you load DNA parameters with-P DNA` and don't give a further value π.
π¨ Plotting π¨
Command line options for changing the default behavior of structure layout and pairing probability plots ποΈ.
--noPSβ Do not produce a postscript drawing of the mfe structure π ββοΈ(default=off).
π REFERENCES π
If you use this program in your work, you might want to cite these bestie-approved papers π«Ά:
π 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.H.Bernhart, Ch. Flamm, P.F. Stadler, I.L. Hofacker, (2006), "Partition Function and Base Pairing Probabilities of RNA Heterodimers", Algorithms Mol. Biol.
The energy parameters are taken from these iconic sources π :
π 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 main squad behind this is Ivo L Hofacker, Peter F Stadler, Stephan Bernhart, and Ronny Lorenz π.
π REPORTING BUGS π
If in doubt, our program is right and nature is at fault ππ«Ά. Send your comments to rna@tbi.univie.ac.at.
And that's a wrap, bestie π This page is for RNAcofold 2.7.0, dated February 2026. Go fold something iconic π§β¨π
π¦ 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