annotate bedtools-galaxy/multiIntersectBed.xml @ 0:26c21c634c51

Uploaded
author aaronquinlan
date Thu, 29 Dec 2011 10:20:07 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
1 <tool id="bedtools_multiintersectbed" name="Intersect multiple sorted BED files" version="0.1.0">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
2 <description>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
3 </description>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
4
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
5 <requirements>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
6 <requirement type="binary">multiIntersectBed</requirement>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
7 </requirements>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
8
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
9 <command>multiIntersectBed
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
10 $header
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
11 #if $zero.value == True:
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
12 -empty
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
13 -g ${chromInfo}
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
14 #end if
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
15
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
16 -i '$input1'
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
17 '$input2'
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
18 #for $q in $beds
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
19 '${q.input}'
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
20 #end for
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
21
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
22 -names
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
23 #if $name1.choice == "tag":
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
24 '${input1.name}'
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
25 #else
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
26 '${name1.custom_name}'
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
27 #end if
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
28
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
29 #if $name2.choice == "tag":
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
30 '${input2.name}'
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
31 #else
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
32 '${name2.custom_name}'
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
33 #end if
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
34
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
35 #for $q in $beds
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
36 #if $q.name.choice == "tag":
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
37 '${q.input.name}'
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
38 #else
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
39 '${q.input.custom_name}'
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
40 #end if
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
41 #end for
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
42 &gt; '$output'
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
43 </command>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
44
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
45 <inputs>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
46 <!-- Make it easy for the user, first two input files are always shown -->
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
47 <!-- INPUT 1 -->
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
48 <param name="input1" format="bed" type="data" label="First sorted BED file" />
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
49
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
50 <conditional name="name1">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
51 <param name="choice" type="select" label="Sample name">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
52 <option value="tag" selected="true">Use input's tag</option>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
53 <option value="custom">Enter custom table name</option>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
54 </param>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
55 <when value="tag">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
56 </when>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
57 <when value="custom">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
58 <param name="custom_name" type="text" area="false" label="Custom sample name"/>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
59 </when>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
60 </conditional>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
61
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
62 <!-- INPUT 2 -->
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
63 <param name="input2" format="bed" type="data" label="Second sorted BED file" />
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
64
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
65 <conditional name="name2">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
66 <param name="choice" type="select" label="Sample name">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
67 <option value="tag" selected="true">Use input's tag</option>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
68 <option value="custom">Enter custom table name</option>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
69 </param>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
70 <when value="tag">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
71 </when>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
72 <when value="custom">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
73 <param name="custom_name" type="text" area="false" label="Custom sample name"/>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
74 </when>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
75 </conditional>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
76
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
77 <!-- Additional files, if the user needs more -->
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
78 <repeat name="beds" title="Add'l sorted BED files" >
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
79 <param name="input" format="bed" type="data" label="BED file" />
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
80
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
81 <conditional name="name">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
82 <param name="choice" type="select" label="Sample name">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
83 <option value="tag" selected="true">Use input's tag</option>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
84 <option value="custom">Enter custom table name</option>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
85 </param>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
86 <when value="tag">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
87 </when>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
88 <when value="custom">
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
89 <param name="custom_name" type="text" area="false" label="Custom sample name"/>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
90 </when>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
91 </conditional>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
92 </repeat>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
93
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
94 <param name="header" type="boolean" checked="true" truevalue="-header" falsevalue="" label="Print header line" help="The first line will include the name of each sample." />
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
95
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
96 <param name="zero" type="boolean" checked="true" label="Report regions that are not covered by any of the files" help="If set, regions that are not overlapped by any file will also be reported. Requires a valid organism key for all input datasets" />
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
97
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
98 </inputs>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
99
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
100 <outputs>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
101 <data format="tabular" name="output" metadata_source="input1" label="Common intervals identified from among ${input1.name}, ${input2.name} and so on." />
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
102 </outputs>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
103 <help>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
104
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
105 **What it does**
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
106
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
107 This tool identifies common intervals among multiple, sorted BED files. Intervals can be common among 0 to N of the N input BED files. The pictorial and raw data examples below illustrate the behavior of this tool more clearly.
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
108
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
109
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
110 .. image:: http://people.virginia.edu/~arq5x/files/bedtools-galaxy/mbi.png
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
111
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
112
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
113 .. class:: warningmark
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
114
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
115 This tool requires that each BED file is reference-sorted (chrom, then start).
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
116
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
117 .. class:: warningmark
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
118
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
119 This tool requires that `bedtools`__ has been installed on your system.
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
120
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
121 .. class:: infomark
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
122
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
123 The output file will contain five fixed columns, plus additional columns for each BED file:
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
124
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
125 * 1. Chromosome name (or 'genome' for whole-genome coverage).
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
126 * 2. The zero-based start position of the interval.
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
127 * 3. The one-based end position of the interval.
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
128 * 4. The number of input files that had at least one feature overlapping this interval.
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
129 * 5. A list of input files or labels that had at least one feature overlapping this interval.
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
130 * 6. For each input file, an indication (1 = Yes, 0 = No) of whether or not the file had at least one feature overlapping this interval.
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
131
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
132 ------
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
133
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
134 **Example input**::
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
135
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
136 # a.bed
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
137 chr1 6 12
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
138 chr1 10 20
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
139 chr1 22 27
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
140 chr1 24 30
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
141
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
142 # b.bed
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
143 chr1 12 32
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
144 chr1 14 30
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
145
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
146 # c.bed
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
147 chr1 8 15
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
148 chr1 10 14
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
149 chr1 32 34
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
150
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
151
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
152 ------
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
153
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
154 **Example without a header and without reporting intervals with zero coverage**::
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
155
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
156
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
157 chr1 6 8 1 1 1 0 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
158 chr1 8 12 2 1,3 1 0 1
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
159 chr1 12 15 3 1,2,3 1 1 1
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
160 chr1 15 20 2 1,2 1 1 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
161 chr1 20 22 1 2 0 1 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
162 chr1 22 30 2 1,2 1 1 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
163 chr1 30 32 1 2 0 1 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
164 chr1 32 34 1 3 0 0 1
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
165
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
166
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
167 **Example adding a header line**::
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
168
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
169
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
170 chrom start end num list a.bed b.bed c.bed
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
171 chr1 6 8 1 1 1 0 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
172 chr1 8 12 2 1,3 1 0 1
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
173 chr1 12 15 3 1,2,3 1 1 1
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
174 chr1 15 20 2 1,2 1 1 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
175 chr1 20 22 1 2 0 1 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
176 chr1 22 30 2 1,2 1 1 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
177 chr1 30 32 1 2 0 1 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
178 chr1 32 34 1 3 0 0 1
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
179
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
180
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
181 **Example adding a header line and custom file labels**::
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
182
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
183
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
184 chrom start end num list joe bob sue
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
185 chr1 6 8 1 joe 1 0 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
186 chr1 8 12 2 joe,sue 1 0 1
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
187 chr1 12 15 3 joe,bob,sue 1 1 1
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
188 chr1 15 20 2 joe,bob 1 1 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
189 chr1 20 22 1 bob 0 1 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
190 chr1 22 30 2 joe,bob 1 1 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
191 chr1 30 32 1 bob 0 1 0
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
192 chr1 32 34 1 sue 0 0 1
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
193
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
194
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
195 -----
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
196
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
197
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
198 This tool is part of the `bedtools package`__ from the `Quinlan laboratory`__. If you use this tool, please cite `Quinlan AR, and Hall I.M. BEDTools: A flexible framework for comparing genomic features. Bioinformatics, 2010, 26, 6.`__
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
199
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
200 .. __: http://code.google.com/p/bedtools/
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
201 .. __: http://code.google.com/p/bedtools/
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
202 .. __: http://cphg.virginia.edu/quinlan/
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
203 .. __: http://bioinformatics.oxfordjournals.org/content/26/6/841.short
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
204
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
205
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
206
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
207
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
208 </help>
26c21c634c51 Uploaded
aaronquinlan
parents:
diff changeset
209 </tool>