<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pise PUBLIC "pise2.dtd" "pise2.dtd" >
<pise>
	<head>
		<title>GBLOCKS on ACCESS</title>
		<version>0.91b</version>
		<description>Selection of conserved blocks from multiple alignments for their use in phylogenetic analysis  - run on XSEDE</description>
		<authors>Jose Castresana</authors>
		<reference>
			 Talavera, G., and Castresana, J. (2007). Improvement of phylogenies after removing divergent and ambiguously aligned blocks from protein sequence alignments. Systematic Biology 56, 564-577.
		</reference>
		<reference>
			Castresana, J. (2000). Selection of conserved blocks from multiple alignments for their use in phylogenetic analysis. Molecular Biology and Evolution 17, 540-552. 
		</reference>
		<category>Phylogeny / Alignment</category>
	</head>
	
	<command>gblocks_xsede</command>

<parameters>
<!-- original version by mamiller, around 6/22/2020 -->
<!-- 
Command line parameters

In Windows 95/98/NT and UNIX versions of the program all parameters can be entered in the command line.
The first parameter must always be the name of the alignment file or the pathnames file. If this is the only given parameter, the menu of the program is activated. For example:

    Gblocks nad3.pir

The next parameters are entered according to the letter of the corresponding menu item. They can be entered in any order. The list of all parameters is:
PARAMETER 	 		MEANING    
NAME			    (Default) 	      								ALLOWED VALUES

(None) 	   			Filename  
		           (No default)        							Alignment or pathnames file
		           
-t= 	 		Type Of Sequence								p, d, c
				(Protein, DNA, Codons) 
				
-b1= 	Minimum Number Of Sequences For A Conserved Position
          (50% of the number of sequences + 1) 					Any integer bigger than half the number of sequences and smaller or equal than the total number of sequences
-b2= 	Minimum Number Of Sequences For A Flank Position
			(85% of the number of sequences) 	                Any integer equal or bigger than Minimum Number Of Sequences For A Conserved Position
-b3= 	Maximum Number Of Contiguous Nonconserved Positions
					(8) 										Any integer
-b4= 	Minimum Length Of A Block
					(10) 										Any integer equal or bigger than 2
-b5= 	Allowed Gap Positions
				(None, With Half, All) 							n, h, a
-b6=		 		
(Only available for 		Use Similarity Matrices				y, n 
protein alignments; only 	(Yes, No) 	
visible in the extended 
block parameters menu)
						
-b0=
(This option does 
not appear in the menu) 	Minimum Length Of An Initial Block
							(Same as Minimum Length Of A Block) Any integer >= 2
-s= 							Selected Blocks
								(Yes, No) 						y, n

-p= 						Results And Parameters File
							(Yes, Text, Short Text, No) 		y, t, s, n
-v=
(Only visible in the		Characters Per Line In Results And Parameters File
 extended saving options) 			(60) 						Any integer > 50

-n=							Nonconserved Blocks
(Only visible in the 				(Yes, No) 						y, n
extended saving options) 	

-u=
(Only visible in the 		Ungapped Alignment
extended saving options) 	(Yes, No) 								y, n

-k=
(Only visible in the		Mask File With The Selected Blocks
extended saving options) 		(Yes, No) 							y, n

-d=
(Only visible in the 		Postscript File With The Selected Blocks
extended saving options) 		(Yes, No) 							y, n

############# Not supported ##############################################
-a=
(Only available with		Concatenated Blocks From Alignments In Batch
paths files) 					(Yes, No)							y, n

-c=
(Only available with 
paths files) 	Concatenated Input Alignments In Batch
(Yes, No) 	y, n
-w=
(Only available with paths files) 	Concatenated Ungapped Alignments In Batch
(Yes, No) 	y, n

-e= 						Generic File Extension
									(-gb) 						Any string with 5 or less characters

For example, the following command line will open an alignment file, insist in that the alignment type is Protein, change the Generic File Extension, set the Minimum Length Of A Block to 5 and ask to save the postscript file:

    Gblocks nad3.pir -t=p -e=-gb1 -b4=5 -d=y

Note for paths files. If one of the options a, c or w are set to yes (a concatenated file is to be saved) or parameters b1 or b2 (that are related to the number of sequences) are changed, then the paths file should contain all alignments with the same number or sequences; otherwise the program will stop.
 -->
	
