comparison intersect.xml @ 0:5b3c6135a982

Imported from capsule None
author devteam
date Tue, 01 Apr 2014 10:53:10 -0400
parents
children 81ad85f731b9
comparison
equal deleted inserted replaced
-1:000000000000 0:5b3c6135a982
1 <tool id="gops_intersect_1" name="Intersect" version="0.0.1">
2 <description>the intervals of two datasets</description>
3 <requirements>
4 <requirement type="package" version="0.7.1">bx-python</requirement>
5 <requirement type="package" version="1.0.0">galaxy-ops</requirement>
6 </requirements>
7 <command interpreter="python">gops_intersect.py
8 $input1 $input2 $output
9
10 #if isinstance( $input1.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gff').__class__):
11 -1 1,4,5,7 --gff1
12 #else:
13 -1 ${input1.metadata.chromCol},${input1.metadata.startCol},${input1.metadata.endCol},${input1.metadata.strandCol}
14 #end if
15
16 #if isinstance( $input2.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gff').__class__):
17 -2 1,4,5,7 --gff2
18 #else:
19 -2 ${input2.metadata.chromCol},${input2.metadata.startCol},${input2.metadata.endCol},${input2.metadata.strandCol}
20 #end if
21
22 -m $min $returntype
23 </command>
24 <inputs>
25 <param name="returntype" type="select" label="Return" help="(see figure below)">
26 <option value="">Overlapping Intervals</option>
27 <option value="-p">Overlapping pieces of Intervals</option>
28 </param>
29 <param format="interval,gff" name="input1" type="data" help="First dataset">
30 <label>of</label>
31 </param>
32 <param format="interval,gff" name="input2" type="data" help="Second dataset">
33 <label>that intersect</label>
34 </param>
35 <param name="min" size="4" type="integer" value="1" min="1" help="(bp)">
36 <label>for at least</label>
37 </param>
38 </inputs>
39 <outputs>
40 <data format="input" name="output" metadata_source="input1"/>
41 </outputs>
42 <code file="operation_filter.py"/>
43 <trackster_conf/>
44 <tests>
45 <test>
46 <param name="input1" value="1.bed" />
47 <param name="input2" value="2.bed" />
48 <param name="min" value="1" />
49 <param name="returntype" value="" />
50 <output name="output" file="gops_intersect_out.bed" />
51 </test>
52 <test>
53 <param name="input1" value="1.bed" />
54 <param name="input2" value="2_mod.bed" ftype="interval"/>
55 <param name="min" value="1" />
56 <param name="returntype" value="" />
57 <output name="output" file="gops_intersect_diffCols.bed" />
58 </test>
59 <test>
60 <param name="input1" value="1.bed" />
61 <param name="input2" value="2_mod.bed" ftype="interval"/>
62 <param name="min" value="1" />
63 <param name="returntype" value="Overlapping pieces of Intervals" />
64 <output name="output" file="gops_intersect_p_diffCols.bed" />
65 </test>
66 <test>
67 <param name="input1" value="1.bed" />
68 <param name="input2" value="2.bed" />
69 <param name="min" value="10" />
70 <param name="returntype" value="Overlapping pieces of Intervals" />
71 <output name="output" file="gops_intersect_p_out.bed" />
72 </test>
73 <test>
74 <param name="input1" value="gops_bigint.interval" ftype="interval" />
75 <param name="input2" value="gops_bigint2.interval" ftype="interval" />
76 <param name="min" value="1" />
77 <param name="returntype" value="" />
78 <output name="output" file="gops_intersect_bigint_out.interval" />
79 </test>
80 <test>
81 <param name="input1" value="gops_bigint2.interval" ftype="interval" />
82 <param name="input2" value="gops_bigint.interval" ftype="interval" />
83 <param name="min" value="1" />
84 <param name="returntype" value="" />
85 <output name="output" file="gops_intersect_bigint_out.interval" />
86 </test>
87 <test>
88 <param name="input1" value="12.bed" ftype="bed" />
89 <param name="input2" value="1.bed" ftype="bed" />
90 <param name="min" value="1" />
91 <param name="returntype" value="" />
92 <output name="output" file="gops_intersect_no_strand_out.bed" />
93 </test>
94 <!-- Intersect two GFF files. -->
95 <test>
96 <param name="input1" value="gops_subtract_in1.gff" />
97 <param name="input2" value="gops_subtract_in2.gff" />
98 <param name="min" value="1" />
99 <param name="returntype" value="" />
100 <output name="output" file="gops_intersect_out2.gff" />
101 </test>
102 <!-- Intersect GFF file and bed file. -->
103 <test>
104 <param name="input1" value="gops_subtract_in1.gff" />
105 <param name="input2" value="gops_subtract_in2.bed" />
106 <param name="min" value="1" />
107 <param name="returntype" value="" />
108 <output name="output" file="gops_intersect_out2.gff" />
109 </test>
110
111 </tests>
112 <help>
113
114 .. class:: infomark
115
116 **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.
117
118 -----
119
120 **Screencasts!**
121
122 See Galaxy Interval Operation Screencasts_ (right click to open this link in another window).
123
124 .. _Screencasts: http://wiki.g2.bx.psu.edu/Learn/Interval%20Operations
125
126 -----
127
128 **Syntax**
129
130 - **Where overlap is at least** sets the minimum length (in base pairs) of overlap between elements of the two datasets
131 - **Overlapping Intervals** returns entire intervals from the first dataset that overlap the second dataset. The returned intervals are completely unchanged, and this option only filters out intervals that do not overlap with the second dataset.
132 - **Overlapping pieces of Intervals** returns intervals that indicate the exact base pair overlap between the first dataset and the second dataset. The intervals returned are from the first dataset, and all fields besides start and end are guaranteed to remain unchanged.
133
134 -----
135
136 **Examples**
137
138 Overlapping Intervals:
139
140 .. image:: ${static_path}/operation_icons/gops_intersectOverlappingIntervals.gif
141
142 Overlapping Pieces of Intervals:
143
144 .. image:: ${static_path}/operation_icons/gops_intersectOverlappingPieces.gif
145
146 </help>
147 </tool>