0
|
1 <tool id="bedtools_mergebedgraph" name="Merge BedGraph files" version="@WRAPPER_VERSION@.0">
|
|
2 <description></description>
|
|
3 <macros>
|
|
4 <import>macros.xml</import>
|
|
5 </macros>
|
|
6 <expand macro="requirements" />
|
|
7 <expand macro="stdio" />
|
|
8 <command>unionBedGraphs
|
|
9 $header
|
|
10 -filler '$filler'
|
|
11 #if $zero.value == True:
|
|
12 -empty
|
|
13 -g ${chromInfo}
|
|
14 #end if
|
|
15
|
|
16 -i '$input1'
|
|
17 '$input2'
|
|
18 #for $q in $bedgraphs
|
|
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 $bedgraphs
|
|
36 #if $q.name.choice == "tag":
|
|
37 '${q.input.name}'
|
|
38 #else
|
|
39 '${q.input.custom_name}'
|
|
40 #end if
|
|
41 #end for
|
|
42 > '$output'
|
|
43 </command>
|
|
44 <inputs>
|
|
45 <!-- Make it easy for the user, first two input files are always shown -->
|
|
46 <!-- INPUT 1 -->
|
|
47 <param name="input1" format="bedgraph" type="data" label="First BedGraph 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="bedgraph" type="data" label="Second BedGraph 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="bedgraphs" title="Add'l BedGraph files" >
|
|
78 <param name="input" format="bedgraph" type="data" label="BedGraph file" />
|
|
79 <conditional name="name">
|
|
80 <param name="choice" type="select" label="Sample name">
|
|
81 <option value="tag" selected="true">Use input's tag</option>
|
|
82 <option value="custom">Enter custom table name</option>
|
|
83 </param>
|
|
84 <when value="tag">
|
|
85 </when>
|
|
86 <when value="custom">
|
|
87 <param name="custom_name" type="text" area="false" label="Custom sample name"/>
|
|
88 </when>
|
|
89 </conditional>
|
|
90 </repeat>
|
|
91
|
|
92 <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." />
|
|
93
|
|
94 <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" />
|
|
95
|
|
96 <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." />
|
|
97 </inputs>
|
|
98
|
|
99 <outputs>
|
|
100 <data format="tabular" name="output" metadata_source="input1" label="Merged BedGraphs of ${input1.name}, ${input2.name} and so on." />
|
|
101 </outputs>
|
|
102 <help>
|
|
103
|
|
104 **What it does**
|
|
105
|
|
106 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.
|
|
107
|
|
108 .. image:: http://people.virginia.edu/~arq5x/files/bedtools-galaxy/ubg.png
|
|
109
|
|
110
|
|
111 .. class:: warningmark
|
|
112
|
|
113 This tool requires that each BedGraph file is reference-sorted (chrom, then start) and contains non-overlapping intervals (within a given file).
|
|
114
|
|
115
|
|
116 ------
|
|
117
|
|
118 **Example input**::
|
|
119
|
|
120 # 1.bedgraph
|
|
121 chr1 1000 1500 10
|
|
122 chr1 2000 2100 20
|
|
123
|
|
124 # 2.bedgraph
|
|
125 chr1 900 1600 60
|
|
126 chr1 1700 2050 50
|
|
127
|
|
128 # 3.bedgraph
|
|
129 chr1 1980 2070 80
|
|
130 chr1 2090 2100 20
|
|
131
|
|
132
|
|
133 ------
|
|
134
|
|
135 **Examples using the Zero Coverage checkbox**
|
|
136
|
|
137 Output example (*without* checking "Report regions with zero coverage")::
|
|
138
|
|
139 chr1 900 1000 0 60 0
|
|
140 chr1 1000 1500 10 60 0
|
|
141 chr1 1500 1600 0 60 0
|
|
142 chr1 1700 1980 0 50 0
|
|
143 chr1 1980 2000 0 50 80
|
|
144 chr1 2000 2050 20 50 80
|
|
145 chr1 2050 2070 20 0 80
|
|
146 chr1 2070 2090 20 0 0
|
|
147 chr1 2090 2100 20 0 20
|
|
148
|
|
149
|
|
150 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).::
|
|
151
|
|
152 chr1 0 900 0 0 0 (*)
|
|
153 chr1 900 1000 0 60 0
|
|
154 chr1 1000 1500 10 60 0
|
|
155 chr1 1500 1600 0 60 0
|
|
156 chr1 1600 1700 0 0 0 (*)
|
|
157 chr1 1700 1980 0 50 0
|
|
158 chr1 1980 2000 0 50 80
|
|
159 chr1 2000 2050 20 50 80
|
|
160 chr1 2050 2070 20 0 80
|
|
161 chr1 2070 2090 20 0 0
|
|
162 chr1 2090 2100 20 0 20
|
|
163 chr1 2100 247249719 0 0 0 (*)
|
|
164
|
|
165
|
|
166 ------
|
|
167
|
|
168 **Examples adjusting the "Filler value" for no-covered intervals**
|
|
169
|
|
170 The default value is '0', but you can use any other value.
|
|
171
|
|
172 Output example with **filler = N/A**::
|
|
173
|
|
174 chr1 900 1000 N/A 60 N/A
|
|
175 chr1 1000 1500 10 60 N/A
|
|
176 chr1 1500 1600 N/A 60 N/A
|
|
177 chr1 1600 1700 N/A N/A N/A
|
|
178 chr1 1700 1980 N/A 50 N/A
|
|
179 chr1 1980 2000 N/A 50 80
|
|
180 chr1 2000 2050 20 50 80
|
|
181 chr1 2050 2070 20 N/A 80
|
|
182 chr1 2070 2090 20 N/A N/A
|
|
183 chr1 2090 2100 20 N/A 20
|
|
184
|
|
185
|
|
186 ------
|
|
187
|
|
188 **Examples using the "sample name" labels**::
|
|
189
|
|
190 chrom start end WT-1 WT-2 KO-1
|
|
191 chr1 900 1000 N/A 60 N/A
|
|
192 chr1 1000 1500 10 60 N/A
|
|
193 chr1 1500 1600 N/A 60 N/A
|
|
194 chr1 1600 1700 N/A N/A N/A
|
|
195 chr1 1700 1980 N/A 50 N/A
|
|
196 chr1 1980 2000 N/A 50 80
|
|
197 chr1 2000 2050 20 50 80
|
|
198 chr1 2050 2070 20 N/A 80
|
|
199 chr1 2070 2090 20 N/A N/A
|
|
200 chr1 2090 2100 20 N/A 20
|
|
201
|
|
202
|
|
203 ------
|
|
204
|
|
205 **Non-numeric values**
|
|
206
|
|
207 The input BedGraph files can contain any kind of value in the fourth column, not necessarily a numeric value.
|
|
208
|
|
209 Input Example::
|
|
210
|
|
211 File-1 File-2
|
|
212 chr1 200 300 Sample1 chr1 100 240 0.75
|
|
213 chr1 400 450 Sample1 chr1 250 700 0.43
|
|
214 chr1 530 600 Sample2
|
|
215
|
|
216 Output Example::
|
|
217
|
|
218 chr1 100 200 0 0.75
|
|
219 chr1 200 240 Sample1 0.75
|
|
220 chr1 240 250 Sample1 0
|
|
221 chr1 250 300 Sample1 0.43
|
|
222 chr1 300 400 0 0.43
|
|
223 chr1 400 450 Sample1 0.43
|
|
224 chr1 450 530 0 0.43
|
|
225 chr1 530 600 Sample2 0.43
|
|
226 chr1 600 700 0 0.43
|
|
227
|
|
228 @REFERENCES@
|
|
229
|
|
230 </help>
|
|
231 <expand macro="citations" />
|
|
232 </tool>
|