annotate uniq.xml @ 0:07d1c048ec1b draft default tip

"planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
author nml
date Tue, 19 May 2020 17:16:58 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
1 <tool id="csvtk_uniq" name="csvtk-unique" version="@VERSION@+@GALAXY_VERSION@">
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
2 <description> first values in column(s)</description>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
3 <macros>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
4 <import>macros.xml</import>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
5 </macros>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
6 <expand macro="requirements" />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
7 <expand macro="version_cmd" />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
8 <command detect_errors="exit_code"><![CDATA[
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
9
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
10 ###################
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
11 ## Start Command ##
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
12 ###################
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
13
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
14 csvtk uniq --num-cpus "\${GALAXY_SLOTS:-1}"
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
15
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
16 ## Add additional flags as specified ##
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
17 #######################################
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
18 $ignore_case
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
19 $global_param.illegal_rows
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
20 $global_param.empty_rows
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
21 $global_param.header
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
22 $global_param.lazy_quotes
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
23
07d1c048ec1b "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 ##
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
25 #######################################################
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
26 #if $in_1.is_of_type("tabular"):
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
27 -t -T
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
28 #end if
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
29
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
30 ## Set Input ##
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
31 ###############
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
32 '$in_1'
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
33
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
34 ## Specify fields for unique ##
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
35 ###############################
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
36 -F -f '$column_text.in_text'
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
37
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
38 ## If Only Wanted input columns ##
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
39 ##################################
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
40 #if $only_input_columns == 'Yes'
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
41 | csvtk cut -F -f '$column_text.in_text'
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
42
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
43 #if $in_1.is_of_type("tabular"):
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
44 -t -T
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
45 #end if
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
46 #end if
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
47
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
48 ## To output ##
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
49 ###############
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
50 > uniq
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
51
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
52 ]]></command>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
53 <inputs>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
54 <expand macro="singular_input" />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
55 <expand macro="fields_input" />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
56 <expand macro="ignore_case" />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
57 <param name="only_input_columns" type="boolean"
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
58 truevalue="Yes"
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
59 falsevalue="No"
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
60 label="Keep only input column(s)"
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
61 help="All columns not specified as part of the input will be removed"
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
62 />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
63 <expand macro="global_parameters" />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
64 </inputs>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
65 <outputs>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
66 <data format_source="in_1" name="uniq" from_work_dir="uniq" label="${in_1.name} unique values in column(s) ${column_text.in_text}" />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
67 </outputs>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
68 <tests>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
69 <test>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
70 <param name="in_1" value="blood_type.tsv" />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
71 <conditional name="column_text">
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
72 <param name="select" value="string" />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
73 <param name="in_text" value="2,3" />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
74 </conditional>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
75 <output name="uniq" file="uniq.tsv" ftype="tabular" />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
76 </test>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
77 </tests>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
78 <help><![CDATA[
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
79
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
80 Csvtk - Unique Help
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
81 -------------------
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
82
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
83 Info
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
84 ####
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
85
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
86 Csvtk unique pulls the first unique values from the column(s) specified to create
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
87
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
88 .. class:: warningmark
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
89
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
90 Single quotes are not allowed in text inputs!
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
91
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
92 @HELP_INPUT_DATA@
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
93
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
94
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
95 Usage
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
96 #####
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
97
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
98 To run csvtk-uniq, all you need is a valid (as defined above) CSV or TSV and the column(s) that you want the to find unique values in.
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
99
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
100 **Ex. Unique on one column:**
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
101
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
102 Suppose you had a table as such
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
103
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
104 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
105 | Name | Colour | Food |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
106 +========+========+==========+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
107 | Eric | Blue | Apples |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
108 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
109 | Darian | Blue | Pancakes |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
110 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
111 | Daniel | Red | Apples |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
112 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
113 | Frank | Blue | Apples |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
114 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
115
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
116 If you ran csvtk-unique on the Colour column, you would end up with the following table:
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
117
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
118 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
119 | Name | Colour | Food |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
120 +========+========+==========+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
121 | Eric | Blue | Apples |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
122 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
123 | Daniel | Red | Apples |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
124 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
125
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
126 As only the first instance of the value in the column is kept.
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
127
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
128 ----
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
129
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
130 **Ex. Unique on more than one column:**
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
131
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
132 Same input table
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
133
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
134 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
135 | Name | Colour | Food |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
136 +========+========+==========+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
137 | Eric | Blue | Apples |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
138 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
139 | Darian | Blue | Pancakes |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
140 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
141 | Daniel | Red | Apples |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
142 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
143 | Frank | Blue | Apples |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
144 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
145
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
146 Now if you ran csvtk-unique on the Colour and Food column, you would end up with the following table:
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
147
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
148 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
149 | Name | Colour | Food |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
150 +========+========+==========+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
151 | Eric | Blue | Apples |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
152 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
153 | Darian | Blue | Pancakes |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
154 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
155 | Daniel | Red | Apples |
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
156 +--------+--------+----------+
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
157
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
158 Only the last row was not kept as there was already a unique pair found of "Blue" and "Apples".
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
159
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
160 **Note:** If you want to only have the unique values of the columns and get rid of the additional columns, run a "cut program" to cut out the wanted columns
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
161 and then csvtk unique to only get the wanted values.
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
162
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
163 ----
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
164
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
165 @HELP_COLUMNS@
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
166
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
167
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
168 @HELP_END_STATEMENT@
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
169
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
170
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
171 ]]></help>
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
172 <expand macro="citations" />
07d1c048ec1b "planemo upload for repository https://github.com/shenwei356/csvtk commit 3a97e1b79bf0c6cdd37d5c8fb497b85531a563ab"
nml
parents:
diff changeset
173 </tool>