Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Roman Sarrazin-Gendron
BP6.1
Commits
d67a9e22
Commit
d67a9e22
authored
Feb 13, 2018
by
Roman Sarrazin-Gendron
Browse files
merging:wq
parent
3dfc0b7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dot.ps
deleted
100644 → 0
View file @
3dfc0b7a
%!PS-Adobe-3.0 EPSF-3.0
%%Title: RNA Dot Plot
%%Creator: ViennaRNA-2.4.3
%%CreationDate: Fri Feb 9 20:36:33 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
{
(
\
AAAAUGUAUGUAUAUUGUAUGUUAUAUAUUUGUAAAGAUGAGUAUUGUAUAAAAUGUAUA
\
)
}
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
50
54
0.008887900
ubox
1
18
0.005909369
ubox
1
23
0.003370084
ubox
1
25
0.017743395
ubox
1
27
0.003537936
ubox
1
30
0.015539868
ubox
1
31
0.055730642
ubox
1
33
0.063126232
ubox
1
39
0.008565111
ubox
2
7
0.004682127
ubox
2
16
0.003223916
ubox
2
23
0.007223698
ubox
2
25
0.009878791
ubox
2
27
0.004563351
ubox
2
29
0.018201442
ubox
2
30
0.053086443
ubox
2
31
0.833045163
ubox
2
33
0.049631186
ubox
2
39
0.009505543
ubox
3
16
0.041405710
ubox
3
22
0.005789865
ubox
3
23
0.104874393
ubox
3
27
0.004100198
ubox
3
29
0.040726638
ubox
3
30
0.882081903
ubox
3
31
0.054456207
ubox
3
33
0.035867802
ubox
3
39
0.007751120
ubox
4
11
0.004011755
ubox
4
13
0.006687771
ubox
4
15
0.044118265
ubox
4
20
0.006734004
ubox
4
22
0.114507748
ubox
4
25
0.017702265
ubox
4
27
0.077015475
ubox
4
29
0.894168730
ubox
4
30
0.049638590
ubox
4
31
0.067670722
ubox
4
33
0.254127142
ubox
4
39
0.025883649
ubox
4
59
0.006182292
ubox
5
10
0.003965978
ubox
5
12
0.006886833
ubox
5
14
0.044567088
ubox
5
19
0.006956152
ubox
5
21
0.115675993
ubox
5
24
0.018438439
ubox
5
26
0.081708865
ubox
5
28
0.896568311
ubox
5
32
0.258891564
ubox
5
34
0.056242094
ubox
5
35
0.016860540
ubox
5
36
0.014197987
ubox
5
37
0.005673453
ubox
5
38
0.026351147
ubox
5
40
0.011811537
ubox
5
41
0.006231209
ubox
5
58
0.006356371
ubox
5
60
0.008409786
ubox
6
11
0.005942074
ubox
6
13
0.044220445
ubox
6
15
0.006331729
ubox
6
18
0.006715419
ubox
6
20
0.118862472
ubox
6
23
0.017830037
ubox
6
25
0.083071788
ubox
6
27
0.897246957
ubox
6
29
0.169069840
ubox
6
30
0.026847788
ubox
6
31
0.193338644
ubox
6
33
0.058814333
ubox
6
39
0.025071221
ubox
6
57
0.005385538
ubox
6
59
0.010067986
ubox
7
12
0.042132121
ubox
7
14
0.006769109
ubox
7
17
0.006805780
ubox
7
19
0.119531304
ubox
7
21
0.006948722
ubox
7
24
0.082664126
ubox
7
26
0.897280969
ubox
7
28
0.179906214
ubox
7
32
0.066366391
ubox
7
34
0.045058659
ubox
7
35
0.005390327
ubox
7
36
0.020541380
ubox
7
37
0.003269550
ubox
7
38
0.025510513
ubox
7
40
0.025232911
ubox
7
58
0.010095603
ubox
7
60
0.003311236
ubox
8
13
0.006166554
ubox
8
16
0.007073222
ubox
8
18
0.119513499
ubox
8
20
0.008309767
ubox
8
22
0.070050919
ubox
8
23
0.067311702
ubox
8
25
0.895399547
ubox
8
27
0.181818086
ubox
8
29
0.325510508
ubox
8
30
0.012562367
ubox
8
31
0.069525162
ubox
8
33
0.047412097
ubox
8
39
0.027506329
ubox
8
57
0.008293319
ubox
8
59
0.003742957
ubox
9
17
0.118620974
ubox
9
19
0.008984295
ubox
9
21
0.093983484
ubox
9
24
0.890711931
ubox
9
26
0.182381851
ubox
9
28
0.338599140
ubox
9
32
0.045258692
ubox
9
34
0.006164975
ubox
9
35
0.004582034
ubox
9
36
0.008655144
ubox
9
37
0.003577054
ubox
9
38
0.027309980
ubox
9
58
0.003662661
ubox
10
15
0.003675175
ubox
10
16
0.103637893
ubox
10
18
0.009066959
ubox
10
20
0.161846597
ubox
10
22
0.088655786
ubox
10
23
0.840571953
ubox
10
25
0.183163087
ubox
10
27
0.343034878
ubox
10
29
0.102471897
ubox
10
30
0.003826020
ubox
10
31
0.017826589
ubox
10
33
0.005265502
ubox
10
59
0.003678405
ubox
11
17
0.014842201
ubox
11
19
0.186234925
ubox
11
21
0.165970516
ubox
11
24
0.182990188
ubox
11
26
0.343721930
ubox
11
28
0.108963901
ubox
11
32
0.004604307
ubox
11
34
0.039363126
ubox
11
36
0.023459624
ubox
11
40
0.004088425
ubox
11
58
0.003696230
ubox
12
16
0.012808219
ubox
12
18
0.185524347
ubox
12
20
0.259500397
ubox
12
22
0.754374739
ubox
12
23
0.165467603
ubox
12
25
0.343916690
ubox
12
27
0.109572836
ubox
12
29
0.020447863
ubox
12
31
0.004602921
ubox
12
33
0.041234905
ubox
12
39
0.004450548
ubox
12
57
0.003550184
ubox
13
17
0.171858792
ubox
13
19
0.261975277
ubox
13
21
0.773200143
ubox
13
24
0.343991303
ubox
13
26
0.109667854
ubox
13
28
0.020729151
ubox
13
32
0.041177006
ubox
13
34
0.025331127
ubox
13
38
0.004283552
ubox
13
40
0.005747986
ubox
14
18
0.232969552
ubox
14
20
0.760854887
ubox
14
22
0.101363707
ubox
14
23
0.341876320
ubox
14
25
0.109585483
ubox
14
27
0.020529887
ubox
14
29
0.003751856
ubox
14
30
0.007167226
ubox
14
31
0.039563270
ubox
14
33
0.025855131
ubox
14
39
0.006880914
ubox
15
19
0.675097434
ubox
15
21
0.107600043
ubox
15
24
0.108619499
ubox
15
26
0.017410389
ubox
15
28
0.003369381
ubox
15
32
0.025426256
ubox
15
35
0.003241611
ubox
15
38
0.006945005
ubox
15
41
0.016178081
ubox
16
21
0.057351833
ubox
16
24
0.013255000
ubox
16
26
0.013383634
ubox
16
28
0.031634027
ubox
16
34
0.003565092
ubox
16
37
0.006654465
ubox
16
40
0.017393887
ubox
16
41
0.007523693
ubox
17
22
0.014234683
ubox
17
23
0.017503427
ubox
17
25
0.017551152
ubox
17
27
0.033349046
ubox
17
29
0.039075508
ubox
17
30
0.004014575
ubox
17
33
0.003410250
ubox
17
39
0.018929924
ubox
18
24
0.017881996
ubox
18
26
0.033555272
ubox
18
28
0.039970045
ubox
18
32
0.003259491
ubox
18
34
0.005528123
ubox
18
38
0.018322701
ubox
18
40
0.034087959
ubox
18
41
0.003349321
ubox
19
23
0.015970090
ubox
19
25
0.033225848
ubox
19
27
0.040064572
ubox
19
29
0.007925414
ubox
19
31
0.003369101
ubox
19
33
0.005774858
ubox
19
39
0.037306444
ubox
20
24
0.029470397
ubox
20
26
0.039628595
ubox
20
28
0.008441311
ubox
20
32
0.005688268
ubox
20
36
0.007341626
ubox
20
37
0.011057788
ubox
20
38
0.037265256
ubox
21
25
0.033005560
ubox
21
27
0.008472017
ubox
21
29
0.003980505
ubox
21
31
0.004666776
ubox
21
39
0.004812653
ubox
22
26
0.007861094
ubox
22
28
0.004171086
ubox
22
35
0.054047518
ubox
22
36
0.026358742
ubox
22
38
0.004716603
ubox
22
41
0.005802093
ubox
23
32
0.004057468
ubox
23
34
0.067844279
ubox
23
35
0.019784891
ubox
23
37
0.004047663
ubox