<!--  submission on trestles: the invocation line and any needed thread specification  -->
					<parameter ismandatory="1" ishidden="1" type="String">
						<name>gblocks_invoke</name>
						<attributes>
							<format>
								<language>perl</language>		
								<code>"<![CDATA[/expanse/projects/ngbt/opt/expanse/gblocks/Gblocks_0.91b/gblocks]]>"</code>
							</format>
							<group>0</group>
						</attributes>
					</parameter>							
					
<!-- 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.  --> 
	
<!-- 1 shared node and 2 threads for all jobs  -->									
				<parameter type="String" ishidden="1" >
					<name>number_nodes</name>
					<attributes>
						<precond>
							<language>perl</language>
							<code>!$more_memory</code>
						</precond>
						<group>2</group>
						<paramfile>scheduler.conf</paramfile>
						<format>
							<language>perl</language>
							<code>
									"nodes=1\\n" .
									"node_exclusive=0\n" .
									"mem=2G\\n" .
									"threads_per_process=1\\n"
							</code>
						</format>
					</attributes>
				</parameter>
<!-- end number of nodes  -->	

<!-- 1 shared node and 2 threads for all jobs  								
				<parameter type="String" ishidden="1" >
					<name>number_nodes2</name>
					<attributes>
						<precond>
							<language>perl</language>
							<code>$more_memory</code>
						</precond>
						<group>2</group>
						<paramfile>scheduler.conf</paramfile>
						<format>
							<language>perl</language>
							<code>
									"nodes=1\\n" .
									"node_exclusive=1\n" .
									"threads_per_process=1\\n"
							</code>
						</format>
					</attributes>
				</parameter>-->	
<!-- end number of nodes  -->	

<!-- 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 (AFA format)</prompt>
				<format>
					<language>perl</language>
					<code>"input.fasta"</code>
				</format>
				<group>1</group>
<!-- the file designator must come first -->
				<filenames>input.fasta</filenames>
			</attributes>
		</parameter>
	
		<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>
						<prompt>Maximum Hours to Run (up to 168 hours)</prompt>
						<paramfile>scheduler.conf</paramfile>
						<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 1 processors as configured. If it runs for the entire configured time, it will consume $runtime cpu hours</message>
								<language>perl</language>
								<code>$runtime ne 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 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>
<!-- -t= 	 		Type Of Sequence								p, d, c
				(Protein, DNA, Codons) 
				 -->
				<parameter issimple="1" ismandatory="1" type="Excl">
					<name>datatype</name>
					<attributes>
						<prompt>Type of sequence (-t)</prompt>
						<vlist>
							<value>DNA</value>
							<label>DNA</label>
							<value>CODON</value>
							<label>Codon</label>
							<value>PROTEIN</value>
							<label>Protein</label>
						</vlist>
						<flist>
							<value>DNA</value>
							<code>"-t=d"</code>
							<value>CODON</value>
							<code>"-t=c"</code>
						    <value>PROTEIN</value>
							<code>"-t=p"</code>
						</flist>
						<ctrls>
							<ctrl>
								<message>Please choose a sequence type</message>
								<language>perl</language>
								<code>!defined $datatype</code>
							</ctrl>
						</ctrls>						
						<group>2</group>
					</attributes>
				</parameter>
				
<!-- geenric file extension -->
				<parameter issimple="1"  type="String">
					<name>specify_fileextens</name>
					<attributes>
						<prompt>Specify a file extension (-e)</prompt>
						<format>
							<language>perl</language>
							<code>($value ne $vdef) ? "-e=$value":""</code>
						</format>
						<vdef>
							<value>-gb</value>
						</vdef>
						<group>30</group>
	<!-- 				<comment>
<value>Any integer equal or bigger than Minimum Number Of Sequences For A Conserved Position</value>
						</comment> -->	
					</attributes>
				</parameter>	
						
<!-- -b1= 	Minimum Number Of Sequences For A Conserved Position
          (50% of the number of sequences + 1) 	Any integer bigger than half the number of sequences and smaller or equal than the total number of sequences -->
				<parameter issimple="1" type="Integer">
					<name>num_seqconserved</name>
					<attributes>
						<prompt>Minimum Number Of Sequences For A Conserved Position (-b1)</prompt>
						<format>
							<language>perl</language>
							<code>(defined $value) ?  "-b1=$value":"" </code>
						</format>
						<group>4</group>
						<comment>
