changeset 6:2b3e65a4252f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 693e1a3641c776965f68d688c8e1409adba7da1e
author iuc
date Wed, 16 Jan 2019 15:35:26 -0500
parents 09d6806c609e
children 2e497a770bca
files snpSift_annotate.xml test-data/db_test_1.vcf
diffstat 2 files changed, 44 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/snpSift_annotate.xml	Wed Apr 18 07:28:51 2018 -0400
+++ b/snpSift_annotate.xml	Wed Jan 16 15:35:26 2019 -0500
@@ -1,4 +1,4 @@
-<tool id="snpSift_annotate" name="SnpSift Annotate" version="@WRAPPER_VERSION@.galaxy0">
+<tool id="snpSift_annotate" name="SnpSift Annotate" version="@WRAPPER_VERSION@.galaxy1">
     <description>SNPs from dbSnp</description>
     <!--
         You can change the amount of memory used, just change the -Xmx parameter (e.g. use -Xmx2G for 2Gb of memory)
@@ -11,10 +11,9 @@
     <expand macro="version_command" />
     <command><![CDATA[
 SnpSift -Xmx8G annotate
-#if $annotate.id == 'id':
-    -id
-#elif str($annotate.info_ids).strip() != '':
-    -info "$annotate.info_ids"
+${annotate.no_info}
+#if str($annotate.info_ids).strip():
+    -info '$annotate.info_ids'
 #end if
 -q '$dbSnp' '$input' > '$output'
     ]]></command>
@@ -23,14 +22,16 @@
         <param name="dbSnp" type="data" format="vcf" label="VCF File with ID field annotated (e.g. dbSNP.vcf)"
             help="The ID field for a variant in input will be assigned from a matching variant in this file."/>
         <conditional name="annotate">
-            <param name="id" type="select" label="Fields to annotate">
-                <option value="id">Only annotate ID field (no INFO fields will be added)</option>
-                <option value="info">Add also INFO fields</option>
+            <param name="no_info" type="select" label="Fields to annotate">
+                <option value="-noInfo">Only annotate ID field (no INFO fields will be added)</option>
+                <option value="">Add also INFO fields</option>
             </param>
-            <when value="id"/>
-            <when value="info">
+            <when value="-noInfo">
+                <param name="info_ids" type="hidden" value="" />
+            </when>
+            <when value="">
                 <param name="info_ids" type="text" value="" label="Limit INFO annotation to these INFO IDs" help="List is a comma separated list of fields. When blank, all INFO fields are included">
-                    <validator type="regex" message="IDs separted by commas">^(([a-zA-Z][a-zA-Z0-9_-]*)(,[a-zA-Z][a-zA-Z0-9_-]*)*)?$</validator>
+                    <validator type="regex" message="IDs separated by commas">^(([a-zA-Z][a-zA-Z0-9_-]*)(,[a-zA-Z][a-zA-Z0-9_-]*)*)?$</validator>
                 </param>
             </when>
         </conditional>
@@ -42,10 +43,37 @@
         <test>
             <param name="input" ftype="vcf" value="annotate_1.vcf"/>
             <param name="dbSnp" ftype="vcf" value="db_test_1.vcf"/>
-            <param name="id" value="id"/>
+            <conditional name="annotate">
+                <param name="no_info" value=""/>
+            </conditional>
             <output name="output">
                 <assert_contents>
-                    <has_text text="rs76166080" />
+                    <has_line_matching expression="1&#009;872687&#009;rs76166080&#009;C&#009;G&#009;.&#009;.&#009;.+;.+" />
+                </assert_contents>
+            </output>
+        </test>
+        <test>
+            <param name="input" ftype="vcf" value="annotate_1.vcf"/>
+            <param name="dbSnp" ftype="vcf" value="db_test_1.vcf"/>
+            <conditional name="annotate">
+                <param name="no_info" value=""/>
+                <param name="info_ids" value="dbSNPBuildID" />
+            </conditional>
+            <output name="output">
+                <assert_contents>
+                    <has_line_matching expression="1&#009;872687&#009;rs76166080&#009;C&#009;G&#009;.&#009;.&#009;dbSNPBuildID=137" />
+                </assert_contents>
+            </output>
+        </test>
+        <test>
+            <param name="input" ftype="vcf" value="annotate_1.vcf"/>
+            <param name="dbSnp" ftype="vcf" value="db_test_1.vcf"/>
+            <conditional name="annotate">
+                <param name="no_info" value="-noInfo"/>
+            </conditional>
+            <output name="output">
+                <assert_contents>
+                    <has_line line="1&#009;872687&#009;rs76166080&#009;C&#009;G&#009;.&#009;.&#009;." />
                 </assert_contents>
             </output>
         </test>
@@ -53,7 +81,7 @@
     <help><![CDATA[
 This is typically used to annotate IDs from dbSnp.
 
-Annotatating only the ID field from dbSnp137.vcf ::
+Annotating only the ID field from dbSnp137.vcf ::
 
     Input VCF:
     CHROM  POS         ID           REF  ALT  QUAL   FILTER  INFO
@@ -67,7 +95,7 @@
     22      16346045    rs56234788   T    C    0.0    FAIL    NS=244
     22      16350245    rs2905295    C    A    0.0    FAIL    NS=192
 
-Annotatating both the ID and INFO fields from dbSnp137.vcf ::
+Annotating both the ID and INFO fields from dbSnp137.vcf ::
 
     Input VCF:
     #CHROM  POS         ID           REF  ALT  QUAL   FILTER  INFO
--- a/test-data/db_test_1.vcf	Wed Apr 18 07:28:51 2018 -0400
+++ b/test-data/db_test_1.vcf	Wed Jan 16 15:35:26 2019 -0500
@@ -1,1 +1,1 @@
-1	872687	rs76166080	C	G	0	.	.
+1	872687	rs76166080	C	G	0	.	dbSNPBuildID=137;PMC