<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pise PUBLIC "pise2.dtd" "pise2.dtd" >
<pise>
	<head>
		<title>IMa3 on ACCESS</title>
		<version>1.13</version>
		<description>IMa3p - Parallel MCMC and inference of ancient demography under the Isolation with Migration (IM) model</description>
		<authors>Jody Hey, Rasmus Nielsen, Sang Chul Choi, Vitor Sousa, Janeen Pisciotta, Yujin Chung and Arun Sethuraman</authors>
		<reference>Arun Sethuraman and Jody Hey (2016) IMa2p - Parallel MCMC and inference of ancient demography under the Isolation with Migration (IM) model Mol Ecol Resour. 2016 Jan; 16(1): 206–215. </reference>
		      <reference>Hey, J., Chung, Y., Sethuraman, A., Lachance, J., Tishkoff, S., Sousa, V. C., and Wang, Y. (2018) Phylogeny Estimation by Integration over Isolation with Migration Models. Molecular Biology and Evolution 35, 2805-2818</reference> 
		<category>Phylogeny / Alignment</category>
	</head>

	<command>ima3_xsede</command>
	
<!--
*****************************************************************************************************************************************
Created by Mark Miller for CSG, 10/25/2018 or thereabouts
***************************************************************************************************************************************** -->

<!--  mpirun –np IMa3p …

Rules for running IMa3 1.11 via the CIPRES gateway
All runs are on one or two standard nodes of Comet.

- Check the number of chains (given as c in -hn <c>), which must be even and
  between 2 and 96. -->
<!-- 							
<ctrl>
	<message>nruns x nchains must be a multiple of 2</message>
	<language>perl</language>
	<code>((($nchainsval) % 2) != 0)</code>
</ctrl> 
-->  
<!--
The number of processes will then be c/2, and the number of nodes, ntasks-per-node,
and the partition to use will be as specified in the following table.

[cipres@login02| /expanse/projects/ngbt/opt/benchmarks/rules]> cat IMa3.Expanse.rules
Rules for running IMa3 1.11 via the CIPRES gateway

All runs are on one standard node of Expanse.

- Check the number of chains (given as c in -hn <c>), which must be even and
  between 2 and 256.

- Specify the number of MPI processes, Slurm partition, and Slurm memory
  according to the following table.

 				MPI pro-     Slurm  Slurm
     c   		cesses  		partition  memory

  <256     c/2     		shared  floor(processes*248/128)G

   256      128    			compute  243G

- For runs in the Slurm shared partition, include the following in the run script.

  #SBATCH -p shared
  #SBATCH -*qos=shared-cipres
  #SBATCH -N 1
  #SBATCH -*ntasks-per-node=<processes>
  #SBATCH -*cpus-per-task=1
  #SBATCH -*mem=<memory>
  ...
  export CIPRES_NP=$SLURM_TASKS_PER_NODE
  export CIPRES_THREADSPP=$SLURM_CIPRES_PER_TASK
  ...
  srun -n $CIPRES_NP -*mpi=pmi2 /expanse/projects/ngbt/home/cipres/ngbw/contrib/scripts/ima3_1.11_expanse ...

- For runs in the Slurm compute partition, replace the first two lines in the run
  script by the following.

  #SBATCH -p compute
  #SBATCH -*qos=cipres


-->

<!--  on the head node
If compiled with MPI_ENABLED,  IMa3 can be run with multiple cpus
MCMC mode means not loading genealogies from a previous run. (-r0). i.e. $specify_runtype == 0
yes -b  Duration of burn  (MCMC mode only).
    - If integer, the number of burnin steps 
    - If floating point, the time in hours between writing of burntrend file
         run continues until file IMburn is no longer present
         in the directory, or if present, does not begin with 'y'
yes -c  Calculation options: 
    0 Likelihood of data functions return a constant - posterior should equal prior 
    1 Include ranges on mutation rates as priors on mutation rate scalars
    2 Joint posterior density calculations, for LLR tests of nested models, use with -r0 -w
    3 Get prior distribution terms from file (requires filename given with -g )
yes -d  Number of steps between sampling genealogies (default 100)
yes -f  Name of file with saved Markov chain state generated in previous run (use with -r3)
-g  Name of file for parameter priors, default: 'imapriors.txt'
-h  Heating terms (MCMC mode only.  Default: EVEN. -ha only: GEOMETRIC. -ha and -hb SYGMOID): 
  -hn Number of chains 
  -ha heating curve shape parameter (less than but near 1, required for GEOMETRIC and SYGMOID)
  -hb lower heating value  (required GEOMETRIC, optional for EVEN) 
-i  Input file name (no spaces) 
calculate marginal likelihood
-L  Run duration. Duration depends on integer or floating point value and other settings
     if integer value, run duration depends on value and other settings
       If estimating population phylogeny (-j0), # of phylogenies to save, 10 steps per save
       If fixed phylogeny in MCMC mode, # of genealogies to save
         This value times -d value sets the # of steps in the chain after burnin 
       If fixed phylogeny,LOAD-GENEALOGY mode (-r0, -v), # genealogies to load from file(s)
	    If floating point: value = the time in hours between outputs. 
         Run continues until file IMrun is absent from directory, or does not begin with 'y'
-m  Migration prior value (maximum for uniform,  mean of exponential distribution is used) 
-o  Output file name (no spaces) default is 'outfile.txt' 
-p  Output options: 
    0 Turn off trend plots in outfile (default is to print trend plots)
    1 Turn off plots of marginal curves in outfile (default is to print marginal density plots)
    2 Print TMRCA histogram for each genealogy (MCMC mode only)
    3 Print histogram of splitting times divided by prior (do not use with -j0)
    4 Turn off printing estimates and histograms of population migration rate (2NM)
    5 Print pairwise probabilities that one parameter is greater than another 
    6 Print histograms of the number of migration events (do not use with -j0)
    7 Print joint estimate for splitting times (not with -j0, models with 3, 4 or 5 populations)