<value>This can be any integer bigger than half the number of sequences and smaller or equal than the total number of sequences</value>
						</comment>
					</attributes>
				</parameter>

<!-- -b2= Minimum Number Of Sequences For A Flank Position
(85% of the number of sequences) Any integer equal or bigger than Minimum Number Of Sequences For A Conserved Position-->

				<parameter issimple="1"  type="Integer">
					<name>specify_cutoff</name>
					<attributes>
						<prompt>Minimum Number Of Sequences For A Flank Position (-b2)</prompt>
						<format>
							<language>perl</language>
							<code>(defined $value) ? "-b2=$value":""</code>
						</format>
						<group>6</group>
						<ctrls>
							<ctrl>
								<message>The number of sequences for a flank position must be greater than or equal to the minimum number of sequences for a conserved position</message>
								<language>perl</language>
								<code>defined $value &amp;&amp; $specify_cutoff &lt; $num_seqconserved</code>
							</ctrl>
						</ctrls>
						<comment>
<value>Any integer equal or bigger than Minimum Number Of Sequences For A Conserved Position</value>
						</comment>
					</attributes>
				</parameter>	
			

<!-- -b3= 	Maximum Number Of Contiguous Nonconserved Positions (8) Any integer -->
			<parameter issimple="1" type="Integer">
					<name>max_contignonconvserved</name>
					<attributes>
						<prompt>Maximum Number Of Contiguous Nonconserved Positions (-b3)</prompt>
						<format>
							<language>perl</language>
							<code>($max_contignonconvserved != $vdef) ? " -b3=$value ":""</code>
						</format>
						<group>8</group>
						<vdef>
							<value>8</value>
						</vdef>
					</attributes>
				</parameter>
				
<!-- -b4= 	Minimum Length Of A Block (10) 	Any integer equal or bigger than 2 -->
			<parameter issimple="1" type="Integer">
					<name>min_blocklength</name>
					<attributes>
						<prompt>Minimum Length Of A Block (-b4)</prompt>
						<format>
							<language>perl</language>
							<code>($min_blocklength != $vdef) ? "-b4=$value":""</code>
						</format>
						<vdef>
							<value>10</value>
						</vdef>
						<group>10</group>
  						<ctrls>
							<ctrl>
								<message>The minimum length of a block must be 2 or greater</message>
								<language>perl</language>
								<code>defined $min_blocklength &amp;&amp; $min_blocklength &lt; 2 </code>
							</ctrl>
						</ctrls> 
					</attributes>
				</parameter>
				
<!-- -b5= 	Allowed Gap Positions (None, With Half, All) 							n, h, a -->
			<parameter issimple="1" ismandatory="1" type="Excl">
					<name>specify_allowedgaps</name>
					<attributes>
						<prompt>Allowed Gap Positions (-b5)</prompt>
						<format>
							<language>perl</language>
							<code>$value ne $vdef ? "-b5=$value":""</code>
						</format>
						<vlist>
							<value>n</value>
							<label>None</label>
							<value>h</value>
							<label>With Half</label>
							<value>a</value>
							<label>All</label>
						</vlist>
						<vdef>
							<value>n</value>
						</vdef>
						<group>12</group>
					</attributes>
				</parameter>
				
