annotate sorted_uniq.xml @ 1:a4ad586d1403 draft

Uploaded
author bgruening
date Thu, 05 Sep 2013 11:42:27 -0400
parents ec66f9d90ef0
children 7068d1548234
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
1 <tool id="unixtools_uniq_tool" name="Unique lines">
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
2 <description>assuming sorted input file</description>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
3 <requirements>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
4 <requirement type="package" version="8.21">gnu_coreutils</requirement>
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
5 <requirement type="package" version="4.2.2-sandbox">gnu_sed</requirement>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
6 </requirements>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
7 <command>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
8 uniq
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
9 -f
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
10 $skipfields
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
11 $count
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
12 $repeated
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
13 $ignorecase
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
14 $uniqueonly
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
15 $input
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
16
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
17 ## feature is not yet released, it will be in the next 8.22 version
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
18 ##--group=$group
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
19
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
20 #if $count:
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
21 # count will print the count with spaces infrontof the line and
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
22 # with a space (not a tab) after the number, we need to cahnge that
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
23 | sed -e 's/ *//' -e 's/ /\t/' &gt; $output
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
24 #end if
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
25 &gt; $output
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
26 </command>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
27
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
28 <inputs>
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
29 <param format="txt,tabular" name="input" type="data" label="File to scan for unique values" help="Make sure you have sorted this file" />
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
30
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
31 <param name="count" type="boolean" label="Counting number of occurrences [-c]" help="Prefix lines by the number of occurrences" truevalue="-c" falsevalue="" />
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
32 <param name="repeated" type="boolean" label="Only print duplicate lines [-d]" truevalue="-d" falsevalue="" />
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
33 <param name="ignorecase" type="boolean" label="Ignore differences in case when comparing [-i]" truevalue="-i" falsevalue="" />
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
34 <param name="uniqueonly" type="boolean" label="Only print unique lines [-u]" checked="True" truevalue="-u" falsevalue="" />
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
35 <param name="skipfields" type="integer" label="Avoid comparing the first N fields [-f]" help="Use zero to start from the first field" size="2" value="0" />
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
36
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
37 <!--
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
38 <param name="group" type="select" label="Output all lines, and delimit each unique group.">
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
39 <option value="separate">Separate unique groups with a single delimiter</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
40 <option value="prepend">Output a delimiter before each group of unique items</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
41 <option value="append">Output a delimiter after each group of unique items.</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
42 <option value="both">Output a delimiter around each group of unique items.</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
43 </param>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
44 -->
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
45 </inputs>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
46
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
47 <outputs>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
48 <data format="input" name="output" metadata_source="input"/>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
49 </outputs>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
50 <help>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
51 This tool takes a sorted file and look for lines that are unique.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
52
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
53 .. class:: warningmark
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
54
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
55 Please make sure your file is sorted, or else this tool will give you an erroneous output.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
56
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
57 .. class:: infomark
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
58
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
59 You can sort your file using either the "Sort" tool in "Filter and Sort", or the "Sort" tool in "Unix Tools".
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
60
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
61 </help>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
62 </tool>