# Name of your program
package "RNAup" # don't use package if you're using automake
purpose "Calculate the thermodynamics of RNA-RNA interactions"
#usage "RNAup" [options]\n"

# Version of your program
#version "2.0"   # don't use version if you're using automake


# command line options passed to gengetopt
args "--file-name=RNAup_cmdl --include-getopt --default-optional --func-name=RNAup_cmdline_parser --arg-struct-name=RNAup_args_info"


description "RNAup calculates the thermodynamics of RNA-RNA interactions, by decomposing the\
 binding into two stages. (1) First the probability that a potential binding sites remains\
 unpaired (equivalent to the free energy needed to open the site) is computed. (2) Then this\
 accessibility is combined with the interaction energy to obtain the total binding energy.\
 All calculations are done by computing partition functions over all possible conformations.\n"

# Options

section "I/O Options"
sectiondesc="Command line options for input and output (pre-)processing\n\n"

option  "no_output_file" o
"Do not produce an output file.\n\n"
flag
off

option  "no_header" -
"Do not produce a header with the command line parameters used in the outputfile.\n\n"
flag
off

option  "noconv"  -
"Do not automatically substitute nucleotide \"T\" with \"U\".\n\n"
flag
off


section "Algorithms"
sectiondesc="Select additional algorithms which should be included in the calculations.\n\n"

option  "ulength"   u
"Specify the length of the unstructured region in the output.\n"
details="The probability of being unpaired is plotted on the right border\
 of the unpaired region. You can specify up to 20 different length values:\
 use \"-\" to specify a range of continuous values (e.g. -u 4-8) or specify\
 a list of comma separated values (e.g. -u 4,8,15).\n\n"
string
multiple
typestr="length"
default="4"
optional

option "contributions"  c
"Specify the contributions listed in the output.\n"
details="By default only the full probability of being unpaired is plotted.\
 The -c option allows one to get the different contributions (c) to the probability\
 of being unpaired: The full probability of being unpaired (\"S\" is the sum of\
 the probability of being unpaired in the exterior loop (\"E\"), within a\
 hairpin loop (\"H\"), within an interior loop (\"I\") and within a multiloop\
 (\"M\"). Any combination of these letters may be given.\n\n"
string
typestr="SHIME"
default="S"
optional


section "Calculations of RNA-RNA interactions"
option  "window"  w
"Set the maximal length of the region of interaction.\n\n"
int
default="25"
optional

option  "include_both"  b
"Include the probability of unpaired regions in both (b) RNAs.\n"
details="By default only the probability of being unpaired in the longer RNA\
 (target) is used.\n\n"
flag
off

option  "extend5" 5
"Extend the region of interaction in the target to some residues on the 5' side.\n"
details="The underlying assumption is that it is favorable for an interaction if\
 not only the direct region of contact is unpaired but also a few residues 5'\n\n"
int
optional

option  "extend3" 3
"Extend the region of interaction in the target to some residues on the 3' side.\n"
details="The underlying assumption is that it is favorable for an interaction if\
 not only the direct region of contact is unpaired but also a few residues 3'\n\n"
int
optional

option  "interaction_pairwise"  -
"Activate pairwise interaction mode.\n"
details="The first sequence interacts with the 2nd, the third with the 4th etc.\
 If activated, two interacting sequences may be given in a single line separated\
 by \"&\" or each sequence may be given on an extra line.\n\n"
flag
off

option  "interaction_first" -
"Activate interaction mode using first sequence only.\n"
details="The interaction of each sequence with the first one is calculated\
 (e.g. interaction of one mRNA with many small RNAs). Each sequence has to be\
 given on an extra line\n\n"
flag
off

option  "pfScale" S
"In the calculation of the pf use scale*mfe as an estimate for the ensemble free energy (used to avoid\
 overflows).\n"
details="The default is 1.07, useful values are 1.0 to 1.2. Occasionally needed for long sequences.\n\n"
double
default="1.07"
optional
hidden


