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

<pise>

  <head>
    <title>Phylip</title>
    <version>3.6a2</version>
    <description>dnapars - DNA Parsimony Program</description>
    &phylip_header;
  </head>

  <command>dnapars</command>

  <parameters>

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

	<format>
	  <language>perl</language>
	  <code> "dnapars &lt; params" </code>
	</format>
	<group>0</group>

      </attributes>
     </parameter>

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

	  <prompt>Alignement File</prompt>
	  <format>
	    <language>perl</language>
	    <code>"ln -s $infile infile; "</code>
	  </format>
	  <group>-10</group>
	  <seqfmt>
	    <value>12</value>
	  </seqfmt>
	  <pipe>
	    <pipetype>readseq_ok_alig</pipetype>
	    <language>perl</language>
	    <code>1</code>
	  </pipe>
	  
	</attributes>
    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>dnapars_opt</name>
	<prompt>Parcimony options</prompt>
	<parameters>
	  
	  <parameter type="Switch">
	    <name>use_threshold</name>
	    <attributes>
		
	      <prompt>Use Threshold parsimony (T)</prompt>
		<format>
		<language>perl</language>
		<code>($value)? "T\\n$threshold\\n" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>3</group>
	      <paramfile>params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter ismandatory="1" type="Integer">
	    <name>threshold</name>
	    <attributes>
		
	      <prompt>Threshold value (if use threshold parsimony)</prompt>
	      <format>
		<language>perl</language>
		<code>"" </code>
	      </format>
	      <group>2</group>
	      <precond>
		<language>perl</language>
		<code>$use_threshold</code>
	      </precond>
	      
	      <ctrls>
		<ctrl>
		  <message>You must enter a numeric value, greater than 1</message>
		  <language>perl</language>
		  <code>($threshold !~ /^\d+(\.\d+)?$/) || ($threshold &lt; 1)</code>
		</ctrl>
	      </ctrls>
	      <comment>
		<value>Thresholds less than or equal to 1.0 do not have any meaning and should not be used: they will result in a tree  dependent  only on the input order of species and not at all on the data</value>
	      </comment>
	      
	      <paramfile>params</paramfile>
	    </attributes>
	  </parameter>
	  
	  <parameter type="Switch">
	    <name>use_transversion</name>
	    <attributes>
	      <prompt>Use Transversion parsimony (N)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "N\\n" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>5</group>
	      <paramfile>params</paramfile>
	      </attributes>
	  </parameter>
	    
	</parameters>
      </paragraph>
      
    </parameter>
    
    <parameter type="Paragraph">
      <paragraph>
	<name>bootstrap</name>
	<prompt>Bootstrap options</prompt>
	<parameters>
	  
	  <parameter type="Switch">
	    <name>seqboot</name>
	    <attributes>
	      
	      <prompt>Perform a bootstrap before analysis</prompt>
		<format>
		<language>perl</language>
		<code>($value)? "seqboot &lt; seqboot.params &amp;&amp; mv outfile infile &amp;&amp; " : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>-5</group>
	      <comment>
		<value>By selecting this option, the bootstrap will be performed on your sequence file. So you don't need to perform a separated seqboot before.</value>
		<value>Don't give an already bootstrapped file to the
		program, this won't work!</value>
		<value>You must also provide parameters for jumble.</value>
	      </comment>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter ismandatory="1" type="Excl">
	    <name>method</name>
	    <attributes>
	      
	      <prompt>Resampling methods</prompt>
	      <vdef><value>bootstrap</value></vdef>
	      <group>1</group>
	      <vlist>
		<value>bootstrap</value>
		<label>Bootstrap</label>
		<value>jackknife</value>
		<label>Delete-half jackknife</label>
		<value>permute</value>
		<label>Permute species for each character</label>
	      </vlist>
	      <flist>
		<value>permute</value>
		<code>"J\\nJ\\n"</code>
		<value>bootstrap</value>
		<code>""</code>
		<value>jackknife</value>
		<code>"J\\n"</code>
	      </flist>
	      <comment>
		<value>1. The bootstrap. Bootstrapping was invented by Bradley Efron in 1979, and its use in phylogeny estimation was introduced by me (Felsenstein, 1985b). It involves creating a new data set by sampling N characters randomly with replacement, so that the resulting data set has the same size as the original, but some characters have been left out and others are duplicated. The random variation of the results from analyzing these bootstrapped data sets can be shown statistically to be typical of the variation that you would get from collecting new data sets. The method assumes that the characters evolve independently, an assumption that may not be realistic for many kinds of data.</value>
		<value>2. Delete-half-jackknifing. This alternative to the bootstrap involves sampling a random half of the characters, and including them in the data but dropping the others. The resulting data sets are half the size of the original, and no characters are duplicated. The random variation from doing this should be very similar to that obtained from the bootstrap. The method is advocated by Wu (1986).</value>
		<value>3. Permuting species within characters. This method of resampling (well, OK, it may not be best to call it resampling) was introduced by Archie (1989) and Faith (1990; see also Faith and Cranston, 1991). It involves permuting the columns of the data matrix separately. This produces data matrices that have the same number and kinds of characters but no taxonomic structure. It is used for different purposes than the bootstrap, as it tests not the variation around an estimated tree but the hypothesis that there is no taxonomic structure in the data: if a statistic such as number of steps is significantly smaller in the actual data than it is in replicates that are permuted, then we can argue that there is some taxonomic structure in the data (though perhaps it might be just a pair of sibling species).</value>
	      </comment>
	      <precond>
		<language>perl</language>
		<code>$seqboot</code>
	      </precond>
	      <paramfile>seqboot.params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter ismandatory="1" type="Integer">
	    <name>seqboot_seed</name>
	    <attributes>
	      
	      <prompt>Random number seed (must be odd)</prompt>
	      <format>
		<language>perl</language>
		<code>"$value\\n"</code>
	      </format>
	      <group>1010</group>
	      <ctrls>
		<ctrl>
		  <message>Random number seed must be odd</message>
		  <language>perl</language>
		  <code>$value &lt;= 0 || (($value % 2) == 0)</code>
		</ctrl>
	      </ctrls>
	      <precond>
		<language>perl</language>
		<code>$seqboot</code>
	      </precond>
	      <paramfile>seqboot.params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter type="Label">
	    <name>jumble_message</name>
	    <attributes>
	      
	      <prompt>(You may also enter a random number seed for jumble)</prompt>
	    </attributes>
	  </parameter>
	  
	  <parameter type="Integer">
	    <name>replicates</name>
	    <attributes>
	      
	      <prompt>How many replicates</prompt>
	      <format>
		<language>perl</language>
		<code>($value &amp;&amp; $value != $vdef)? "R\\n$value\\n" : ""</code>
	      </format>
	      <vdef><value>100</value></vdef>
	      <group>1</group>
	      <ctrls>
		<ctrl>
		  <message>this server allows no more than 1000 replicates</message>
		  <language>perl</language>
		  <code>$replicates &gt; 1000</code>
		</ctrl>
	      </ctrls>
	      <precond>
		<language>perl</language>
		<code>$seqboot</code>
	      </precond>
	      <paramfile>seqboot.params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter type="Switch">
	    <name>consense</name>
	    <attributes>
	      
	      <prompt>Compute a consensus tree</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? ";cp infile infile.dnapars;mv outtree outtree.dnapars;mv outfile outfile.dnapars;cp outtree.dnapars intree;consense &lt; consense.params; cp outtree outtree.consense; cp outfile outfile.consense; mv outtree.dnapars outtree; mv infile.dnapars infile; mv outfile.dnapars outfile" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>10</group>
	      <precond>
		<language>perl</language>
		<code>$seqboot &amp;&amp; $print_treefile</code>
	      </precond>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter ishidden="1" type="String">
	    <name>multiple_dataset</name>
	    <attributes>
	      
	      <format>
		<language>perl</language>
		<code>(defined $jumble_seed)?
		"M\\nD\\n$replicates\\n$jumble_seed\\n$times\\n" : "M\\nD\\n$replicates\\n$seqboot_seed\\n$times\\n"</code> 
	      </format>
	      <group>1</group>
	      <precond>
		<language>perl</language>
		<code>$seqboot</code>
	      </precond>
	      <paramfile>params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter ishidden="1" type="String">
	    <name>bootconfirm</name>
	    <attributes>
	      
	      <format>
		<language>perl</language>
		<code>"y\\n"</code>
	      </format>
	      <group>1000</group>
	      <precond>
		<language>perl</language>
		<code>$seqboot</code>
	      </precond>
	      <paramfile>seqboot.params</paramfile>
	      
	    </attributes>
	  </parameter>
    
	  <parameter ishidden="1" type="String">
	    <name>bootterminal_type</name>
	    <attributes>
	      
	      <format>
		<language>perl</language>
		<code>"0\\n"</code>
	      </format>
	      <group>-1</group>
	      <precond>
		<language>perl</language>
		<code>$seqboot</code>
	      </precond>
	      <paramfile>seqboot.params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	</parameters>
      </paragraph>

    </parameter>
    
    <parameter type="Paragraph">
      <paragraph>
	<name>jumble_opt</name>
	<prompt>Randomize options</prompt>
	<parameters>
	  
	  <parameter type="Switch">
	    <name>jumble</name>
	    <attributes>
	      
	      <prompt>Randomize (jumble) input order (J)</prompt>
	      <format>
		<language>perl</language>
		<code>($value &amp;&amp; ! $seqboot )? "j\\n$jumble_seed\\n$times\\n" : "" </code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>20</group>
	      <paramfile>params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter ismandatory="1" type="Integer">
	    <name>jumble_seed</name>
	    <attributes>
	      
	      <prompt>Random number seed for jumble (must be odd)</prompt>
	      <format>
		<language>perl</language>
		<code>""</code>
	      </format>
	      <group>19</group>
	      <ctrls>

		<ctrl>
		  <message>Random number seed for jumble must be odd. </message>
		  <language>perl</language>
		  <code>defined $value &amp;&amp; ($value &lt;= 0 || (($value % 2) == 0))</code>
		</ctrl>
	      </ctrls>
	      <precond>
		<language>perl</language>
		<code>$jumble</code>
	      </precond>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter ismandatory="1" type="Integer">
	    <name>times</name>
	    <attributes>
	      
	      <prompt>Number of times to jumble</prompt>
	      <format>
		<language>perl</language>
		<code>""</code>
	      </format>
	      <vdef><value>1</value></vdef>
	      <group>19</group>
	      <precond>
		<language>perl</language>
		<code>$jumble || $seqboot</code>
	      </precond>

	    </attributes>
	  </parameter>
	  
	</parameters>
      </paragraph>
      
    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>user_tree_opt</name>
	<prompt>User tree options</prompt>
	<parameters>
	  
	  <parameter type="Switch">
	    <name>user_tree</name>
	    <attributes>
	      
	      <prompt>Use User tree (default: no, search for best tree) (U)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "U\\n" : "" </code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>1</group>
	      <comment>
		<value>To give your tree to the program, you must normally put it in the alignement file, after the sequences, preceded by a line indicating how many trees you give.</value>
		<value>Here, this will be automatically appended: just give a treefile and the number of trees in it.</value>
	      </comment>
	      <ctrls>
		<ctrl>
		  <message>you cannot bootstrap your dataset and give a user tree at the same time</message>
		  <language>perl</language>
		  <code>$user_tree &amp;&amp; $seqboot</code>
		</ctrl>
		<ctrl>
		  <message>you cannot randomize (jumble) your dataset and give a user tree at the same time</message>
		  <language>perl</language>
		  <code>$user_tree &amp;&amp; $jumble</code>
		</ctrl>
	      </ctrls>
	      <paramfile>params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter type="InFile">
	    <name>tree_file</name>
	    <attributes>
	      
	      <prompt>User Tree file</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "ln -s $tree_file intree; " : ""</code>
	      </format>
	      <group>-1</group>
	      <comment>
		<value>Give a tree whenever the infile does not already contain the tree.</value>
	      </comment>
	      <precond>
		<language>perl</language>
		<code>$user_tree</code>
	      </precond>
	      
	    </attributes>
	  </parameter>
	  
	</parameters>
      </paragraph>
      
    </parameter>
    
    <parameter type="Paragraph">
      <paragraph>
	<name>weight_opt</name>
	<prompt>Weight options</prompt>
	<parameters>

	  <parameter type="Switch">
	    <name>weights</name>
	    <attributes>
	      
	      <prompt>Use weights for sites (W)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "W\\n" : ""</code>
	      </format>
	      <group>1</group>
	      <paramfile>params</paramfile>
	      
	    </attributes>
	  </parameter>

	  <parameter type="InFile">
	    <name>weights_file</name>
	    <attributes>
	      
	      <prompt>Weights file</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "ln -s $weights_file weights; " : ""</code>
	      </format>
	      <group>-1</group>
	      <precond>
		<language>perl</language>
		<code>$weights</code>
	      </precond>
	      <pipe>
		<pipetype>phylip_weights</pipetype>
		<language>perl</language>
		<code>1</code>
	      </pipe>
	      <withpipe>
		<pipetype>phylip_weights</pipetype>
		<parametername>infile</parametername>
	      </withpipe>

	    </attributes>
	  </parameter>

	</parameters>
      </paragraph>

    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>output</name>
	<prompt>Output options</prompt>
	<parameters>
	  
	  <parameter type="Switch">
	    <name>print_tree</name>
	    <attributes>
	      
	      <prompt>Print out tree (3)</prompt>
	      <format>
			<language>perl</language>
		<code>($value)? "" : "3\\n"</code>
	      </format>
	      <vdef><value>1</value></vdef>
	      <group>1</group>
	      <comment>
		<value>Tells the program to print a semi-graphical picture of the tree in the outfile.</value>
	      </comment>
	      <paramfile>params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter type="Switch">
	    <name>print_steps</name>
	    <attributes>
	      
	      <prompt>Print out steps in each site (4)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "5\\n" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>1</group>
	      <paramfile>params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter type="Switch">
	    <name>print_sequences</name>
	    <attributes>
	      
	      <prompt>Print sequences at all nodes of tree (5)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "5\\n" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>1</group>
	      <paramfile>params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter type="Switch">
	    <name>print_treefile</name>
	    <attributes>
	      
	      <prompt>Write out trees onto tree file (6)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "" : "6\\n"</code>
	      </format>
	      <vdef><value>1</value></vdef>
	      <group>1</group>
	      <comment>
		<value>Tells the program to save the tree in a tree file (outtree) (a standard representation of trees where the tree is specified by a nested pairs of parentheses, enclosing names and separated by commas).</value>
	      </comment>
	      <paramfile>params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter type="Switch">
	    <name>printdata</name>
	    <attributes>
	      
	      <prompt>Print out the data at start of run (1)</prompt>
	      <format>
		<language>perl</language>
		<code>($value)? "1\\n" : ""</code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>1</group>
	      <paramfile>params</paramfile>
	      
	    </attributes>
	  </parameter>
	  
	  <parameter type="Switch">
	    <name>indent_tree</name>
	    <attributes>

	      <prompt>Indent treefile</prompt>
		<format>
		<language>perl</language>
		<code>($value)? " &amp;&amp; indenttree -o outtree.indent outtree" : "" </code>
	      </format>
	      <vdef><value>0</value></vdef>
	      <group>1000</group>
	      
	    </attributes>
	</parameter>
	  
	</parameters>
      </paragraph>
      
    </parameter>

    <parameter type="Paragraph">
      <paragraph>
	<name>other_options</name>
	<prompt>Other options</prompt>
	<parameters>
	  
	  <parameter type="Integer">
	    <name>outgroup</name>
	    <attributes>
	      
	      <prompt>Outgroup species (default, use as outgroup species 1) (O)</prompt>
	      <format>
		<language>perl</language>
		<code>($value &amp;&amp; $value != $vdef)? "o\\n$value\\n" : "" </code>
	      </format>
	      <vdef><value>1</value></vdef>
	      <group>1</group>
	      <paramfile>params</paramfile>
	      <ctrls>
		<ctrl>
		  <message>Please enter a value greater than 0</message>
		  <language>perl</language>
		  <code>$value &amp;&amp; $value &lt; 1</code>
		</ctrl>
	      </ctrls>

	    </attributes>
	  </parameter>
	  
	</parameters>
      </paragraph>
      
    </parameter>
    
    <parameter type="Results">
      <name>outfile</name>
      <attributes>
	
	<filenames>outfile</filenames>
	
      </attributes>
    </parameter>
    
    <parameter type="Results">
      <name>treefile</name>
      <attributes>
	
	<precond>
	  <language>perl</language>
	  <code>$print_treefile</code>
	</precond>
	<filenames>outtree</filenames>
	<pipe>
	  <pipetype>phylip_tree</pipetype>
	  <language>perl</language>
	  <code>1</code>
	</pipe>

      </attributes>
    </parameter>

    <parameter type="Results">
      <name>indented_treefile</name>
      <attributes>
	
	<precond>
	  <language>perl</language>
	  <code>$print_treefile &amp;&amp; $indent_tree</code>
	</precond>
	<filenames>outtree.indent</filenames>
	
      </attributes>
    </parameter>
    
    <parameter type="Results">
      <name>params</name>
      <attributes>
	
	<filenames>params</filenames>
	
      </attributes>
    </parameter>
    
    <parameter ishidden="1" type="String">
      <name>confirm</name>
      <attributes>
	
	<format>
	  <language>perl</language>
	  <code>"y\\n"</code>
	</format>
	<group>1000</group>
	<paramfile>params</paramfile>
	
      </attributes>
    </parameter>
    
    <parameter ishidden="1" type="String">
      <name>terminal_type</name>
      <attributes>
	
	<format>
	  <language>perl</language>
	  <code>"0\\n"</code>
	</format>
	<group>-1</group>
	<paramfile>params</paramfile>
	
      </attributes>
    </parameter>
    
    <parameter type="Results">
      <name>tmp_params</name>
      <attributes>
	
	<filenames>*.params</filenames>
	
      </attributes>
    </parameter>
    
    <parameter ishidden="1" type="String">
      <name>consense_confirm</name>
      <attributes>
	
	<format>
	  <language>perl</language>
	  <code>"Y\\n"</code>
	</format>
	<group>1000</group>
	<precond>
	  <language>perl</language>
	  <code>$consense</code>
	</precond>
	<paramfile>consense.params</paramfile>
	
      </attributes>
    </parameter>
    
    <parameter ishidden="1" type="String">
      <name>consense_terminal_type</name>
      <attributes>
	<format>
	  <language>perl</language>
	  <code>"T\\n"</code>
	</format>
	<group>-2</group>
	<precond>
	  <language>perl</language>
	  <code>$consense</code>
	</precond>
	<paramfile>consense.params</paramfile>
      </attributes>
    </parameter>
    
    <parameter type="Results">
      <name>consense_outfile</name>
      <attributes>

	<precond>
	  <language>perl</language>
	  <code>$consense</code>
	</precond>
	<filenames>outfile.consense</filenames>
	
      </attributes>
    </parameter>
    
    <parameter ishidden="1" type="String">
      <name>consense_outgroup</name>
      <attributes>
	
	<format>
	  <language>perl</language>
	  <code>"O\\n$outgroup\\n"</code>
	</format>
	<group>1000</group>
	<precond>
	  <language>perl</language>
	  <code>$consense and $outgroup and $outgroup != 1</code>
	</precond>
	<paramfile>consense.params</paramfile>
	
      </attributes>
    </parameter>
    
    <parameter type="Results">
      <name>consense_treefile</name>
      <attributes>
	
	<precond>
	<language>perl</language>
	  <code>$consense</code>
	</precond>
	<filenames>outtree.consense</filenames>
	
      </attributes>
    </parameter>
    
  </parameters>
</pise>
