annotate tools/new_operations/join.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="gops_join_1" name="Join">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>the intervals of two datasets side-by-side</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <command interpreter="python">gops_join.py $input1 $input2 $output -1 ${input1.metadata.chromCol},${input1.metadata.startCol},${input1.metadata.endCol},${input1.metadata.strandCol} -2 ${input2.metadata.chromCol},${input2.metadata.startCol},${input2.metadata.endCol},${input2.metadata.strandCol} -m $min -f $fill</command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 <param format="interval" name="input1" type="data" help="First dataset">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 <label>Join</label>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 <param format="interval" name="input2" type="data" help="Second dataset">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 <label>with</label>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 <param name="min" size="4" type="integer" value="1" help="(bp)">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 <label>with min overlap</label>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <param name="fill" type="select" label="Return">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <option value="none">Only records that are joined (INNER JOIN)</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <option value="right">All records of first dataset (fill null with ".")</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <option value="left">All records of second dataset (fill null with ".")</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <option value="both">All records of both datasets (fill nulls with ".")</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <data format="interval" name="output" metadata_source="input1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <code file="operation_filter.py"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <param name="input1" value="1.bed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <param name="input2" value="2.bed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <param name="min" value="1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 <param name="fill" value="none" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 <output name="output" file="gops-join-none.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <param name="input1" value="1.bed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <param name="input2" value="2.bed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <param name="min" value="1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <param name="fill" value="right" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 <output name="output" file="gops-join-right.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 <param name="input1" value="1.bed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <param name="input2" value="2.bed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 <param name="min" value="1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 <param name="fill" value="left" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 <output name="output" file="gops-join-left.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 <param name="input1" value="1.bed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 <param name="input2" value="2.bed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 <param name="min" value="1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 <param name="fill" value="both" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 <output name="output" file="gops-join-both.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 <param name="input1" value="1.bed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 <param name="input2" value="2.bed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 <param name="min" value="500" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 <param name="fill" value="none" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 <output name="output" file="gops-join-none-500.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 <param name="input1" value="1.bed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 <param name="input2" value="2.bed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 <param name="min" value="100" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 <param name="fill" value="both" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 <output name="output" file="gops-join-both-100.dat" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 .. class:: infomark
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 **TIP:** If your dataset does not appear in the pulldown menu, it means that it is not in interval format. Use "edit attributes" to set chromosome, start, end, and strand columns.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 **Screencasts!**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 See Galaxy Interval Operation Screencasts_ (right click to open this link in another window).
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 .. _Screencasts: http://wiki.g2.bx.psu.edu/Learn/Interval%20Operations
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85 **Syntax**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87 - **Where overlap** specifies the minimum overlap between intervals that allows them to be joined.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 - **Return only records that are joined** returns only the records of the first dataset that join to a record in the second dataset. This is analogous to an INNER JOIN.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 - **Return all records of first dataset (fill null with &quot;.&quot;)** returns all intervals of the first dataset, and any intervals that do not join an interval from the second dataset are filled in with a period(.). This is analogous to a LEFT JOIN.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90 - **Return all records of second dataset (fill null with &quot;.&quot;)** returns all intervals of the second dataset, and any intervals that do not join an interval from the first dataset are filled in with a period(.). **Note that this may produce an invalid interval file, since a period(.) is not a valid chrom, start, end or strand.**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91 - **Return all records of both datasets (fill nulls with &quot;.&quot;)** returns all records from both datasets, and fills on either the right or left with periods. **Note that this may produce an invalid interval file, since a period(.) is not a valid chrom, start, end or strand.**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93 -----
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95 **Example**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 If **First dataset** is::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 chr1 10 100 Query1.1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 chr1 500 1000 Query1.2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101 chr1 1100 1250 Query1.3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 and **Second dataset** is::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105 chr1 20 80 Query2.1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106 chr1 2000 2204 Query2.2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107 chr1 2500 3000 Query2.3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
109
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
110 The four return options will generate:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
111
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
112
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
113 - **Return only records that are joined**::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
114
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
115 chr1 10 100 Query1.1 chr1 20 80 Query2.1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
116
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
117 - **Return all records of first dataset**::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
118
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
119 chr1 10 100 Query1.1 chr1 20 80 Query2.1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
120 chr1 500 1000 Query1.2 . . . .
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
121 chr1 1100 1250 Query1.3 . . . .
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
122
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
123 - **Return all records of second dataset**::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
124
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
125 chr1 10 100 Query1.1 chr1 20 80 Query2.1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
126 . . . . chr1 2000 2204 Query2.2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
127 . . . . chr1 2500 3000 Query2.3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
128
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
129 - **Return all records of both datasets**::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
130
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
131 chr1 10 100 Query1.1 chr1 20 80 Query2.1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
132 chr1 500 1000 Query1.2 . . . .
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
133 chr1 1100 1250 Query1.3 . . . .
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
134 . . . . chr1 2000 2204 Query2.2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
135 . . . . chr1 2500 3000 Query2.3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
136
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
137
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
138 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
139 </tool>