view 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
line wrap: on
line source

%!PS-Adobe-3.0 EPSF-3.0
%%Creator: ViennaRNA-2.3.1
%%CreationDate: Tue May 30 20:24:19 2017
%%Title: RNA Secondary Structure Plot
%%BoundingBox: 0 0 700 700
%%DocumentFonts: Helvetica
%%Pages: 1
%%EndComments

%Options: --noLP 
% to switch off outline pairs of sequence comment or
% delete the appropriate line near the end of the file

%%BeginProlog
/RNAplot 100 dict def
RNAplot begin
/fsize  14 def
/outlinecolor {0.2 setgray} bind def
/paircolor    {0.2 setgray} bind def
/seqcolor     {0   setgray} bind def
/cshow  { dup stringwidth pop -2 div fsize -3 div rmoveto show} bind def
/min { 2 copy gt { exch } if pop } bind def
/max { 2 copy lt { exch } if pop } bind def
/arccoords { % i j arccoords
  % puts optimal x1 y1 x2 y2 coordinates used in bezier curves from i to j
  % onto the stack
  dup 3 -1 roll dup 4 -1 roll lt dup dup 5 2 roll {exch} if
  dup 3 -1 roll dup 3 -1 roll exch sub 1 sub dup
  4 -2 roll 5 -1 roll {exch} if 4 2 roll
  sequence length dup 2 div exch 3 1 roll lt 
  {exch 5 -1 roll pop 4 -2 roll exch 4 2 roll}
  { 4 2 roll 5 -1 roll dup 6 1 roll {exch} if
    4 -2 roll exch pop dup 3 -1 roll dup 4 1 roll
    exch add 4 -1 roll dup 5 1 roll sub 1 sub
    5 -1 roll not {4 -2 roll exch 4 2 roll} if
  }ifelse
   % compute the scalingfactor and prepare (1-sf) and sf*r
  2 mul exch cpr 3 1 roll div dup
  3 -1 roll mul exch 1 exch sub exch
   % compute the coordinates
  3 -1 roll 1 sub coor exch get aload pop % get coord for i
  4 -1 roll dup 5 1 roll mul 3 -1 roll dup 4 1 roll add exch % calculate y1
  4 -1 roll dup 5 1 roll mul 3 -1 roll dup 4 1 roll add exch % calculate x1
  5 -1 roll 1 sub coor exch get aload pop % get coord for j
  % duplicate j coord
  dup 3 -1 roll dup 4 1 roll exch 8 2 roll
  6 -1 roll dup 7 1 roll mul 5 -1 roll dup 6 1 roll add exch % calculate y2
  6 -1 roll mul 5 -1 roll add exch % calculate x2
  6 -2 roll % reorder
} bind def
/drawoutline {
  gsave outlinecolor newpath
  coor 0 get aload pop 0.8 0 360 arc % draw 5' circle of 1st sequence
  currentdict /cutpoint known        % check if cutpoint is defined
  {coor 0 cutpoint getinterval
   {aload pop lineto} forall         % draw outline of 1st sequence
   coor cutpoint 1 add get aload pop
   2 copy moveto 0.8 0 360 arc       % draw 5' circle of 2nd sequence
   coor cutpoint 1 add coor length cutpoint 1 add sub getinterval
   {aload pop lineto} forall}        % draw outline of 2nd sequence
  {coor {aload pop lineto} forall}   % draw outline as a whole
  ifelse
  stroke grestore
} bind def
/drawpairs {
  paircolor
  0.7 setlinewidth
  [9 3.01] 9 setdash
  newpath
  pairs {aload pop
      currentdict (cpr) known
      { exch dup
        coor  exch 1 sub get aload pop moveto
        exch arccoords curveto
      }
      { coor exch 1 sub get aload pop moveto
        coor exch 1 sub get aload pop lineto
      }ifelse
  } forall
  stroke
} bind def
% draw bases
/drawbases {
  [] 0 setdash
  seqcolor
  0
  coor {
    aload pop moveto
    dup sequence exch 1 getinterval cshow
    1 add
  } forall
  pop
} bind def

