# Name of your program
package "RNAinverse" # don't use package if you're using automake

purpose "Find RNA sequences with given secondary structure"

#usage "RNAinverse [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=RNAinverse_cmdl --include-getopt --default-optional --func-name=RNAinverse_cmdline_parser --arg-struct-name=RNAinverse_args_info"


description "The program searches for sequences folding into a predefined structure, thereby\
 inverting the folding algorithm. Target structures (in bracket notation) and starting sequences\
 for the search are read alternately from stdin.\nCharacters in the start sequence other than \"AUGC\"\
 (or the alphabet specified with -a) will be treated as wild cards and replaced by a random character.\
 Any lower case characters in the start sequence will be kept fixed during the search. If necessary,\
 the sequence will be elongated to the length of the structure. Thus a string of \"N\"s as well as a\
 blank line specify a random start sequence.\nFor each search the best sequence found and its Hamming\
 distance to the start sequence are printed to stdout. If the the search was unsuccessful, a structure\
 distance to the target is appended.\nThe -Fp and -R options can modify the output format, see commandline\
 options below.\nThe program will continue to read new structures and sequences until a line consisting\
 of the single character \"@\" or an end of file condition is encountered.\n"

# Options

option  "verbose"   v
"In conjunction with a negative value supplied to -R, print the last subsequence and\
 substructure for each unsuccessful search.\n\n"
flag
off


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

option  "function"  F
"Use minimum energy (-Fm), partition function folding (-Fp) or both (-Fmp).\n"
details="In partition function mode, the probability of the target structure exp(-E(S)/kT)/Q is maximized.\
 This probability is written in brackets after the found sequence and Hamming distance. In most cases\
 you'll want to use the -f option in conjunction with -Fp, see below.\n\n"
string
typestr="mp"
default="m"
optional

option  "final"   f
"In combination with -Fp stop search when sequence is found with E(s)-F is smaller\
 than final, where F=-kT*ln(Q).\n\n"
float
optional

option  "repeat"   R
"Search repeatedly for the same structure.\nIf an argument is supplied to this option it must\
 follow the option flag immediately. E.g.: -R5\n"
details="If repeats is negative search until --repeats exact solutions are found, no\
 output is done for unsuccessful searches. Be aware, that the program will not terminate\
 if the target structure can not be found.\nIf no value is supplied with this option, the\
 default value is used.\n\n"
int
argoptional
default="1"
optional

option  "alphabet"    a
"Find sequences using only nucleotides from a given alphabet.\n\n"
string
typestr="ALPHABET"
optional


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. When passing the placeholder file name \"DNA\",\
 DNA parameters are loaded 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


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

option  "dangles" d
"How to treat \"dangling end\" energies for bases adjacent to helices in free ends and multi-loops\n"
details="\nWith -d1 only unpaired bases can participate in at most one dangling end. With -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 (-p).\nThe option -d0 ignores\
 dangling ends altogether (mostly for debugging).\nWith -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.\n\nNote that with\
 -d1 and -d3 only the MFE computations will be using this setting while partition function uses\
 -d2 setting, i.e. dangling ends will be treated differently.\n\n"
int
default="2"
optional

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.\ne.g.\
 RNAfold -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"
