############
RNAmultifold
############

:program:`RNAmultifold` - manual page for RNAmultifold 2.6.4

Synopsis
--------

.. code:: bash

    RNAmultifold [OPTION]... [FILE]...

DESCRIPTION
-----------

RNAmultifold 2.6.4

Compute secondary structures of multiple interacting RNAs

The program works much like RNAfold, but allows one to specify multiple RNA
sequences which are then allowed to form conncected components. RNA sequences
are read from stdin in the usual format, i.e. each line of input corresponds to
one sequence, except for lines starting with ">" which contain the name of
the next sequence(s).
Multiple strands must be concatenated using the \``&\`` character as separator.
RNAmultifold can compute MFE, partition function, corresponding ensemble free
energy and base pairing probabilities. These properties are either computed for
a particular arrangement (concatenation) of sequences, for the full ensemble of
the complex of input RNAs, or all complexes formed by the input sequences up to
a specified number of interacting sequences.
Output consists of a PostScript "dot plot" file containing the pair
probabilities, see the RNAfold man page for details.
The program will continue to read new sequences until a line consisting of the
single character ``@`` or an end of file condition is encountered.

.. option:: -h, --help

    Print help and exit

.. option:: --detailed-help

    Print help, including all details and hidden options, and exit

.. option:: --full-help

    Print help, including hidden options, and exit

.. option:: -V, --version

    Print version and exit

.. option:: -v, --verbose

    Be verbose.


    *(default=off)*

I/O Options:
^^^^^^^^^^^^



    Command line options for input and output (pre-)processing

.. option:: -j, --jobs[=number]

    Split batch input into jobs and start processing in parallel using multiple threads. A value of 0 indicates to use as many parallel threads as computation cores are available.


    *(default="0")*


    Default processing of input data is performed in a serial fashion, i.e. one
    sequence pair at a time. Using this switch, a user can instead start the
    computation for many sequence pairs in the input in parallel. RNAmultifold
    will create as many parallel computation slots as specified and assigns input
    sequences of the input file(s) to the available slots. Note, that this
    increases memory consumption since input alignments have to be kept in memory
    until an empty compute slot is available and each running job requires its
    own dynamic programming matrices.

.. option:: --unordered

    Do not try to keep output in order with input while parallel processing is in place.


    *(default=off)*


    When parallel input processing (:option:`--jobs` flag) is enabled, the order in which
    input is processed depends on the host machines job scheduler. Therefore, any
    output to stdout or files generated by this program will most likely not
    follow the order of the corresponding input data set. The default of
    RNAmultifold is to use a specialized data structure to still keep the results
    output in order with the input data. However, this comes with a trade-off in
    terms of memory consumption, since all output must be kept in memory for as
    long as no chunks of consecutive, ordered output are available. By setting
    this flag, RNAmultifold will not buffer individual results but print them as
    soon as they have been computated.

.. option:: --noconv

    Do not automatically substitute nucleotide "T" with "U".


    *(default=off)*

.. option:: --auto-id

    Automatically generate an ID for each sequence. *(default=off)*


    The default mode of RNAmultifold is to automatically determine an ID from the
    input sequence data if the input file format allows to do that. Sequence IDs
    are usually given in the FASTA header of input sequences. If this flag is
    active, RNAmultifold ignores any IDs retrieved from the input and
    automatically generates an ID for each sequence. This ID consists of a prefix
    and an increasing number. This flag can also be used to add a FASTA header to
    the output even if the input has none.

.. option:: --id-prefix=STRING

    Prefix for automatically generated IDs (as used in output file names).


    *(default="sequence")*


    If this parameter is set, each sequence will be prefixed with the provided
    string. Hence, the output files will obey the following naming scheme:
    "prefix_xxxx_ss.ps" (secondary structure plot), "prefix_xxxx_dp.ps"
    (dot-plot), "prefix_xxxx_dp2.ps" (stack probabilities), etc. where xxxx is
    the sequence number. Note: Setting this parameter implies :option:`--auto-id`.

.. option:: --id-delim=CHAR

    Change the delimiter between prefix and increasing number for automatically generated IDs (as used in output file names).


    *(default="_")*


    This parameter can be used to change the default delimiter "_" between the
    prefix string and the increasing number for automatically generated ID.

.. option:: --id-digits=INT

    Specify the number of digits of the counter in automatically generated alignment IDs.


    *(default="4")*


    When alignments IDs are automatically generated, they receive an increasing
    number, starting with 1. This number will always be left-padded by leading
    zeros, such that the number takes up a certain width. Using this parameter,
    the width can be specified to the users need. We allow numbers in the range
    [1:18]. This option implies :option:`--auto-id`.

