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

<pise>

  <head>
    <title>fastDNAml</title>
    <version>1.2.2</version>
    <description>construction of phylogenetic trees of DNA sequences using maximum likelihood</description>
    <authors>Olsen, Matsuda, Hagstrom, Overbeek</authors>
    <reference>Olsen, G. J., Matsuda, H., Hagstrom, R., and Overbeek, R.  1994.  fastDNAml: A tool for construction of phylogenetic trees of DNA sequences using maximum likelihood.  Comput. Appl. Biosci. 10: 41-48.</reference>
    <reference>Felsenstein, J.  1981.  Evolutionary trees from DNA sequences:   A maximum likelihood approach.  J. Mol. Evol. 17: 368-376.</reference>
    <category>phylogeny</category>
  </head>

  <command>fastdnaml</command>

  <parameters>

    <parameter iscommand="1" ishidden="1" type="String">
      <name>fastdnaml</name>
      <attributes>
	<format>
	  <language>perl</language>
	  <code>($bootstrap)? "cat &gt; $alignment.tmp;" : "fastDNAml"</code>
	</format>
	<group>1000</group>
      </attributes>
    </parameter>

    <parameter ishidden="1" type="String">
      <name>clean_tmp</name>
      <attributes>
	<format>
	  <language>perl</language>
	  <code>"; clean_checkpoints"</code>
	</format>
	<group>1100</group>
      </attributes>
    </parameter>


    <parameter ismandatory="1" issimple="1" type="Sequence">
      <name>alignment</name>
      <attributes>

	<prompt>Sequence Alignment File</prompt>
	<format>
	  <language>perl</language>
	  <code> "cat $value | "</code>
	</format>
	<group>1</group>
	<comment>
	  <value>The input to fastDNAml is similar to that used by DNAML (and the other PHYLIP programs).</value>
	</comment>
	<seqfmt>
	  <value>12</value>
	</seqfmt>
	<pipe>
	  <pipetype>readseq_ok_alig</pipetype>
	  <language>perl</language>
	  <code>fastDNAml</code>
	</pipe>

      </attributes>
    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>inputopt</name>
	<prompt>Input Options</prompt>
	<parameters>

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

	      <prompt>Instructs the program to use empirical base frequencies derived from the sequence data</prompt>
	      <format>
		<language>perl</language>
		<code>(! $value)? "frequencies $fA $fC $fG $fT | " : "" </code>
	      </format>
	      <vdef><value>1</value></vdef>
	      <group>2</group>

	    </attributes>
	  </parameter>

	  <parameter ismandatory="1" type="Float">
	    <name>fA</name>
	    <attributes>

	      <prompt>frequency of A (instead of empirical frequencies)</prompt>
	      <format>
		<language>perl</language>
		<code>""</code>
	      </format>
	      <vdef><value>0.25</value></vdef>
	      <group>1</group>
	      <precond>
		<language>perl</language>
		<code>! $frequencies</code>
	      </precond>

	    </attributes>
	  </parameter>

	  <parameter ismandatory="1" type="Float">
	    <name>fC</name>
	    <attributes>

	      <prompt>frequency of C (instead of empirical frequencies)</prompt>
	      <format>
		<language>perl</language>
		<code>""</code>
	      </format>
	      <vdef><value>0.25</value></vdef>
	      <group>1</group>
	      <precond>
		<language>perl</language>
		<code>! $frequencies</code>
	      </precond>

	    </attributes>
	  </parameter>

	  <parameter ismandatory="1" type="Float">
	    <name>fG</name>
	    <attributes>

	      <prompt>frequency of G (instead of empirical frequencies)</prompt>
	      <format>
		<language>perl</language>
		<code>""</code>
	      </format>
	      <vdef><value>0.25</value></vdef>
	      <group>1</group>
	      <precond>
		<language>perl</language>
		<code>! $frequencies</code>
	      </precond>

	    </attributes>
	  </parameter>

	  <parameter ismandatory="1" type="Float">
	    <name>fT</name>
	    <attributes>

	      <prompt>frequency of T (instead of empirical frequencies)</prompt>
	      <format>
		<language>perl</language>
		<code>""</code>
	      </format>
	      <vdef><value>0.25</value></vdef>
	      <group>1</group>
	      <precond>
		<language>perl</language>
		<code>! $frequencies</code>
	      </precond>

	    </attributes>
	  </parameter>

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

	      <prompt>Use the specified sequence number for the outgroup</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "outgroup $value | " : "" </code>
	      </format>
	      <group>2</group>

	    </attributes>
	  </parameter>

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

	      <prompt>ratio of transition to transversion type substitutions</prompt>
	      <format>
		<language>perl</language>
		<code>($value &amp;&amp; $value!=$vdef)? "transition $value | " : "" </code>
	      </format>
	      <vdef><value>2.0</value></vdef>
	      <group>2</group>
	      <comment>
		<value>This option with a value of 2.0 (the program's default value) can be used before a global or treefile option with auxiliary data.</value>
	      </comment>
	      <precond>
		<language>perl</language>
		<code>! ($global &amp;&amp; ($final_arrgt||$partial_arrgt))</code>
	      </precond>

	    </attributes>
	  </parameter>

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

	      <prompt>Randomize the sequence addition order (jumble)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "jumble | " : "" </code>
	      </format>
	      <group>2</group>
	      <comment>
		<value>Note that fastDNAml explores a very small number of alternative tree topologies relative to a typical parsimony program. There is a very real chance that the search procedure will not find the tree topology with the highest likelihood. Altering the order of taxon addition and comparing the trees found is a fairly efficient method for testing convergence. Typically, it would be nice to find the same best tree at least twice (if not three times), as opposed to simply performing some fixed number of jumbles and hoping that at least one of them will be the optimum.</value>
	      </comment>
	      <precond>
		<language>perl</language>
		<code>! $bootstrap</code>
	      </precond>

	    </attributes>
	  </parameter>

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

	      <prompt>Interleaved format</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "" : "non_interleaved | " </code>
	      </format>
	      <vdef><value>1</value></vdef>
	      <group>2</group>

	    </attributes>
	  </parameter>

	</parameters>
      </paragraph>

    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>bootopt</name>
	<prompt>Bootstrap Options</prompt>
	<parameters>

	  <parameter issimple="1" type="Switch">
	    <name>bootstrap</name>
	    <attributes>

	      <prompt>generates a re-sample of the input data (bootstrap)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "fastDNAml_boot_web -out " : "" </code>
	      </format>
	      <group>1001</group>
	      <comment>
		<value>tree files will be summarized in one '.tree' file as well as output files in one '.out' file</value>
	      </comment>

	    </attributes>
	  </parameter>

	  <parameter issimple="1" type="Integer">
	    <name>nboots</name>
	    <attributes>

	      <prompt>how many samples</prompt>
	      <format>
		<language>perl</language>
		<code>($value &amp;&amp; $value != $vdef)? " -boots $value" : "" </code>
	      </format>
	      <vdef><value>1</value></vdef>
	      <group>1002</group>
	      <ctrls>
		<ctrl>
		  <message>more than 1000 samples is not possible on this server</message>
		  <language>perl</language>
		  <code>$value &gt; 1000</code>
		</ctrl>
	      </ctrls>
	      <precond>
		<language>perl</language>
		<code>$bootstrap</code>
	      </precond>

	    </attributes>
	  </parameter>

	  <parameter ismandatory="1" issimple="1" type="Integer">
	    <name>bootstrap_seed</name>
	    <attributes>

	      <prompt>random number seed for bootstrap</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -seed $value" : ""</code>
	      </format>
	      <group>1002</group>
	      <comment>
		<value>Warning: For a given random number seed, the sample will always be the same.</value>
	      </comment>
	      <precond>
		<language>perl</language>
		<code>$bootstrap</code>
	      </precond>

	    </attributes>
	  </parameter>

	  <parameter ismandatory="1" type="Integer">
	    <name>nbest</name>
	    <attributes>

	      <prompt>nbest: input order is jumbled (up to maxjumble times) until same tree is found n_best times</prompt>
	      <format>
		<language>perl</language>
		<code>" $value"</code>
	      </format>
	      <vdef><value>2</value></vdef>
	      <group>1004</group>
	      <precond>
		<language>perl</language>
		<code>$bootstrap</code>
	      </precond>

	    </attributes>
	  </parameter>

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

	      <prompt>maximum attempts at replicating inferred tree (max jumble)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? " -max $value" : "" </code>
	      </format>
	      <vdef><value>10</value></vdef>
	      <group>1002</group>
	      <precond>
		<language>perl</language>
		<code>$bootstrap</code>
	      </precond>

	    </attributes>
	  </parameter>

	</parameters>
      </paragraph>

    </parameter>

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

	<format>
	  <language>perl</language>
	  <code>" &amp;&amp; (concattree $alignment.tree.tmp $alignment.out.tmp ; mv $alignment.tree.tmp $alignment.tree; mv $alignment.out.tmp $alignment.out) " </code>
	</format>
	<group>1010</group>
	<precond>
	  <language>perl</language>
	  <code>$bootstrap</code>
	</precond>

      </attributes>
    </parameter>

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

	<format>
	  <language>perl</language>
	  <code>" $alignment.tmp"</code>
	</format>
	<group>1003</group>
	<precond>
	  <language>perl</language>
	  <code>$bootstrap</code>
	</precond>

      </attributes>
    </parameter>

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

	<precond>
	  <language>perl</language>
	  <code>$bootstrap</code>
	</precond>
	<filenames>*.tree *.out *.tmp</filenames>

      </attributes>
    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>outputopt</name>
	<prompt>Output and Results Options</prompt>
	<parameters>

	  <parameter ismandatory="1" isstandout="1" type="OutFile">
	    <name>outfile</name>
	    <attributes>
	      <prompt>Output File</prompt>
	      <format>
		<language>perl</language>
		<code>($value &amp;&amp; $value ne $vdef) ? " > $outfile" : ""</code>
	      </format>
	      <vdef>
		<value>fastdnaml.out</value>
	      </vdef>
	      <precond>
		<language>perl</language>
		<code>! $bootstrap</code>
	      </precond>
	      <group>1010</group>
	    </attributes>
	  </parameter>

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

	      <prompt>Save tree in treefile</prompt>
	      <format>
		<language>perl</language>
		<code>(!$value)? "treefile | " : "" </code>
	      </format>
	      <vdef><value>1</value></vdef>
	      <group>2</group>
	      <precond>
		<language>perl</language>
		<code>! $bootstrap</code>
	      </precond>

	    </attributes>
	  </parameter>

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

	      <prompt>Echo of the data in addition to the usual output (printdata)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "printdata | " : "" </code>
	      </format>
	      <vdef><value>1</value></vdef>
	      <group>2</group>

	    </attributes>
	  </parameter>

	</parameters>
      </paragraph>

    </parameter>

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

	<filenames>treefile.*</filenames>

      </attributes>
    </parameter>

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

	<filenames>"$alignment.tmp_*"</filenames>

      </attributes>
    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>arrgtopt</name>
	<prompt>Rearrangements Options</prompt>
	<parameters>

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

	      <prompt>Decreases the time in initially placing a new sequence in the growing tree (quickadd)</prompt>
	      <format>
		<language>perl</language>
		<code>(! $value)? "quickadd | " : "" </code>
	      </format>
	      <vdef><value>1</value></vdef>
	      <group>2</group>
	      <comment>
		<value>This option greatly decreases the time in initially placing a new sequence in the growing tree (but does not change the time required to subsequently test rearrangements). The overall time savings seems to be about 30%, based on a very limited number of test cases. Its downside, if any, is unknown. This will probably become default program behavior in the near future.</value>
		<value>If the analysis is run with a global option of 'G 0 0', so that no rearrangements are permitted, the tree is build very approximately, but very quickly. This may be of greatest interest if the question is, 'Where does this one new sequence fit into this known tree?' The known tree is provided with the restart option, below.</value>
		<value>PHYLIP DNAML does not include anything comparable to the quickadd option.</value>
	      </comment>

	    </attributes>
	  </parameter>

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

	      <prompt>global rearrangements</prompt>
	      <format>
		<language>perl</language>
		<code>($value &amp;&amp; (((defined $final_arrgt || defined $partial_arrgt) &amp;&amp; ($trans_cmd = "transition $transition |")) || 1))? "$trans_cmd global $final_arrgt $partial_arrgt | " : "" </code>
	      </format>
	      <group>3</group>
	      <comment>
		<value>The G (global) option has been generalized to permit crossing any number of branches during tree rearrangements. In addition, it is possible to modify the extent of rearrangement explored during the sequential addition phase of tree building.</value>
		<value>The G U (global and user tree) option combination instructs the program to find the best of the user trees, and then look for rearrangements that are better still.</value>
		<value>If a rearrangement distance is specified, the input must contain a transition option.</value>
		<value>The Global option can be used to force branch swapping on user trees, (combination of Global and User Tree(s) options).</value>
	      </comment>
	      <ctrls>
		<ctrl>
		  <message>If a rearrangement distance is specified, the input must contain a bootstrap, a jumble or a transition option.</message>
		  <language>perl</language>
		  <code>	((defined $final_arrgt||defined $partial_arrgt) &amp;&amp; !($transition||$bootstrap||$jumble)) </code>
		</ctrl>
	      </ctrls>

	    </attributes>
	  </parameter>

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

	      <prompt>number of branches to cross in rearrangements of the completed tree</prompt>
	      <format>
		<language>perl</language>
		<code>""</code>
	      </format>
	      <group>2</group>

	    </attributes>
	  </parameter>

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

	      <prompt>number of branches to cross in testing rearrangements during the sequential addition phase of tree inference</prompt>
	      <format>
		<language>perl</language>
		<code>""</code>
	      </format>
	      <group>2</group>

	    </attributes>
	  </parameter>

	</parameters>
      </paragraph>

    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>categopt</name>
	<prompt>Categories and Weights Options</prompt>
	<parameters>

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

	      <prompt>categories file</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "categories $value |" : "" </code>
	      </format>
	      <group>2</group>
	      <comment>
		<value>The data must have the format specified for PHYLIP dnaml 3.3. The first line must be the letter C, followed by the number of categories (a number in the range 1 through 35), and then a blank-separated list of the rates for each category. (The list can take more than one line; the program reads until it finds the specified number of rate values.) The next line should be the word Categories followed by one rate category character per sequence position. The categories 1 - 35 are represented by the series 1, 2, 3, ..., 8, 9, A, B, C, ..., Y, Z. These latter data can be on one or more lines. For example:</value>
		<value>C 12 0.0625 0.125 0.25 0.5 1 2 4 8 16 32 64 128</value>
		<value>Categories 5111136343678975AAA8949995566778888889AAAAAA9239898629AAAAA9</value>
		<value>Category 'numbers' are ordered: 1, 2, 3, ..., 9, A, B, ..., Y, Z. Category zero (undefined rate) is permitted at sites with a zero in a user-supplied weighting mask.</value>
	      </comment>

	    </attributes>
	  </parameter>

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

	      <prompt>weights file (user-specified column weighting information)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "weights $value |" : "" </code>
	      </format>
	      <group>2</group>
	      <comment>
		<value>example:</value>
		<value>Weights 111111111111001100000100011111100000000000000110000110000000</value>
		<value>In case of bootstrap, only positions that have nonzero weights are used in computing the bootstrap sample.</value>
	      </comment>

	    </attributes>
	  </parameter>

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

	      <prompt>Adds both the userweights and categories from a file</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "weights_categories $value |" : "" </code>
	      </format>
	      <group>2</group>

	    </attributes>
	  </parameter>

	</parameters>
      </paragraph>

    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>treeopt</name>
	<prompt>User input Tree Options</prompt>
	<precond>
	  <language>perl</language>
	  <code> ! $bootstrap</code>
	</precond>
	<comment>
	  <value>This options allows you to enter your own trees and instructs the program to evaluate them.</value>
	</comment>
	<parameters>

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

	      <prompt>User tree - tree(s) file</prompt>
	      <format>
		<language>perl</language>
		<code>($value &amp;&amp; (! $user_lengths|| ($L="L") ))? "usertree $value $L|" : ""</code>
	      </format>
	      <group>2</group>
	      <comment>
		<value>The trees must be in Newick format, and terminated with a semicolon. (The program also accepts a pseudo_newick format, which is a valid prolog fact.)</value>
		<value>The tree reader in this program is more powerful than that in PHYLIP 3.3. In particular, material enclosed in square brackets, [ like this ], is ignored as comments; taxa names can be wrapped in single quotation marks to support the inclusion of characters that would otherwise end the name (i.e., '(', ')', ':', ';', '[', ']', ',' and ' '); names of internal nodes are properly ignored; and exponential notation (such as 1.0E-6) for branch lengths is supported.</value>
	      </comment>
	      <precond>
		<language>perl</language>
		<code> ! $bootstrap</code>
	      </precond>

	    </attributes>
	  </parameter>

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

	      <prompt>user trees to be read with branch lengths</prompt>
	      <format>
		<language>perl</language>
		<code>""</code>
	      </format>
	      <comment>
		<value>Causes user trees to be read with branch lengths (and it is an error to omit any of them). Without the L option, branch lengths in user trees are not required, and are ignored if present.</value>
	      </comment>
	      <precond>
		<language>perl</language>
		<code> ! $bootstrap</code>
	      </precond>

	    </attributes>
	  </parameter>

	</parameters>
      </paragraph>

    </parameter>

    <parameter type="Results">
      <name>tree</name>
      <attributes>
	<filenames>*tree*</filenames>
	<pipe>
	  <pipetype>phylip_tree</pipetype>
	  <language>perl</language>
	  <code>1</code>
	</pipe>

      </attributes>
    </parameter>

  </parameters>
</pise>
