comparison concat.xml @ 0:cd31fe25d6ac draft default tip

"planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
author nml
date Tue, 19 May 2020 17:11:07 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:cd31fe25d6ac
1 <tool id="csvtk_concat" name="csvtk-concatenate" version="@VERSION@+@GALAXY_VERSION@">
2 <description> concatenate CSV/TSV files by rows</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements" />
7 <expand macro="version_cmd" />
8 <command detect_errors="exit_code"><![CDATA[
9
10 ###################
11 ## Start Command ##
12 ###################
13
14 csvtk concat --num-cpus "\${GALAXY_SLOTS:-1}"
15
16 ## Add additional flags as specified ##
17 #######################################
18 $ignore_case
19 $global_param.illegal_rows
20 $global_param.empty_rows
21 $global_param.header
22 $global_param.lazy_quotes
23
24 ## Set Tabular input/output flag if first input is tabular ##
25 #############################################################
26 #if $in_1[0].is_of_type("tabular"):
27 -t -T
28 #end if
29
30 ## Set input files ##
31 #####################
32 #for $file in $in_1:
33 '$file'
34 #end for
35
36 ## Fill unmatched ##
37 ####################
38 #if $fill.select == 'yes'
39 -u '$fill.fill_value'
40 #end if
41
42 ## To output ##
43 ###############
44 > concat
45
46 ]]></command>
47 <inputs>
48 <expand macro="multi_input" />
49 <conditional name="fill">
50 <param name="select" type="select" label="Fill unmatched columns?">
51 <option value="yes">Yes</option>
52 <option value="no">No</option>
53 </param>
54 <when value="yes">
55 <param name="fill_value" type="text" value="-" argument="-u"
56 optional="false"
57 label="Fill string"
58 help="Input character string that will fill unmatched columns. The ' character is not allowed">
59 <expand macro="text_sanitizer" />
60 </param>
61 </when>
62 <when value="no" />
63 </conditional>
64 <expand macro="ignore_case" />
65 <expand macro="global_parameters" />
66 </inputs>
67 <outputs>
68 <data format_source="in_1" name="concat" from_work_dir="concat" label="${in_1[0].name} concatenated" />
69 </outputs>
70 <tests>
71 <test>
72 <param name="in_1" value="test.csv,other.csv,another.csv" />
73 <conditional name="fill">
74 <param name="select" value="no" />
75 </conditional>
76 <output name="concat" file="concat_2.csv" />
77 </test>
78 <test>
79 <param name="in_1" value="test.csv,other.csv,another.csv" />
80 <output name="concat" file="concat_1.csv" />
81 </test>
82 </tests>
83 <help><![CDATA[
84
85 Csvtk - Collapse Help
86 ---------------------
87
88 Info
89 ####
90
91 Csvtk concatenate CSV/TSV files by rows
92
93 **Order is important to input and the first file input will determine the header names!**
94
95 .. class:: warningmark
96
97 Single quotes are not allowed in text inputs!
98
99 @HELP_INPUT_DATA@
100
101
102 Usage
103 #####
104
105 To run csvtk-concatenate, all you need is one or more valid (as defined above) CSV or TSV files (of the same type) to concatenate together.
106
107 **Example Concatenate**
108
109 ::
110
111 If you have the following two files:
112
113 +-------+--------+ +-------+------+
114 | Name | Colour | | Name | Food |
115 +=======+========+ + +=======+======+
116 | Steve | Blue | | Fred | Eggs |
117 +-------+--------+ +-------+------+
118 | Steve | Ham |
119 +-------+------+
120
121 -----------------------------------------------
122
123 They would concatenate to:
124
125 +-------+--------+
126 | Name | Colour |
127 +=======+========+
128 | Steve | Blue |
129 +-------+--------+
130 | Steve | |
131 +-------+--------+
132
133 If you want, you can fill the empty cell with any set of characters so long as it doesn't contain an apostraphe (')
134
135 ----
136
137 @HELP_COLUMNS@
138
139
140 @HELP_END_STATEMENT@
141
142
143 ]]></help>
144 <expand macro="citations" />
145 </tool>