PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 1ms

/tools/filters/uniq.xml

https://bitbucket.org/cistrome/cistrome-harvard/
XML | 75 lines | 60 code | 15 blank | 0 comment | 0 complexity | 43305040d5cfb5822d42d4fa3addbb07 MD5 | raw file
 1<tool id="Count1" name="Count">
 2  <description>occurrences of each record</description>
 3  <command interpreter="python">uniq.py -i $input -o $out_file1 -c "$column" -d $delim</command>
 4  <inputs>
 5    <param name="input" type="data" format="tabular" label="from dataset" help="Dataset missing? See TIP below"/>
 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" />
 7    <param name="delim" type="select" label="Delimited by">
 8      <option value="T">Tab</option>
 9      <option value="Sp">Whitespace</option>
10      <option value="Dt">Dot</option>
11      <option value="C">Comma</option>
12      <option value="D">Dash</option>
13      <option value="U">Underscore</option>
14      <option value="P">Pipe</option>
15    </param>
16  </inputs>
17  <outputs>
18    <data format="tabular" name="out_file1" />
19  </outputs>
20  <tests>
21    <test>
22      <param name="input" value="1.bed"/>
23      <output name="out_file1" file="uniq_out.dat"/>
24      <param name="column" value="1"/>
25      <param name="delim" value="T"/>
26    </test>
27  </tests>
28  <help>
29  
30 .. class:: infomark
31
32**TIP:** If your data is not TAB delimited, use *Text Manipulation-&gt;Convert*
33
34-----
35
36**Syntax**
37
38This tool counts occurrences of unique values in selected column(s).
39
40- If multiple columns are selected, counting is performed on each unique group of all values in the selected columns.
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.
42
43-----
44
45**Example**
46
47- Input file::
48     
49       chr1   10  100  gene1
50       chr1  105  200  gene2
51       chr1  205  300  gene3
52       chr2   10  100  gene4
53       chr2 1000 1900  gene5
54       chr3   15 1656  gene6
55       chr4   10 1765  gene7
56       chr4   10 1765  gene8
57
58- Counting unique values in column c1 will result in::
59
60       3 chr1
61       2 chr2
62       1 chr3
63       2 chr4   
64
65- Counting unique values in the grouping of columns c2 and c3 will result in::
66
67       2    10    100
68       2    10    1765
69       1    1000  1900
70       1    105   200
71       1    15    1656
72       1    205   300
73
74</help>
75</tool>