comparison bedtools-galaxy/multiIntersectBed.xml @ 0:fa875e3c66c3 draft

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