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

<pise>

  <head>
    <title>PHYLOQUART</title>
    <version>1.3</version>
    <description>distquart - quartet inference by weak four-point method (NJ)</description>
    <authors>Berry</authors>
    <category>phylogeny</category>
  </head>


<command>distquart</command>

<parameters>

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

	<format>
		<language>seqlab</language>
		<code>distquart</code>
		<language>perl</language>
		<code>"distquart"</code>
	</format>
	<group>0</group>

</attributes>
</parameter>

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

	<prompt>Reads as input inter-species distances (as opposed to sequences) (-d)</prompt>
	<format>
		<language>perl</language>
		<code>($value)? " -d1" : " -d0"</code>
	</format>
	<group>1</group>
	<comment>
		<value>The program can take as input either a distance matrix (lower triangular) (infile.dist), either a character matrix in the file (infile.nuc) (ie, nucleotide sequences for the species in the same format as the PHYLIP package or as output by the readseq program) from which it computes the Hamming distance between species to infer the quartets.</value>
	</comment>

</attributes>
</parameter>

<parameter type="Paragraph">
<paragraph>
<name>sequence_param</name>
<prompt>Sequences parameters</prompt>
<parameters>

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

		<prompt>Nucleotide Sequences Alignement File</prompt>
		<format>
			<language>perl</language>
			<code>"ln -s $infile infile.nuc; "</code>
		</format>
		<group>-10</group>
		<comment>
			<value>If you provide no distance matrix file, the Hamming distances will be computed from this file.</value>
		</comment>
		<seqfmt>
			<value>11</value>
		</seqfmt>
	<precond>
		<language>perl</language>
		<code>! $dist</code>
	</precond>
		<pipe>
			<pipetype>readseq_ok_alig</pipetype>
				<language>perl</language>
				<code>1</code>
		</pipe>

	</attributes>
	</parameter>

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

		<prompt>Use gap position whenever is possible for computing the distance between two taxa (-g)</prompt>
		<format>
			<language>perl</language>
			<code>($value)? " -g1" : "" </code>
		</format>
		<vdef><value>0</value></vdef>
		<group>1</group>
		<comment>
			<value>If out, drop any position that contains a gap from the whole analysis.</value>
		</comment>
	<precond>
		<language>perl</language>
		<code>! $dist</code>
	</precond>

	</attributes>
	</parameter>

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

		<prompt>Evolutionary model correction (-c)</prompt>
		<format>
			<language>perl</language>
			<code>($value)? " -c$value" : "" </code>
		</format>
		<vdef><value>0</value></vdef>
		<group>1</group>
		<vlist>
			<value>0</value>
			<label>0: no correction</label>
			<value>1</value>
			<label>1: correct according to the Jukes-Cantor 1969 model</label>
			<value>2</value>
			<label>2: correct according to the 2-param Kimura 1980 model</label>
		</vlist>
	<precond>
		<language>perl</language>
		<code>! $dist</code>
	</precond>

	</attributes>
	</parameter>

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

		<prompt>Save in the file outfile.dist the inter-species Hamming distances computed from the input nucleotide sequences (-s)</prompt>
		<format>
			<language>perl</language>
			<code>($value)? " -s1" : "" </code>
		</format>
		<vdef><value>0</value></vdef>
		<group>1</group>
	<precond>
		<language>perl</language>
		<code>! $dist</code>
	</precond>

	</attributes>
	</parameter>

</parameters>
</paragraph>

</parameter>

<parameter ismandatory="1" issimple="1" type="InFile">
<name>distfile</name>
<attributes>

	<prompt>Distances matrix File (lower triangular)</prompt>
	<format>
		<language>perl</language>
		<code>"ln -s $distfile infile.dist; "</code>
	</format>
	<group>-10</group>
<precond>
	<language>perl</language>
	<code>$dist</code>
</precond>
	<pipe>
		<pipetype>phylip_dist</pipetype>
			<language>perl</language>
			<code>1</code>
	</pipe>

</attributes>
</parameter>

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

	<prompt>Lower triangular distances matrix (-l)</prompt>
	<format>
		<language>perl</language>
		<code>($value)? " -l1" : ""</code>
	</format>
	<vdef><value>0</value></vdef>
	<group>1</group>

</attributes>
</parameter>

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

	<filenames>quartfile</filenames>
	<pipe>
		<pipetype>quartfile</pipetype>
			<language>perl</language>
			<code>1</code>
	</pipe>

</attributes>
</parameter>

<parameter ishidden="1" type="OutFile">
<name>outdistfile</name>
<attributes>

	<vdef><value>"outfile.dist"</value></vdef>
	<pipe>
		<pipetype>phylip_dist</pipetype>
			<language>perl</language>
			<code>(! $dist) &amp;&amp; $savedist</code>
	</pipe>

</attributes>
</parameter>


</parameters>
</pise>
