<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE pise SYSTEM "PARSER/pise.dtd">

<pise>

  <head>
    <title>VIENNARNA</title>
    <version>1.4</version>
    <description>RNAfold - calculate secondary structures of RNAs</description>
    <authors>Hofacker, Fontana, Bonhoeffer, Stadler</authors>
    <reference>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: 167-188</reference>
    <reference>A. Walter, D Turner, J Kim, M Lyttle, P Muller, D Mathews, M Zuker Coaxial stacking of helices enhances binding of oligoribonucleotides. PNAS, 91, pp 9218-9222, 1994</reference>
    <reference>M. Zuker, P. Stiegler (1981) Optimal computer folding of large RNA sequences using thermodynamic and auxiliary information, Nucl Acid Res 9: 133-148</reference>
    <reference>J.S. McCaskill (1990) The equilibrium partition function and base pair binding probabilities for RNA secondary structures, Biopolymers 29: 11051119 D.H. Turner N. Sugimoto and S.M. Freier (1988) RNA structure prediction, Ann Rev Biophys Biophys Chem 17: 167-192</reference>
    <reference>D. Adams (1979) The hitchhiker's guide to the galaxy, Pan Books, London</reference>
    <doclink>http://bioweb.pasteur.fr/docs/gensoft-na.html#VIENNARNA</doclink>
  </head> 


  <command>rnafold</command>

  <parameters>

    <parameter iscommand="1" ishidden="1" type="String">
      <name>rnafold</name>
      <attributes>
	<format>
	  <language>perl</language>
	  <code>"RNAfold"</code>
	</format>
	<vdef><value>rnafold</value></vdef>
	<group>0</group>
      </attributes>
    </parameter>

    <parameter ismandatory="1" issimple="1" type="Sequence">
      <name>seq</name>
      <attributes>
	<prompt>RNA Sequences File</prompt>
	<format>
	  <language>perl</language>
	  <code>" &lt; $value" </code>
	</format>
	<group>1000</group>
	<seqfmt>
	  <value>8</value>
	</seqfmt>
      </attributes>
    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>control</name>
	<prompt>Control options</prompt>
	<group>2</group>
	<parameters>

	  <parameter issimple="1" type="Switch">
	    <name>partition</name>
	    <attributes>
	      <prompt>Calculate the partition function and base pairing probability matrix (-p)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -p" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>2</group>

	    </attributes>
	  </parameter>

	  <parameter type="Switch">
	    <name>pf</name>
	    <attributes>

	      <prompt>Calculate the pf without pairing matrix (-p0)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -p0" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>2</group>
	      <comment>
		<value>Calculate the pf without pairing matrix and print the ensemble free energy -kT ln(Z). This is much faster.</value>
	      </comment>

	    </attributes>
	  </parameter>

	  <parameter type="Integer">
	    <name>temperature</name>
	    <attributes>

	      <prompt>Rescale energy parameters to a temperature of temp C. (-T)</prompt>
	      <format>
		<language>perl</language>
		<code>(defined $value &amp;&amp; $value ne $vdef)? " -T $value" : ""</code>
	      </format>
	      <vdef><value>37</value></vdef>
	      <group>2</group>

	    </attributes>
	  </parameter>

	  <parameter type="Switch">
	    <name>tetraloops</name>
	    <attributes>

	      <prompt>Do not include special stabilizing energies for certain tetraloops (-4)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -4" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>2</group>

	    </attributes>
	  </parameter>

	  <parameter type="Excl">
	    <name>dangling</name>
	    <attributes>

	      <prompt>How to treat dangling end energies for bases adjacent to helices in free ends and multiloops (-d)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " $value" : ""</code>
	      </format>
	      <vdef><value>""</value></vdef>
	      <group>2</group>
	      <vlist>
		<value></value>
		<label>only unpaired bases can participate in at most one dangling end</label>
		<value>-d</value>
		<label>-d: ignores dangling ends altogether</label>
		<value>-d2</value>
		<label>-d2: the check is ignored, this is the default for partition function folding.</label>
	      </vlist>
	      <comment>
		<value>How to treat 'dangling end' energies for bases adjacent to helices in free ends and multiloops: Normally only unpaired bases can participate in at most one dangling end. With -d2 this check is ignored, this is the default for partition function folding (-p). -d ignores dangling ends altogether. Note that by default pf and mfe folding treat dangling ends differently, use -d2 (or -d) in addition to -p to ensure that both algorithms use the same energy model. The -d2 options is available for RNAfold, RNAeval, and RNAinverse only.</value>
	      </comment>
	      <ctrls>
		<ctrl>
		  <message>no message</message>
		  <language>perl</language>
		  <code>(! (defined $rnafold || defined $rnaeval || defined $rnainverse) &amp;&amp;   ($dangling eq "-d2")  &amp;&amp; ($dangling = "") &amp;&amp; 0)</code>
		</ctrl>
	      </ctrls>

	    </attributes>
	  </parameter>

	  <parameter type="Integer">
	    <name>scale</name>
	    <attributes>

	      <prompt>Use scale*mfe as an estimate for the free energy (-S)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -S $value" : ""</code>
	      </format>
	      <group>2</group>
	      <comment>
		<value>In the calculation of the pf use scale*mfe as an estimate for the ensemble free energy (used to avoid overflows). The default is 1.07, usefull values are 1.0 to 1.2. Occasionally needed for long sequences. You can also recompile the programm to use double precision (see the README file).</value>
	      </comment>

	    </attributes>
	  </parameter>

	</parameters>
      </paragraph>

    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>input</name>
	<prompt>Input parameters</prompt>
	<group>2</group>
	<parameters>

	  <parameter type="Switch">
	    <name>constraints</name>
	    <attributes>

	      <prompt>Calculate structures subject to constraints (-C)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -C" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>2</group>
	      <comment>
		<value>The programm reads first the sequence then the a string containg constraints on the structure encoded with the symbols: </value>
		<value>| (the corresponding base has to be paired x (the base is unpaired)</value>
		<value>&lt; (base i is paired with a base j&gt;i)</value>
		<value>&gt; (base i is paired with a base j&lt;i)</value>
		<value>matching brackets ( ) (base i pairs base j)</value>
		<value>Pf folding ignores constraints of type '|' '&lt;' and '&gt;', but disallow all pairs conflicting with a constraint of type 'x' or '( )'. This is usually sufficient to enforce the constraint.</value>
	      </comment>

	    </attributes>
	  </parameter>

	  <parameter type="Switch">
	    <name>noLP</name>
	    <attributes>

	      <prompt>Avoid lonely pairs (helices of length 1) (-noLP)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -noLP" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>2</group>
	      <comment>
		<value>This works by disallowing pairs that can only occur isolated. Other pairs may still occasionally occur as helices of length 1.</value>
	      </comment>

	    </attributes>
	  </parameter>

	  <parameter type="Switch">
	    <name>noGU</name>
	    <attributes>

	      <prompt>Do not allow GU pairs (-noGU)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -noGU" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>2</group>

	    </attributes>
	  </parameter>

	  <parameter type="Switch">
	    <name>noCloseGU</name>
	    <attributes>

	      <prompt>Do not allow GU pairs at the end of helices (-noCloseGU)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -noCloseGU" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>2</group>

	    </attributes>
	  </parameter>

	  <parameter type="String">
	    <name>nsp</name>
	    <attributes>

	      <prompt>Non standard pairs (comma seperated list) (-nsp)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -nsp $value" : "" </code>
	      </format>
	      <group>2</group>
	      <comment>
		<value>Allow other pairs in addition to the usual AU,GC,and GU pairs. pairs is a comma seperated list of additionally allowed pairs. If a the first character is a '-' then AB will imply that AB and BA are allowed pairs. e.g. RNAfold -nsp -GA will allow GA and AG pairs. Nonstandard pairs are given 0 stacking energy.</value>
	      </comment>

	    </attributes>
	  </parameter>

	  <parameter type="InFile">
	    <name>parameter</name>
	    <attributes>

	      <prompt>Parameter file (-P)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -P $value" : ""</code>
	      </format>
	      <group>2</group>
	      <comment>
		<value>Read energy parameters from paramfile, instead of using the default parameter set. A sample parameterfile should accompany your distribution. See the RNAlib documentation for details on the file format.</value>
	      </comment>

	    </attributes>
	  </parameter>

	  <parameter type="Excl">
	    <name>energy</name>
	    <attributes>

	      <prompt>Energy parameters for the artificial ABCD... alphabet (-e)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -e $value" : ""</code>
	      </format>
	      <group>2</group>
	      <vlist>
		<value>1</value>
		<label>1: use energy parameters for GC pairs</label>
		<value>2</value>
		<label>2: use energy parameters for AU pairs</label>
	      </vlist>

	    </attributes>
	  </parameter>

	</parameters>
      </paragraph>

    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>output_options</name>
	<prompt>Output options</prompt>
	<parameters>

	  <parameter ismandatory="1" isstandout="1" type="OutFile">
	    <name>outfile</name>
	    <attributes>

	      <prompt>Result file</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " &gt; $value" : ""</code>
	      </format>
	      <vdef><value>struct.out</value></vdef>
	      <group>2000</group>
	      <pipe>
		<pipetype>rnafold_struct</pipetype>
		<language>perl</language>
		<code>! $partition</code>
	      </pipe>

	    </attributes>
	  </parameter>

	  <parameter type="Switch">
	    <name>b2ct</name>
	    <attributes>

	      <prompt>converts the bracket notation produced by RNAfold into an .ct file, as produced by Zukers mfold</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " ; head -2 rnafold.out | b2ct &gt; rnafold.ct " : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>2000</group>

	    </attributes>
	  </parameter>

	</parameters>
      </paragraph>

    </parameter>

    <parameter ishidden="1" type="String">
      <name>readseq</name>
      <attributes>

	<format>
	  <language>perl</language>
	  <code>"/local/gensoft/lib/ViennaRNA/readseq  -f=19 -a $seq &gt; $seq.tmp &amp;&amp; (cp $seq $seq.orig &amp;&amp; mv $seq.tmp $seq) ; "</code>
	</format>
	<group>-10</group>
	<precond>
	  <language>perl</language>
	  <code>defined $rnafold || defined $rnasubopt</code>
	</precond>

      </attributes>
    </parameter>

    <parameter type="Results">
      <name>ctfiles</name>
      <attributes>

	<precond>
	  <language>perl</language>
	  <code>$b2ct</code>
	</precond>
	<filenames>rnafold.ct</filenames>

      </attributes>
    </parameter>

    <parameter type="Results">
      <name>psfiles</name>
      <attributes>

	<filenames>*.ps</filenames>

      </attributes>
    </parameter>


  </parameters>
</pise>
