changeset 1:8750c3125ec5 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/join_files_on_column_fuzzy commit b1763d10a1c39bc6651be891a993989c5a5617ff
author bgruening
date Fri, 01 Dec 2017 16:26:59 -0500
parents 64469e7ecf9f
children f2068690addc
files join_files_on_column_fuzzy.xml
diffstat 1 files changed, 23 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/join_files_on_column_fuzzy.xml	Sun Nov 26 16:13:51 2017 -0500
+++ b/join_files_on_column_fuzzy.xml	Fri Dec 01 16:26:59 2017 -0500
@@ -3,7 +3,7 @@
         on column allowing a small difference
     </description>
     <requirements>
-        <requirement type="package" version="3.6">python</requirement> 
+        <requirement type="package" version="3.6">python</requirement>
     </requirements>
     <command>
     <![CDATA[
@@ -15,16 +15,16 @@
 --outfile '$merged_file'
 $header
 $add_distance
-#if $merge_mode.merge_mode_select == 'closest':
+#if $merge_mode_select == 'closest':
     --closest
-#else:
-    --distance $merge_mode.distance
-    --unit $merge_mode.units
-#end if
+#end if:
+--distance $distance
+--unit $units
+
     ]]>
     </command>
     <inputs>
-        <param argument="--f1" type="data" optional="true" format="tabular" label="1st file"
+	<param argument="--f1" type="data" optional="true" format="tabular" label="1st file"
             help=""/>
         <param argument="--c1" type="data_column" data_ref="f1" label="Column to use from 1st file" help="The file needs to be sorted by this column, ascending."/>
         <param argument="--f2" type="data" optional="true" format="tabular" label="2nd file"
@@ -34,21 +34,16 @@
         <param argument="--header" type="boolean" checked="false" truevalue="--header" falsevalue="" label="Does the input files contain a header line" />
         <param argument="--add_distance" type="boolean" checked="false" truevalue="--add_distance" falsevalue="" label="Add an addional column with the calculated distance." />
 
-        <conditional name="merge_mode">
-            <param name="merge_mode_select" type="select" label="Choose the mode of merging.">
-                <option value="closest" selected="True">Best match (in case of multiple best matches, only the first one is reported)</option>
-                <option value="distance">Matching with a defined distance</option>
-            </param>
-            <when value="closest"/>
-            <when value="distance">
-                <param name="units" display="radio" type="select" value="ppm_value" label="Choose the metrics of your distance"
-                    help="ppm is useful for very small differences">
-                        <option value="absolute" selected="True">Absolute distance</option>
-                        <option value="ppm" >Distance in ppm</option>
-                </param>
-                <param name="distance" value="0.2" type="float" label="Allowed distance between the two values that will trigger a merge" help=""/>
-            </when>
-        </conditional>
+        <param name="merge_mode_select" type="select" label="Choose the mode of merging.">
+            <option value="closest" selected="True">Best match (in case of multiple best matches, only the first one is reported)</option>
+            <option value="distance">Matching with a defined distance</option>
+        </param>
+        <param name="units" display="radio" type="select" value="ppm_value" label="Choose the metrics of your distance"
+            help="ppm is useful for very small differences">
+            <option value="absolute" selected="True">Absolute distance</option>
+            <option value="ppm" >Distance in ppm</option>
+        </param>
+        <param name="distance" value="0.2" type="float" label="Allowed distance between the two values that will trigger a merge" help=""/>
     </inputs>
     <outputs>
         <data name="merged_file" format="tabular" />
@@ -82,7 +77,7 @@
             <param name="c1" value="1"/>
             <param name="c2" value="1"/>
             <param name="header" value="true"/>
-            <param name="closest" value="true"/>
+            <param name="merge_mode_select" value="closest"/>
             <output name="merged_file" file="header_closest_result3.tab" />
         </test>
         <test>
@@ -123,14 +118,14 @@
 <![CDATA[
 
 Join two files on a common column. It is possible to provide an allowed difference between both values (currently only numbers)
-as the absolute differece or as PPM. 
+as the absolute differece or as PPM.
 
-Two modes are available: 
+Two modes are available:
 
-1. In the **best match** mode only the rows are merged for the most similar (or identical) values. In case of multiple best matches, only the first one is reported.
+  1. In the **best match** mode only the rows are merged for the most similar (or identical) values. In case of multiple best matches, only the first one is reported.
 
-1. The **Matching with a defined distance** option will offer you the possibility
-to provide a distance between the two values of the columns. Is the calculates distance smaller or equal than the given distance the columns will be joined. You can specify the allowed distance as an absolute distance or as PPM.
+  2. The **Matching with a defined distance** option will offer you the possibility
+     to provide a distance between the two values of the columns. Is the calculates distance smaller or equal than the given distance the columns will be joined. You can specify the allowed distance as an absolute distance or as PPM.
 
 
 ]]>
@@ -138,4 +133,3 @@
     <citations>
     </citations>
 </tool>
-