RNACOFOLD(1)

πŸ“¦
version 2.7.0 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

πŸŽ€ 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 as CSV 🌈
  • --csv-delim=delimiter β€” change the delimiting character for the Delimiter-separated output format, like CSV πŸ“ (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 πŸ¦‹
  • --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 of 0 means 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 --jobs flag) 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 πŸ”₯
  • --noconv β€” don't automatically swap the nucleotide T for U 🌈 (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, where xxxx is the sequence number 🌈
    • heads up: setting this implies --auto-id ⭐
  • --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 πŸ’œ
  • --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 πŸ’…
  • --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-id flag too πŸ¦‹
  • --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 '>' 🚫
  • --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 gene normally gives output files with the prefix NM_0001 and nothing else from the header, like NM_0001_ss.ps for 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) ⭐
  • --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 -a automatically switches on -p πŸ’–.
    • Pass 0 as the argument to turn off base pair probability computations entirely. Then no dot plot files get made πŸ™ˆ.
  • --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)), where k is the Boltzmann constant, dG is the free energy contribution of the state, and T is the absolute temperature.
  • -S, --pfScale=DOUBLE β€” In the partition function calculation, we use scale*mfe as an estimate for the ensemble free energy 🧠. This keeps things from overflowing 😭.
    • (default=1.07)
    • The default is 1.07. Useful values are 1.0 to 1.2. You'll occasionally need this for long sequences πŸ’œ.
  • -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 -a and -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 of 2*gamma*p_ij, and an unpaired base scores the probability of not forming a pair 🧩.
    • gamma tunes how much you care about correctly predicted pairs versus unpaired bases. With small values of gamma, the MEA structure only keeps pairs with a very high probability πŸŒ™.
    • Using --MEA implies -p for computing the pair probabilities ✨.
  • --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-5 appear as squares in the dot plot. Change the threshold to another value to show more or less data 🌸.
  • -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)
  • -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 πŸ’ž
      • x means 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 capital D in the parameter, so --shapeMethod="D" is the default πŸ’–. The slope m and intercept b can be changed if needed; otherwise m=1.8 and b=-0.6. To change them, for example to m=1.9 and b=-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 factor beta, 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 🧁.
  • --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 🌈.
  • --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 of temp C 🌑️.
    • (default=37.0)
    • The default is 37C πŸ”₯.
  • -P, --paramFile=paramfile β€” Reads energy parameters from paramfile instead 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 is 1.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 -d1 and -d3, only the MFE computations use this setting. The partition function uses the -d2 setting 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 -, then AB implies that AB and BA are 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 to 3.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 to 6.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