annotate tools/filters/uniq.xml @ 1:cdcb0ce84a1b

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="Count1" name="Count">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>occurrences of each record</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python">uniq.py -i $input -o $out_file1 -c "$column" -d $delim</command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 <param name="input" type="data" format="tabular" label="from dataset" help="Dataset missing? See TIP below"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 <param name="column" type="data_column" data_ref="input" multiple="True" numerical="False" label="Count occurrences of values in column(s)" help="Multi-select list - hold the appropriate key while clicking to select multiple columns" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 <param name="delim" type="select" label="Delimited by">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 <option value="T">Tab</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 <option value="Sp">Whitespace</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 <option value="Dt">Dot</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 <option value="C">Comma</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 <option value="D">Dash</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 <option value="U">Underscore</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <option value="P">Pipe</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <data format="tabular" name="out_file1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <param name="input" value="1.bed"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 <output name="out_file1" file="uniq_out.dat"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <param name="column" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 <param name="delim" value="T"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 .. class:: infomark
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 **TIP:** If your data is not TAB delimited, use *Text Manipulation-&gt;Convert*
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 **Syntax**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 This tool counts occurrences of unique values in selected column(s).
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 - If multiple columns are selected, counting is performed on each unique group of all values in the selected columns.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 - The first column of the resulting dataset will be the count of unique values in the selected column(s) and will be followed by each value.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 **Example**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 - Input file::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 chr1 10 100 gene1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 chr1 105 200 gene2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 chr1 205 300 gene3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 chr2 10 100 gene4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 chr2 1000 1900 gene5
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 chr3 15 1656 gene6
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 chr4 10 1765 gene7
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 chr4 10 1765 gene8
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 - Counting unique values in column c1 will result in::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 3 chr1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 2 chr2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 1 chr3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 2 chr4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 - Counting unique values in the grouping of columns c2 and c3 will result in::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 2 10 100
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 2 10 1765
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 1 1000 1900
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 1 105 200
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 1 15 1656
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 1 205 300
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 </tool>