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