diff snpSift_caseControl.xml @ 8:13b6ad2ddace

SnpEffect v3.2
author Jim Johnson <jj@umn.edu>
date Mon, 13 May 2013 12:45:07 -0500
parents ec16dae84230
children 937367efb1da
line wrap: on
line diff
--- a/snpSift_caseControl.xml	Thu Mar 28 12:29:45 2013 -0500
+++ b/snpSift_caseControl.xml	Mon May 13 12:45:07 2013 -0500
@@ -1,37 +1,50 @@
-<tool id="snpSift_caseControl" name="SnpSift CaseControl" version="3.1">
-	<description>Count samples are in 'case' and 'control' groups.</description>
-	<!-- 
-	    You will need to change the path to wherever your installation is.
-		You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
-	-->
-	<requirements>
-                <requirement type="package" version="3.1">snpEff</requirement>
-	</requirements>
-	<command>
-		java -Xmx1G -jar \$JAVA_JAR_PATH/SnpSift.jar caseControl -q $hhCase $hhControl '$caseControStr' $input > $output
-	</command>
-	<inputs>
-		<param format="vcf" name="input" type="data" label="VCF input"/>
-		<param name="hhCase" type="select" label="Hom/Het case">
-			<option value="any">Any</option>
-			<option value="hom">Homozygous</option>
-			<option value="het">Heterozygous</option>
-		</param>
-		<param name="hhControl" type="select" label="Hom/Het control">
-			<option value="any">Any</option>
-			<option value="hom">Homozygous</option>
-			<option value="het">Heterozygous</option>
-		</param>
-		<param name="caseControStr" type="text" label="Case / Control column designation" size="50">
-		<help>
-Case and control are defined by a string containing plus and minus symbols {'+', '-', '0'} where '+' is case, '-' is control and '0' is neutral
-		</help>
-		<validator type="regex" message="must be  only plus(+), minus(-), or zero(0) characters">[+-0]+</validator>
-                </param>
-	</inputs>
-	<outputs>
-		<data format="vcf" name="output" />
-	</outputs>
+<tool id="snpSift_caseControl" name="SnpSift CaseControl" version="3.2">
+  <description>Count samples are in 'case' and 'control' groups.</description>
+  <!-- 
+    You will need to change the path to wherever your installation is.
+    You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
+  -->
+  <requirements>
+                <requirement type="package" version="3.2">snpEff</requirement>
+  </requirements>
+  <command>
+    java -Xmx1G -jar \$JAVA_JAR_PATH/SnpSift.jar caseControl -q 
+    #if $name.__str__.strip() != '':
+      -name $name
+    #end if
+    #if $ctrl.ctrl_src == 'caseString':
+      '$ctrl.caseControlStr' 
+    #else
+      -tfam "$ctrl.tfam"
+    #end if
+    $input > $output
+  </command>
+  <inputs>
+    <param format="vcf" name="input" type="data" label="VCF input"/>
+    <conditional name="ctrl">
+      <param name="ctrl_src" type="select" label="Case Control defined in">
+        <option value="caseString">Case Control String</option>
+        <option value="tfam">TFAM</option>
+      </param>
+      <when value="caseString">
+        <param name="caseControlStr" type="text" label="Case / Control column designation" size="50">
+          <help>
+             Case and control are defined by a string containing plus and minus symbols {'+', '-', '0'} where '+' is case, '-' is control and '0' is neutral
+          </help>
+          <validator type="regex" message="must be  only plus(+), minus(-), or zero(0) characters">[+-0]+</validator>
+        </param>
+      </when>
+      <when value="tfam">
+        <param format="tabular" name="tfam" type="data" label="PLINK TFAM file"/>
+      </when>
+    </conditional>
+    <param name="name" type="text" optional="true" label="name" help="name to append to the 'Cases' or 'Controls' tags">
+        <validator type="regex" message="Use only valid ID characters">[_a-zA-Z0-9]+</validator>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="vcf" name="output" />
+  </outputs>
         <stdio>
           <exit_code range=":-1"  level="fatal"   description="Error: Cannot open file" />
           <exit_code range="1:"  level="fatal"   description="Error" />
@@ -40,43 +53,44 @@
 
             <test>
                 <param name="input" ftype="vcf" value="test.private.01.vcf"/>
-                <param name="hhCase" value="any"/>
-                <param name="hhControl" value="any"/>
-                <param name="caseControStr" value="--"/>
+                <param name="ctrl_src" value="caseString"/>
+                <param name="caseControlStr" value="--"/>
                 <output name="output">
                     <assert_contents>
-                        <has_text text="CaseControl=0/0,0/2;" />
+                        <has_text text="Cases=0,0,0;" />
+                        <has_text text="Controls=0,0,0;" />
                     </assert_contents>
                 </output>
             </test>
 
             <test>
                 <param name="input" ftype="vcf" value="test.private.02.vcf"/>
-                <param name="hhCase" value="any"/>
-                <param name="hhControl" value="any"/>
-                <param name="caseControStr" value="--"/>
+                <param name="ctrl_src" value="caseString"/>
+                <param name="caseControlStr" value="--"/>
                 <output name="output">
                     <assert_contents>
-                        <has_text text="CaseControl=0/0,2/0;" />
+                        <has_text text="Cases=0,0,0;" />
+                        <has_text text="Controls=2,0,4;" />
                     </assert_contents>
                 </output>
             </test>
 
             <test>
                 <param name="input" ftype="vcf" value="test.private.02.vcf"/>
-                <param name="hhCase" value="any"/>
-                <param name="hhControl" value="any"/>
-                <param name="caseControStr" value="-+"/>
+                <param name="name" value=""/>
+                <param name="ctrl_src" value="caseString"/>
+                <param name="caseControlStr" value="-+"/>
                 <output name="output">
                     <assert_contents>
-                        <has_text text="CaseControl=1/0,1/0;" />
+                        <has_text text="Cases=1,0,2;" />
+                        <has_text text="Controls=1,0,2;" />
                     </assert_contents>
                 </output>
             </test>
 
         </tests>
 
-	<help>
+  <help>
 
 **SnpSift CaseControl**
 
@@ -107,5 +121,5 @@
 
 For details about this tool, please go to http://snpeff.sourceforge.net/SnpSift.html#casecontrol
 
-	</help>
+  </help>
 </tool>