<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pise PUBLIC "pise2.dtd" "pise2.dtd" >
<pise>
	<head>
		<title>jModelTest2 on XSEDE</title>
		<version>2.1.6</version>
		<description>Statistical selection of best-fit models of nucleotide substitution, run on XSEDE</description>
		<authors>Diego Darriba and David Posada</authors>
		<reference>Darriba D, Taboada GL, Doallo R, and Posada D. (2012) jModelTest 2: more models, new heuristics and parallel computing. Nature Methods 9(8), 772. </reference>
		<category>Phylogeny / Alignment</category>
	</head>
	
	<command>jmodeltest2_xsede</command>
	
<!--
*****************************************************************************************************************************************
Created by Mark Miller for CSG, 8/14/2014
*****************************************************************************************************************************************
 4 Command Line Arguments
	
	-help Displays a help message
		
	-machinesfile machinesFile Gets the processors per host from a machines file (for MPI execution).
 
	-->
<!-- 

-*-

[cipres@login01 rules]$ cat jModelTest2.Expanse.rules
Rules for running jModelTest2 on Expanse via the CIPRES gateway

All runs are in the shared partition on a CPU node.

- Check the -s option and whether the -f, -i, and -g options are specified.

- Determine the following four factors:

  schemes = the number after -s, i.e., -s <schemes>

  fmult = 2 if -f is specified or
          1 otherwise

  imult = 2 if -i is specified or
          1 otherwise

  gmult = 2 if -g <value> is specified or
          1 otherwise

- Calculate the number of models as follows:

  models = schemes x fmult x imult x gmult

- Specify the number of threads and memory according to the following table.

                       Slurm
    Models  Threads   memory

      <=24       16      30G
  25 to 55       24      46G
      >=56       32      61G

- Include the following in the run script.

  #SBATCH -p shared
  #SBATCH -*qos=shared-cipres
  #SBATCH -N 1
  #SBATCH -*ntasks-per-node=1
  #SBATCH -*cpus-per-task=<threads>
  #SBATCH -*mem=<memory>
  ...
  srun ... <wrapper> ...


Here are examples from the data sets that I analyzed:

	22 models = 11 x 2:			-s 11 -g 4			(no -f & no -i)
	24 models = 3 x 2 x 2 x 2:	-s 3 -f -i -g 4
	40 models = 5 x 2 x 2 x 2:	-s 5 -f -i -g 4
	44 models = 11 x 2 x 2:		-s 11 -f -g 4		(no -i)
	56 models = 7 x 2 x 2 x 2:	-s 7 -f -i -g 4
	88 models = 11 x 2 x 2 x 2:	-s 11 -f -i -g 4
   1,624 models = 203 x 2 x 2 x 2:	-s 203 -f -i -g 4

 -->
<parameters>
	
<!--  submission: the invocation line and any needed thread specification  -->
					<parameter ismandatory="1" ishidden="1" type="String">
						<name>jmodeltest2_invoke</name>
						<attributes>
							<precond>
								<language>perl</language>
								<code>($set_subschemes*$uneq_basefmodels*$invar_models*$include_ratevar) &lt;= 24</code>
							</precond>
							<format>
								<language>perl</language>		
								<code>"<![CDATA[jmodeltest2_2.1.10_expanse --set-property log-dir=./  ]]>"</code>
							</format>
							<group>0</group>
						</attributes>
					</parameter>
					
					<parameter ismandatory="1" ishidden="1" type="String">
						<name>jmodeltest2_invoke2</name>
						<attributes>
							<precond>
								<language>perl</language>
								<code>($set_subschemes*$uneq_basefmodels*$invar_models*$include_ratevar) &gt; 24 &amp;&amp; $set_subschemes*$uneq_basefmodels*$invar_models*$include_ratevar &lt; 56 </code>
							</precond>
							<format>
								<language>perl</language>		
								<code>"<![CDATA[jmodeltest2_2.1.10_expanse --set-property log-dir=./  ]]>"</code>
							</format>
							<group>0</group>
						</attributes>
					</parameter>	
					
					<parameter ismandatory="1" ishidden="1" type="String">
						<name>jmodeltest2_invoke3</name>
						<attributes>
							<precond>
								<language>perl</language>
								<code>($set_subschemes*$uneq_basefmodels*$invar_models*$include_ratevar) &gt; 55 </code>
							</precond>
							<format>
								<language>perl</language>		
								<code>"<![CDATA[jmodeltest2_2.1.10_expanse --set-property log-dir=./  ]]>"</code>
							</format>
							<group>0</group>
						</attributes>
					</parameter>							