.. option:: --id-start=LONG

    Specify the first number in automatically generated IDs.


    *(default="1")*


    When sequence IDs are automatically generated, they receive an increasing
    number, usually starting with 1. Using this parameter, the first number can
    be specified to the users requirements. Note: negative numbers are not
    allowed.
    Note: Setting this parameter implies to ignore any IDs retrieved from the
    input data, i.e. it activates the :option:`--auto-id` flag.

.. option:: --filename-delim=CHAR

    Change the delimiting character used in sanitized filenames.


    *(default="ID-delimiter")*


    This parameter can be used to change the delimiting character used while
    sanitizing filenames, i.e. replacing invalid characters. Note, that the
    default delimiter ALWAYS is the first character of the "ID delimiter" as
    supplied through the :option:`--id-delim` option. If the delimiter is a whitespace
    character or empty, invalid characters will be simply removed rather than
    substituted. Currently, we regard the following characters as illegal for use
    in filenames: backslash ``\``, slash ``/``, question mark ``?``, percent sign ``%``,
    asterisk ``*``, colon ``:``, pipe symbol ``|``, double quote ``"``, triangular
    brackets ``<`` and ``>``.

.. option:: --filename-full

    Use full FASTA header to create filenames. *(default=off)*


    This parameter can be used to deactivate the default behavior of limiting
    output filenames to the first word of the sequence ID. Consider the following
    example: An input with FASTA header ``>NM_0001 Homo Sapiens some gene`` usually
    produces output files with the prefix "NM_0001" without the additional data
    available in the FASTA header, e.g. "NM_0001_ss.ps" for secondary structure
    plots. With this flag set, no truncation of the output filenames is done,
    i.e. output filenames receive the full FASTA header data as prefixes. Note,
    however, that invalid characters (such as whitespace) will be substituted by
    a delimiting character or simply removed, (see also the parameter option
    :option:`--filename-delim`).

Algorithms:
^^^^^^^^^^^



    Select additional algorithms which should be included in the calculations.
    The Minimum free energy (MFE) and a structure representative are calculated
    in any case.

.. option:: -p, --partfunc[=INT]

    Calculate the partition function and base pairing probability matrix in addition to the MFE structure. Default is calculation of mfe structure only.


    *(default="1")*


    In addition to the MFE structure we print a coarse representation of the pair
    probabilities in form of a pseudo bracket notation, followed by the ensemble
    free energy.
    Note that unless you also specify :option:`-d2` or :option:`-d0`, the partition function and mfe
    calculations will use a slightly different energy model. See the discussion
    of dangling end options below.


    An additionally passed value to this option changes the behavior of partition
    function calculation:


    In order to calculate the partition function but not the pair probabilities


    use the :option:`-p0` option and save about


    50% in runtime. This prints the ensemble free energy ``dG=-kT ln(Z)``.

.. option:: -a, --all_pf[=INT]

    Compute the partition function and free energies not only for the complex formed by the input sequences (the "ABC... mutimer"), but also of all complexes formed by the input sequences up to the number of input sequences, e.g. AAA, AAB, ABB, BBB, etc.


    *(default="1")*


    The output will contain the free energies for each of these species. Using :option:`-a`
    automatically switches on the :option:`-p` option.

.. option:: -c, --concentrations

    In addition to everything listed under the :option:`-a` option, read in initial monomer concentrations and compute the expected equilibrium concentrations of all possible species (A, B, AA, BB, AB, etc).


    *(default=off)*


    Start concentrations are read from stdin (unless the :option:`-f` option is used) in
    [mol/l], equilibrium concentrations are given realtive to the sum of the
    inputs. An arbitrary number of initial concentrations can be specified (one
    tuple of concentrations per line).

.. option:: -f, --concfile=filename

    Specify a file with initial concentrations for the input sequences.


    The table consits of arbitrary many lines with multiple numbers separated by
    whitespace (the concentration of the input sequences A, B, C, etc.). This
    option will automatically toggle the :option:`-c` (and thus :option:`-a` and :option:`-p`) options (see
    above).

.. option:: --absolute-concentrations Report absolute instead of relative

    concentrations


    *(default=off)*

.. option:: --betaScale=DOUBLE

    Set the scaling of the Boltzmann factors. *(default="1.")*


    The argument provided with this option is used to scale the thermodynamic
    temperature in the Boltzmann factors independently from the temperature of
    the individual loop energy contributions. The Boltzmann factors then become
    ``exp(- dG/(kT*betaScale))`` where ``k`` is the Boltzmann constant, ``dG`` the free
    energy contribution of the state and ``T`` the absolute temperature.

.. option:: -S, --pfScale=DOUBLE

    In the calculation of the pf use scale*mfe as an estimate for the ensemble free energy (used to avoid overflows).


    *(default="1.07")*


    The default is 1.07, useful values are 1.0 to 1.2. Occasionally needed for
    long sequences.