/init {
  /Helvetica findfont fsize scalefont setfont
  1 setlinejoin
  1 setlinecap
  0.8 setlinewidth
  % find the coordinate range
  /xmax -1000 def /xmin 10000 def
  /ymax -1000 def /ymin 10000 def
  coor {
      aload pop
      dup ymin lt {dup /ymin exch def} if
      dup ymax gt {/ymax exch def} {pop} ifelse
      dup xmin lt {dup /xmin exch def} if
      dup xmax gt {/xmax exch def} {pop} ifelse
  } forall
  /size {xmax xmin sub ymax ymin sub max} bind def
  /width {xmax xmin sub} bind def
  /height {ymax ymin sub} bind def
  10 10 translate
  680 size 10 add div dup scale
  size width sub width xmin sub xmax sub add 2 div 5 add
  size height sub height ymin sub ymax sub add 2 div 5 add
  translate
} bind def
end
RNAplot begin
% extra definitions for standard anotations
/min { 2 copy gt { exch } if pop } bind def
/BLACK { 0 0 0 } def
/RED   { 1 0 0 } def
/GREEN { 0 1 0 } def
/BLUE  { 0 0 1 } def
/WHITE { 1 1 1 } def
/LabelFont { % font size LabelFont
  exch findfont exch fsize mul scalefont setfont
} bind def
/Label { % i dx dy (text) Label
  % write text at base i plus offset dx, dy
  4 3 roll 1 sub coor exch get aload pop moveto
  3 1 roll fsize mul exch fsize mul exch rmoveto
  show
} bind def
/cmark { % i cmark   draw circle around base i
  newpath 1 sub coor exch get aload pop
  fsize 2 div 0 360 arc stroke
} bind def
/gmark { % i j c gmark
  % draw basepair i,j with c counter examples in gray
  gsave
  3 min [0 0.33 0.66 0.9] exch get setgray
  1 sub dup coor exch get aload pop moveto
  sequence exch 1 getinterval cshow
  1 sub dup coor exch get aload pop moveto
  sequence exch 1 getinterval cshow
  grestore
} bind def
/segmark { % f i j lw r g b segmark
  % mark segment [i,j] with outline width lw and color rgb
  % use omark and Fomark instead
  gsave
  setrgbcolor setlinewidth
  newpath
  1 sub exch 1 sub dup
  coor exch get aload pop moveto
  currentdict (cpr) known
  {
    3 -1 roll dup 4 1 roll dup
    {
      3 1 roll dup 3 -1 roll dup
      4 1 roll exch 5 2 roll exch
    }
    {
      3 1 roll exch
    } ifelse
    1 exch { coor exch get aload pop lineto } for
    {
      dup 3 1 roll 1 add exch 1 add arccoords pop pop
      4 2 roll 5 -1 roll coor exch get aload pop curveto
    } if
  }
  {
    exch 1 exch {
      coor exch get aload pop lineto
    } for
  } ifelse
  { closepath fill } if  stroke
  grestore
} bind def
/omark { % i j lw r g b omark
  % stroke segment [i..j] with linewidth lw, color rgb
  false 7 1 roll segmark
} bind def
/Fomark { % i j r g b Fomark
  % fill segment [i..j] with color rgb
  % should precede drawbases
  1 4 1 roll true 7 1 roll segmark
} bind def
/BFmark{ % i j k l r g b BFmark
  % fill block between pairs (i,j) and (k,l) with color rgb
  % should precede drawbases
  gsave
  setrgbcolor
  newpath
  currentdict (cpr) known
  {
    dup 1 sub coor exch get aload pop moveto % move to l
    dup 1 sub 4 -1 roll dup 5 1 roll 1 sub 1 exch
    { coor exch get aload pop lineto } for % lines from l to j
    3 -1 roll 4 -1 roll dup 5 1 roll arccoords curveto % curve from j to i
    exch dup 4 -1 roll 1 sub exch 1 sub 1 exch
    { coor exch get aload pop lineto } for % lines from i to k
    exch arccoords curveto% curve from k to l
  }
  {  exch 4 3 roll exch 1 sub exch 1 sub dup
     coor exch get aload pop moveto
     exch 1 exch { coor exch get aload pop lineto } for
     exch 1 sub exch 1 sub dup
     coor exch get aload pop lineto
     exch 1 exch { coor exch get aload pop lineto } for
  } ifelse
    closepath fill stroke
   grestore
} bind def
/hsb {
  dup 0.3 mul 1 exch sub sethsbcolor
} bind def
/colorpair { % i j hue sat colorpair
  % draw basepair i,j in color
  % 1 index 0.00 ne {
  gsave
  newpath
  hsb
  fsize setlinewidth
  currentdict (cpr) known
  {
    exch dup
    coor  exch 1 sub get aload pop moveto
    exch arccoords curveto
  }
  { 1 sub coor exch get aload pop moveto
    1 sub coor exch get aload pop lineto
  } ifelse
   stroke
   grestore
   % } if
} bind def
end