<!-- 
                       Slurm
    Models  Threads   memory

      <=24       16      30G
  25 to 55       24      46G
      >=56       32      61G -->	
      								
<!-- this section defines the file scheduler.conf that accompanies the command line to the TG resource. It instructs the machine how to run the job.  --> 								
				<parameter type="String" ishidden="1" >
					<name>number_nodes</name>
					<attributes>
						<group>2</group>
							<precond>
								<language>perl</language>
								<code>$set_subschemes*$uneq_basefmodels*$invar_models*$include_ratevar  &lt;= 24</code>
							</precond>
						<paramfile>scheduler.conf</paramfile>
						<format>
							<language>perl</language>
							<code>
									"nodes=1\\n" .
									"node_exclusive=0\\n" .
									"mem=30G\\n" .
									"cpus-per-task=16\\n" .
									"threads_per_process=16\\n"
							</code>
						</format>
					</attributes>
				</parameter>
				
				<parameter type="String" ishidden="1" >
					<name>number_nodes2</name>
					<attributes>
						<group>2</group>
							<precond>
								<language>perl</language>
								<code>$set_subschemes*$uneq_basefmodels*$invar_models*$include_ratevar &gt; 24 &amp;&amp; $set_subschemes*$uneq_basefmodels*$invar_models*$include_ratevar &lt; 56</code>
							</precond>
						<paramfile>scheduler.conf</paramfile>
						<format>
							<language>perl</language>
							<code>
									"nodes=1\\n" .
									"node_exclusive=0\\n" .
									"mem=46G\\n" .
									"cpus-per-task=24\\n" .
									"threads_per_process=24\\n"
							</code>
						</format>
					</attributes>
				</parameter>
				
				<parameter type="String" ishidden="1" >
					<name>number_nodes3</name>
					<attributes>
						<group>2</group>
							<precond>
								<language>perl</language>
								<code>$set_subschemes*$uneq_basefmodels*$invar_models*$include_ratevar  &gt; 55</code>
							</precond>
						<paramfile>scheduler.conf</paramfile>
						<format>
							<language>perl</language>
							<code>
									"nodes=1\\n" .
									"node_exclusive=0\\n" .
									"mem=61G\\n" .
									"cpus-per-task=32\\n" .
									"threads_per_process=32\\n"
							</code>
						</format>
					</attributes>
				</parameter>
				
<!-- 			<parameter type="String" ishidden="1" >
					<name>number_nodes3</name>
					<attributes>
						<group>2</group>
							<precond>
								<language>perl</language>
								<code>$num_models &gt; 55</code>
							</precond>
						<paramfile>scheduler.conf</paramfile>
						<format>
							<language>perl</language>
							<code>
									"nodes=1\\n" .
									"node_exclusive=1\\n" .
									"mem=61G\\n" .
									"threads_per_process=32\\n"
							</code>
						</format>
					</attributes>
				</parameter>  -->
				
<!-- end number of nodes  -->	
	
<!-- input file specification -->
	<parameter ismandatory="1" issimple="1" isinput="1" type="InFile"> 
	<name>infile</name>
		<attributes>
			<prompt>Input Alignment</prompt>
			<filenames>infile.phy</filenames>
			<format>
				<language>perl</language>
				<code>"-d infile.phy"</code>
			</format>	
			<group>1</group>
		</attributes>
	</parameter>	
	
	
<!-- begin visible parameters -->		
<!-- This section provides visible queries that help configure the interface  -->

<!-- this sets the run time -->
				<parameter type="Float" issimple="1" ismandatory="1">
					<name>runtime</name> 
					<attributes>
						<group>1</group>
						<paramfile>scheduler.conf</paramfile>
						<prompt>Maximum Hours to Run (up to 168 hours)</prompt>
						<vdef>
							<value>0.5</value>
						</vdef>
						<ctrls>
							<ctrl>
								<message>The maximum hours to run must be less than 168</message>
								<language>perl</language>
								<code>$runtime &gt; 168.0</code>
							</ctrl>
							<ctrl>
								<message>The maximum hours to run must be greater than 0.05</message>
								<language>perl</language>
								<code>$runtime &lt; 0.05</code>
							</ctrl>
						</ctrls>
						<format>
							<language>perl</language>
							<code>"runhours=$value\\n"</code>
						</format>

