annotate collapse.xml @ 0:7ff05a1ffdd7 draft default tip

"planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
author nml
date Tue, 19 May 2020 17:18:56 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
1 <tool id="csvtk_collapse" name="csvtk-collapse" version="@VERSION@+@GALAXY_VERSION@">
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
2 <description> one field with selected fields as keys</description>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
3 <macros>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
4 <import>macros.xml</import>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
5 </macros>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
6 <expand macro="requirements" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
7 <expand macro="version_cmd" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
8 <command detect_errors="exit_code"><![CDATA[
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
9
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
10 ###################
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
11 ## Start Command ##
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
12 ###################
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
13
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
14 csvtk collapse --num-cpus "\${GALAXY_SLOTS:-1}"
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
15
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
16 ## Add additional flags as specified ##
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
17 #######################################
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
18 $ignore_case
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
19 $global_param.illegal_rows
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
20 $global_param.empty_rows
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
21 $global_param.header
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
22 $global_param.lazy_quotes
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
23
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
24 ## Set Tabular input/output flag if input is tabular ##
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
25 #######################################################
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
26 #if $in_1.is_of_type("tabular"):
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
27 -t -T
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
28 #end if
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
29
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
30 ## Set Input ##
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
31 ###############
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
32 '$in_1'
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
33
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
34 ## Specify fields for collapse ##
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
35 #################################
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
36 -F -f '$column_text.in_text'
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
37
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
38 ## other ##
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
39 ###########
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
40 -v '$value_column.in_text'
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
41 -s '$separator'
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
42
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
43 ## To output ##
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
44 ###############
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
45 > collapsed
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
46
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
47 ]]></command>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
48 <inputs>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
49 <expand macro="singular_input" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
50 <expand macro="fields_input" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
51 <conditional name="value_column" >
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
52 <param type="select" name="select" label="Select value column to collapse based on" argument="-v">
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
53 <option value="string">Column Name</option>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
54 <option value="column">Column Number</option>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
55 </param>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
56 <when value="column">
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
57 <param type="data_column" name="in_text"
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
58 data_ref="in_1"
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
59 multiple="false"
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
60 label="Input column number"
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
61 help="Select column to collapse on"
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
62 />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
63 </when>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
64 <when value="string">
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
65 <param type="text" name="in_text"
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
66 optional="false"
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
67 label="Input column name"
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
68 help="Specify column name or number (ex. 1 for first column) to collapse on">
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
69 <expand macro="text_sanitizer" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
70 </param>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
71 </when>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
72 </conditional>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
73 <param name="separator" type="text" value="; " argument="-s"
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
74 optional="false"
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
75 label="Separator string"
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
76 help="Input string of characters that will separate collapsed columns. The ' character is not allowed">
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
77 <expand macro="text_sanitizer" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
78 </param>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
79 <expand macro="ignore_case" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
80 <expand macro="global_parameters" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
81 </inputs>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
82 <outputs>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
83 <data format_source="in_1" name="collapse" from_work_dir="collapsed" label="${in_1.name} with ${value_column.in_text} collapsed by ${column_text.in_text}" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
84 </outputs>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
85 <tests>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
86 <test>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
87 <param name="in_1" value="blood_type.tsv" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
88 <conditional name="column_text">
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
89 <param name="select" value="string" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
90 <param name="in_text" value="2" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
91 </conditional>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
92 <conditional name="value_column">
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
93 <param name="select" value="string" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
94 <param name="in_text" value="1" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
95 </conditional>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
96 <param name="separator" value="; " />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
97 <output name="collapse" file="collapsed.tsv" ftype="tabular" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
98 </test>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
99 <test>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
100 <param name="in_1" value="illegal.csv" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
101 <conditional name="column_text">
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
102 <param name="select" value="string" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
103 <param name="in_text" value="4" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
104 </conditional>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
105 <conditional name="value_column">
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
106 <param name="select" value="string" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
107 <param name="in_text" value="1" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
108 </conditional>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
109 <param name="separator" value="; " />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
110 <section name="global_param">
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
111 <param name="illegal_rows" value="true" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
112 </section>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
113 <output name="collapse" file="illegal_collapse.csv" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
114 </test>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
115 </tests>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
116 <help><![CDATA[
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
117
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
118 Csvtk - Collapse Help
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
119 ---------------------
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
120
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
121 Info
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
122 ####
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
123
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
124 Csvtk collapse combines one field with selected fields as keys for what to combine
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
125
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
126 .. class:: warningmark
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
127
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
128 Single quotes are not allowed in text inputs!
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
129
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
130 @HELP_INPUT_DATA@
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
131
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
132
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
133 Usage
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
134 #####
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
135
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
136 To run csvtk-collapse, all you need is a valid (as defined above) CSV or TSV file with a column you want to use
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
137 to collapse on based on any number of key column(s).
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
138
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
139 **Example collapse with one key column**
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
140
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
141 Input table:
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
142
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
143 +--------+--------+----------+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
144 | Name | Colour | Food |
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
145 +========+========+==========+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
146 | Eric | Blue | Apples |
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
147 +--------+--------+----------+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
148 | Darian | Blue | Pancakes |
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
149 +--------+--------+----------+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
150 | Daniel | Red | Apples |
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
151 +--------+--------+----------+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
152 | Emily | Blue | Apples |
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
153 +--------+--------+----------+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
154
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
155 Now if you wanted to find out who has the same favourite colour, you would specify the key column as "Colour" (-F -f)
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
156 and the value column as "Name" (-v) to generate the following table:
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
157
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
158 +--------+---------------------+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
159 | Colour | Name |
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
160 +========+=====================+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
161 | Red | Daniel |
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
162 +--------+---------------------+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
163 | Blue | Eric; Darian; Emily |
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
164 +--------+---------------------+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
165
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
166 --------
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
167
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
168 **Example collapse with two key columns**
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
169
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
170 Same input table, now our key columns are "Colour" and "Food" which could be input as "2,3" (-F -f)
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
171 and the same value column which would generate the following table:
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
172
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
173 +--------+----------+-------------+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
174 | Colour | Food | Name |
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
175 +========+==========+=============+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
176 | Blue | Pancakes | Darian |
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
177 +--------+----------+-------------+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
178 | Red | Apples | Daniel |
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
179 +--------+----------+-------------+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
180 | Blue | Apples | Eric; Emily |
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
181 +--------+----------+-------------+
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
182
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
183 ----
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
184
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
185 @HELP_COLUMNS@
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
186
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
187
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
188 @HELP_END_STATEMENT@
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
189
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
190
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
191 ]]></help>
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
192 <expand macro="citations" />
7ff05a1ffdd7 "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
193 </tool>