Commit 5af8294b authored by Roman Sarrazin-Gendron's avatar Roman Sarrazin-Gendron
Browse files

Final paper supplementary version

parent 969ac9ad
%!PS-Adobe-3.0 EPSF-3.0
%%Title: RNA Dot Plot
%%Creator: ViennaRNA-2.4.2
%%CreationDate: Fri Dec 07 19:11:24 2018
%%BoundingBox: 0 0 700 720
%%DocumentFonts: Helvetica
%%Pages: 1
%%EndComments
%Options:
%This file contains the square roots of the base pair probabilities in the form
% i j sqrt(p(i,j)) ubox
%%BeginProlog
/DPdict 100 dict def
DPdict begin
/logscale false def
/lpmin 1e-05 log def
/DataVisible [ true true true true] def
/DataTitles [ false false false false ] def
/min { 2 copy gt { exch } if pop } bind def
/max { 2 copy lt { exch } if pop } bind def
/box { %size x y box - draws box centered on x,y
2 index 0.5 mul sub % x -= 0.5
exch 2 index 0.5 mul sub exch % y -= 0.5
3 -1 roll dup rectfill
} bind def
/ubox {
logscale {
log dup add lpmin div 1 exch sub dup 0 lt { pop 0 } if
} if
3 1 roll
exch len exch sub 1 add box
} bind def
/lbox {
3 1 roll
len exch sub 1 add box
} bind def
/drawseq {
% print sequence along all 4 sides
[ [0.7 -0.3 0 ]
[0.7 0.7 len add 0]
[-0.3 len sub -0.4 -90]
[-0.3 len sub 0.7 len add -90]
] {
gsave
aload pop rotate translate
0 1 len 1 sub {
dup 0 moveto
sequence exch 1 getinterval
show
} for
grestore
} forall
} bind def
/drawgrid{
gsave
0.5 dup translate 0.01 setlinewidth
len log 0.9 sub cvi 10 exch exp % grid spacing
dup 1 gt {
dup dup 20 div dup 2 array astore exch 40 div setdash
} { [0.3 0.7] 0.1 setdash } ifelse
0 exch len {
dup dup
0 moveto
len lineto
dup
len exch sub 0 exch moveto
len exch len exch sub lineto
stroke
} for
[] 0 setdash
0.04 setlinewidth
currentdict /cutpoint known {
cutpoint 1 sub
dup dup -1 moveto len 1 add lineto
len exch sub dup
-1 exch moveto len 1 add exch lineto
stroke
} if
%% draw diagonal
0 len moveto len 0 lineto stroke
grestore
} bind def
/drawTitle {
currentdict /DPtitle known {
% center title text
/Helvetica findfont 10 scalefont setfont
360 705 moveto DPtitle dup stringwidth pop 2 div neg 0 rmoveto show
} if
} bind def
/prepareCoords {
0 1 3 {
% check whether we want to display current data
dup DataVisible exch get
{
% check whether we've actually got some data
DataSource exch get dup currentdict exch known {
% data source s_j is present, so find length of array
currentdict exch get length
} { pop 0 } ifelse
} if
} for
exch dup 5 -1 roll add 4 -1 roll dup 5 1 roll 4 -1 roll add max
len add 3 add 700 exch div dup scale
exch 1 add exch 1 add translate
} bind def
/utri{ % i j prob utri
gsave
0.5 dup translate
1 min 2 div
0.85 mul 0.15 add 0.95 0.33
3 1 roll % prepare hsb color
sethsbcolor
% now produce the coordinates for lines
exch 1 sub dup len exch sub dup 4 -1 roll dup 3 1 roll dup len exch sub
moveto lineto lineto closepath fill
grestore
} bind def
/uUDmotif{ % i j uUDmotif
gsave
0.5 dup translate
1 min 2 div
0.85 mul 0.15 add 0.95 0.6
3 1 roll % prepare hsb color
sethsbcolor
% now produce the coordinates for lines
exch 1 sub dup len exch sub dup 4 -1 roll dup 3 1 roll dup len exch sub
moveto lineto lineto closepath fill
grestore
} bind def
/lUDmotif{ % i j lUDmotif
gsave
0.5 dup translate
1 min 2 div
0.85 mul 0.15 add 0.95 0.6
3 1 roll % prepare hsb color
sethsbcolor
% now produce the coordinates for lines
dup len exch sub dup 4 -1 roll 1 sub dup 3 1 roll dup len exch sub
moveto lineto lineto closepath fill
grestore
} bind def
/uHmotif{ % i j uHmotif
gsave
0.5 dup translate
1 min 2 div
0.85 mul 0.15 add 0.95 0.99
3 1 roll % prepare hsb color
sethsbcolor
% now produce the coordinates for lines
exch 1 sub dup len exch sub dup 4 -1 roll dup 3 1 roll dup len exch sub
moveto lineto lineto closepath fill
grestore
} bind def
/lHmotif{ % i j lHmotif
gsave
0.5 dup translate
1 min 2 div
0.85 mul 0.15 add 0.95 0.99
3 1 roll % prepare hsb color
sethsbcolor
% now produce the coordinates for lines
dup len exch sub dup 4 -1 roll 1 sub dup 3 1 roll dup len exch sub
moveto lineto lineto closepath fill
grestore
} bind def
/uImotif{ % i j k l uImotif
gsave
0.5 dup translate
1 min 2 div
0.85 mul 0.15 add 0.95 0.99
3 1 roll % prepare hsb color
sethsbcolor
% now produce the coordinates for lines
1 sub dup 5 1 roll exch len exch sub dup 5 1 roll 3 -1 roll dup
5 1 roll exch 4 1 roll 3 1 roll exch 1 sub len exch sub dup 3 1 roll
moveto lineto lineto lineto closepath fill
grestore
} bind def
/lImotif{ % i j k l lImotif
gsave
0.5 dup translate
1 min 2 div
0.85 mul 0.15 add 0.95 0.99
3 1 roll % prepare hsb color
sethsbcolor
% now produce the coordinates for lines
4 -1 roll 1 sub dup 5 1 roll exch 1 sub len exch sub dup 3 -1 roll exch
5 -1 roll len exch sub dup 6 -1 roll dup 3 1 roll 7 4 roll
moveto lineto lineto lineto closepath fill
grestore
} bind def
/drawDataSquareBottom { % x v n dataSquareBottom draw box
len add 2 add exch lbox
} bind def
/drawDataSquareTop { % x v n dataSquareBottom draw box
neg 1 sub exch lbox
} bind def
/drawDataSquareLeft { % y v n dataSquareBottom draw box
neg 1 sub 3 1 roll lbox
} bind def
/drawDataSquareRight { % y v n dataSquareBottom draw box
% use size x y box to draw box
2 add len add 3 1 roll lbox
} bind def
/drawDataSquareBottomHSB { % x v h s b n dataSquareBottomHSB draw box
% use size x y box to draw box
len add 2 add 5 1 roll sethsbcolor lbox
} bind def
/drawDataSquareTopHSB { % x v h s b n dataSquareBottomHSB draw box
% use size x y box to draw box
neg 1 sub 5 1 roll sethsbcolor lbox
} bind def
/drawDataSquareLeftHSB { % x v h s b n dataSquareLeftHSB draw box
% use size x y box to draw box
neg 1 sub 6 1 roll sethsbcolor lbox
} bind def
/drawDataSquareRightHSB { % x v h s b n dataSquareLeftHSB draw box
% use size x y box to draw box
2 add len add 6 1 roll sethsbcolor lbox
} bind def
/drawDataTitleBottom {
/Helvetica findfont 0.95 scalefont setfont
0 -1.4 3 -1 roll sub moveto
dup stringwidth pop neg 0 rmoveto
show
} bind def
/drawDataTitleTop {
/Helvetica findfont 0.95 scalefont setfont
0 len 1.6 add 3 -1 roll add moveto
dup stringwidth pop neg 0 rmoveto
show
} bind def
/drawDataTitleLeft {
/Helvetica findfont 0.95 scalefont setfont
neg 1.4 sub len 1 add moveto
dup stringwidth pop 0 exch rmoveto -90 rotate
show 90 rotate
} bind def
/drawDataTitleRight {
/Helvetica findfont 0.95 scalefont setfont
1.6 add len add len 1 add moveto
dup stringwidth pop 0 exch rmoveto -90 rotate
show 90 rotate
} bind def
% do not modify the arrays below unless you know what you're doing!
/DataSource [ /topData /leftData /bottomData /rightData ] def
/DataDrawBox [ /drawDataSquareTop /drawDataSquareLeft /drawDataSquareBottom /drawDataSquareRight] def
/DataDrawBoxHSB [ /drawDataSquareTopHSB /drawDataSquareLeftHSB /drawDataSquareBottomHSB /drawDataSquareRightHSB ] def
/DataDrawTitle [ /drawDataTitleTop /drawDataTitleLeft /drawDataTitleBottom /drawDataTitleRight ] def
% this is the logic to parse the auxiliary linear data
% given in arrays topData, leftData, bottomData, and rightData
% See also the Boolean arrays DataVisible and DataTitles that
% are used to control which part of data will be visible
/drawData {
0 1 3 {
% check whether we want to display current data
dup DataVisible exch get
{
% check whether we've actually got some data
dup DataSource exch get dup currentdict exch known {
% data source s_j is present, so we load the
% corresponding data array a and loop over all data sets a[i]
currentdict exch get dup length 1 sub 0 1 3 -1 roll {
dup dup
% now on stack: j a i i i
% load data set, i.e. a[i]
4 -1 roll % j i i i a
dup 3 -1 roll get dup % j i i a a[i] a[i]
% 1. check whether we need to process data set title
6 -1 roll dup 7 1 roll DataTitles exch get {
% get current title drawing function key
6 -1 roll dup 7 1 roll DataDrawTitle exch get
% now on stack: ... j i i a a[i] a[i] title_draw_key
% get current title and execute drawing function
exch 0 get exch currentdict exch get 5 -1 roll exch exec
} { % remove unused variables
pop 3 -1 roll pop
} ifelse
% now on stack: ... j i a a[i]
% 2. process actual data a[k] for 1 <= k < n
dup length 1 sub 1 exch getinterval {
% on stack: j i a a[i][k]
gsave
dup length 2 eq { % print black box if two-valued
% get box drawing function
4 -1 roll dup 5 1 roll DataDrawBox exch get currentdict exch get exch
aload pop 5 -1 roll dup 6 1 roll 4 -1 roll exec
} {
dup length 5 eq { % print box with hsb color
% get box drawing function
4 -1 roll dup 5 1 roll DataDrawBoxHSB exch get currentdict exch get exch
% on stack: j i a f a[i]
% load data array and prepare for drawing
aload pop 8 -1 roll dup 9 1 roll 7 -1 roll exec
} { pop } ifelse
} ifelse
grestore
} forall
exch pop
% left on stack: j a
} for
} if
} if
} for
} bind def
end
%EndProlog
DPdict begin
/DPtitle {
(dot.ps)
} def
/sequence { (\
GGACUCGGGGUGCCCUUCUGCGUGAAGGCUGAGAAAUACCCGUAUCACCUGAUCUGGAUAAUGCCAGCGUAGGGAAGUUC\
) } def
/len { sequence length } bind def
% BEGIN linear data array
/topData [
] def
/leftData [
] def
/bottomData [
] def
/rightData [
] def
% END linear data arrays
%Finally, prepare canvas
%draw title
drawTitle
%prepare coordinate system, draw grid and sequence
/Helvetica findfont 0.95 scalefont setfont
%prepare coordinate system
prepareCoords
%draw sequence arround grid
drawseq
%draw grid
drawgrid
%draw auxiliary linear data (if available)
drawData
%data (commands) starts here
%start of quadruplex data
%start of Hmotif data
%start of Imotif data
%start of base pair probability data
1 6 0.019126934 ubox
1 29 0.005639761 ubox
1 30 0.011825145 ubox
1 37 0.007904769 ubox
1 39 0.007528105 ubox
1 40 0.036107692 ubox
1 41 0.037793228 ubox
1 43 0.005941176 ubox
1 45 0.009458238 ubox
1 46 0.111879094 ubox
1 48 0.022485958 ubox
1 49 0.005870331 ubox
1 78 0.003588292 ubox
1 79 0.007909154 ubox
1 80 0.532680549 ubox
2 6 0.006150229 ubox
2 29 0.012386440 ubox
2 37 0.005859616 ubox
2 39 0.036333394 ubox
2 40 0.037600883 ubox
2 43 0.011496451 ubox
2 45 0.088741628 ubox
2 46 0.749634654 ubox
2 48 0.005864127 ubox
2 78 0.006209753 ubox
2 79 0.563453714 ubox
2 80 0.028861222 ubox
3 11 0.005310996 ubox
3 37 0.019772241 ubox
3 43 0.039740601 ubox
3 45 0.748917713 ubox
3 78 0.567627662 ubox
3 79 0.022357715 ubox
4 10 0.005454496 ubox
4 27 0.017455221 ubox
4 28 0.003693710 ubox
4 33 0.111754188 ubox
4 42 0.036061337 ubox
4 74 0.004346119 ubox
4 77 0.568276468 ubox
5 9 0.004917088 ubox
5 25 0.029277588 ubox
5 26 0.012615326 ubox
5 32 0.112650319 ubox
5 34 0.009950687 ubox
5 42 0.006072961 ubox
5 44 0.103378700 ubox
5 47 0.003795184 ubox
5 74 0.003653682 ubox
5 75 0.119848614 ubox
5 76 0.522733243 ubox
5 77 0.003863364 ubox
6 22 0.007590655 ubox
6 24 0.036267914 ubox
6 31 0.112952009 ubox
6 33 0.010827400 ubox
6 42 0.930942618 ubox
6 74 0.168202072 ubox
6 77 0.004389992 ubox
7 21 0.008266409 ubox
7 23 0.036188091 ubox
7 30 0.112085227 ubox
7 40 0.009716341 ubox
7 41 0.944856707 ubox
7 43 0.025932365 ubox
7 46 0.009635002 ubox
8 21 0.005015749 ubox
8 29 0.111600505 ubox
8 30 0.009144580 ubox
8 39 0.010192800 ubox
8 40 0.942554201 ubox
8 41 0.303237448 ubox
9 21 0.036640219 ubox
9 29 0.012618236 ubox
9 30 0.018072048 ubox
9 39 0.939578676 ubox
9 40 0.310705864 ubox
9 41 0.008005817 ubox
10 21 0.017752361 ubox
10 29 0.046530060 ubox
10 37 0.208978091 ubox
10 39 0.317703965 ubox
10 40 0.007882951 ubox
11 24 0.006335672 ubox
11 25 0.010578335 ubox
11 26 0.027084413 ubox
11 27 0.014564183 ubox
11 28 0.046323826 ubox
11 32 0.003547013 ubox
11 33 0.003775907 ubox
11 34 0.009450038 ubox
11 35 0.032012174 ubox
11 36 0.226865615 ubox
11 38 0.313697155 ubox
12 20 0.005001930 ubox
21 27 0.687103135 ubox
21 28 0.325498697 ubox
21 31 0.151112964 ubox
21 33 0.052678078 ubox
21 73 0.003657197 ubox
21 74 0.004725693 ubox
22 29 0.309147748 ubox
22 30 0.075634581 ubox
22 37 0.018253766 ubox
22 45 0.003236213 ubox
22 48 0.009391270 ubox
23 27 0.022697694 ubox
23 28 0.306097619 ubox
23 31 0.024413015 ubox
23 32 0.036356029 ubox
23 33 0.008411851 ubox
23 34 0.010478315 ubox
23 35 0.010624431 ubox
23 36 0.018956045 ubox
23 38 0.004296982 ubox
23 44 0.003672086 ubox
23 47 0.013661188 ubox
23 71 0.003369719 ubox
23 72 0.004480225 ubox
24 29 0.057946358 ubox
24 30 0.020019451 ubox
24 37 0.004006131 ubox
24 43 0.003626368 ubox
24 46 0.014800483 ubox
25 30 0.024153279 ubox
25 45 0.014551960 ubox
26 30 0.006564794 ubox
26 37 0.004134651 ubox
26 50 0.004283778 ubox
26 70 0.016439736 ubox
27 37 0.003752417 ubox
27 40 0.011669613 ubox
27 41 0.015269877 ubox
27 49 0.004452342 ubox
27 79 0.004032566 ubox
28 37 0.005237058 ubox
28 39 0.011714769 ubox
28 40 0.015211378 ubox
28 43 0.016203250 ubox
28 48 0.004460272 ubox
28 68 0.022588908 ubox
28 78 0.005303119 ubox
29 33 0.012461173 ubox
29 42 0.016402398 ubox
29 67 0.022611801 ubox
29 77 0.005412096 ubox
30 34 0.005931380 ubox
30 35 0.026078005 ubox
30 36 0.020729089 ubox
30 38 0.015467728 ubox
30 42 0.004543718 ubox
30 44 0.003164639 ubox
30 47 0.009922855 ubox
30 66 0.022605219 ubox
30 76 0.005282087 ubox
31 37 0.014575128 ubox
31 39 0.003710752 ubox
31 40 0.013616282 ubox
31 41 0.008542747 ubox
31 43 0.003373422 ubox
31 46 0.011270606 ubox
31 65 0.022584811 ubox
32 37 0.022531049 ubox
32 45 0.011110483 ubox
33 37 0.006080983 ubox
33 39 0.007566317 ubox
33 40 0.008064766 ubox
33 41 0.004894558 ubox
33 46 0.006116573 ubox
33 64 0.019994399 ubox
33 80 0.003890024 ubox
34 43 0.003843298 ubox
34 45 0.006009864 ubox
34 62 0.005763156 ubox
34 79 0.004580980 ubox
35 62 0.006749775 ubox
35 78 0.004471206 ubox
35 79 0.005402261 ubox
36 43 0.008673260 ubox
36 45 0.006530612 ubox
36 62 0.003839999 ubox
36 78 0.005966427 ubox
37 42 0.008454661 ubox
37 44 0.007751168 ubox
37 60 0.016461255 ubox
37 61 0.003268419 ubox
37 77 0.005862622 ubox
38 43 0.007157048 ubox
38 59 0.016754987 ubox
38 78 0.006929479 ubox
39 57 0.006323262 ubox
39 74 0.009597389 ubox
39 77 0.007436134 ubox
40 56 0.006264301 ubox
40 57 0.021876581 ubox
40 73 0.009596489 ubox
40 74 0.007492507 ubox
40 77 0.004178571 ubox
41 56 0.021923577 ubox
41 72 0.009545822 ubox
41 73 0.007393009 ubox
41 77 0.014467529 ubox
42 46 0.018989683 ubox