comparison bedtools-galaxy/unionBedGraphs.xml @ 0:26c21c634c51

Uploaded
author aaronquinlan
date Thu, 29 Dec 2011 10:20:07 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:26c21c634c51
1 <tool id="bedtools_mergebedgraph" name="Merge BedGraph files" version="0.1.0">
2 <description>
3 </description>
4
5 <requirements>
6 <requirement type="binary">unionBedGraphs</requirement>
7 </requirements>
8
9 <command>unionBedGraphs
10 $header
11 -filler '$filler'
12 #if $zero.value == True:
13 -empty
14 -g ${chromInfo}
15 #end if
16
17 -i '$input1'
18 '$input2'
19 #for $q in $bedgraphs
20 '${q.input}'
21 #end for
22
23 -names
24 #if $name1.choice == "tag":
25 '${input1.name}'
26 #else
27 '${name1.custom_name}'
28 #end if
29
30 #if $name2.choice == "tag":
31 '${input2.name}'
32 #else
33 '${name2.custom_name}'
34 #end if
35
36 #for $q in $bedgraphs
37 #if $q.name.choice == "tag":
38 '${q.input.name}'
39 #else
40 '${q.input.custom_name}'
41 #end if
42 #end for
43 &gt; '$output'
44 </command>
45
46 <inputs>
47 <!-- Make it easy for the user, first two input files are always shown -->
48 <!-- INPUT 1 -->
49 <param name="input1" format="bedgraph" type="data" label="First BedGraph file" />
50
51 <conditional name="name1">
52 <param name="choice" type="select" label="Sample name">
53 <option value="tag" selected="true">Use input's tag</option>
54 <option value="custom">Enter custom table name</option>
55 </param>
56 <when value="tag">
57 </when>
58 <when value="custom">
59 <param name="custom_name" type="text" area="false" label="Custom sample name"/>
60 </when>
61 </conditional>
62
63 <!-- INPUT 2 -->
64 <param name="input2" format="bedgraph" type="data" label="Second BedGraph file" />
65
66 <conditional name="name2">
67 <param name="choice" type="select" label="Sample name">
68 <option value="tag" selected="true">Use input's tag</option>
69 <option value="custom">Enter custom table name</option>
70 </param>
71 <when value="tag">
72 </when>
73 <when value="custom">
74 <param name="custom_name" type="text" area="false" label="Custom sample name"/>
75 </when>
76 </conditional>
77
78 <!-- Additional files, if the user needs more -->
79 <repeat name="bedgraphs" title="Add'l BedGraph files" >
80 <param name="input" format="bedgraph" type="data" label="BedGraph file" />
81
82 <conditional name="name">
83 <param name="choice" type="select" label="Sample name">
84 <option value="tag" selected="true">Use input's tag</option>
85 <option value="custom">Enter custom table name</option>
86 </param>
87 <when value="tag">
88 </when>
89 <when value="custom">
90 <param name="custom_name" type="text" area="false" label="Custom sample name"/>
91 </when>
92 </conditional>
93 </repeat>
94
95 <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." />
96
97 <param name="zero" type="boolean" checked="true" label="Report regions with zero coverage" help="If set, regions without any coverage will also be reported. Requires a valid organism key for all input datasets" />
98
99 <param name="filler" type="text" value="0" label="Text to use for no-coverage value" help="Can be 0.0, N/A, - or any other value." />
100 </inputs>
101
102 <outputs>
103 <data format="tabular" name="output" metadata_source="input1" label="Merged BedGraphs of ${input1.name}, ${input2.name} and so on." />
104 </outputs>
105 <help>
106
107 **What it does**
108
109 This tool merges multiple BedGraph files, allowing direct and fine-scale coverage comparisons among many samples/files. The BedGraph files need not represent the same intervals; the tool will identify both common and file-specific intervals. In addition, the BedGraph values need not be numeric: one can use any text as the BedGraph value and the tool will compare the values from multiple files.
110
111 .. image:: http://people.virginia.edu/~arq5x/files/bedtools-galaxy/ubg.png
112
113
114 .. class:: warningmark
115
116 This tool requires that each BedGraph file is reference-sorted (chrom, then start) and contains non-overlapping intervals (within a given file).
117
118 .. class:: warningmark
119
120 This tool requires that `bedtools`__ has been installed on your system.
121
122 ------
123
124 **Example input**::
125
126 # 1.bedgraph
127 chr1 1000 1500 10
128 chr1 2000 2100 20
129
130 # 2.bedgraph
131 chr1 900 1600 60
132 chr1 1700 2050 50
133
134 # 3.bedgraph
135 chr1 1980 2070 80
136 chr1 2090 2100 20
137
138
139 ------
140
141 **Examples using the Zero Coverage checkbox**
142
143 Output example (*without* checking "Report regions with zero coverage")::
144
145 chr1 900 1000 0 60 0
146 chr1 1000 1500 10 60 0
147 chr1 1500 1600 0 60 0
148 chr1 1700 1980 0 50 0
149 chr1 1980 2000 0 50 80
150 chr1 2000 2050 20 50 80
151 chr1 2050 2070 20 0 80
152 chr1 2070 2090 20 0 0
153 chr1 2090 2100 20 0 20
154
155
156 Output example (*with* checking "Report regions with zero coverage"). The lines marked with (*) are not covered in any input file, but are still reported (The asterisk marking does not appear in the file).::
157
158 chr1 0 900 0 0 0 (*)
159 chr1 900 1000 0 60 0
160 chr1 1000 1500 10 60 0
161 chr1 1500 1600 0 60 0
162 chr1 1600 1700 0 0 0 (*)
163 chr1 1700 1980 0 50 0
164 chr1 1980 2000 0 50 80
165 chr1 2000 2050 20 50 80
166 chr1 2050 2070 20 0 80
167 chr1 2070 2090 20 0 0
168 chr1 2090 2100 20 0 20
169 chr1 2100 247249719 0 0 0 (*)
170
171
172 ------
173
174 **Examples adjusting the "Filler value" for no-covered intervals**
175
176 The default value is '0', but you can use any other value.
177
178 Output example with **filler = N/A**::
179
180 chr1 900 1000 N/A 60 N/A
181 chr1 1000 1500 10 60 N/A
182 chr1 1500 1600 N/A 60 N/A
183 chr1 1600 1700 N/A N/A N/A
184 chr1 1700 1980 N/A 50 N/A
185 chr1 1980 2000 N/A 50 80
186 chr1 2000 2050 20 50 80
187 chr1 2050 2070 20 N/A 80
188 chr1 2070 2090 20 N/A N/A
189 chr1 2090 2100 20 N/A 20
190
191
192 ------
193
194 **Examples using the "sample name" labels**::
195
196 chrom start end WT-1 WT-2 KO-1
197 chr1 900 1000 N/A 60 N/A
198 chr1 1000 1500 10 60 N/A
199 chr1 1500 1600 N/A 60 N/A
200 chr1 1600 1700 N/A N/A N/A
201 chr1 1700 1980 N/A 50 N/A
202 chr1 1980 2000 N/A 50 80
203 chr1 2000 2050 20 50 80
204 chr1 2050 2070 20 N/A 80
205 chr1 2070 2090 20 N/A N/A
206 chr1 2090 2100 20 N/A 20
207
208
209 ------
210
211 **Non-numeric values**
212
213 The input BedGraph files can contain any kind of value in the fourth column, not necessarily a numeric value.
214
215 Input Example::
216
217 File-1 File-2
218 chr1 200 300 Sample1 chr1 100 240 0.75
219 chr1 400 450 Sample1 chr1 250 700 0.43
220 chr1 530 600 Sample2
221
222 Output Example::
223
224 chr1 100 200 0 0.75
225 chr1 200 240 Sample1 0.75
226 chr1 240 250 Sample1 0
227 chr1 250 300 Sample1 0.43
228 chr1 300 400 0 0.43
229 chr1 400 450 Sample1 0.43
230 chr1 450 530 0 0.43
231 chr1 530 600 Sample2 0.43
232 chr1 600 700 0 0.43
233
234
235 -----
236
237 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.`__
238
239 .. __: http://code.google.com/p/bedtools/
240 .. __: http://code.google.com/p/bedtools/
241 .. __: http://cphg.virginia.edu/quinlan/
242 .. __: http://bioinformatics.oxfordjournals.org/content/26/6/841.short
243
244
245
246
247 </help>
248 </tool>