# Name of your program
package "RNAheat" # don't use package if you're using automake
purpose "calculate specific heat of RNAs"
usage "RNAheat [OPTIONS] [<input0>] [<input1>]..."

# 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=RNAheat_cmdl --include-getopt --default-optional --unamed-opts --func-name=RNAheat_cmdline_parser --arg-struct-name=RNAheat_args_info"


description "Reads RNA sequences from stdin or input files and calculates their specific heat in the temperature range t1\
 to t2, from the partition function by numeric differentiation. The result is written to stdout as a list\
 of pairs of temperature in C and specific heat in kcal/(mol*K).\nThe program will continue to read new\
 sequences until a line consisting of the single character '@' or an end of file condition is encountered.\n"

# Options

option  "verbose" v
"Be verbose.\n"
details="Lower the log level setting such that even INFO messages are passed through.\n\n"
flag
off


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

option  "infile"  i
"Read a file instead of reading from stdin\n"
details="The default behavior of RNAheat is to read input from stdin or the file(s) that follow(s)\
 the RNAheat command. Using this parameter the user can specify input file names where data\
 is read from. Note, that any additional files supplied to RNAheat are still processed as well.\n\n"
string
typestr="filename"
multiple
optional

option  "jobs"  j
"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.\n"
details="Default processing of input data is performed in a serial fashion, i.e. one sequence at\
 a time. Using this switch, a user can instead start the computation for many sequences in the\
 input in parallel. RNAheat 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.\n\n"
int
default="0"
typestr="number"
argoptional
optional

option  "unordered"  -
"Do not try to keep output in order with input while parallel processing is in place.\n"
details="When parallel input processing (--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 RNAheat 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, RNAheat will not buffer\
 individual results but print them as soon as they have been computated.\n\n"
flag
off
dependon="jobs"
hidden

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

option  "auto-id"  -
"Automatically generate an ID for each sequence.\n"
details="The default mode of RNAheat 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, RNAheat 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.\n\n"
flag
off

option  "id-prefix" -
"Prefix for automatically generated IDs (as used in output file names)\n\n"
details="If this parameter is set, each sequences' FASTA id will be prefixed\
 with the provided string. FASTA ids then take the form \">prefix_xxxx\" where\
 xxxx is the sequence number. Note: Setting this parameter implies --auto-id.\n\n"
string
typestr="STRING"
default="sequence"
optional

option  "id-delim" -
"Change the delimiter between prefix and increasing number for automatically generated IDs (as used in output file names).\n"
details="This parameter can be used to change the default delimiter \"_\" between\
 the prefix string and the increasing number for automatically generated ID.\n\n"
string
typestr="CHAR"
default="_"
optional
hidden

option  "id-digits"  -
"Specify the number of digits of the counter in automatically generated alignment IDs.\n"
details="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 --auto-id.\n\n"
int
default="4"
optional
hidden

option  "id-start"  -
"Specify the first number in automatically generated alignment IDs.\n"
details="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.\nNote: Setting this parameter implies\
 to ignore any IDs retrieved from the input data, i.e. it activates the --auto-id flag.\n\n"
long
default="1"
optional
hidden


option  "log-level" -
"Set log level threshold.\n"
details="By default, any log messages are filtered such that only warnings (level 2) or errors (level 3)\
 are printed. This setting allows for specifying the log level threshold, where higher values result in\
 fewer information. Log-level 5 turns off all messages, even errors and other critical information.\n\n"
int
typestr="level"
default="2"
hidden


option  "log-file" -
"Print log messages to a file instead of stderr.\n"
string
typestr="filename"
default="RNAheat.log"
argoptional
hidden


option  "log-time" -
"Include time stamp in log messages.\n\n"
flag
off
hidden


option  "log-call" -
"Include file and line of log calling function.\n\n"
flag
off
hidden


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

option  "Tmin"  -
"Lowest temperature.\n\n"
float
default = "0"
typestr="t1"

option  "Tmax"  -
"Highest temperature.\n\n"
float
default = "100"
typestr="t2"

option "stepsize" -
"Calculate partition function every stepsize degrees C.\n\n"
float
default="1."

option "ipoints" m
"The program fits a parabola to 2*ipoints+1 data points to calculate 2nd derivatives. Increasing this parameter\
 produces a smoother curve.\n\n"
int
typestr="ipoints"
default="2"

option  "circ"    c
"Assume a circular (instead of linear) RNA molecule.\n\n"
flag
off

option  "gquad" g
"Incoorporate G-Quadruplex formation into the structure prediction algorithm.\n\n"
flag
off


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

option  "maxBPspan" -
"Set the maximum base pair span.\n\n"
int
default="-1"
optional


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

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


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 -d2 dangling energies will be added for the bases adjacent to a helix on both sides\
 in any case\n\n-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" -
"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 (--energyModel 1) or AU (--energyModel 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"