.. option:: --bppmThreshold=cutoff

    Set the threshold/cutoff for base pair probabilities included in the postscript output.


    *(default="1e-5")*


    By setting the threshold the base pair probabilities that are included in the
    output can be varied. By default only those exceeding ``1e-5`` in probability
    will be shown as squares in the dot plot. Changing the threshold to any other
    value allows for increase or decrease of data.

.. option:: -g, --gquad

    Incoorporate G-Quadruplex formation into the structure prediction algorithm.


    *(default=off)*


    Note, only intramolecular G-quadruplexes are considered.

Structure Constraints:
^^^^^^^^^^^^^^^^^^^^^^



    Command line options to interact with the structure constraints feature of
    this program

.. option:: --maxBPspan=INT

    Set the maximum base pair span.


    *(default="-1")*

.. option:: --commands=filename

    Read additional commands from file


    Commands include hard and soft constraints, but also structure motifs in
    hairpin and interior loops that need to be treeted differently. Furthermore,
    commands can be set for unstructured and structured domains.

Energy Parameters:
^^^^^^^^^^^^^^^^^^



    Energy parameter sets can be adapted or loaded from user-provided input files

.. option:: -T, --temp=DOUBLE

    Rescale energy parameters to a temperature of temp C. Default is 37C.


    *(default="37.0")*

.. option:: -P, --paramFile=paramfile

    Read energy parameters from paramfile, instead of using the default parameter set.


    Different sets of energy parameters for RNA and DNA should accompany your
    distribution.
    See the RNAlib documentation for details on the file format. The placeholder
    file name ``DNA`` can be used to load DNA parameters without the need to
    actually specify any input file.

.. option:: -4, --noTetra

    Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins.


    *(default=off)*


    Mostly for testing.

.. option:: --salt=DOUBLE

    Set salt concentration in molar (M). Default is 1.021M.

Model Details:
^^^^^^^^^^^^^^



    Tweak the energy model and pairing rules additionally using the following
    parameters

.. option:: -d, --dangles=INT

    How to treat "dangling end" energies for bases adjacent to helices in free ends and multi-loops.


    *(default="2")*


    With :option:`-d1` only unpaired bases can participate in at most one dangling end.
    With :option:`-d2` this check is ignored, dangling energies will be added for the bases
    adjacent to a helix on both sides in any case; this is the default for mfe
    and partition function folding (:option:`-p`).
    The option :option:`-d0` ignores dangling ends altogether (mostly for debugging).
    With :option:`-d3` mfe folding will allow coaxial stacking of adjacent helices in
    multi-loops. At the moment the implementation will not allow coaxial stacking
    of the two interior pairs in a loop of degree 3 and works only for mfe
    folding.


    Note that with :option:`-d1` and :option:`-d3` only the MFE computations will be using this
    setting while partition function uses :option:`-d2` setting, i.e. dangling ends will be
    treated differently.

.. option:: --noLP

    Produce 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 occasionally occur as helices of length 1.

.. option:: --noGU

    Do not allow GU pairs.


    *(default=off)*

.. option:: --noClosingGU

    Do not allow GU pairs at the end of helices.


    *(default=off)*

.. option:: --nsp=STRING

    Allow other pairs in addition to the usual AU,GC,and GU pairs.


    Its argument is a comma separated list of additionally allowed pairs. If the
    first character is a "-" then AB will imply that AB and BA are allowed
    pairs, e.g. :option:`--nsp=`"-GA"  will allow GA and AG pairs. Nonstandard pairs are
    given 0 stacking energy.

.. option:: -e, --energyModel=INT

    Set energy model.


    Rarely used option to fold sequences from the artificial ABCD... alphabet,
    where A pairs B, C-D etc.  Use the energy parameters for GC (:option:`-e` 1) or AU (:option:`-e`
    2) pairs.

.. option:: --helical-rise=FLOAT

    Set the helical rise of the helix in units of Angstrom.


    *(default="2.8")*


    Use with caution! This value will be re-set automatically to 3.4 in case DNA
    parameters are loaded via :option:`-P` DNA and no further value is provided.

.. option:: --backbone-length=FLOAT

    Set the average backbone length for looped regions in units of Angstrom.


    *(default="6.0")*


    Use with caution! This value will be re-set automatically to 6.76 in case DNA
    parameters are loaded via :option:`-P` DNA and no further value is provided.

REFERENCES
----------

*If you use this program in your work you might want to cite:*

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

*The energy parameters are taken from:*

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

REPORTING BUGS
--------------


If in doubt our program is right, nature is at fault.
Comments should be sent to rna@tbi.univie.ac.at.