-q  Maximum for population size parameters (4Nu) 
-r  Run options 
    0 LOAD-GENEALOGY Mode - load from previous run(s); also requires -v (do not use with -j0)
    1 Do not save genealogies (default saves sampled genealogies, ignored with -j0)
    2 Save the state of the Markov chain in a file - named with extension .mcf (MCMC mode only)
    3 Start by loading *.mcf file; requires -f (only the state space is loaded)
    4 Write all mutation related updates rates to stdout during the run (default is to suppress)
    5 Print burntrend file at end of burnin period
    6 When loading mcf files (-r3,-r7) do not load sampled values (i.e. use previous run as burnin)
    7 Load *.mcf file if present AND save to *.mcf file.
       No burn done if *.mcf is present. Use to continue a run by repeating the same command line.
    8 Use unique IMburn/run files with outfilename as a prefix 
-s  Random number seed (default is taken from current time)
-t  Maximum time of population splitting
-u  Generation time in years (default is 1) 
      Only needed if demographically scaled histograms are desired in fixed phylogeny runs
-v  Base name (no extension) of *.ti files with genealogy data  (requires use of -r0) 
-w  Name of file with nested models to be tested (requires use of -r0), invokes –c2
-x  Set phylogeny priors for clades of sampled populations (requires -j0), can have multiple -x terms
      each -x terms must be followed by two or more population integers and a positive floating point value
      e.g. -x 0 1 2 0.5 sets relative prior on trees with clade consisting of 0,1,2 to 0.5 (default is 1)
-y  Mutation rate scalar for relevant loci
      Only needed if demographically scaled histograms are desired in fixed phylogeny runs
      Only needed in LOAD-GENEALOGY Mode (-r0) and if mutation rates not known for all loci