%%EndProlog
RNAplot begin
% data start here
/sequence (\
GUUUCCGUAGUGUAGUGGUUAUCACGUUCGCCUCACACGCGAAAGGU_________CCCCGGUUCGAAACCGGGCGGAAACA\
) def
/coor [
[126.01442719 205.80749512]
[125.44680786 190.81823730]
[124.87918091 175.82897949]
[124.31156158 160.83972168]
[123.74394226 145.85047913]
[123.17631531 130.86122131]
[122.60869598 115.87195587]
[107.91925812 124.77088928]
[91.87033844 122.99333954]
[80.97422791 112.51052094]
[66.42591858 116.16383362]
[51.87760544 119.81713867]
[47.74618530 134.60993958]
[36.76065063 145.34370422]
[21.87605476 149.13108826]
[7.09627628 144.95332336]
[-3.60299659 133.93420410]
[-7.34371328 119.03780365]
[-3.11964059 104.27119446]
[7.93296814 93.60651398]
[22.84101677 89.91250610]
[37.59431458 94.18284607]
[48.22429657 105.26882935]
[62.77260971 101.61552429]
[77.32091522 97.96221161]
[93.74244690 75.59227753]
[122.92980194 84.59557343]
[115.84320831 71.37512970]
[108.75661469 58.15468216]
[101.67002106 44.93423462]
[94.58342743 31.71378899]
[79.24071503 28.69135094]
[69.47061157 16.48155785]
[69.88626099 0.84949923]
[80.29140472 -10.82384396]
[95.77305603 -13.02667522]
[109.02124786 -4.71888638]
[113.78059387 10.17683983]
[107.80387115 24.62719536]
[114.89046478 37.84764099]
[121.97705841 51.06808853]
[129.06365967 64.28853607]
[136.15025330 77.50897980]
[130.14912415 63.76174545]
[129.68310547 48.76898575]
[134.81886292 34.67558289]
[144.82167053 23.49776077]
[158.26051331 16.83462524]
[173.21282959 15.63941574]
[187.53950500 20.08312035]
[199.19094849 29.53001785]
[206.50028992 42.62862396]
[208.42185974 57.50503159]
[204.68074036 72.03101349]
[195.81214905 84.12845612]
[183.08483887 92.06668854]
[168.31959534 94.71005249]
[153.62709045 91.67971802]
[168.02673340 95.88093567]
[182.42637634 100.08216095]
[196.82603455 104.28337860]
[211.22567749 108.48459625]
[224.12878418 99.65035248]
[239.68653870 101.22833252]
[250.55305481 112.47345734]
[251.59750366 128.07612610]
[242.32670593 140.66921997]
[227.11805725 144.30670166]
[213.15261841 137.27102661]
[207.02444458 122.88423920]
[192.62480164 118.68302155]
[178.22515869 114.48180389]
[163.82551575 110.28057861]
[149.42587280 106.07936096]
[137.59794617 115.30433655]
[138.16557312 130.29359436]
[138.73320007 145.28285217]
[139.30081177 160.27210999]
[139.86843872 175.26136780]
[140.43606567 190.25062561]
[141.00367737 205.23986816]
[143.92169189 224.40065002]
] def
/pairs [
[1 81]
[2 80]
[3 79]
[4 78]
[5 77]
[6 76]
[7 75]
[10 25]
[11 24]
[12 23]
[27 43]
[28 42]
[29 41]
[30 40]
[31 39]
[58 74]
[59 73]
[60 72]
[61 71]
[62 70]
] def

init

% Start Annotations
1 81 0.0 1 colorpair
2 80 0.16 1 colorpair
3 79 0.16 1 colorpair
4 78 0.16 1 colorpair
5 77 0.16 1 colorpair
6 76 0.32 1 colorpair
7 75 0.16 1 colorpair
10 25 0.0 1 colorpair
11 24 0.16 1 colorpair
12 23 0.16 1 colorpair
27 43 0.16 1 colorpair
28 42 0.0 1 colorpair
29 41 0.16 1 colorpair
30 40 0.0 1 colorpair
31 39 0.16 1 colorpair
58 74 0.16 1 colorpair
59 73 0.0 1 colorpair
60 72 0.16 1 colorpair
61 71 0.0 1 colorpair
62 70 0.0 1 colorpair

% End Annotations
% switch off outline pairs or bases by removing these lines
drawoutline
drawpairs
drawbases
% Start Annotations
2 cmark
80 cmark
3 cmark
79 cmark
4 cmark
78 cmark
5 cmark
77 cmark
6 cmark
76 cmark
7 cmark
75 cmark
11 cmark
24 cmark
12 cmark
23 cmark
27 cmark
43 cmark
29 cmark
41 cmark
31 cmark
39 cmark
58 cmark
74 cmark
60 cmark
72 cmark

% End Annotations
% show it
showpage
end
%%EOF