<!-- provide feedback on number of cpu hrs to be consumed; all runs are the same, but this must be keyed to a visible param, so here we make it conditional on a non-zero run time. -->
						<warns>
							<warn>
								<message>The job will run on 16 processors as configured. If it runs for the entire configured time, it will consume 16 x $runtime cpu hours</message>
								<language>perl</language>
								<code>$set_subschemes*$uneq_basefmodels*$invar_models*$include_ratevar  &lt;= 24</code>
							</warn>
							<warn>
								<message>The job will run on 24 processors as configured. If it runs for the entire configured time, it will consume 24 x $runtime cpu hours</message>
								<language>perl</language>
								<code>$set_subschemes*$uneq_basefmodels*$invar_models*$include_ratevar  &gt; 24 &amp;&amp; $set_subschemes*$uneq_basefmodels*$invar_models*$include_ratevar &lt; 56 </code>
							</warn>
							<warn>
								<message>The job will run on 32 processors as configured. If it runs for the entire configured time, it will consume 32 x $runtime cpu hours</message>
								<language>perl</language>
								<code>$set_subschemes*$uneq_basefmodels*$invar_models*$include_ratevar &gt; 55</code>
							</warn>
						</warns>
						<comment>
<value>Estimate the maximum time your job will need to run. We recommend testing initially with a &lt; 0.5hr test run because Jobs set for 0.5 h or less depedendably run immediately in the "debug" queue. 
Once you are sure the configuration is correct, you then increase the time. The reason is that jobs &gt; 0.5 h are submitted to the "normal" queue, where jobs configured for 1 or a few hours times may
	run sooner than jobs configured for the full 168 hours. 
</value>
						</comment>
					</attributes>
				</parameter>
	
<!-- 	-o outputFile  Redirects the output to a file. -->
	<parameter  issimple="1" type="String"> 
	<name>name_output</name>
		<attributes>
			<prompt>Specify the name of your output file (-o)</prompt>
			<precond>
				<language>perl</language>
				<code>!$convert_phylip</code>
			</precond>
			<format>
				<language>perl</language>
				<code>(defined $value) ?  "-o $value":""</code>
			</format>
			<vdef>
				<value>output.txt</value>
			</vdef>
			<group>3</group>
		</attributes>
	</parameter>
	
<!-- 	-n logSuffix Execution name appended to the log filenames. By default, current time is used: yyyyMMddhhmmss.-->
	<parameter  issimple="1" type="String"> 
	<name>name_suffix</name>
		<attributes>
			<prompt>Specify a suffix for your log file (-n)</prompt>
			<precond>
				<language>perl</language>
				<code>!$convert_phylip</code>
			</precond>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-n $value":"" </code>
			</format>
			<group>4</group>
		</attributes>
	</parameter>
	
<!-- 	-getPhylip Converts the input file into phylip format and exits. 
	
	For example, the following command will generate a new PHYLIP file named “input.nex.phy”. 
	$java -jar jModelTest.jar -d input.nex -getPhylip -->

	<parameter  issimple="1" type="Switch"> 
	<name>convert_phylip</name>
		<attributes>
			<prompt>Convert input to Phylip format (only)</prompt>
			<format>
				<language>perl</language>
				<code>($value) ? "-getPhylip":"" </code>
			</format>
			<vdef>
				<value>0</value>
			</vdef>	
			<group>2</group>
		</attributes>
	</parameter>		
	
<!--Although jModelTest has many options, most users would like to perform a model selection
among the 11 substitution schemes, including models with unequal frequencies, gamma rate variation
and a proportion of invariable sites. The following command produces this operation, shows
the selection results under the 4 available criteria, computes the model-averaged phylogenies (“-a”),
computes the parameters importance (“-v” and “-p”) and writes the PAUP* block for the best-fit
models (“-w”):
	
java jar jModelTest -d exampledata/aPa.fas -s 11 -f -i -g 4 -AIC -BIC -AICc -DT -p -a -w
	