section "Structure Constraints"
sectiondesc="Command line options to interact with the structure constraints feature of this program\n\n"

option  "constraint"  C
"Apply structural constraint(s) during prediction.\n"
details="The program first reads the sequence(s), then a dot-bracket like string containing\
 constraints on the structure. The following symbols are recognized:\n\
 '.' ... no constraint for this base\n\n\
 'x' ... the base is unpaired\n\n\
 '<' ... the base pairs downstream, i.e. i is paired with j > i\n\n\
 '>' ... the base pairs upstream, i.e. i is paired with j < i\n\n\
 '()' ... base i pairs with base j\n\n\
 '|' ... the corresponding base has to be paired intermolecularily (only for interaction mode)\n\n"
flag
off


section "Energy Parameters"
sectiondesc="Energy parameter sets can be adapted or loaded from user-provided input files\n\n"

option  "temp"  T
"Rescale energy parameters to a temperature of temp C. Default is 37C.\n\n"
double
default="37.0"
optional

option  "paramFile" P
"Read energy parameters from paramfile, instead of using the default parameter set.\n"
details="Different sets of energy parameters for RNA and DNA should accompany your distribution.\nSee 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.\n\n"
string
typestr="paramfile"
optional

option  "noTetra" 4
"Do not include special tabulated stabilizing energies for tri-, tetra- and hexaloop hairpins.\n"
details="Mostly for testing.\n\n"
flag
off
hidden

option  "salt" -
"Set salt concentration in molar (M). Default is 1.021M.\n\n"
double
optional

option  "saltInit" -
"Provide salt correction for duplex initialization (in kcal/mol).\n\n"
double
optional
hidden


section "Model Details"
sectiondesc="Tweak the energy model and pairing rules additionally using the following parameters\n\n"

option  "dangles" d
"Specify \"dangling end\" model for bases adjacent to helices in free ends and multi-loops.\n"
details="\nWith -d2 dangling energies will be added for the bases adjacent to a helix on both sides in any case.\n\
 The option -d0 ignores dangling ends altogether (mostly for debugging).\n\n"
int
default="2"
optional

option  "noLP"  -
"Produce structures without lonely pairs (helices of length 1).\n"
details="For partition function folding this only disallows pairs that can only occur isolated. Other\
 pairs may still occasionally occur as helices of length 1.\n\n"
flag
off

option  "noGU"  -
"Do not allow GU pairs.\n\n"
flag
off
hidden

option  "noClosingGU" -
"Do not allow GU pairs at the end of helices.\n\n"
flag
off
hidden

option  "nsp" -
"Allow other pairs in addition to the usual AU,GC,and GU pairs.\n"
details="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.\
 --nsp=\"-GA\"  will allow GA and AG pairs. Nonstandard pairs are given 0 stacking\
 energy.\n\n"
string
optional
hidden

option  "energyModel" e
"Set energy model.\n"
details="Rarely used option to fold sequences from the artificial ABCD... alphabet, where\
 A pairs B, C-D etc.  Use the energy parameters for GC (-e 1) or AU (-e 2) pairs.\n\n"
int
optional
hidden

option  "helical-rise"  -
"Set the helical rise of the helix in units of Angstrom.\n"
details="Use with caution! This value will be re-set automatically to 3.4 in case DNA\
 parameters are loaded via -P DNA and no further value is provided.\n\n"
float
optional
default="2.8"
hidden

option  "backbone-length"  -
"Set the average backbone length for looped regions in units of Angstrom.\n"
details="Use with caution! This value will be re-set automatically to 6.76 in case DNA\
 parameters are loaded via -P DNA and no further value is provided.\n\n"
float
optional
default="6.0"
hidden


text    "\nIf in doubt our program is right, nature is at fault.\nComments should be sent to\
 rna@tbi.univie.ac.at.\n\n"
