diff convert.xml @ 0:2c55b0752ea7 draft default tip

"planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
author nml
date Tue, 19 May 2020 17:25:20 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/convert.xml	Tue May 19 17:25:20 2020 -0400
@@ -0,0 +1,100 @@
+<tool id="csvtk_convert" name="csvtk-convert" version="@VERSION@+@GALAXY_VERSION@">
+    <description> csv to tab or tab to csv</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="version_cmd" />
+    <command detect_errors="exit_code"><![CDATA[
+
+###################
+## Start Command ##
+###################
+
+#if $in_1.is_of_type("tabular"):
+    csvtk tab2csv --num-cpus "\${GALAXY_SLOTS:-1}"
+
+#else:
+    csvtk csv2tab --num-cpus "\${GALAXY_SLOTS:-1}"
+
+#end if
+
+    ## Add additional flags as specified ##
+    #######################################
+    $global_param.illegal_rows
+    $global_param.empty_rows
+    $global_param.header
+    $global_param.lazy_quotes
+
+    ## Set Input ##
+    ###############
+    '$in_1'
+
+    ## To output ##
+    ###############
+    #if $in_1.is_of_type("tabular")
+        > converted.csv
+
+    #else:
+        > converted.tsv
+
+    #end if
+
+    ]]></command>
+    <inputs>
+        <expand macro="singular_input" />
+        <expand macro="global_parameters" />
+    </inputs>
+    <outputs>
+        <data auto_format="true" name="converted" from_work_dir="converted*" label="${in_1.name} converted" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="in_1" value="XY_with_break.tabular" />
+            <section name="global_param">
+                <param name="empty_rows" value="true" />
+            </section>
+            <output name="converted" file="XY_converted.csv" />
+        </test>
+        <test>
+            <param name="in_1" value="XY_with_break.csv" />
+            <section name="global_param">
+                <param name="empty_rows" value="true" />
+            </section>
+            <output name="converted" file="XY_converted.tsv" />
+        </test>
+    </tests>
+    <help><![CDATA[
+    
+Csvtk - Convert Help
+--------------------
+
+Info
+####
+
+Csvtk convert converts csv files to tsv files and vice versa. 
+
+.. class:: note
+
+    Output CSV data may not be autodetected properly to CSV format and you may have to manually change the format after.
+
+
+@HELP_INPUT_DATA@
+
+
+Usage
+#####
+
+To run csvtk-convert, all you need is a valid (as defined above) CSV or TSV file
+
+----
+
+@HELP_COLUMNS@
+
+
+@HELP_END_STATEMENT@
+
+
+    ]]></help>
+    <expand macro="citations" />
+</tool>
\ No newline at end of file