Note that, by default, jModelTest uses Maximum-Likelihood topologies as the base trees for the
model optimization, and checks both NNI and SPR algorithms for the topology search. This obtains
the most accurate results, but it is also the most time consuming operation. According to the size of
the input alignment, one can directly select one of the algorithms saving time in the computations.
As a general rule, for a small number of taxa NNI algorithm would work better, as well as SPR is
more suitable for a large number of taxa. The tree search operation can be set with “-S” argument
(e.g., -t ML -S NNI). -->
<!-- choose models-->
<parameter type="Paragraph">
	<paragraph>
		<name>choose_models</name>
		<prompt>Configure Model Search</prompt>
		<precond>
			<language>perl</language>
			<code>!$convert_phylip</code>
		</precond>
		<parameters>
			
<!--	-H Information criterion for clustering search (AIC, AICc, BIC). (e.g., -H AIC) (default is BIC)-->
			<parameter type="Excl">
					<name>information_criterion</name>
					<attributes>
					<prompt>Clustering search (-H)</prompt>
						<precond>
							<language>perl</language>
							<code>$set_subschemes eq "203"</code>
						</precond>
						<vlist>
							<value>AIC</value>
							<label>AIC</label>
							<value>AICc</value>
							<label>AICc</label>
							<value>BIC</value>
							<label>BIC</label>
						</vlist>
						<format>
							<language>perl</language>
							<code>"-H $value"</code>
						</format>
						<vdef>
							<value>BIC</value>
						</vdef>
						<group>25</group>
						<comment>
							<value>This is used only with 203 searches. AIC=Akaike Information Criterion; AICc = corrected Akaike Information Criterion; BIC = Bayesian Information Criterion</value>
						</comment>
					</attributes>
			</parameter>
			
<!--	-G threshold Heuristic search. Requires a threshold ¿ 0 (e.g., -G 0.1) -->			
			<parameter type="Float">
				<name>threshold_heuristic</name>
				<attributes>
					<prompt>Perform threshold heuristic search. (-G; default = 0.1)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip</code>
					</precond>
					<format>
						<language>perl</language>
						<code>(defined $value) ? "-G $value":""</code>
					</format>
<!--				<ctrls>
						<ctrl>
							<message>Please enter a value greater than 0 for the search threshold.</message>
							<language>perl</language>
							<code>defined $value &amp;&amp; $value &lt;= 0 </code>
						</ctrl>
						
					</ctrls> -->
					<group>13</group>
				</attributes>
			</parameter>

<!-- -s 3—5—7—11—203
		Sets the number of substitution schemes.
		– 3 JC/F81, K80/HKY, SYM/GTR (used by default).
		– 5 JC/F81, K80/HKY, TrNef/TrN, TPM1/TPM1uf, SYM/GTR.
		– 7 JC/F81, K80/HKY, TrNef/TrN, TPM1/TPM1uf, TIM1ef/TIM1, TVMef/TVM, SYM/GTR.
		– 11 All models defined in Table 6.1.
		– 203 All possible GTR submatrices. -->
			
			<parameter ismandatory="1"  type="Excl">
				<name>set_subschemes</name>
				<attributes>
					<prompt>Set the number of substitution schemes (-s)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip</code>
					</precond>
					<vlist>
						<value>3</value>
						<label>3</label>
						<value>5</value>
						<label>5</label>
						<value>7</value>
						<label>7</label>
						<value>11</value>
						<label>11</label>		
						<value>203</value>
						<label>203</label>				
					</vlist>
					<format>
						<language>perl</language>
						<code>" -s $value"</code>
					</format>
					<vdef>
						<value>11</value>
					</vdef>
					<group>5</group>
					<ctrls>
						<ctrl>
							<message></message>
							<language>perl</language>
							<code>!defined $set_subschemes</code>
						</ctrl>
					</ctrls>
					<comment>
						<value>This flag sets the number of substitution schemes. 3 = JC/F81 K80/HKY SYM/GTR; 5 = JC/F81, K80/HKY, TrNef/TrN, TPM1/TPM1uf, SYM/GTR 7 = JC/F81, K80/HKY, TrNef/TrN, TPM1/TPM1uf, TIM1ef/TIM1, TVMef/TVM, SYM/GTR; 11 = all named models; 203 = All possible GTR submatrices</value>
					</comment>
				</attributes>
			</parameter>
				
<!--	-f Include models with unequal base frequencies. -->
			<parameter ismandatory="1"  type="Excl">
				<name>uneq_basefmodels</name>
				<attributes>
					<prompt>Include models with unequal base frequencies. (-f)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip</code>
					</precond>
					<vlist>
						<value>1</value>
						<label>No</label>
						<value>2</value>
						<label>Yes</label>
					</vlist>
					<flist>
						<value>1</value>
						<code>""</code>
						<value>2</value>
						<code>"-f"</code>
					</flist>
					<vdef>
						<value>2</value>
					</vdef>
					<group>7</group>
					<ctrls>
						<ctrl>
							<message>Please specify whether or not to use the -f option</message>
							<language>perl</language>
							<code>!defined $uneq_basefmodels</code>
						</ctrl>
					</ctrls>
				</attributes>
			</parameter>
	
