Mercurial > repos > rnateam > graphclust_postprocessing
comparison test-data/1.cluster.top5.alirna.ps @ 17:f93c868203cc draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/GraphClust/CollectResults commit 4406735e44aba20859c252be39f4e99df28c7a92
author | rnateam |
---|---|
date | Sat, 27 Oct 2018 13:23:06 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
16:79df97a1bc0f | 17:f93c868203cc |
---|---|
1 %!PS-Adobe-3.0 EPSF-3.0 | |
2 %%Creator: ViennaRNA-2.3.1 | |
3 %%CreationDate: Tue May 30 20:24:19 2017 | |
4 %%Title: RNA Secondary Structure Plot | |
5 %%BoundingBox: 0 0 700 700 | |
6 %%DocumentFonts: Helvetica | |
7 %%Pages: 1 | |
8 %%EndComments | |
9 | |
10 %Options: --noLP | |
11 % to switch off outline pairs of sequence comment or | |
12 % delete the appropriate line near the end of the file | |
13 | |
14 %%BeginProlog | |
15 /RNAplot 100 dict def | |
16 RNAplot begin | |
17 /fsize 14 def | |
18 /outlinecolor {0.2 setgray} bind def | |
19 /paircolor {0.2 setgray} bind def | |
20 /seqcolor {0 setgray} bind def | |
21 /cshow { dup stringwidth pop -2 div fsize -3 div rmoveto show} bind def | |
22 /min { 2 copy gt { exch } if pop } bind def | |
23 /max { 2 copy lt { exch } if pop } bind def | |
24 /arccoords { % i j arccoords | |
25 % puts optimal x1 y1 x2 y2 coordinates used in bezier curves from i to j | |
26 % onto the stack | |
27 dup 3 -1 roll dup 4 -1 roll lt dup dup 5 2 roll {exch} if | |
28 dup 3 -1 roll dup 3 -1 roll exch sub 1 sub dup | |
29 4 -2 roll 5 -1 roll {exch} if 4 2 roll | |
30 sequence length dup 2 div exch 3 1 roll lt | |
31 {exch 5 -1 roll pop 4 -2 roll exch 4 2 roll} | |
32 { 4 2 roll 5 -1 roll dup 6 1 roll {exch} if | |
33 4 -2 roll exch pop dup 3 -1 roll dup 4 1 roll | |
34 exch add 4 -1 roll dup 5 1 roll sub 1 sub | |
35 5 -1 roll not {4 -2 roll exch 4 2 roll} if | |
36 }ifelse | |
37 % compute the scalingfactor and prepare (1-sf) and sf*r | |
38 2 mul exch cpr 3 1 roll div dup | |
39 3 -1 roll mul exch 1 exch sub exch | |
40 % compute the coordinates | |
41 3 -1 roll 1 sub coor exch get aload pop % get coord for i | |
42 4 -1 roll dup 5 1 roll mul 3 -1 roll dup 4 1 roll add exch % calculate y1 | |
43 4 -1 roll dup 5 1 roll mul 3 -1 roll dup 4 1 roll add exch % calculate x1 | |
44 5 -1 roll 1 sub coor exch get aload pop % get coord for j | |
45 % duplicate j coord | |
46 dup 3 -1 roll dup 4 1 roll exch 8 2 roll | |
47 6 -1 roll dup 7 1 roll mul 5 -1 roll dup 6 1 roll add exch % calculate y2 | |
48 6 -1 roll mul 5 -1 roll add exch % calculate x2 | |
49 6 -2 roll % reorder | |
50 } bind def | |
51 /drawoutline { | |
52 gsave outlinecolor newpath | |
53 coor 0 get aload pop 0.8 0 360 arc % draw 5' circle of 1st sequence | |
54 currentdict /cutpoint known % check if cutpoint is defined | |
55 {coor 0 cutpoint getinterval | |
56 {aload pop lineto} forall % draw outline of 1st sequence | |
57 coor cutpoint 1 add get aload pop | |
58 2 copy moveto 0.8 0 360 arc % draw 5' circle of 2nd sequence | |
59 coor cutpoint 1 add coor length cutpoint 1 add sub getinterval | |
60 {aload pop lineto} forall} % draw outline of 2nd sequence | |
61 {coor {aload pop lineto} forall} % draw outline as a whole | |
62 ifelse | |
63 stroke grestore | |
64 } bind def | |
65 /drawpairs { | |
66 paircolor | |
67 0.7 setlinewidth | |
68 [9 3.01] 9 setdash | |
69 newpath | |
70 pairs {aload pop | |
71 currentdict (cpr) known | |
72 { exch dup | |
73 coor exch 1 sub get aload pop moveto | |
74 exch arccoords curveto | |
75 } | |
76 { coor exch 1 sub get aload pop moveto | |
77 coor exch 1 sub get aload pop lineto | |
78 }ifelse | |
79 } forall | |
80 stroke | |
81 } bind def | |
82 % draw bases | |
83 /drawbases { | |
84 [] 0 setdash | |
85 seqcolor | |
86 0 | |
87 coor { | |
88 aload pop moveto | |
89 dup sequence exch 1 getinterval cshow | |
90 1 add | |
91 } forall | |
92 pop | |
93 } bind def | |
94 | |
95 /init { | |
96 /Helvetica findfont fsize scalefont setfont | |
97 1 setlinejoin | |
98 1 setlinecap | |
99 0.8 setlinewidth | |
100 % find the coordinate range | |
101 /xmax -1000 def /xmin 10000 def | |
102 /ymax -1000 def /ymin 10000 def | |
103 coor { | |
104 aload pop | |
105 dup ymin lt {dup /ymin exch def} if | |
106 dup ymax gt {/ymax exch def} {pop} ifelse | |
107 dup xmin lt {dup /xmin exch def} if | |
108 dup xmax gt {/xmax exch def} {pop} ifelse | |
109 } forall | |
110 /size {xmax xmin sub ymax ymin sub max} bind def | |
111 /width {xmax xmin sub} bind def | |
112 /height {ymax ymin sub} bind def | |
113 10 10 translate | |
114 680 size 10 add div dup scale | |
115 size width sub width xmin sub xmax sub add 2 div 5 add | |
116 size height sub height ymin sub ymax sub add 2 div 5 add | |
117 translate | |
118 } bind def | |
119 end | |
120 RNAplot begin | |
121 % extra definitions for standard anotations | |
122 /min { 2 copy gt { exch } if pop } bind def | |
123 /BLACK { 0 0 0 } def | |
124 /RED { 1 0 0 } def | |
125 /GREEN { 0 1 0 } def | |
126 /BLUE { 0 0 1 } def | |
127 /WHITE { 1 1 1 } def | |
128 /LabelFont { % font size LabelFont | |
129 exch findfont exch fsize mul scalefont setfont | |
130 } bind def | |
131 /Label { % i dx dy (text) Label | |
132 % write text at base i plus offset dx, dy | |
133 4 3 roll 1 sub coor exch get aload pop moveto | |
134 3 1 roll fsize mul exch fsize mul exch rmoveto | |
135 show | |
136 } bind def | |
137 /cmark { % i cmark draw circle around base i | |
138 newpath 1 sub coor exch get aload pop | |
139 fsize 2 div 0 360 arc stroke | |
140 } bind def | |
141 /gmark { % i j c gmark | |
142 % draw basepair i,j with c counter examples in gray | |
143 gsave | |
144 3 min [0 0.33 0.66 0.9] exch get setgray | |
145 1 sub dup coor exch get aload pop moveto | |
146 sequence exch 1 getinterval cshow | |
147 1 sub dup coor exch get aload pop moveto | |
148 sequence exch 1 getinterval cshow | |
149 grestore | |
150 } bind def | |
151 /segmark { % f i j lw r g b segmark | |
152 % mark segment [i,j] with outline width lw and color rgb | |
153 % use omark and Fomark instead | |
154 gsave | |
155 setrgbcolor setlinewidth | |
156 newpath | |
157 1 sub exch 1 sub dup | |
158 coor exch get aload pop moveto | |
159 currentdict (cpr) known | |
160 { | |
161 3 -1 roll dup 4 1 roll dup | |
162 { | |
163 3 1 roll dup 3 -1 roll dup | |
164 4 1 roll exch 5 2 roll exch | |
165 } | |
166 { | |
167 3 1 roll exch | |
168 } ifelse | |
169 1 exch { coor exch get aload pop lineto } for | |
170 { | |
171 dup 3 1 roll 1 add exch 1 add arccoords pop pop | |
172 4 2 roll 5 -1 roll coor exch get aload pop curveto | |
173 } if | |
174 } | |
175 { | |
176 exch 1 exch { | |
177 coor exch get aload pop lineto | |
178 } for | |
179 } ifelse | |
180 { closepath fill } if stroke | |
181 grestore | |
182 } bind def | |
183 /omark { % i j lw r g b omark | |
184 % stroke segment [i..j] with linewidth lw, color rgb | |
185 false 7 1 roll segmark | |
186 } bind def | |
187 /Fomark { % i j r g b Fomark | |
188 % fill segment [i..j] with color rgb | |
189 % should precede drawbases | |
190 1 4 1 roll true 7 1 roll segmark | |
191 } bind def | |
192 /BFmark{ % i j k l r g b BFmark | |
193 % fill block between pairs (i,j) and (k,l) with color rgb | |
194 % should precede drawbases | |
195 gsave | |
196 setrgbcolor | |
197 newpath | |
198 currentdict (cpr) known | |
199 { | |
200 dup 1 sub coor exch get aload pop moveto % move to l | |
201 dup 1 sub 4 -1 roll dup 5 1 roll 1 sub 1 exch | |
202 { coor exch get aload pop lineto } for % lines from l to j | |
203 3 -1 roll 4 -1 roll dup 5 1 roll arccoords curveto % curve from j to i | |
204 exch dup 4 -1 roll 1 sub exch 1 sub 1 exch | |
205 { coor exch get aload pop lineto } for % lines from i to k | |
206 exch arccoords curveto% curve from k to l | |
207 } | |
208 { exch 4 3 roll exch 1 sub exch 1 sub dup | |
209 coor exch get aload pop moveto | |
210 exch 1 exch { coor exch get aload pop lineto } for | |
211 exch 1 sub exch 1 sub dup | |
212 coor exch get aload pop lineto | |
213 exch 1 exch { coor exch get aload pop lineto } for | |
214 } ifelse | |
215 closepath fill stroke | |
216 grestore | |
217 } bind def | |
218 /hsb { | |
219 dup 0.3 mul 1 exch sub sethsbcolor | |
220 } bind def | |
221 /colorpair { % i j hue sat colorpair | |
222 % draw basepair i,j in color | |
223 % 1 index 0.00 ne { | |
224 gsave | |
225 newpath | |
226 hsb | |
227 fsize setlinewidth | |
228 currentdict (cpr) known | |
229 { | |
230 exch dup | |
231 coor exch 1 sub get aload pop moveto | |
232 exch arccoords curveto | |
233 } | |
234 { 1 sub coor exch get aload pop moveto | |
235 1 sub coor exch get aload pop lineto | |
236 } ifelse | |
237 stroke | |
238 grestore | |
239 % } if | |
240 } bind def | |
241 end | |
242 | |
243 %%EndProlog | |
244 RNAplot begin | |
245 % data start here | |
246 /sequence (\ | |
247 GUUUCCGUAGUGUAGUGGUUAUCACGUUCGCCUCACACGCGAAAGGU_________CCCCGGUUCGAAACCGGGCGGAAACA\ | |
248 ) def | |
249 /coor [ | |
250 [126.01442719 205.80749512] | |
251 [125.44680786 190.81823730] | |
252 [124.87918091 175.82897949] | |
253 [124.31156158 160.83972168] | |
254 [123.74394226 145.85047913] | |
255 [123.17631531 130.86122131] | |
256 [122.60869598 115.87195587] | |
257 [107.91925812 124.77088928] | |
258 [91.87033844 122.99333954] | |
259 [80.97422791 112.51052094] | |
260 [66.42591858 116.16383362] | |
261 [51.87760544 119.81713867] | |
262 [47.74618530 134.60993958] | |
263 [36.76065063 145.34370422] | |
264 [21.87605476 149.13108826] | |
265 [7.09627628 144.95332336] | |
266 [-3.60299659 133.93420410] | |
267 [-7.34371328 119.03780365] | |
268 [-3.11964059 104.27119446] | |
269 [7.93296814 93.60651398] | |
270 [22.84101677 89.91250610] | |
271 [37.59431458 94.18284607] | |
272 [48.22429657 105.26882935] | |
273 [62.77260971 101.61552429] | |
274 [77.32091522 97.96221161] | |
275 [93.74244690 75.59227753] | |
276 [122.92980194 84.59557343] | |
277 [115.84320831 71.37512970] | |
278 [108.75661469 58.15468216] | |
279 [101.67002106 44.93423462] | |
280 [94.58342743 31.71378899] | |
281 [79.24071503 28.69135094] | |
282 [69.47061157 16.48155785] | |
283 [69.88626099 0.84949923] | |
284 [80.29140472 -10.82384396] | |
285 [95.77305603 -13.02667522] | |
286 [109.02124786 -4.71888638] | |
287 [113.78059387 10.17683983] | |
288 [107.80387115 24.62719536] | |
289 [114.89046478 37.84764099] | |
290 [121.97705841 51.06808853] | |
291 [129.06365967 64.28853607] | |
292 [136.15025330 77.50897980] | |
293 [130.14912415 63.76174545] | |
294 [129.68310547 48.76898575] | |
295 [134.81886292 34.67558289] | |
296 [144.82167053 23.49776077] | |
297 [158.26051331 16.83462524] | |
298 [173.21282959 15.63941574] | |
299 [187.53950500 20.08312035] | |
300 [199.19094849 29.53001785] | |
301 [206.50028992 42.62862396] | |
302 [208.42185974 57.50503159] | |
303 [204.68074036 72.03101349] | |
304 [195.81214905 84.12845612] | |
305 [183.08483887 92.06668854] | |
306 [168.31959534 94.71005249] | |
307 [153.62709045 91.67971802] | |
308 [168.02673340 95.88093567] | |
309 [182.42637634 100.08216095] | |
310 [196.82603455 104.28337860] | |
311 [211.22567749 108.48459625] | |
312 [224.12878418 99.65035248] | |
313 [239.68653870 101.22833252] | |
314 [250.55305481 112.47345734] | |
315 [251.59750366 128.07612610] | |
316 [242.32670593 140.66921997] | |
317 [227.11805725 144.30670166] | |
318 [213.15261841 137.27102661] | |
319 [207.02444458 122.88423920] | |
320 [192.62480164 118.68302155] | |
321 [178.22515869 114.48180389] | |
322 [163.82551575 110.28057861] | |
323 [149.42587280 106.07936096] | |
324 [137.59794617 115.30433655] | |
325 [138.16557312 130.29359436] | |
326 [138.73320007 145.28285217] | |
327 [139.30081177 160.27210999] | |
328 [139.86843872 175.26136780] | |
329 [140.43606567 190.25062561] | |
330 [141.00367737 205.23986816] | |
331 [143.92169189 224.40065002] | |
332 ] def | |
333 /pairs [ | |
334 [1 81] | |
335 [2 80] | |
336 [3 79] | |
337 [4 78] | |
338 [5 77] | |
339 [6 76] | |
340 [7 75] | |
341 [10 25] | |
342 [11 24] | |
343 [12 23] | |
344 [27 43] | |
345 [28 42] | |
346 [29 41] | |
347 [30 40] | |
348 [31 39] | |
349 [58 74] | |
350 [59 73] | |
351 [60 72] | |
352 [61 71] | |
353 [62 70] | |
354 ] def | |
355 | |
356 init | |
357 | |
358 % Start Annotations | |
359 1 81 0.0 1 colorpair | |
360 2 80 0.16 1 colorpair | |
361 3 79 0.16 1 colorpair | |
362 4 78 0.16 1 colorpair | |
363 5 77 0.16 1 colorpair | |
364 6 76 0.32 1 colorpair | |
365 7 75 0.16 1 colorpair | |
366 10 25 0.0 1 colorpair | |
367 11 24 0.16 1 colorpair | |
368 12 23 0.16 1 colorpair | |
369 27 43 0.16 1 colorpair | |
370 28 42 0.0 1 colorpair | |
371 29 41 0.16 1 colorpair | |
372 30 40 0.0 1 colorpair | |
373 31 39 0.16 1 colorpair | |
374 58 74 0.16 1 colorpair | |
375 59 73 0.0 1 colorpair | |
376 60 72 0.16 1 colorpair | |
377 61 71 0.0 1 colorpair | |
378 62 70 0.0 1 colorpair | |
379 | |
380 % End Annotations | |
381 % switch off outline pairs or bases by removing these lines | |
382 drawoutline | |
383 drawpairs | |
384 drawbases | |
385 % Start Annotations | |
386 2 cmark | |
387 80 cmark | |
388 3 cmark | |
389 79 cmark | |
390 4 cmark | |
391 78 cmark | |
392 5 cmark | |
393 77 cmark | |
394 6 cmark | |
395 76 cmark | |
396 7 cmark | |
397 75 cmark | |
398 11 cmark | |
399 24 cmark | |
400 12 cmark | |
401 23 cmark | |
402 27 cmark | |
403 43 cmark | |
404 29 cmark | |
405 41 cmark | |
406 31 cmark | |
407 39 cmark | |
408 58 cmark | |
409 74 cmark | |
410 60 cmark | |
411 72 cmark | |
412 | |
413 % End Annotations | |
414 % show it | |
415 showpage | |
416 end | |
417 %%EOF |