Mercurial > repos > bgruening > hicexplorer_hicplottads
comparison hicPlotTADs.xml @ 0:5e0a39c5bcf6 draft
planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit 2f347b0756d720114f037ed1ff9ba4836e1b3b04
author | bgruening |
---|---|
date | Thu, 30 Mar 2017 02:59:24 -0400 |
parents | |
children | 3615a7c5c119 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:5e0a39c5bcf6 |
---|---|
1 <tool id="hicexplorer_hicplottads" name="@BINARY@" version="@WRAPPER_VERSION@.0"> | |
2 <description>Plots the diagonal, and some values close to the diagonal of a HiC matrix</description> | |
3 <macros> | |
4 <token name="@BINARY@">hicPlotTADs</token> | |
5 <import>macros.xml</import> | |
6 </macros> | |
7 <expand macro="requirements" /> | |
8 <command detect_errors="aggressive"> | |
9 <![CDATA[ | |
10 sed '/^$/d' '$tracks_config' && | |
11 | |
12 @BINARY@ | |
13 --tracks '$tracks_config' | |
14 #if $region and $region is not None: | |
15 --region '$region' | |
16 #end if | |
17 --outFileName plot.svg | |
18 | |
19 ]]> | |
20 </command> | |
21 <configfiles> | |
22 <configfile name="tracks_config"> | |
23 ## lines that start with '#' are comment lines | |
24 ## and are not interpreted by the program | |
25 ## the different tracks are represented by sections in this file | |
26 ## each section starts with a header of the form [hic] | |
27 ## the content of the section label (in the previous example 'hic') is irrelevant for | |
28 ## plotting and only used to tell the user when something goes wrong. | |
29 ## There are two exceptions for this, the [x-axis] and the [spacer] sections | |
30 ## that use the secion label to determine the action. | |
31 | |
32 #if $x_axis.x_axis_select == "yes": | |
33 [x-axis] | |
34 fontsize = $x_axis.fontsize | |
35 where = $x_axis.where | |
36 #else: | |
37 [x-axis] | |
38 #end if | |
39 | |
40 #for $counter, $track in enumerate($tracks): | |
41 [hic_section_$counter] | |
42 | |
43 file = $track.track_input | |
44 | |
45 #if $track.title | |
46 title = $track.title | |
47 #end if | |
48 | |
49 #if $track.colormap and $track.track_input.ext == "h5": | |
50 colormap = $track.colormap | |
51 #end if | |
52 | |
53 #if $track.color and $track.track_input.ext != "h5": | |
54 color = $track.color | |
55 #end if | |
56 | |
57 #if $track.depth: | |
58 depth = $track.depth | |
59 #end if | |
60 | |
61 #if $track.display: | |
62 display = $track.display | |
63 #end if | |
64 | |
65 ##color = black | |
66 | |
67 #if $track.width | |
68 width = $track.width | |
69 #end if | |
70 | |
71 #if $track.min_value: | |
72 # auto is possible | |
73 min_value = $track.min_value | |
74 #end if | |
75 | |
76 #if $track.max_value: | |
77 max_value = $track.max_value | |
78 #end if | |
79 | |
80 #if $track.transform | |
81 transform = $track.transform | |
82 #end if | |
83 | |
84 #if $track.boundaries_file: | |
85 boundaries_file = $track.boundaries_file | |
86 #end if | |
87 | |
88 #if $track.x_labels == 'yes': | |
89 x labels = yes | |
90 #end if | |
91 | |
92 #if $track.track_input.ext == "bedgraph": | |
93 #set $columns = len(open(str($track.track_input)).readline().split('\t')) | |
94 #if $columns > 5: | |
95 file_type = bedgraph_matrix | |
96 #else: | |
97 file_type = bedgraph | |
98 #end if | |
99 #elif $track.track_input.ext == "h5": | |
100 file_type = hic_matrix | |
101 #else | |
102 file_type = $track.track_input.ext | |
103 #end if | |
104 | |
105 ## show masked bins plots as white lines | |
106 ## those bins that were not used during the correction | |
107 ## the default is to extend neighboring bins to | |
108 ## obtain an aesthetically pleasant output | |
109 #if $track.show_masked_bins: | |
110 show_masked_bins = $track.show_masked_bins | |
111 #end if | |
112 | |
113 #if $track.show_data_range: | |
114 show data range = $track.show_data_range | |
115 #end if | |
116 | |
117 #if $track.nans_to_zeros: | |
118 nans to zeros = $track.nans_to_zeros | |
119 #end if | |
120 | |
121 ## to turn off/on printing of labels | |
122 #if str($track.labels) == 'off' | |
123 labels = off | |
124 #end if | |
125 | |
126 #if $track.global_max_row == 'yes': | |
127 global max row = yes | |
128 #end if | |
129 | |
130 ## optional: font size can be given if default are not good | |
131 #if $track.fontsize: | |
132 fontsize = $track.fontsize | |
133 #end if | |
134 | |
135 #if $track.number_of_bins: | |
136 number of bins = $track.number_of_bins | |
137 #end if | |
138 | |
139 #if $track.orientation | |
140 orientation = $track.orientation | |
141 #end if | |
142 | |
143 #if $track.type | |
144 type = $track.type | |
145 #end if | |
146 | |
147 #if $track.gene_rows | |
148 gene rows = $track.gene_rows | |
149 #end if | |
150 | |
151 #if $track.spacer_width: | |
152 [spacer] | |
153 width = $track.spacer_width | |
154 #end if | |
155 | |
156 | |
157 #end for</configfile> | |
158 </configfiles> | |
159 <inputs> | |
160 <expand macro="region" /> | |
161 <repeat name="tracks" min="1" title="Include tracks in your plot" | |
162 help="Tracks can be of different filetypes. E.g BED, HiC-Matrix, BigWig or BedGraph"> | |
163 | |
164 <param name="track_input" type="data" format="h5,bed,bedgraph,bigwig,tabular" label="Track file"/> | |
165 <param name="boundaries_file" type="data" optional="True" format="bed" label="Boundaries file"/> | |
166 <param name="title" type="text" optional="true" label="Plot title"/> | |
167 <expand macro="colormap" /> | |
168 <param name="color" type="color" value="#000000" label="Track color" optional="True" /> | |
169 <param name="min_value" type="float" value="" optional="True" label="Minimum value"/> | |
170 <param name="max_value" type="float" value="" optional="True" label="Maximum value"/> | |
171 | |
172 <param name="width" type="float" value="1.5" optional="True" label="Width"/> | |
173 | |
174 <param name="transform" type="select" optional="True" label="Plot the transformed value"> | |
175 <option value="log1p">log1p</option> | |
176 <option value="log">log</option> | |
177 </param> | |
178 <param name="show_masked_bins" type="boolean" truevalue="yes" falsevalue="no" checked="false" | |
179 label="Show masked bins" /> | |
180 | |
181 <param name="nans_to_zeros" type="boolean" truevalue="True" falsevalue="False" checked="false" | |
182 label="NAN's to zeros" /> | |
183 | |
184 <param name="show_data_range" type="boolean" truevalue="yes" falsevalue="no" checked="false" | |
185 label="SHow data range" /> | |
186 | |
187 <param name="labels" type="boolean" truevalue="on" falsevalue="off" checked="true" | |
188 label="Plot labels" /> | |
189 | |
190 <param name="x_labels" type="boolean" truevalue="yes" falsevalue="no" checked="false" | |
191 label="X labels" /> | |
192 | |
193 <param name="global_max_row" type="boolean" truevalue="yes" falsevalue="no" checked="false" | |
194 label="Global max rows" /> | |
195 | |
196 <param name="orientation" type="select" optional="True" label="Orientation"> | |
197 <option value="inverted">Inverted</option> | |
198 </param> | |
199 | |
200 <param name="display" type="select" optional="True" label="Display type"> | |
201 <option value="collapsed">collapsed</option> | |
202 <option value="domain">domain</option> | |
203 <option value="interlaced">interlaced</option> | |
204 </param> | |
205 | |
206 <param name="type" type="select" optional="True" label="Plotting type"> | |
207 <option value="lines">Lines</option> | |
208 <option value="vlines">vertical dotted lines from the top to the bottom</option> | |
209 <option value="arcplot">arcplot</option> | |
210 <option value="interaction">interaction</option> | |
211 <option value="genes">Genes</option> | |
212 </param> | |
213 | |
214 <param name="depth" type="integer" value="8000000" optional="True" label="Depth" /> | |
215 <param name="number_of_bins" type="integer" value="" optional="True" label="Number of bins" /> | |
216 | |
217 <param name="fontsize" type="integer" value="" optional="True" label="Fontsize" /> | |
218 <param name="gene_rows" type="integer" value="" optional="True" label="Gene rows" /> | |
219 | |
220 <param name="spacer_width" type="float" value="" optional="True" | |
221 label="Include spacer at the end of the track." help="Width of the spacer." /> | |
222 | |
223 </repeat> | |
224 | |
225 <conditional name="x_axis"> | |
226 <param name="x_axis_select" type="select" label="Configure x-axis"> | |
227 <option value="no" selected="True">No</option> | |
228 <option value="yes">Yes</option> | |
229 </param> | |
230 <when value="yes"> | |
231 <param name="fontsize" type="integer" value="" optional="True" label="Fontsize" /> | |
232 <param name="where" type="select" optional="True" label="Where to place the x-axis"> | |
233 <option value="top">Top</option> | |
234 <option value="bottom">Bottom</option> | |
235 </param> | |
236 </when> | |
237 <when value="no" /> | |
238 </conditional> | |
239 | |
240 </inputs> | |
241 <outputs> | |
242 <data name="outFileName" from_work_dir="plot.svg" format="svg"/> | |
243 </outputs> | |
244 <tests> | |
245 <test> | |
246 <param name="region" value="chrX:3000000-3500000"/> | |
247 <repeat name="tracks"> | |
248 <param name="track_input" value="Li_et_al_2015.h5" ftype="h5" /> | |
249 <param name="title" value="Kc DpnII (Li et al. 2015)"/> | |
250 <param name="colormap" value="RdYlBu_r"/> | |
251 <param name="depth" value="200000"/> | |
252 <param name="transform" value="log1p"/> | |
253 <param name="boundaries_file" value="domains.bed"/> | |
254 <param name="spacer_width" value="0.5"/> | |
255 </repeat> | |
256 <repeat name="tracks"> | |
257 <param name="track_input" value="tad_classification.bed" ftype="bed" /> | |
258 <param name="title" value="TAD state"/> | |
259 <param name="width" value="0.5"/> | |
260 <param name="display" value="collapsed"/> | |
261 <param name="labels" value="off"/> | |
262 </repeat> | |
263 <repeat name="tracks"> | |
264 <param name="track_input" value="tad_score.gz" ftype="bedgraph" /> | |
265 <param name="title" value="TAD separation score (Ramirez et al.)"/> | |
266 <param name="width" value="10"/> | |
267 <param name="type" value="lines"/> | |
268 <param name="spacer_width" value="1"/> | |
269 </repeat> | |
270 <repeat name="tracks"> | |
271 <param name="track_input" value="dm3_genes.bed.gz" ftype="bed" /> | |
272 <param name="title" value="genes"/> | |
273 <param name="width" value="5"/> | |
274 <param name="fontsize" value="10"/> | |
275 <param name="spacer_width" value="1"/> | |
276 </repeat> | |
277 <repeat name="tracks"> | |
278 <param name="track_input" value="dm3_genes.bed.gz" ftype="bed" /> | |
279 <param name="title" value="max num rows 3"/> | |
280 <param name="width" value="3"/> | |
281 <param name="fontsize" value="8"/> | |
282 <param name="gene_rows" value="3"/> | |
283 <param name="spacer_width" value="1"/> | |
284 </repeat> | |
285 <repeat name="tracks"> | |
286 <param name="track_input" value="dm3_genes.bed6.gz" ftype="bed" /> | |
287 <param name="title" value="bed6 global max row"/> | |
288 <param name="width" value="20"/> | |
289 <param name="fontsize" value="10"/> | |
290 <param name="global_max_row" value="True"/> | |
291 </repeat> | |
292 <repeat name="tracks"> | |
293 <param name="track_input" value="domains.bed" ftype="bed" /> | |
294 <param name="type" value="vlines"/> | |
295 </repeat> | |
296 <output name="outFileName" file="hicPlotTADs_result1.svg" ftype="svg" compare="sim_size" delta="35000"/> | |
297 </test> | |
298 </tests> | |
299 <help><![CDATA[ | |
300 | |
301 **What it does** | |
302 | |
303 Plots the diagonal, and some values close to the diagonal of a HiC matrix. The diagonal of the matrix is plotted horizontally for a region. | |
304 | |
305 ]]></help> | |
306 <expand macro="citations" /> | |
307 </tool> |