changeset 4:746e8e4bf929 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/datamash commit 384736acb5d2ae31d796c53031fad0e5da5424e3
author iuc
date Fri, 01 Jul 2022 16:18:07 +0000
parents 419027d822d6
children 4c07ddedc198
files datamash-ops.xml macros.xml test-data/na_values_input.tsv
diffstat 3 files changed, 29 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/datamash-ops.xml	Sun Apr 10 11:41:19 2022 +0000
+++ b/datamash-ops.xml	Fri Jul 01 16:18:07 2022 +0000
@@ -13,6 +13,7 @@
                 $need_sort
                 $print_full_line
                 $ignore_case
+                $narm
                 @FIELD_SEPARATOR@
                 #if str($grouping) != ''
                     --group '$grouping'
@@ -41,6 +42,7 @@
         <param argument="--header-out" type="boolean" truevalue="--header-out" falsevalue="" label="Print header line" />
         <param argument="--full" name="print_full_line" type="boolean" truevalue="--full" falsevalue="" label="Print all fields from input file" />
         <param argument="--ignore-case" type="boolean" truevalue="--ignore-case" falsevalue="" label="Ignore case when grouping" />
+        <param argument="--narm" type="boolean" truevalue="--narm" falsevalue="" label="Skip NA or NaN values" />
         <repeat name="operations" default="1" min="1" title="Operation to perform on each group">
             <param name="op_name" type="select" label="Type">
                 <option value="count">count</option>
@@ -123,6 +125,25 @@
                 </assert_contents>
             </output>
         </test>
+        <test><!-- test with a file containing NA and NaN values and the -narm parameter " -->
+            <param name="in_file" value="na_values_input.tsv" ftype="tabular" />
+            <param name="grouping" value="2" />
+            <param name="header_in" value="true" />
+            <param name="print_full_line" value="false" />
+            <param name="need_sort" value="true" />
+            <param name="narm" value="true" />
+            <repeat name="operations">
+                <param name="op_name" value="mean" />
+                <param name="op_column" value="3" />
+            </repeat>
+            <output name="out_file" ftype="tabular">
+                <assert_contents>
+                    <has_n_lines n="2"/>
+                    <has_line_matching expression="DE\t173.5"/>
+                    <has_line_matching expression="NL\t177.5"/>
+                </assert_contents>
+            </output>
+        </test>
     </tests>
     <help>
 <![CDATA[
--- a/macros.xml	Sun Apr 10 11:41:19 2022 +0000
+++ b/macros.xml	Fri Jul 01 16:18:07 2022 +0000
@@ -1,6 +1,6 @@
 <macros>
     <token name="@TOOL_VERSION@">1.1.0</token>
-    <token name="@VERSION_SUFFIX@">1</token>
+    <token name="@VERSION_SUFFIX@">2</token>
     <token name="@PROFILE@">21.01</token>
     <xml name="inputs_outputs">
         <inputs>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/na_values_input.tsv	Fri Jul 01 16:18:07 2022 +0000
@@ -0,0 +1,7 @@
+Name	Country	Height
+Alice	NL	178
+Bob	DE	165
+Charlie	NL	NA
+Doris	DE	182
+Eve	NL	177
+Francis	DE	NaN