<!--  -b6=		(Only available for protein alignments		Use Similarity Matrices				y, n 
 	(Yes, No) -->		
			<parameter issimple="1" type="Switch">
					<name>use_similarity</name>
					<attributes>
						<prompt>Use Similarity Matrices (Protein only; -b6)</prompt>
						<precond>
							<language>perl</language>
							<code>$datatype eq "PROTEIN"</code>
						</precond>
						<format>
							<language>perl</language>
							<code>($value) ? "-b6=y":""</code>
						</format>
						<vdef>
							<value>1</value>
						</vdef>
						<group>14</group>
					</attributes>
				</parameter>

<!-- -b0= Minimum Length Of An Initial Block (Same as Minimum Length Of A Block) Any integer >= 2 -->
				<parameter issimple="1" type="Integer">
					<name>min_initialblock</name>
					<attributes>
						<prompt>Minimum Length Of An Initial Block (-b0)</prompt>
						<format>
							<language>perl</language>
							<code>(defined $value) ? "-b0=$value":""</code>
						</format>
						<group>16</group>
  						<ctrls>
							<ctrl>
								<message>The minimum length of the initial block must be 2 or greater</message>
								<language>perl</language>
								<code>defined $min_initialblock &amp;&amp; $min_initialblock &lt; 2 </code>
							</ctrl>
						</ctrls>
						<comment>
<value>This will be the same as the minimum length of a block by default</value>
						</comment>
					</attributes>
				</parameter>
				
<!--  -s= 	Selected Blocks (Yes, No) 	y, n -->
			<parameter issimple="1" type="Switch">
					<name>specify_selectedblocks</name>
					<attributes>
						<prompt>Selected Blocks	(-s)</prompt>
						<format>
							<language>perl</language>
							<code>($value) ? "-s=y":""</code>
						</format>
						<vdef>
							<value>1</value>
						</vdef>
						<group>18</group>
					</attributes>
				</parameter>

<!-- n=		Nonconserved Blocks (Yes, No) 	y, n -->
			<parameter issimple="1"  type="Switch">
					<name>specify_nonconservedblocks</name>
					<attributes>
						<prompt>Nonconserved Blocks	(-n)</prompt>
						<format>
							<language>perl</language>
							<code>$specify_nonconservedblocks ? "-n=y":""</code>
						</format>
						<vdef>
							<value>0</value>
						</vdef>
						<group>20</group>
					</attributes>
				</parameter>
				
<!--  -u= 	Ungapped Alignment (Yes, No)	y, n -->
			<parameter issimple="1" type="Switch">
					<name>specify_ungapped</name>
					<attributes>
						<prompt>Ungapped Alignment (-u)</prompt>
						<format>
							<language>perl</language>
							<code>($specify_ungapped) ? "-u=y":""</code>
						</format>
						<vdef>
							<value>0</value>
						</vdef>
						<group>22</group>
					</attributes>
				</parameter>
				
<!--  -k= Mask File With The Selected Blocks (Yes, No) 							y, n -->
			<parameter issimple="1" type="Switch">
					<name>specify_maskfile</name>
					<attributes>
						<prompt>Selected Blocks	(-k)</prompt>
						<format>
							<language>perl</language>
							<code>($specify_maskfile) ? "-k=y":""</code>
						</format>
						<vdef>
							<value>0</value>
						</vdef>
						<group>24</group>
					</attributes>
				</parameter>
				
<!--  -p= Results And Parameters File	(Yes, Text, Short Text, No)	y, t, s, n -->
			<parameter issimple="1" ismandatory="1" type="Excl">
					<name>specify_resultsfile</name>
					<attributes>
						<prompt>Results And Parameters File (-p)</prompt>
						<vlist>
							<value>y</value>
							<label>Yes</label>
							<value>t</value>
							<label>Text</label>
							<value>s</value>
							<label>Short Text</label>
							<value>n</value>
							<label>No</label>
						</vlist>
						<format>
							<language>perl</language>
							<code>"-p=$value "</code>
						</format>
						<vdef>
							<value>y</value>
						</vdef>
						<group>26</group>
					</attributes>
				</parameter>	

<!-- -v= Characters Per Line In Results And Parameters File
 			(60) 						Any integer > 50 -->					
				<parameter issimple="1" type="Integer">
					<name>configure_resultsfile</name>
					<attributes>
						<prompt>Characters Per Line In Results And Parameters File (-v)</prompt>
						<format>
							<language>perl</language>
							<code>($configure_resultsfile != $vdef) ? " -v=$value ":""</code>
						</format>
						<vdef>
							<value>60</value>
						</vdef>
						<group>28</group>
 					<ctrls>
							<ctrl>
								<message>The minimum characters per Line in results and parameters file is 50</message>
								<language>perl</language>
								<code>defined $configure_resultsfile &amp;&amp; $configure_resultsfile &lt; 50 </code>
							</ctrl>
						</ctrls> 
					</attributes>
				</parameter>	
						
<!-- -d= Postscript File With The Selected Blocks y, n  -->				
			<parameter issimple="1"  type="Switch">
					<name>specify_postscriptfile</name>
					<attributes>
						<prompt>Postscript File With The Selected Blocks	(-d)</prompt>
						<format>
							<language>perl</language>
							<code>$specify_postscriptfile ? "-d=y":""</code>
						</format>
						<vdef>
							<value>0</value>
						</vdef>
						<group>30</group>
					</attributes>
				</parameter>

</parameters>
</pise>