<!--	-i Include models with a proportion invariable sites. -->
			<parameter ismandatory="1"  type="Excl">
				<name>invar_models</name>
				<attributes>
					<prompt>Include models with a proportion invariable sites.  (-i)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip</code>
					</precond>
					<vlist>
						<value>1</value>
						<label>No</label>
						<value>2</value>
						<label>Yes</label>
					</vlist>
					<flist>
						<value>1</value>
						<code>""</code>
						<value>2</value>
						<code>"-i"</code>
					</flist>
					<vdef>
						<value>2</value>
					</vdef>
					<ctrls>
						<ctrl>
							<message>Please specify whether or not to include models with invariable sites (-i)</message>
							<language>perl</language>
							<code>!defined $invar_models</code>
						</ctrl>
					</ctrls>
					<group>8</group>
				</attributes>
			</parameter>
			
<!-- add this so we can do the multiplication above -->			
			<parameter ismandatory="1" type="Excl">
				<name>include_ratevar</name>
				<attributes>
					<prompt>Include models with rate variation among sites?</prompt>
					<vlist>
						<value>1</value>
						<label>No</label>
						<value>2</value>
						<label>Yes</label>
					</vlist>
					<vdef>
						<value>2</value>
					</vdef>
					<ctrls>
						<ctrl>
							<message>Please specify whether or not to include models with rate variation</message>
							<language>perl</language>
							<code>!defined $include_ratevar</code>
						</ctrl>
					</ctrls>
				</attributes>
			</parameter>
			
<!--	-g numberOfRateCategories  Include models with rate variation among sites and sets the number of categories. Usually 4
categories are enough.
	-->
			<parameter type="Integer">
				<name>numratecat_models</name>
				<attributes>
					<prompt>Include models with rate variation among sites, set number of categories  (-g; default = 4)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip</code>
					</precond>
					<format>
						<language>perl</language>
						<code>(defined $value) ? "-g $value":""</code>
					</format>
					<vdef>
						<value>4</value>
					</vdef>
					<group>9</group>
				</attributes>
			</parameter>
			
<!-- 	-c confidenceInterval Sets the confidence interval for the model selection process (default is 100). -->
				<parameter type="Integer">
				<name>confidenceint_models</name>
				<attributes>
					<prompt>Confidence interval for the model selection process (-c; default = 100)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip</code>
					</precond>
					<format>
						<language>perl</language>
						<code>(defined $value) ? "-c $value":""</code>
					</format>
					<group>18</group>
				</attributes>
			</parameter>
			
		</parameters>
	</paragraph>
</parameter>
	
<!-- tree search-->
<parameter type="Paragraph">
	<paragraph>
		<name>configure_treesearch</name>
		<prompt>Define Tree Search</prompt>

		<parameters>
			<parameter type="Excl">
				<name>set_basetree</name>
				<attributes>
					<prompt>Base tree topology for likelihood calculations. (-t)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip</code>
					</precond>
					<vlist>
						<value>fixed</value>
						<label>Fixed BIONJ</label>
						<value>BIONJ</value>
						<label>Neighbor-Joining</label>
						<value>ML</value>
						<label>Maximum Likelihood</label>			
					</vlist>
					<format>
						  <language>perl</language>
						  <code>" -t $value"</code>
					</format>
					<vdef>
						<value>ML</value>
					</vdef>
<!--					<ctrls> 
						<ctrl>
							<message>Sorry, you cannot choose a User-defined tree AND use the -t option</message>
							<language>perl</language>
							<code>defined $user_fixedtree</code>
						</ctrl>
					</ctrls> -->
<comment>
	<value>	This option lets you choose the base tree topology for liklihood calculations. The choices are: 
Fixed BIONJ: Fixed BIONJ topology from Jukes-Cantor model; Neighor Joining: Use Neighbor-Joining topology for each model; and
Maximum Likelihood: use the maximum liklihood topology for each model</value>
</comment>
<!-- Base tree for likelihood calculations (e.g., -t BIONJ):
							– fixed Fixed BIONJ topology from JC model
							– BIONJ Neighbor-Joining topology for each model
							– ML Maximum Likelihood topology for each model   -->
					<group>10</group>
				</attributes>
			</parameter>

