<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pise PUBLIC "pise2.dtd" "pise2.dtd" >
<pise>
	<head>
		<title>IMgc on XSEDE</title>
		<version>1.0</version>
		<description>Extract optimal recombination-filtered blocks (no four-gamete violations) from recombination-rich genomic re-sequence data</description>
		<authors>Woerner, A. E., Cox, M. P., and Hammer, M. F.</authors>
		<reference>
Woerner, A. E., Cox, M. P., and Hammer, M. F. (2007) Recombination-filtered genomic datasets by information maximization. Bioinformatics 23, 1851-1853. 10.1093/bioinformatics/btm253			
		</reference>
		<category>Phylogeny / Alignment</category>
	</head>
	
	<command>imgc_xsede</command>
	   
<!--
*****************************************************************************************************************************************
Created by Mark Miller for CSG, 7_1_2016 or thereabouts.
*****************************************************************************************************************************************
Doh! Usage is: IMgc.pl name_of_fasta_file(s)
                (-w) [weeds out individuals; maintains original sequence length (fast)]
                (-s) [weeds out both individuals and sites; makes the largest block possible; (slow)]
                (-i 1.1 [weights keeping individuals. Default = 1. Weights keeping individuals vs keeping sites]
                (-o 0 [omits the nth id from your fasta file when optimizing the region, but tacks them back on in the output]
                (-p 0 [preserves the pth id from your fasta file no matter what]
                (-f) [prints output in fasta format (not IM)]
 -->
 

<parameters> 
<!-- -->
					<parameter ismandatory="1" ishidden="1" type="String">
						<name>imgc_expanse</name>
						<attributes>
							<format>
								<language>perl</language>		
								<code>"/expanse/projects/ngbt/opt/expanse/IMgc/IMgc.pl"</code>
							</format>
							<group>0</group>
						</attributes>
					</parameter>	
<!-- For any tool that you don’t want our system to save stdout/stderr, 
you will need to pass a flag no_stdout_saved or no_stdderr_saved (or both) 
through scheduler.conf,  I can then change the submit script accordingly. -->
		<parameter type="String" ishidden="1" >
			<name>number_nodes_patlt10000</name>
			<attributes>
				<group>2</group>
				<paramfile>scheduler.conf</paramfile>
					<format>
						<language>perl</language>
						<code>
									"ChargeFactor=1.0\\n" .
									"no_stdout_saved=1\\n" .
									"mem=5G\\n" .
									"nodes=1\\n" .
									"node_exclusive=0\\n" .
									"threads_per_process=1\\n"
						</code>
					</format>
			</attributes>
		</parameter>
		
<!-- input file specification -->
<!-- the input file to be operated on ends the command line -->
		<parameter issimple="1" ismandatory="1" isinput="1" type="Sequence">
			<name>infile</name>
			<attributes>
				<prompt>Input File (must be in fasta format)</prompt>
				<format>
					<language>perl</language>
					<code>"infile.fas"</code>
				</format>
				<group>5</group>
<!-- this file designator seems to come at the end of the command string, so we set if for 99 currently -->
				<filenames>infile.fas</filenames>
			</attributes>
		</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>
		
<!-- 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 for non-gpu; 120 for gpu jobs)</prompt>
					
						<format>
							<language>perl</language>
							<code>"runhours=$value\\n"</code>
						</format>
						<vdef>
							<value>0.5</value>
						</vdef>
						<ctrls>										
							<ctrl>
								<message>The maximum runtime can be no more than 168 hours</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>	
						<warns>
							<warn>
								<message>The job will run on 1 processors as configured. If it runs for the entire configured time, it will consume 1 X $runtime cpu hours</message>
								<language>perl</language>
								<code>$runtime &gt; 0</code>
							</warn>
						</warns>
						<comment>
<value>Estimate the maximum time your job will need to run. We recommend testimg initially with a &lt; 0.5hr test run because Jobs set for 0.5 h or less dependably 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>
				
	
<!--            (-w) [weeds out individuals; maintains original sequence length (fast)]
                (-s) [weeds out both individuals and sites; makes the largest block possible; (slow)]
                (-i 1.1 [weights keeping individuals. Default = 1. Weights keeping individuals vs keeping sites]
                (-o 0 [omits the nth id from your fasta file when optimizing the region, but tacks them back on in the output]
                (-p 0 [preserves the pth id from your fasta file no matter what]
                (-f) [prints output in fasta format (not IM)] -->
			<parameter issimple="1" ishidden="0" type="Switch">
			<name>maintain_seqlength</name>
			<attributes>
				<prompt>Weed out individuals; maintains original sequence length (fast; -w)</prompt>
				<format>
					<language>perl</language>
					<code>$value ? "-w":""</code>
				</format>
				<vdef>
					<value>0</value>				
				</vdef>
				<group>10</group>
				<comment>
<value></value>
				</comment>
			</attributes>
		</parameter>
		
		<parameter issimple="1" ishidden="0" type="Switch">
			<name>weed_individandsites</name>
			<attributes>
				<prompt>Weed out both individuals and sites; make the largest block possible; (slow, -s)]</prompt>
				<format>
					<language>perl</language>
					<code>$value ? "-s":""</code>
				</format>
				<vdef>
					<value>1</value>				
				</vdef>
				<group>11</group>
				<comment>
<value></value>
				</comment>
			</attributes>
		</parameter>
		
		<parameter issimple="1" ishidden="0" type="Float">
			<name>weight_keepindivid</name>
			<attributes>
				<prompt>Weight keeping individuals -i </prompt>
				<format>
					<language>perl</language>
					<code>(defined $value) ? "-i $value":""</code>
				</format>
				<vdef>
					<value>1</value>				
				</vdef>
				<group>12</group>
				<comment>
<value></value>
				</comment>
			</attributes>
		</parameter>
		
<!-- (-o 0 [omits the nth id from your fasta file when optimizing the region, but tacks them back on in the output] -->
		<parameter issimple="1" ishidden="0" type="Integer">
			<name>omit_nthid</name>
			<attributes>
				<prompt>Omit the nth id from the fasta file when optimizing </prompt>
				<format>
					<language>perl</language>
					<code>(defined $value) ? "-o $value":""</code>
				</format>
				<group>13</group>
				<comment>
<value>Omits the nth id from your fasta file when optimizing the region, but tacks them back on in the output</value>
				</comment>
			</attributes>
		</parameter>
		
<!-- (-p 0 [preserves the pth id from your fasta file no matter what] -->
		<parameter issimple="1" ishidden="0" type="Integer">
			<name>preserve_pthid</name>
			<attributes>
				<prompt>Preserve the pth id </prompt>
				<format>
					<language>perl</language>
					<code>(defined $value) ? "-p $value":""</code>
				</format>
				<group>14</group>
				<comment>
<value>Preserves the pth id from your fasta file no matter what</value>
				</comment>
			</attributes>
		</parameter>
		
<!--  (-f) [prints output in fasta format (not IM)] -->
		<parameter issimple="1" ishidden="0" type="Switch">
			<name>print_fatsaformat</name>
			<attributes>
				<prompt>Print the output in fasta format (-f)</prompt>
				<format>
					<language>perl</language>
					<code>($value) ? "-f":""</code>
				</format>
				<vdef>
					<value>1</value>
				</vdef>
				<group>16</group>
				<comment>
<value></value>
				</comment>
			</attributes>
		</parameter>

</parameters>
</pise>


