annotate tools/filters/compare.xml @ 0:9071e359b9a3

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:37:19 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="comp1" name="Compare two Datasets" version="1.0.2">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>to find common or distinct rows</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python">joinWrapper.py $input1 $input2 $field1 $field2 $mode $out_file1</command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 <param format="tabular" name="input1" type="data" label="Compare"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 <param name="field1" label="Using column" type="data_column" data_ref="input1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 <validator type="no_options" message="Invalid column choice. Please try again after editing metadata of your input dataset by clicking on the pencil icon next to it."/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 <param format="tabular" name="input2" type="data" label="against" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 <param name="field2" label="and column" type="data_column" data_ref="input2">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 <validator type="no_options" message="Invalid column choice. Please try again after editing metadata of your input dataset by clicking on the pencil icon next to it."/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 <param name="mode" type="select" label="To find" help="See examples below for explanation of these options">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <option value="N">Matching rows of 1st dataset</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <option value="V">Non Matching rows of 1st dataset</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <data format="input" name="out_file1" metadata_source="input1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 <param name="input1" value="1.bed"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <param name="input2" value="2.bed"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 <param name="field1" value="2"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <param name="field2" value="2"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <param name="mode" value="N"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <output name="out_file1" file="fs-compare.dat"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 <!--test case with duplicated key values-->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 <param name="input1" value="1.bed"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <param name="input2" value="3.bed"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <param name="field1" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <param name="field2" value="1"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <param name="mode" value="V"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <output name="out_file1" file="fs-compare-2.dat"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 .. class:: infomark
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 **TIP:** If your data is not TAB delimited, use *Text Manipulation-&gt;Convert*
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 **Syntax**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 This tool finds lines in one dataset that HAVE or DO NOT HAVE a common field with another dataset.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 **Example**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 If this is **First dataset**::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 chr1 10 20 geneA
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 chr1 50 80 geneB
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 chr5 10 40 geneL
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 and this is **Second dataset**::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 geneA tumor-suppressor
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 geneB Foxp2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 geneC Gnas1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 geneE INK4a
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 Finding lines of the **First dataset** whose 4th column matches the 1st column of the **Second dataset** yields::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 chr1 10 20 geneA
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 chr1 50 80 geneB
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74 Conversely, using option **Non Matching rows of First dataset** on the same fields will yield::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76 chr5 10 40 geneL
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 </tool>