<!--	-S NNI—SPR—BEST
		Defines the tree topology search operation option for Maximum-Likelihood search:
		– NNI Nearest Neighbour Interchange (fast).
		– SPR Subtree Pruning and Regrafting (slower).
		– BEST Best of NNI and SPR (slowest option) (used by default). -->
			
			<parameter ismandatory="1" type="Excl">
				<name>def_topsearch</name>
				<attributes>
					<prompt>Set tree topology search operation option for Maximum-Likelihood search (-S)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip &amp;&amp; $set_basetree eq "ML" &amp;&amp; !defined $user_fixedtree</code>
					</precond>
					<vlist>
						<value>NNI</value>
						<label>NNI</label>
						<value>SPR</value>
						<label>SPR</label>
						<value>BEST</value>
						<label>BEST</label>			
					</vlist>
					<vdef>
						<value>BEST</value>
					</vdef>
					<format>
						  <language>perl</language>
						  <code>" -S $value"</code>
					</format>
					<group>10</group>
					<comment>
<value>by default, jModelTest uses Maximum-Likelihood topologies as the base trees for the
model optimization, and checks both Nearest Neighbour Interchange (fast)and Subtree Pruning and Regrafting (slower) algorithms for the topology search. This obtains
the most accurate results, but it is also the most time consuming operation. According to the size of
the input alignment, one can directly select one of the algorithms saving time in the computations.
As a general rule, for a small number of taxa NNI algorithm would work better, as well as SPR is
more suitable for a large number of taxa. The tree search operation can be set with “-S” argument
(e.g., -t ML -S NNI).</value>
					</comment>
				</attributes>
			</parameter>
				
<!--	-t fixed—BIONJ—ML
		Base tree for likelihood calculations (e.g., -t BIONJ):
		– fixed Fixed BIONJ topology from JC model
		– BIONJ Neighbor-Joining topology for each model
		– ML Maximum Likelihood topology for each model (default)-->

	
<!--	-u treeFile Fixed tree for likelihood calculations defined by the user. If a user tree is defined with this
		command, -t argument is ignored.
	-->
			<parameter type="InFile">
				<name>user_fixedtree</name>
				<attributes>
					<prompt>Select a User-defined fixed tree for likelihood calculations (-u)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip</code>
					</precond>
					<filenames>userfixedtree.tre</filenames>
					<format>
						<language>perl</language>
						<code>"-u userfixedtree.tre"</code>
					</format>
<!--					<ctrls> 
						<ctrl>
							<message>Sorry, you cannot choose a User-defined tree AND use the -t option</message>
							<language>perl</language>
							<code>defined $uneq_basefmodels</code>
						</ctrl>
					</ctrls> --> 
					<group>8</group>
				</attributes>
			</parameter>

		</parameters>
	</paragraph>
</parameter>
	
<parameter type="Paragraph">
	<paragraph>
	<name>selection_criteria</name>
	<prompt>Information Criteria</prompt>

	<parameters>
<!-- the jmodeltest2 command line apparently these can be chosen as multiples
	-AIC  Calculate the Akaike Information Criterion. See Section 6.5.1.

	-AICc Calculate the corrected Akaike Information Criterion. See Section 6.5.1.
	
	-BIC  Calculate the Bayesian Information Criterion. See Section 6.5.2.
	
	-DT   Calculate the decision theory criterion. See Section 6.5.3. 
	
	-->
		<parameter issimple="0"  type="List">
			<name>criteria_1</name>
			<attributes>
				<prompt>Select Information Criterion (choose all needed)</prompt>
				<precond>
					<language>perl</language>
					<code>!$convert_phylip</code>
				</precond>
				<vlist>
					<value>-AIC</value>
					<label>Akaike Information Criterion</label>
					<value>-AICc</value>
					<label>corrected Akaike Information Criterion</label>
					<value>-BIC</value>
					<label>Bayesian Information Criterion</label>
					<value>-DT</value>
					<label>Decision Theory criterion</label>
				</vlist>
				<format>
					<language>perl</language>
					<code>(defined $value) ? "$value":""</code>
				</format>
				<vdef>
					<value>-AIC</value>
					<value>-AICc</value>
					<value>-BIC</value>
					<value>-DT</value>
				</vdef>
				<group>10</group>
