diff find_in_reference.xml @ 2:30975b3ff0dc

Allow user to add annotation columns from reference to found input entries
author Jim Johnson <jj@umn.edu>
date Thu, 23 Jan 2014 10:52:30 -0600
parents 856033fb26e8
children fe044d480b3a
line wrap: on
line diff
--- a/find_in_reference.xml	Fri Jan 17 14:50:53 2014 -0600
+++ b/find_in_reference.xml	Thu Jan 23 10:52:30 2014 -0600
@@ -13,6 +13,15 @@
   #end if
   #if 'found' in $outputs.__str__:
     --filtered "$found"
+    #if $annotate.from_ref == 'yes' and str($annotate.annotation_columns) != 'None':
+      --annotation_columns $annotate.annotation_columns
+      #if $annotate.annotation_separator != '':
+        --annotation_separator '$annotate.annotation_separator'
+      #end if
+      #if $annotate.annotation_col_sep != '':
+        --annotation_col_sep '$annotate.annotation_col_sep'
+      #end if
+    #end if
   #end if
   </command>
   <inputs>
@@ -38,6 +47,21 @@
       <option value="novel" selected="true">lines with no match in reference</option>
       <option value="found">lines with match in reference</option>
     </param>
+    <conditional name="annotate">
+      <param name="from_ref" type="select" label="Annotate found input entries with columns from reference">
+        <option value="no" selected="true">No</option>
+        <option value="yes">Yes</option>
+      </param>
+      <when value="no"/>
+      <when value="yes">
+        <param name="annotation_columns" type="data_column" data_ref="reference" multiple="true" label="columns from reference to append to found input lines" 
+           help=""/>
+        <param name="annotation_separator" type="text" value="" optional="true" label="separator to place between annotations from different reference lines"
+           help="defaults to ;"/>
+        <param name="annotation_col_sep" type="text" value="" optional="true" label="separator to place between annotation columns from the same reference line"
+           help="defaults to ,"/>
+      </when>
+    </conditional>
   </inputs>
   <stdio>
     <exit_code range="1:" level="fatal" description="Error" />