comparison test-data/structure1.ps @ 0:c05c83b3ef0f draft

planemo upload for repository https://github.com/bgruening/galaxytools/tools/GraphClust/AlignCluster commit 4406735e44aba20859c252be39f4e99df28c7a92
author rnateam
date Sat, 27 Oct 2018 13:21:39 -0400
parents
children 953353eacec2
comparison
equal deleted inserted replaced
-1:000000000000 0:c05c83b3ef0f
1 %!PS-Adobe-3.0 EPSF-3.0
2 %%Creator: ViennaRNA-2.2.10
3 %%CreationDate: Sat Oct 27 14:38:56 2018
4 %%Title: RNA Secondary Structure Plot
5 %%BoundingBox: 66 210 518 662
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 72 216 translate
101 % find the coordinate range
102 /xmax -1000 def /xmin 10000 def
103 /ymax -1000 def /ymin 10000 def
104 coor {
105 aload pop
106 dup ymin lt {dup /ymin exch def} if
107 dup ymax gt {/ymax exch def} {pop} ifelse
108 dup xmin lt {dup /xmin exch def} if
109 dup xmax gt {/xmax exch def} {pop} ifelse
110 } forall
111 /size {xmax xmin sub ymax ymin sub max} bind def
112 72 6 mul size div dup scale
113 size xmin sub xmax sub 2 div size ymin sub ymax sub 2 div
114 translate
115 } bind def
116 end
117 RNAplot begin
118 % extra definitions for standard anotations
119 /min { 2 copy gt { exch } if pop } bind def
120 /BLACK { 0 0 0 } def
121 /RED { 1 0 0 } def
122 /GREEN { 0 1 0 } def
123 /BLUE { 0 0 1 } def
124 /WHITE { 1 1 1 } def
125 /LabelFont { % font size LabelFont
126 exch findfont exch fsize mul scalefont setfont
127 } bind def
128 /Label { % i dx dy (text) Label
129 % write text at base i plus offset dx, dy
130 4 3 roll 1 sub coor exch get aload pop moveto
131 3 1 roll fsize mul exch fsize mul exch rmoveto
132 show
133 } bind def
134 /cmark { % i cmark draw circle around base i
135 newpath 1 sub coor exch get aload pop
136 fsize 2 div 0 360 arc stroke
137 } bind def
138 /gmark { % i j c gmark
139 % draw basepair i,j with c counter examples in gray
140 gsave
141 3 min [0 0.33 0.66 0.9] exch get setgray
142 1 sub dup coor exch get aload pop moveto
143 sequence exch 1 getinterval cshow
144 1 sub dup coor exch get aload pop moveto
145 sequence exch 1 getinterval cshow
146 grestore
147 } bind def
148 /segmark { % f i j lw r g b segmark
149 % mark segment [i,j] with outline width lw and color rgb
150 % use omark and Fomark instead
151 gsave
152 setrgbcolor setlinewidth
153 newpath
154 1 sub exch 1 sub dup
155 coor exch get aload pop moveto
156 currentdict (cpr) known
157 {
158 3 -1 roll dup 4 1 roll dup
159 {
160 3 1 roll dup 3 -1 roll dup
161 4 1 roll exch 5 2 roll exch
162 }
163 {
164 3 1 roll exch
165 } ifelse
166 1 exch { coor exch get aload pop lineto } for
167 {
168 dup 3 1 roll 1 add exch 1 add arccoords pop pop
169 4 2 roll 5 -1 roll coor exch get aload pop curveto
170 } if
171 }
172 {
173 exch 1 exch {
174 coor exch get aload pop lineto
175 } for
176 } ifelse
177 { closepath fill } if stroke
178 grestore
179 } bind def
180 /omark { % i j lw r g b omark
181 % stroke segment [i..j] with linewidth lw, color rgb
182 false 7 1 roll segmark
183 } bind def
184 /Fomark { % i j r g b Fomark
185 % fill segment [i..j] with color rgb
186 % should precede drawbases
187 1 4 1 roll true 7 1 roll segmark
188 } bind def
189 /BFmark{ % i j k l r g b BFmark
190 % fill block between pairs (i,j) and (k,l) with color rgb
191 % should precede drawbases
192 gsave
193 setrgbcolor
194 newpath
195 currentdict (cpr) known
196 {
197 dup 1 sub coor exch get aload pop moveto % move to l
198 dup 1 sub 4 -1 roll dup 5 1 roll 1 sub 1 exch
199 { coor exch get aload pop lineto } for % lines from l to j
200 3 -1 roll 4 -1 roll dup 5 1 roll arccoords curveto % curve from j to i
201 exch dup 4 -1 roll 1 sub exch 1 sub 1 exch
202 { coor exch get aload pop lineto } for % lines from i to k
203 exch arccoords curveto% curve from k to l
204 }
205 { exch 4 3 roll exch 1 sub exch 1 sub dup
206 coor exch get aload pop moveto
207 exch 1 exch { coor exch get aload pop lineto } for
208 exch 1 sub exch 1 sub dup
209 coor exch get aload pop lineto
210 exch 1 exch { coor exch get aload pop lineto } for
211 } ifelse
212 closepath fill stroke
213 grestore
214 } bind def
215 /hsb {
216 dup 0.3 mul 1 exch sub sethsbcolor
217 } bind def
218 /colorpair { % i j hue sat colorpair
219 % draw basepair i,j in color
220 % 1 index 0.00 ne {
221 gsave
222 newpath
223 hsb
224 fsize setlinewidth
225 currentdict (cpr) known
226 {
227 exch dup
228 coor exch 1 sub get aload pop moveto
229 exch arccoords curveto
230 }
231 { 1 sub coor exch get aload pop moveto
232 1 sub coor exch get aload pop lineto
233 } ifelse
234 stroke
235 grestore
236 % } if
237 } bind def
238 end
239
240 %%EndProlog
241 RNAplot begin
242 % data start here
243 /sequence (\
244 AUGAAUAUAGUUUAAA_UAGAACAUUAGAUUUUCAAACUAAUAGUAGAGGC\
245 ) def
246 /coor [
247 [95.00124359 138.88397217]
248 [87.89935303 137.28974915]
249 [81.21456146 134.41014099]
250 [75.17730713 130.34443665]
251 [69.99568176 125.23274994]
252 [65.84830475 119.25129700]
253 [62.87813568 112.60626221]
254 [61.18754959 105.52667999]
255 [60.83482361 98.25659943]
256 [61.83211517 91.04661560]
257 [48.15361786 84.89042664]
258 [34.47511673 78.73423004]
259 [20.79662132 72.57804108]
260 [6.11008787 78.41596222]
261 [-8.36961174 72.08241272]
262 [-14.05193043 57.33497620]
263 [-7.56564760 42.92304993]
264 [7.24103928 37.39696503]
265 [21.58358574 44.03525925]
266 [26.95281219 58.89954376]
267 [40.63130951 65.05573273]
268 [54.30980682 71.21192932]
269 [67.98830414 77.36811829]
270 [94.10119629 61.24235916]
271 [123.82917786 68.86929321]
272 [135.05683899 58.92245483]
273 [146.28450012 48.97561264]
274 [157.51216125 39.02877426]
275 [168.73982239 29.08193398]
276 [168.13914490 13.45589161]
277 [177.76402283 1.13129318]
278 [193.06988525 -2.07256317]
279 [206.82977295 5.35708570]
280 [212.54667664 19.91218758]
281 [207.52125549 34.72026825]
282 [194.12637329 42.78940201]
283 [178.68666077 40.30959702]
284 [167.45899963 50.25643539]
285 [156.23133850 60.20327377]
286 [145.00367737 70.15011597]
287 [133.77601624 80.09695435]
288 [136.87315369 86.68378448]
289 [138.69926453 93.72961426]
290 [139.19142151 100.99159241]
291 [138.33265686 108.21938324]
292 [136.15257263 115.16385651]
293 [132.72630310 121.58563232]
294 [128.17196655 127.26335907]
295 [122.64655304 132.00131226]
296 [116.34051514 135.63619995]
297 [109.47121429 138.04269409]
298 ] def
299 /pairs [
300 [10 23]
301 [11 22]
302 [12 21]
303 [13 20]
304 [25 41]
305 [26 40]
306 [27 39]
307 [28 38]
308 [29 37]
309 ] def
310
311 init
312
313 % Start Annotations
314 10 23 0.16 1 colorpair
315 11 22 0.16 1 colorpair
316 12 21 0.16 1 colorpair
317 13 20 0.48 1 colorpair
318 25 41 0.32 1 colorpair
319 26 40 0.32 1 colorpair
320 27 39 0.32 1 colorpair
321 28 38 0.48 1 colorpair
322 29 37 0.32 1 colorpair
323
324 % End Annotations
325 % switch off outline pairs or bases by removing these lines
326 drawoutline
327 drawpairs
328 drawbases
329 % Start Annotations
330 23 cmark
331 11 cmark
332 22 cmark
333 12 cmark
334 21 cmark
335 13 cmark
336 20 cmark
337 25 cmark
338 41 cmark
339 26 cmark
340 40 cmark
341 27 cmark
342 39 cmark
343 28 cmark
344 38 cmark
345 29 cmark
346 37 cmark
347
348 % End Annotations
349 % show it
350 showpage
351 end
352 %%EOF