# Name of your program
package "RNAsnoop" # don't use package if you're using automake
purpose "Find targets of a query H/ACA snoRNA"
usage "RNAsnoop [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=RNAsnoop_cmdl --include-getopt --default-optional --func-name=RNAsnoop_cmdline_parser --arg-struct-name=RNAsnoop_args_info"


description "reads a target RNA sequence and a H/ACA snoRNA sequence
from a target and query file, respectively and computes optimal
and suboptimal secondary structures for their hybridization. The
calculation can be done roughly in O(nm), where is n the length
of the target sequence and m is the length of the snoRNA stem, as it
is specially tailored to the special case of H/ACA snoRNA. For general
purpose target predictions, please have a look at RNAduplex, RNAup,
RNAcofold and RNAplex. Accessibility effects can be estimated by
RNAsnoop if a RNAplfold accessibility profile is provided. \n
The computed optimal and suboptimal structure are written to
stdout, one structure per line. Each line consist
of: The structure in dot bracket format with a '&' separating the
two strands. The '<>' brackets represent snoRNA intramolecular
interactions, while the '()' brackets represent intermolecular
interactions between the snoRNA and its target.

The range of the structure in the two sequences in the format
\"from,to : from,to\"; the energy of duplex structure in
kcal/mol. If available the opening energy are also returned.\n"

# Options

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

option "query" s
"File containing the query sequence.\n"
details="Input sequences can be given piped to RNAsnoop or given in a query file with the -s option.\
 Note that the -s option implies that the -t option is also used.\n\n"
string

option "target" t
"File containing the target sequence.\n"
details="Input sequences can be given piped to RNAsnoop or given in a target file with the -t option\
Note that the -t option implies that the -s option is also used.\n\n"
string

option "suffix" S
"Specificy the suffix that was added by RNAup to the accessibility files.\n\n"
string
default="_u1_to_30.out"
optional

option "from-RNAplfold" P
"Specify the directory where accessibility profile generated by RNAplfold are found.\n\n"
string
optional

option "from-RNAup" U
"Specify the directory where accessibility profiles generated by RNAup are found.\n\n"
string
optional

option  "output_directory"  O
"Set where the generated figures should be stored.\n\n"
string
default="./"
optional


section "Algorithms"
sectiondesc="Options which alter the computing behaviour of RNAplex.\
 Please note that the options allowing to filter out snoRNA-RNA\
 duplexes expect the energy to be given in decacal/mol instead of\
 kcal/mol. A threshold of -2.8(kcal/mol) should be given as -280(decacal/mol).\n\n"

option "alignment-mode" A
"Specify if RNAsnoop gets alignments or single sequences as input.\n\n"
flag
off

option "fast-folding" f
"Speedup of the target search.\n"
details="This option allows one to decide if the backtracking has to be
done (-f 1) or not (-f 0). For -f 1 the structure is computed based
on the standard energy model. This is the slowest mode of RNAsnoop. -f
0 is the fastest mode, as no structure are recomputed and only the
interaction energy is returned.\n\n"
int 
default="1"
optional

option "extension-cost" c
"Cost to add to each nucleotide in a duplex.\n"
details="Cost of extending a duplex by one nucleotide. Allows one to find
compact duplexes, having few/small bulges or interior loops. Only
useful when no accessibility profiles are available. This option is
disabled if accessibility profiles are used (-P option).\n\n"
int
default="0"
optional

option "energy-threshold" e
"Maximal energy difference between the mfe and the desired suboptimal.\n"
details="Energy range for a duplex to be returned. The threshold is set on the total energy of interaction, i.e. the hybridization\
energy corrected for opening energy if -a is set or the energy corrected by -c. If unset, only the mfe will be returned.\n\n"
double
default="-1"
optional

option "minimal-right-duplex" o
"Minimal Right Duplex Energy\n\n"
default="-270"
int
optional

option "minimal-loop-energy" l
"Minimal Right Duplex Energy.\n"
details="Minimal Stem Loop Energy of the snoRNA. The energy should be
given in decacalories, i.e. a minimal stem-loop energy of -2.8
kcal/mol corresponds to -280 decacal/mol.\n\n" 
default="-280"
int
optional

option "minimal-left-duplex" p
"Minimal Left Duplex Energy.\n\n"
default="-170"
int
optional

option "minimal-duplex" q
"Minimal Duplex Energy.\n\n"
default="-1090"
int
optional

option "duplex-distance" d
"Distance between target 3' ends of two consecutive duplexes.\n"
details="Distance between the target 3'ends of two consecutive
duplexes. Should be set to the maximal length of interaction to get
good results. Smaller d leads to larger overlaps between consecutive
duplexes.\n\n"
int
default="2"
optional

option "minimal-stem-length" h
"Minimal snoRNA stem length.\n\n"
default="5"
int
optional

option "maximal-stem-length" i
"Maximal snoRNA stem length.\n\n"
default="120"
int
optional

option "minimal-duplex-box-length" j
"Minimal distance between the duplex end and the H/ACA box.\n\n"
default="11"
int
optional

option "maximal-duplex-box-length" k
"Maximal distance between the duplex end and the H/ACA box.\n\n"
default="16"
int
optional

option "minimal-snoRNA-stem-loop-length" m
"Minimal number of nucleotides between the beginning of stem loop and
beginning of the snoRNA sequence.\n\n"
default="1"
int
optional

option "maximal-snoRNA-stem-loop-length" n
"Maximal number of nucleotides between the beginning of stem loop and
beginning of the snoRNA sequence.\n\n"
default="100000"
int
optional

option "minimal-snoRNA-duplex-length" v
"Minimal distance between duplex start and snoRNA.\n\n"
int
default="0"
optional

option "maximal-snoRNA-duplex-length" w
"Maximal distance between duplex start and snoRNA.\n\n"
int
default="0"
optional

option "minimal-duplex-stem-energy" x
"Minimal duplex stem energy.\n\n"
int
default="-1370"
optional

option "minimal-total-energy" y
"Minimal total energy.\n\n"
int
default="100000"
optional

option "maximal-stem-asymmetry" a
"Maximal snoRNA stem asymmetry.\n\n"
int
default="30"
optional

option "minimal-lower-stem-energy" b
"Minimal lower stem energy.\n\n"
int
default="100000"
optional

option "alignmentLength" L
"Limit the extent of the interactions to L nucleotides.\n\n"
int
default="25"
optional


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

option  "constraint"  C
"Calculate the stem structure subject to constraints.\n"
details="The program reads first the\
 stem sequence, then a string containing constraints on the structure encoded with the symbols:\n\n. (no constraint\
 for this base)\n\n| (the corresponding base has to be paired\n\nx (the base is unpaired)\n\n< (base i is paired with\
 a base j>i)\n\n> (base i is paired with a base j<i)\n\nand matching brackets ( ) (base i pairs base j)\n\nWith the\
 exception of \"|\", constraints will disallow all pairs conflicting with the constraint. This is usually\
 sufficient to enforce the constraint, but occasionally a base may stay unpaired in spite of constraints. PF\
 folding ignores constraints of type \"|\".\n\n"
flag
off


section "Plotting"
sectiondesc="Command line options for changing the default behavior of structure layout and pairing probability plots.\n\n"

option "produce-ps" I
"Draw annotated 2D structures for a list of dot-bracket structures.\n"
details="This option allows one to produce interaction figures in PS-format with conservation/accessibility annotation, if available.\n\n"
flag
off

option "direct-redraw" N
"Outputs 2D interactions concurrently with the interaction calculation for each suboptimal interaction. The -I option should be preferred.\n\n"
flag
off


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