<!-- separator must be a single character within single quotes -->
				<ctrls>
					<ctrl>
						<message>Please select at least one Information Criterion (all four is typical)</message>
						<language>perl</language>
						<code>!defined $criteria_1</code>
					</ctrl>
				</ctrls>
				<separator>' '</separator>
			</attributes>
			</parameter> 
		
<!--	-h confidenceInterval Sets the confidence level for the hLRTs (default is 0.01)-->			
			<parameter type="Float">
					<name>confidence_selection</name>
					<attributes>
					<prompt>Confidence level for the hLRTs (-h; default is 0.01)</prompt>
						<precond>
							<language>perl</language>
							<code>!$convert_phylip</code>
						</precond>
						<format>
							<language>perl</language>
							<code>(defined $value) ? "-h $value":""</code>
						</format>
<!--						<vdef>
							<value>0.01</value>
						</vdef> -->
						<group>13</group>
					</attributes>
			</parameter>	
		
<!--	-p  Calculate the parameter importances. See Section 6.9. -->
			<parameter type="Switch">
				<name>parameter_importances</name>
				<attributes>
					<prompt>Calculate the parameter importances (-p)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip</code>
					</precond>
					<format>
						<language>perl</language>
						<code>($value) ? "-p":""</code>
					</format>
					<vdef>
						<value>1</value>
					</vdef>
					<group>16</group>
				</attributes>
			</parameter>
			
<!--	-v Do model averaging and parameter importances. See Section 6.7. -->
			<parameter type="Switch">
				<name>modeland_importances</name>
				<attributes>
					<prompt>Do model averaging and parameter importances (-v)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip</code>
					</precond>
					<format>
						<language>perl</language>
						<code>($value) ? "-v":""</code>
					</format>
					<vdef>
						<value>0</value>
					</vdef>
					<group>17</group>
				</attributes>
			</parameter>
		
<!-- -w Prints out the PAUP block. -->
	<parameter  issimple="0" type="Switch"> 
	<name>print_paup</name>
		<attributes>
			<prompt>Print out the PAUP block (-w)</prompt>
			<precond>
				<language>perl</language>
				<code>!$convert_phylip</code>
			</precond>
			<format>
				<language>perl</language>
				<code>($value) ? "-w":""</code>
			</format>
			<vdef>
				<value>1</value>
			</vdef>	
			<comment>
				<value> You can append the PAUP block produced here if you want to load the selected model and associated estimates in PAUP></value>
			</comment>
			<group>20</group>
		</attributes>
	</parameter>
		
<!--	-a   Estimate model-averaged phylogeny for each active criterion. See Section 6.8 for more details.-->
			<parameter type="Switch">
				<name>estimate_modelavg</name>
				<attributes>
					<prompt>Estimate model-averaged phylogeny for each active criterion (-a)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip</code>
					</precond>
					<format>
						<language>perl</language>
						<code>($value) ? "-a":""</code>
					</format>
					<vdef>
						<value>1</value>
					</vdef>
					<group>19</group>
				</attributes>
			</parameter>
		
<!--	-z Strict consensus type for model-averaged phylogeny (default is majority rule). See Section 6.8. -->
			<parameter type="Switch">
				<name>strict_consensus</name>
				<attributes>
					<prompt>Use strict consensus type for model-averaged phylogeny (-z)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip</code>
					</precond>
					<format>
						<language>perl</language>
						<code>($value) ? "-z":""</code>
					</format>
					<vdef>
						<value>0</value>
					</vdef>
					<group>14</group>
					<comment>
<value>Default for this parameter is Majority Rule</value>
					</comment>
				</attributes>
			</parameter>
		
<!--	-uLnL Calculate delta AIC,AICc,BIC against unconstrained likelihood. -->
			<parameter type="Switch">
					<name>calculate_delta</name>
					<attributes>
					<prompt>Calculate delta AIC,AICc,BIC against unconstrained likelihood. (-uLnL)</prompt>
						<precond>
							<language>perl</language>
							<code>!$convert_phylip</code>
						</precond>
						<format>
							<language>perl</language>
							<code>($value) ? "-uLnL":""</code>
						</format>
						<vdef>
							<value>0</value>
						</vdef>
						<group>19</group>
					</attributes>
			</parameter>
		
		</parameters>
	</paragraph>
</parameter>