-z  Number of steps between screen output (default is 10000) (don't use with LOAD-GENEALOGY mode -r0)


 -->
<!-- to restart, remove any -r elents on the commandline, and replace with
    -r7 Load *.mcf file if present AND save to *.mcf file.
       No burn done if *.mcf is present. Use to continue a run by repeating the same command line.  -->

<parameters>
	
<!--  submission on expanse  -->
					<parameter ismandatory="1" ishidden="1" type="String">
						<name>ima2p_invoke2</name>
						<attributes>
<!--  						<precond>
								<language>perl</language>
								<code>$which_ima2p eq "2"</code>
							</precond> -->
							<format>
								<language>perl</language>		
								<code>"ima3_1.13_expanse"</code>					
							</format>
							<group>0</group>
						</attributes>
					</parameter> 
					
<!-- when run type = 1 
- Specify the number of MPI processes, Slurm partition, and Slurm memory
  according to the following table.

 				MPI pro-     Slurm  Slurm
     c   		cesses  		partition  memory

  <256     c/2     		shared  floor(processes*248/128)G

   256      128    			compute  243G-->
				<parameter type="String" ishidden="1" >
					<name>number_nodes1</name>
					<attributes>
						<group>2</group>
						<paramfile>scheduler.conf</paramfile>
  						<precond>
							<language>perl</language>
							<code>$specify_numchains &lt; 256 </code>
						</precond>  
						<format>
							<language>perl</language>
							<code>
									"nodes=1\\n" .
									"node_exclusive=0\\n" .
									"cpus-per-task=1\\n" .
									"mem=" . (int(($specify_numchains * 0.5)*(248/128))) . "G\\n" .
  									"jobtype=mpi\\n" .
									"mpi_processes=" .  $specify_numchains * 0.5  . "\\n"
							</code>
						</format>
					</attributes>
				</parameter> 
				
				<parameter type="String" ishidden="1" >
					<name>number_nodes2</name>
					<attributes>
						<group>2</group>
						<paramfile>scheduler.conf</paramfile>
  						<precond>
							<language>perl</language>
							<code>$specify_numchains &gt;= 256  </code>
						</precond>  
						<format>
							<language>perl</language>
							<code>
									"nodes=1\\n" .
									"node_exclusive=1\\n" .
  									"jobtype=mpi\\n" .
  									"cpus-per-task=1\\n" .
  									"mem=243G\\n" .
									"mpi_processes=128\\n"
							</code>
						</format>
					</attributes>
				</parameter>
				
<!-- end number of nodes  -->
	
<!-- input file specification -i  Input file name (no spaces) -->
	<parameter ismandatory="1" issimple="1" isinput="1" type="InFile"> 
	<name>infile</name>
		<attributes>
			<prompt>Input</prompt>
			<filenames>infile.txt</filenames>
   			<format>
				<language>perl</language>
				<code>"-i infile.txt"</code>
			</format>
			<group>1</group>
		</attributes>
	</parameter>		
<!-- begin visible parameters -->		
<!--IMa2
Documentation  - August 24, 2011
.
COMMAND LINE OPTIONS
Executing the program with no commands or only a command line flag of 
-h will cause the following output to the screen:

IMa2 Program 
copyright 2011 by Jody Hey, Rasmus Nielsen, Sang Chul Choi, Vitor Sousa and Janeen Pisciotta

Release date: August 24, 2011
This program is run through a command line interface
To execute the program, type the program name followed by the necessary command line flags and options

 -->
<!-- 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 $specify_numchains * 0.5 processors as configured. If it runs for the entire configured time, it will consume $specify_numchains * 0.5  x $runtime cpu hours</message>
								<language>perl</language>
								<code>$specify_numchains &lt; 256</code>
							</warn>
							<warn>
								<message>The job will run on 128 processors as configured. If it runs for the entire configured time, it will consume 128 x $runtime cpu hours</message>
								<language>perl</language>
								<code>$specify_numchains &gt;= 256</code>
							</warn>
							<warn>
								<message>WARNING: This job will consume 3,000-6,000 CPU hours if it runs for the entire configured time. Are you sure you want to do this?</message>
								<language>perl</language>
								<code>$specify_numchains &gt;= 256 &amp;&amp; $runtime &gt;= 24 &amp;&amp; $runtime &lt; 48</code>
							</warn>
							<warn>
								<message>WARNING: This job will consume 6,000-9,000 CPU hours if it runs for the entire configured time. Are you sure you want to do this?</message>
								<language>perl</language>
								<code>$specify_numchains &gt;= 256 &amp;&amp; $runtime &gt;= 48 &amp;&amp; $runtime &lt; 72</code>
							</warn>
							<warn>
								<message>WARNING: This job will consume 9,000-12,000 CPU hours if it runs for the entire configured time. Are you sure you want to do this?</message>
								<language>perl</language>
								<code>$specify_numchains &gt;= 256 &amp;&amp; $runtime &gt;= 72 &amp;&amp; $runtime &lt; 96</code>
							</warn>
							<warn>
								<message>WARNING: This job will consume 12,000-15,000 CPU hours if it runs for the entire configured time. Are you sure you want to do this?</message>
								<language>perl</language>
								<code>$specify_numchains &gt;= 256 &amp;&amp; $runtime &gt;= 96 &amp;&amp; $runtime &lt; 120</code>
							</warn>
							<warn>
								<message>WARNING: This job will consume 15,000-18,000 CPU hours if it runs for the entire configured time. Are you sure you want to do this?</message>
								<language>perl</language>
								<code>$specify_numchains &gt;= 256 &amp;&amp; $runtime &gt;= 120 &amp;&amp; $runtime &lt; 144</code>
							</warn>
							<warn>
								<message>WARNING: This job will consume 18,000-21,000 CPU hours if it runs for the entire configured time. Are you sure you want to do this?</message>
								<language>perl</language>
								<code>$specify_numchains &gt;= 256 &amp;&amp; $runtime &gt;= 144 &amp;&amp; $runtime &lt;= 168</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>
				
<!-- -q  Maximum for population size parameters (4Nu) -->
	<parameter  issimple="1" type="Float"> 
	<name>max_popsize</name>
		<attributes>
			<prompt>Maximum for population size parameters (-q, 4Nu)</prompt>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-q $value":"" </code>
			</format>
			<group>50</group>
			<warns>
				<warn>
					<message>A value may be required for Maximum for population size</message>
					<language>perl</language>
					<code>!defined $max_popsize</code>
				</warn>
			</warns>
		</attributes>
	</parameter>		

<!-- simple options -->
<!-- -m  Migration prior value (maximum for uniform,  mean if exponential distribution is used -->
	<parameter  issimple="1" type="Float"> 
	<name>migration_prior</name>
		<attributes>
			<prompt>Migration prior value (-m, maximum for uniform, mean if exponential distribution is used)</prompt>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-m $value":"" </code>
			</format>
			<warns>
				<warn>
					<message>A value may be required for Migration prior value (-m)</message>
					<language>perl</language>
					<code>!defined $specify_popsplit</code>
				</warn>
			</warns>
			<group>70</group>
			<comment>
			<value>Please see the manual for further information about the -m option.</value>
			</comment>
		</attributes>
	</parameter>	

<!-- -o  Output file name (no spaces) default is 'outfile.txt' -->
	<parameter  issimple="1" type="String"> 
	<name>outfile_name</name>
		<attributes>
			<prompt>Output file name </prompt>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-o $value":"" </code>
			</format>
			<group>5</group>
		</attributes>
	</parameter>	
	
<!--  -s  Random number seed (default is taken from current time) -->
	<parameter  issimple="1" type="Integer"> 
	<name>specify_seed</name>
		<attributes>
			<prompt>Random number seed (-s default is taken from current time)</prompt>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-s $value":"" </code>
			</format>
			<group>50</group>
		</attributes>
	</parameter>
	
<!-- -t  Maximum time of population splitting  -->
	<parameter  issimple="1" type="Float"> 
	<name>specify_popsplit</name>
		<attributes>
			<prompt>Maximum time of population splitting (-t)</prompt>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-t $value":"" </code>
			</format>
			<group>51</group>
<!-- 			<ctrls>
				<ctrl>
					<message>A value may be required for Maximum time of population splitting</message>
					<language>perl</language>
					<code>!defined $specify_popsplit</code>
				</ctrl>
			</ctrls>  -->
		</attributes>
	</parameter>

	 
<!-- -r  Run options
	0 LOAD -GENEALOGY Mode 
		-load genealogies from previous run(s); also requires -v
	1 Do not save genealogies to a file (default saves sampled genealogies)
	2 Save the state of the Markov chain in a file -named with extension .mcf (MCMC mode only)
	3 Start run by loading a previously saved *.mcf file; requires -f (data and priors must be the same)
	4 Write all mutation related updates rates to stdout during the run (default is to suppress this)
	5 Print burntrend file at end of burnin period; use with  followed by integer (MCMC mode only) -->
<parameter type="Paragraph">				
				<paragraph>
					<name>run_options</name>
					<prompt>Run Options</prompt>
					<parameters>	
					
<parameter type="Switch"> 
	<name>run_option0</name>
		<attributes>
			<prompt>Load genealogies from previous run(s) (-r0)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-r0":"" </code>
			</format> 
			<group>30</group>
		</attributes>
	</parameter>
		
<!-- -v  Base name (no extension) of *.ti files with genealogy data  (requires use of -r0) -->
	<parameter ishidden="1" type="String"> 
	<name>specify_tiname</name>
		<attributes>
			<prompt>Base name (no extension) of *.ti files with genealogy data </prompt>
			<precond>
				<language>perl</language>
				<code>$run_option0</code>
			</precond>
			<format>
				<language>perl</language>
				<code>"-v genealogies"</code>
			</format>
			<group>32</group>
		</attributes>
	</parameter> 
	
	<parameter type="InFile"> 
	<name>specify_tifile1</name>
		<attributes>
			<prompt>Select your *.ti file</prompt>
			<precond>
				<language>perl</language>
				<code>$run_option0</code>
			</precond>
			<filenames>genealogies1.out.ti</filenames>
		</attributes>
	</parameter> 
	
<parameter type="InFile"> 
	<name>specify_tifile2</name>
		<attributes>
			<prompt>Select your second *.ti file</prompt>
			<precond>
				<language>perl</language>
				<code>$run_option0 &amp;&amp; defined $specify_tifile1</code>
			</precond>
			<filenames>genealogies2.out.ti</filenames>
		</attributes>
	</parameter> 
		
<parameter type="InFile"> 
	<name>specify_tifile3</name>
		<attributes>
			<prompt>Select your third *.ti file</prompt>
			<precond>
				<language>perl</language>
				<code>$run_option0 &amp;&amp; defined $specify_tifile2</code>
			</precond>
			<filenames>genealogies3.out.ti</filenames>
		</attributes>
	</parameter> 
	
	<parameter type="Switch"> 
	<name>run_option1</name>
		<attributes>
			<prompt>Do not save genealogies to a file (-r1)</prompt>
			<precond>
				<language>perl</language>
				<code>!$run_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-r1":"" </code>
			</format> 
		</attributes>
	</parameter>
	
<!-- -z  Number of steps between screen output (default is 10000) (MCMC mode only)  
	<parameter  issimple="0" type="Integer"> 
	<name>specify_stepscreen</name>
		<attributes>
			<prompt>Number of steps between screen output</prompt>
			<precond>
				<language>perl</language>
				<code>$specify_runtype == 0</code>
			</precond>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-z $value":"" </code>
			</format>
		</attributes>
	</parameter>	-->
	
	<parameter type="Switch"> 
	<name>run_option2</name>
		<attributes>
			<prompt>Save the state of the Markov chain in a file (-r2)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-r2":"" </code>
			</format> 
		</attributes>
	</parameter>

<!-- this can work for restart, but not for regular  -->

  <parameter type="Switch"> 
	<name>run_option3</name>
		<attributes>
			<prompt>Start run by loading a previously saved *.mcf file (-r3)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-r3":"" </code>
			</format> 
		</attributes>
	</parameter> 
	
<!-- this can work for restart, but not for regular  -->
<!-- -f  Name of file with saved Markov chain state generated in previous run -use with -r3 -->	
 <parameter ishidden="1" type="String"> 
	<name>markovchainstate_filename</name>
		<attributes>
			<prompt>Enter the mcf file name (-f)</prompt>
			<precond>
				<language>perl</language>
				<code>$run_option3</code>
			</precond>
			<format>
				<language>perl</language>
				<code>"-f statefile.mcf"</code>
			</format>
			<comment>
				<value>To use this option, -r3 must be invoked.</value>
			</comment>
		</attributes>
	</parameter> 
	
<!--	-->
<parameter type="InFile"> 
	<name>specify_mcffile</name>
		<attributes>
			<prompt>Specify the first *.mcf file</prompt>
			<precond>
				<language>perl</language>
				<code>$run_option3</code>
			</precond>
			<filenames>statefile.mcf.0</filenames>
		</attributes>
	</parameter> 
	
<parameter type="InFile"> 
	<name>specify_mcffile2</name>
		<attributes>
			<prompt>Specify the second *.mcf file</prompt>
			<precond>
				<language>perl</language>
				<code>defined $specify_mcffile</code>
			</precond>
			<filenames>statefile.mcf.1</filenames>
		</attributes>
	</parameter> 	
	
	<parameter type="InFile"> 
	<name>specify_mcffile3</name>
		<attributes>
			<prompt>Specify the third *.mcf file</prompt>
			<precond>
				<language>perl</language>
				<code>defined $specify_mcffile2</code>
			</precond>
			<filenames>statefile.mcf.2</filenames>
		</attributes>
	</parameter> 	
	
	<parameter type="InFile"> 
	<name>specify_mcffile4</name>
		<attributes>
			<prompt>Specify the fourth *.mcf file</prompt>
			<precond>
				<language>perl</language>
				<code>defined $specify_mcffile3</code>
			</precond>
			<filenames>statefile.mcf.3</filenames>
		</attributes>
	</parameter> 	

	<parameter type="Switch"> 
	<name>run_option4</name>
		<attributes>
			<prompt>Write all mutation related rates to stdout.txt (-r4)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-r4":"" </code>
			</format> 
		</attributes>
	</parameter>
		
	<parameter type="Switch"> 
	<name>run_option5</name>
		<attributes>
			<prompt>Print burntrend file at end of burnin period (-r5)</prompt>
				<precond>
				<language>perl</language>
				<code>!$run_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-r5":"" </code>
			</format> 
		</attributes>
	</parameter>			
		
 	<parameter type="Switch"> 
	<name>run_option6</name>
		<attributes>
			<prompt>When loading mcf files (-r3,-r7), use previous run as burnin (-r6)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-r6":"" </code>
			</format> 
		</attributes>
	</parameter>

<!-- this can be used to restart in the same folder/directory -->		
<parameter type="Switch"> 
	<name>run_option7</name>
		<attributes>
			<prompt>Load mcf if present, AND save to mcf (-r7)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-r7":"" </code>
			</format> 
		</attributes>
	</parameter>   
	
<!--  	<parameter type="InFile"> 
	<name>mcf_file1</name>
		<attributes>
			<prompt>Select the .mcf file with saved Markov chain state generated in previous run</prompt>
			<precond>
				<language>perl</language>
				<code>$run_option7</code>
			</precond>
		</attributes>
	</parameter>
	
	<parameter type="InFile"> 
	<name>mcf_file2</name>
		<attributes>
			<prompt>Select the .mcf file with saved Markov chain state generated in previous run</prompt>
			<precond>
				<language>perl</language>
				<code>$run_option7</code>
			</precond>
		</attributes>
	</parameter>
	
	<parameter type="InFile"> 
	<name>mcf_file3</name>
		<attributes>
			<prompt>Select the .mcf file with saved Markov chain state generated in previous run</prompt>
			<precond>
				<language>perl</language>
				<code>$run_option7</code>
			</precond>
		</attributes>
	</parameter>
	
	<parameter type="InFile"> 
	<name>mcf_file4</name>
		<attributes>
			<prompt>Select the .mcf file with saved Markov chain state generated in previous run</prompt>
			<precond>
				<language>perl</language>
				<code>$run_option7</code>
			</precond>
		</attributes>
	</parameter> -->
	
	
	<parameter type="Switch"> 
	<name>run_option8</name>
		<attributes>
			<prompt>Use unique IMburn/run files with outfilename as a prefix (-r8)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-r8":"" </code>
			</format> 
		</attributes>
	</parameter>

<!-- -d  Number of steps between geneology saving (MCMC mode only) (default 100) -->
	<parameter  issimple="0" type="Integer"> 
	<name>specify_numsteps</name>
		<attributes>
			<prompt>Specify the number of steps between geneology saving (-d)</prompt>
			<precond>
				<language>perl</language>
				<code>!$run_option0</code>
			</precond>
			<format>
				<language>perl</language>
				<code>defined $value ? "-d $value":""</code>
			</format>
			<vdef>
				<value>100</value>
			</vdef>
			<comment>
<value>The -d option is ignored when sampling phylogenies</value>
			</comment>
		</attributes>
	</parameter>
	
	</parameters>
</paragraph>
</parameter>
	
<!-- -c  Calculation options:
	0 Likelihood of data functions return a constant -posterior should equal prior
	1 Include ranges on mutation rates as priors on mutation rate scalars
	2 Joint posterior density calculations, for LLR tests of nested models use with -w (LOAD- GENEALOGY mode only)
	3 Get prior distribution terms from file (requires filename given with -g) -->
<!-- multiple values can be specified at once -->
<parameter type="Paragraph">
	<paragraph>
	<name>calculation_options</name>
	<prompt>Calculation Options</prompt>
		<parameters>
		
	<parameter type="Switch"> 
	<name>calc_option0</name>
		<attributes>
			<prompt>Likelihood of data functions return a constant -posterior should equal prior (-c0)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-c0":"" </code>
			</format> 
		</attributes>
	</parameter>
		
	<parameter type="Switch"> 
	<name>calc_option1</name>
		<attributes>
			<prompt>Include ranges on mutation rates as priors on mutation rate scalars (-c1)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-c1":"" </code>
			</format> 
		</attributes>
	</parameter>	
		
<!--	 use with -w (LOAD- GENEALOGY mode only)
mpirun -np 10 IMa3 -i infile.im -o outfile.out -hn20 -r0 -L100000 -v genealogies -c2 -w models.txt -ha0.96 -hb0.01  -q70 -t30.0  -p5 -m7.0 -->
<parameter type="Switch"> 
	<name>calc_option2</name>
		<attributes>
			<prompt>Joint posterior density calculations, for LLR tests of nested models (-c2)</prompt>	 
			<precond>
				<language>perl</language>
				<code>$run_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-c2":"" </code>
			</format> 
			<group>34</group>
		</attributes>
	</parameter> 
		
	<!--  -w  Name of file with nested models to be tested (LOAD-GENEALOGY mode only), invokes -c2  -->
	<parameter type="InFile"> 
	<name>specify_nestmod</name>
		<attributes>
			<prompt>File with nested models to be tested (LOAD-GENEALOGY mode only), invokes -c2 (-w)</prompt>
			<precond>
				<language>perl</language>
				<code>$calc_option2</code>
			</precond>
			<filenames>nested_models.txt</filenames>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-w nested_models.txt":"" </code>
			</format>
			<group>36</group>
			<ctrls>
				<ctrl>
					<message>The -c2 option requres a file with nested models via -w</message>
					<language>perl</language>
					<code>$calc_option2 &amp;&amp; !defined $specify_nestmod</code>
				</ctrl>
			</ctrls>
		</attributes>
	</parameter> 
			
	<parameter type="Switch"> 
	<name>calc_option3</name>
		<attributes>
			<prompt>Get prior distribution terms from file (-c3)</prompt>
			<!-- (requires filename given with -g) -->
  			<format>
				<language>perl</language>
				<code>($value)? "-c3":"" </code>
			</format> 
		</attributes>
	</parameter>	
	
	<!-- -g  Name of file with parameter priors  (requires -c3) default: 'imapriors.txt'-->
	<parameter type="InFile"> 
	<name>datatype5_file</name>
		<attributes>
			<prompt>Select file with parameter priors</prompt>
			<precond>
				<language>perl</language>
				<code>$calc_option3 </code>
			</precond>
			  <format>
				<language>perl</language>
				<code>(defined $value)? "-g imapriors.txt":"" </code>
			</format> 	
			<filenames>imapriors.txt</filenames>
			<ctrls>
				<ctrl>
					<message>Sorry, you cant specify a parameter prior file AND specify a prior via -m</message>
					<language>perl</language>
					<code>defined $migration_prior &amp;&amp; defined $datatype5_file</code>
				</ctrl>
			</ctrls>
			<comment>
				<value>To use this option, calculation option 3, -c3 must be invoked</value>
			</comment>
		</attributes>
	</parameter>  
	
	</parameters>
	</paragraph>
</parameter>
	
<!-- -b  Duration of burn  (MCMC mode only)
	-If integer, the number of burnin steps
	-If floating point, the time in hours between writing of burntrend file. run continues until file IMburn is no longer present in the directory, or if present, does not begin with 'y'
-->
<parameter type="Paragraph">
	<paragraph>
	<name>set_burnin</name>
	<prompt>Set Burnin</prompt>
		<parameters>
		
	<parameter ismandatory="1" type="Excl"> 
	<name>choose_burninsteps</name>
		<attributes>
			<prompt>Burn duration (-b) is in:</prompt>
			<precond>
				<language>perl</language>
				<code>!$run_option0 &amp;&amp; !$run_option7 </code>
			</precond>
			<vlist>
				<value>1</value>
				<label>Number of Burnin Steps</label>
				<value>2</value>
				<label>Time in hours between writing to burntrend</label>
			</vlist>
			<ctrls>
				<ctrl>
					<message>Please choose the burnin method</message>
					<language>perl</language>
					<code>!defined $choose_burninsteps</code>
				</ctrl>
			</ctrls>
			<comment>
<value>The -b value is ignored when R7 is used.</value>
			</comment>
		</attributes>
	</parameter> 

	<parameter  type="Integer"> 
	<name>specify_burninsteps</name>
		<attributes>
			<prompt>Specify the number of burnin steps (-b integer)</prompt>
			<precond>
				<language>perl</language>
				<code>$choose_burninsteps == 1</code>
			</precond>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-b $value":"" </code>
			</format>
		</attributes>
	</parameter> 
					
	<parameter  issimple="0" type="Float"> 
	<name>specify_burntrend</name>
		<attributes>
			<prompt>Hours between writing of burntrend file (there must be a decimal)</prompt>
			<precond>
				<language>perl</language>
				<code>!$run_option0 &amp;&amp; $choose_burninsteps == 2 </code>
			</precond>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-b $value":"" </code>
			</format>
		</attributes>
	</parameter>
	</parameters>
	</paragraph>
	</parameter>

<parameter type="Paragraph">
	<paragraph>
	<name>heating_terms</name>
	<prompt>Heating Terms</prompt>
		<parameters>
<!-- -h  Heating terms (MCMC mode only):
	-hn Number of chains
	-ha First heating parameter
	-hb Second heating parameter -->
	
	<parameter  issimple="0" type="Integer"> 
	<name>specify_numchains</name>
		<attributes>
			<prompt>Number of chains, all models (-hn)</prompt>
			<format>
				<language>perl</language>
				<code>defined $value ? "-hn$value":""</code>
			</format>
			<group>20</group>
			<ctrls>
				<ctrl>
					<message>Please specify the number of chains</message>
					<language>perl</language>
					<code>!defined $specify_numchains</code>
				</ctrl>
				<ctrl>
					<message>The number of chains must be a multiple of 2</message>
					<language>perl</language>
					<code>((($specify_numchains) % 2) != 0)</code>
				</ctrl>
  				<ctrl>
					<message>The number of chains must be no greater than 256</message>
					<language>perl</language>
					<code>$specify_numchains &gt; 256</code>
				</ctrl> 
				<ctrl>
					<message>The number of chains must be no less than 4</message>
					<language>perl</language>
					<code>$specify_numchains &lt; 4</code>
				</ctrl>   
			</ctrls>
		</attributes>
	</parameter> 	
	
	<parameter  issimple="0" type="Float"> 
	<name>specify_firstheatparam</name>
		<attributes>
			<prompt>Specify the first heating parameter (-ha; sigmoid or geometric)</prompt>
<!--			<precond>
				<language>perl</language>
				<code>!$run_option0</code>
			</precond>-->
			<format>
				<language>perl</language>
				<code>defined $value ? "-ha$value":""</code>
			</format>
			<group>40</group>
			<comment>
<value>This value should be between 0 and 1. Values near 1 will be near Even, values near 0.95 will be sigmoid,  </value>
			</comment>
		</attributes>
	</parameter>
	
	<parameter  issimple="0" type="Float"> 
	<name>specify_secondheatparam</name>
		<attributes>
			<prompt>Specify the second heating parameter (-hb; geometric only)</prompt>
<!--			<precond>
				<language>perl</language>
				<code>!$run_option0 </code>
			</precond>-->
			<format>
				<language>perl</language>
				<code>defined $value ? "-hb$value":""</code>
			</format>
			<group>41</group>
			<comment>
	<value>This option is required for the Geometric model</value>
			</comment>
		</attributes>
	</parameter>
	
		</parameters>
	</paragraph>	
</parameter>

<!--  			<value>2</value>
				<label>Migration prior follows exponential distribution</label>
				<value>3</value>
				<label>Use hyperpriors</label>
				<value>4</value>
				<label>Migration only between sister populations</label>
				<value>5</value>
				<label>One migration parameter for each pair of populations</label>
				<value>6</value>
				<label>Migration only between sampled populations</label>
				<value>7</value>
				<label>Period specific parameters</label>
				<value>8</value>
				<label>No migration in the model</label>
				<value>9</value>
				<label>One single migration parameter for all pairs of populations</label>
				<value>x</value>
				<label>One overall popsize parameter</label>
			</vlist> -->
<parameter type="Paragraph">				
				<paragraph>
					<name>model_options</name>
					<prompt>Model Options</prompt>
					<parameters>	
					
	<parameter type="Switch"> 
	<name>model_option0</name>
		<attributes>
			<prompt>Estimate population topology: 3 populations required (-j0)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-j0":"" </code>
			</format> 
		</attributes>
	</parameter>
	
	<!-- specify population topology prior	 -->
	<parameter type="String"> 
	<name>specify_topologypr</name>
		<attributes>
			<prompt>Specify population topology prior (-x)</prompt>
			<precond>
				<language>perl</language>
				<code>$model_option0</code>
			</precond>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-x $value":""</code>
			</format>
			<comment>
				<value>Set phylogeny priors for clades of sampled populations (requires -j0), can have multiple -x terms
      each -x terms must be followed by two or more population integers and a positive floating point value
      e.g. -x 0 1 2 0.5 sets relative prior on trees with clade consisting of 0,1,2 to 0.5 (default is 1)</value>
			</comment>
		</attributes>
	</parameter> 
		 
	<parameter type="Switch"> 
	<name>model_option1</name>
		<attributes>
			<prompt>Add a non-sampled ghost population to the model (-j1)</prompt>
			<precond>
				<language>perl</language>
				<code>!$model_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-j1":"" </code>
			</format> 
		</attributes>
	</parameter>	
	
	<parameter type="Switch"> 
	<name>model_option2</name>
		<attributes>
			<prompt>Migration prior follows exponential distribution (-j2)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-j2":"" </code>
			</format> 
		</attributes>
	</parameter>
<!-- 	-->
	<parameter type="Switch"> 
	<name>model_option3</name>
		<attributes>
			<prompt>Use hyperpriors specified by -q and -m (-j3)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-j3":"" </code>
			</format> 
<!-- 			<ctrls>
				<ctrl>
					<message>Sorry you cant use this option together with Population topology updating and estimation</message>
					<language>perl</language>
					<code>$model_option0 &amp;&amp; $model_option3</code>	
				</ctrl>
			</ctrls>  -->
		</attributes>
	</parameter>
			
	<parameter type="Switch"> 
	<name>model_option4</name>
		<attributes>
			<prompt>Migration only between sister populations (-j4)</prompt>
			<precond>
				<language>perl</language>
				<code>!$model_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-j4":"" </code>
			</format> 
		</attributes>
	</parameter>

	<parameter type="Switch"> 
	<name>model_option5</name>
		<attributes>
			<prompt>One migration parameter for each pair of populations (-j5)</prompt>
			<precond>
				<language>perl</language>
				<code>!$model_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-j5":"" </code>
			</format> 
		</attributes>
	</parameter>
	
	<parameter type="Switch"> 
	<name>model_option6</name>
		<attributes>
			<prompt>Migration only between sampled populations (-j6)</prompt>
			<precond>
				<language>perl</language>
				<code>!$model_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-j6":"" </code>
			</format> 
		</attributes>
	</parameter>
	
	<parameter type="Switch"> 
	<name>model_option7</name>
		<attributes>
			<prompt>Period specific parameters (-j7)</prompt>
			<precond>
				<language>perl</language>
				<code>!$model_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-j7":"" </code>
			</format> 
		</attributes>
	</parameter>
		
	<parameter type="Switch"> 
	<name>model_option8</name>
		<attributes>
			<prompt>No migration in the model (-j8)</prompt>
			<precond>
				<language>perl</language>
				<code>!$model_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-j8":"" </code>
			</format> 
		</attributes>
	</parameter>
	
	<parameter type="Switch"> 
	<name>model_option9</name>
		<attributes>
			<prompt>One single migration parameter for all pairs of populations (-j9)</prompt>
			<precond>
				<language>perl</language>
				<code>!$model_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-j9":"" </code>
			</format> 
		</attributes>
	</parameter>
		
	<parameter type="Switch"> 
	<name>model_optionx</name>
		<attributes>
			<prompt>One single population size parameter for all populations (-jx)</prompt>
			<precond>
				<language>perl</language>
				<code>!$model_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-jx":"" </code>
			</format> 
			 <ctrls>
				<ctrl>
					<message>Sorry you cant use this option together with Population topology updating and estimation</message>
					<language>perl</language>
					<code>$model_option0 &amp;&amp; $model_optionx</code>	
				</ctrl>
			</ctrls>
		</attributes>
	</parameter>
					
				</parameters>
			</paragraph>
		</parameter>
		
		<!-- other run duration options 

-L  Run duration. Duration depends on integer or floating point value and other settings
     if integer value, run duration depends on value and other settings
       
       If estimating population phylogeny (-j0), # of phylogenies to save, 10 steps per save
       
       If fixed phylogeny in MCMC mode, # of genealogies to save
       This value times -d value sets the # of steps in the chain after burnin 
       
       If fixed phylogeny,LOAD-GENEALOGY mode (-r0, -v), # genealogies to load from file(s)
	   
	   If floating point: value = the time in hours between outputs. 
    
       Run continues until file IMrun is absent from directory, or does not begin with 'y' -->
<parameter type="Paragraph">
	<paragraph>
	<name>set_runduration</name>
	<prompt>Set Run Duration</prompt>
		<parameters>

<!--  If floating point: value = the time in hours between outputs.  -->
	<parameter type="Float"> 
	<name>specify_hours</name>
		<attributes>
			<prompt>Time in hours of the sampling period (must have a decimal) (-L)</prompt>
			<precond>
				<language>perl</language>
<!-- fix when the -j and -r are refactored -->
				<code>!$run_option0 &amp;&amp; $choose_runmethod == 2 </code>
			</precond>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-L $value":"" </code>
			</format>
			<comment>
			<value>Must have a decimal.</value>
			</comment>
		</attributes>
	</parameter>		

<!-- -L Run duration. Duration depends on integer or floating point value and other settings
if integer value, run duration depends on value and other settings
If estimating population phylogeny (-j0), # of phylogenies to save, 10 steps per save
If fixed phylogeny in MCMC mode, # of genealogies to save
This value times -d value sets the # of steps in the chain after burnin
If fixed phylogeny,LOAD-GENEALOGY mode (-r0, -v), # genealogies to load from file(s)
If floating point: value = the time in hours between outputs.
Run continues until file IMrun is absent from directory, or does not begin with 'y -->
<parameter  issimple="0" ismandatory = "1" type="Float"> 
<!--        If estimating population phylogeny i.e. sampling topologies (-j0), # of phylogenies to save, 10 steps per save -->
	<name>specify_runduration1</name>
		<attributes>
			<prompt>Number of phylogenies to save:</prompt>
			<precond>
				<language>perl</language>
<!-- fix this when the lists are refactored -->
				<code>$model_option0</code>
			</precond>
			<format>
				<language>perl</language>
				<code>defined $value ? "-L $value":""</code>
			</format>
			<ctrls>
				<ctrl>
					<message>Please choose the number of phylogenies to save</message>
					<language>perl</language>
					<code>$model_option0 &amp;&amp; !defined $specify_runduration1</code>
				</ctrl>
			</ctrls>
		</attributes>
	</parameter> 

<!--   If fixed phylogeny in MCMC mode, # of genealogies to save
       This value times -d value sets the # of steps in the chain after burnin -->
	<parameter  issimple="0" ismandatory = "1" type="Integer"> 
	<name>specify_runduration2b</name>
		<attributes>
			<prompt>Number of times the genealogies are sampled</prompt>
			<precond>
				<language>perl</language>
<!-- fix this when the lists are refactored -->
				<code>!$model_option0 &amp;&amp; !$run_option0</code>
			</precond>
			<format>
				<language>perl</language>
				<code>defined $value ? "-L $value":""</code>
			</format>
			<ctrls>
				<ctrl>
					<message>Please choose the number of genealogies to save</message>
					<language>perl</language>
					<code>!$model_option0 &amp;&amp; !$run_option0 &amp;&amp; !defined $specify_runduration2b </code>
				</ctrl>
			</ctrls>
			<comment>
			<value>The (number of geneologies to save) x (-d) value sets the # of steps in the chain after burnin</value>
			</comment>
		</attributes>
	</parameter>

	<parameter  issimple="0" ismandatory = "1" type="Integer"> 
<!--   If fixed phylogeny,LOAD-GENEALOGY mode (-r0, -v), # genealogies to load from file(s) -->
	<name>specify_runduration3</name>
		<attributes>
			<prompt>Number of genealogies to load from file</prompt>
			<precond>
				<language>perl</language>
<!-- fix this when the lists are refactored -->
				<code>$run_option0</code>
			</precond>
			<format>
				<language>perl</language>
				<code>defined $value ? "-L $value":""</code>
			</format>
			<group>30</group>
			<ctrls>
				<ctrl>
					<message>Please choose the number of genealogies to load from file</message>
					<language>perl</language>
					<code>$run_option0 &amp;&amp; !defined $specify_runduration3</code>
				</ctrl>
			</ctrls>
			<comment>
			<value>The (number of geneologies to save) x (-d) value sets the # of steps in the chain after burnin</value>
			</comment>
		</attributes>
	</parameter> 
			
</parameters>
</paragraph>
</parameter>
		
<!--  -p  Output options: 
    0 Turn off trend plots in outfile (default is to print trend plots)
    1 Turn off plots of marginal curves in outfile (default is to print marginal density plots)
    2 Print TMRCA histogram for each genealogy (MCMC mode only)
    3 Print histogram of splitting times divided by prior (do not use with -j0)
    4 Turn off printing estimates and histograms of population migration rate (2NM)
    5 Print pairwise probabilities that one parameter is greater than another 
    6 Print histograms of the number of migration events (do not use with -j0)
    7 Print joint estimate for splitting times (not with -j0, models with 3, 4 or 5 populations) -->
<parameter type="Paragraph">				
				<paragraph>
					<name>output_options</name>
					<prompt>Output Options</prompt>
					<parameters>	
					
	<parameter type="Switch"> 
	<name>output_option0</name>
		<attributes>
			<prompt>Turn off trend plots in outfile (-p0)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-p0":"" </code>
			</format> 
			<group>60</group>
		</attributes>
	</parameter>
		 
	<parameter type="Switch"> 
	<name>output_option1</name>
		<attributes>
			<prompt>Turn off plots of marginal curves in outfile (-p1)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-p1":"" </code>
			</format> 
			<group>60</group>
		</attributes>
	</parameter>	
	
	<parameter type="Switch"> 
	<name>output_option2</name>
		<attributes>
			<prompt>Print TMRCA histogram for each genealogy  (-p2)</prompt>
			<precond>
				<language>perl</language>
				<code>!$run_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-p2":"" </code>
			</format> 
			<group>60</group>
		</attributes>
	</parameter>
<!-- 	-->
	<parameter type="Switch"> 
	<name>output_option3</name>
		<attributes>
			<prompt>Print histogram of splitting times divided by prior (-p3)</prompt>
			<precond>
				<language>perl</language>
				<code>!$model_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-p3":"" </code>
			</format> 
			<group>60</group>
			<ctrls>
				<ctrl>
					<message>Sorry you cant use this option together with Population topology updating and estimation</message>
					<language>perl</language>
					<code>$model_option0 &amp;&amp; $model_option3</code>	
				</ctrl>
			</ctrls>
		</attributes>
	</parameter>

<!-- -u  Generation time in years - for use with -p3 (default is 1)  -->
	<parameter type="Float"> 
	<name>specify_gentime</name>
		<attributes>
			<prompt>Generation time in years (-u for use with -p3; default is 1) </prompt>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-u $value":"" </code>
			</format>
			<vdef>
				<value>1</value>
			</vdef>
			<group>60</group>
		</attributes>
	</parameter>
	
<!--  -y  Mutation rate scalar for relevant loci -for use with -p3 -->
	<parameter type="Integer"> 
	<name>specify_mutratescalar</name>
		<attributes>
			<prompt>Mutation rate scalar for relevant loci -for use with -p3 (-y) </prompt>
			<precond>
				<language>perl</language>
				<code>$output_option3</code>
			</precond>
			<format>
				<language>perl</language>
				<code>(defined $value) ? "-y $value":"" </code>
			</format>
			<group>60</group>
		</attributes>
	</parameter>
			
	<parameter type="Switch"> 
	<name>output_option4</name>
		<attributes>
			<prompt>Turn off printing estimates and histograms of population migration rate (-p4)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-p4":"" </code>
			</format>
			<group>60</group>
			<ctrls>
				<ctrl>
					<message>Please turn off extimates of 2NM (option -p4) to use a single migration parameter (-j5)</message>
					<language>perl</language>
					<code>!$output_option4 &amp;&amp; $model_option5</code>
				</ctrl>
			</ctrls> 
		</attributes>
	</parameter>

	<parameter type="Switch"> 
	<name>output_option5</name>
		<attributes>
			<prompt>Print pairwise probabilities that one parameter is greater than another (-p5)</prompt>
  			<format>
				<language>perl</language>
				<code>($value)? "-p5":"" </code>
			</format>
			<group>60</group> 
		</attributes>
	</parameter>
	
	<parameter type="Switch"> 
	<name>output_option6</name>
		<attributes>
			<prompt>Print histograms of the number of migration events (-p6)</prompt>
			<precond>
				<language>perl</language>
				<code>!$model_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-p6":"" </code>
			</format> 
			<group>60</group>
		</attributes>
	</parameter>
	
	<parameter type="Switch"> 
	<name>output_option7</name>
		<attributes>
			<prompt>Print joint estimate for splitting times (-p7)</prompt>
			<precond>
				<language>perl</language>
				<code>!$model_option0</code>
			</precond>
  			<format>
				<language>perl</language>
				<code>($value)? "-p7":"" </code>
			</format> 
			<group>60</group>
		</attributes>
	</parameter>
					
				</parameters>
			</paragraph>
		</parameter>
    
<parameter type="Results">
	<name>results</name>
	<attributes>
		<filenames>*</filenames>
	</attributes>
</parameter>

</parameters>
</pise>