<parameter type="Paragraph">
	<paragraph>
		<name>hRLT_params</name>
		<prompt>hRLT parameters</prompt>

		<parameters>
			
<!--	-hLRT Perform hierarchical likelihood ratio tests. See Section 6.3 for more details. -->
<!--    -hLRT is only available when likelihoods are calculated on the same tree (i.e., models are nested)
        Execute jModelTest using a fixed BIONJ-JC tree or a user-defined topology
-->
			<parameter type="Switch">
					<name>hierarchical_likelihood</name>
					<attributes>
					<prompt>Perform hierarchical likelihood ratio tests (-hLRT)</prompt>
					<precond>
						<language>perl</language>
						<code>!$convert_phylip &amp;&amp; $set_subschemes ne "203" &amp;&amp;($set_basetree eq "fixed" || defined $user_fixedtree)</code>
					</precond>
						<format>
							<language>perl</language>
							<code>($value) ? "-hLRT":""</code>
						</format>
						<vdef>
							<value>0</value>
						</vdef>
						<group>13</group>
						<comment>
<value>The -hrlt option not available for the 203 subsitution scheme. It requires an uploaded user-defined topology, or a fixed BIONJ-JC tree.</value>
						</comment>
					</attributes>
			</parameter>
			
<!--  -O ftvwxgp  Sets the hypothesis order for the hLRTs (e.g., -hLRT -O gpftv) (default is ftvwxgp)

		– f frequencies
		– t transition/transversion ratio
		– v 2ti4tv for subst=3 / 2ti for subst¿3
		– w 2tv
		– x 4tv
		– g gamma
		– p proportion of invariable sites -->
			<parameter type="String">
					<name>specify_hyporder</name>
					<attributes>
					<prompt>Specify the hypothesis order (-O; default ftvwxgp)</prompt>
						<precond>
							<language>perl</language>
							<code>$hierarchical_likelihood</code>
						</precond>
						<format>
							<language>perl</language>
							<code>(defined $value) ? "-O $value":""</code>
						</format>
						<vdef>
							<value>ftvwxgp</value>
						</vdef>
						<group>14</group>
<!--					<ctrls>
							<ctrl>
								<message>The allowed values for the -O option are f,t,v,w,x,g, and p. Please see the help section for further information</message>
								<language>perl</language>
								<code>$value ne "f" &amp;&amp; $value ne t &amp;&amp; $value ne v &amp;&amp; $value ne w &amp;&amp; $value ne x &amp;&amp; $value ne g &amp;&amp; $value ne p </code>
							</ctrl>	
						</ctrls> -->
						<comment>
<value>This option allows you to set the hypothesis order as a string of small case letters. The options are as follows:
f:frequencies; t:transition/transversion ratio; v: 2ti4tv for subst=3 or 2ti for subst¿3; w: 2tv; x: 4tv; g: gamma; 
p: proportion of invariable sites.
</value>
						</comment>
					</attributes>
			</parameter>
			
<!--	-r  Backward selection for the hLRT (default is forward) -->
			<parameter type="Switch">
					<name>backward_selection</name>
					<attributes>
					<prompt>Backward selection for the hLRT (-r)</prompt>
						<precond>
							<language>perl</language>
							<code>$hierarchical_likelihood </code>
						</precond>						
						<format>
							<language>perl</language>
							<code>($value) ? "-r":""</code>
						</format>
						<vdef>
							<value>0</value>
						</vdef>
						<group>13</group>
					</attributes>
			</parameter>
			
<!-- 	-dLRT Perform dynamical likelihood ratio tests. See Section 6.4 for more details. -->
	
			<parameter type="Switch">
				<name>dynamical_likelhood</name>
				<attributes>
					<prompt>Perform dynamical likelihood ratio tests. (-dLRT)</prompt>
					<precond>
						<language>perl</language>
						<code>$hierarchical_likelihood </code>
					</precond>
					<format>
						<language>perl</language>
						<code>($value) ? "-dLRT":""</code>
					</format>
					<vdef>
						<value>0</value>
					</vdef>
					<group>12</group>
				</attributes>
			</parameter>
				
							
		</parameters>
	</paragraph>
</parameter>
	
<!-- Results section. To start we return all results files available-->
		<parameter ishidden="1" type="Results">
			<name>all_results</name>
			<attributes>
				<filenames>*</filenames>
			</attributes>
		</parameter>

</parameters>
</pise>


