Mercurial > repos > rnateam > locarna_reliability_profile
annotate test-data/archaea_relplot.scr @ 0:7dd1f41aee4d draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
author | rnateam |
---|---|
date | Wed, 28 Dec 2016 18:52:45 -0500 |
parents | |
children | e84d1fc87829 |
rev | line source |
---|---|
0
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
1 pdf("/tmp/tmp5yxSuG/files/000/dataset_2.dat",width=12,height=4,version="1.4") |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
2 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
3 rel <- read.table("mlocarna_results/results/result.bmreliability"); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
4 seqrel <- rel[[2]] |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
5 strrel <- rel[[3]] |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
6 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
7 if ("" != "") { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
8 seq <- "" |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
9 seq <- strsplit(seq,split="") |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
10 tab <- unlist(seq)!="-" |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
11 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
12 seqrel<-seqrel[tab] |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
13 strrel<-strrel[tab] |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
14 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
15 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
16 len<-length(seqrel) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
17 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
18 if (0) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
19 seqrel<-seqrel[len:1] |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
20 strrel<-strrel[len:1] |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
21 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
22 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
23 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
24 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
25 if (1) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
26 seqrel <- seqrel/1.0 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
27 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
28 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
29 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
30 totalrel <- seqrel+strrel; |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
31 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
32 anno_space<-0.075 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
33 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
34 maxy <- max(c(1,totalrel))+anno_space*(0+1); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
35 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
36 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
37 firstpos <- 1 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
38 lastpos <- 1+len-1 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
39 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
40 if (0) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
41 the_xlim <- c(lastpos,firstpos) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
42 } else { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
43 the_xlim <- c(firstpos,lastpos) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
44 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
45 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
46 # set margin |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
47 # b, l, t, r |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
48 par(mar=c(6,2.5,1,1)) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
49 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
50 # open plot (and draw threshold) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
51 plot(c(0),c(0),type="l", |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
52 xlab="",ylab="", |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
53 xlim=the_xlim,ylim=c(0,maxy), |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
54 yaxp=c(0,1,2)) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
55 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
56 ## title inside of plot |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
57 legend("topleft","",bty="n") |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
58 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
59 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
60 # total reliability |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
61 polygon(c(firstpos,firstpos:lastpos,lastpos),c(0,totalrel,0),col=rgb(0.8,0.8,0.9,0.5),lwd=2,border=FALSE) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
62 lines(firstpos:lastpos,totalrel,col="blue",lwd=2) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
63 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
64 # plot structure reliability |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
65 polygon(c(firstpos,firstpos:lastpos,lastpos),c(0,strrel,0),col=rgb(0.3,0.3,0.5,0.8),lwd=1,border=FALSE) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
66 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
67 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
68 ## draw other signals |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
69 signals<-c(); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
70 signal_sizes<-c(); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
71 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
72 signal_starts <- 1:0 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
73 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
74 signal_starts[1]<-1; |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
75 if (0>1) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
76 for (i in 2:0) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
77 signal_starts[i]<-signal_starts[i-1]+signal_sizes[i-1]*2+1; |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
78 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
79 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
80 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
81 colors <- c( |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
82 rgb(0.6,0.1,0.1,0.9), |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
83 rgb(0.6,0.6,0.1,0.9), |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
84 rgb(0.1,0.6,0.6,0.9), |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
85 rgb(0.6,0.1,0.6,0.9) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
86 ); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
87 colors<-c(colors,colors); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
88 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
89 if (0>0) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
90 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
91 for (i in 1:0) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
92 orientation <- signals[signal_starts[i]+signal_sizes[i]*2]; |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
93 sig_y <- maxy-i*anno_space; |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
94 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
95 for (j in 0:(signal_sizes[i]-1)) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
96 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
97 sig_x <- c(signals[signal_starts[i]+j*2],signals[signal_starts[i]+j*2+1]); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
98 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
99 ## draw arrows |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
100 if (orientation!=0) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
101 the_code <- 1+(orientation+1)/2; |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
102 arrows(sig_x[1],sig_y,sig_x[2],sig_y,lwd=4,col=colors[i],code=the_code,angle=20,length=0.15); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
103 } else { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
104 lines(sig_x,c(sig_y,sig_y),lwd=4,col=colors[i]); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
105 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
106 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
107 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
108 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
109 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
110 #draw inferred on-signal |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
111 hit_color <- rgb(0.1,0.6,0.1,0.9) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
112 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
113 if (0!=1) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
114 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
115 on <- c(0,4,33,44,49); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
116 off <- c(3,20,43,48,51); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
117 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
118 if (length(on)>0) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
119 for (i in 1:length(on)) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
120 lines(c(1+on[i],1+off[i]-1),c(maxy,maxy),lwd=7,col=hit_color); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
121 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
122 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
123 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
124 ### draw on/off values |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
125 if (0) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
126 lines(c(1,1+len),c(0.0355791,0.0355791),lty=2,lwd=1) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
127 lines(c(1,1+len),c(0.702675,0.702675),lty=2,lwd=1) |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
128 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
129 } |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
130 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
131 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
132 signal_names<-c(); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
133 |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
134 if (length(signal_names)>0 || (0!=1)) { |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
135 legend("bottom",c("LocARNA",signal_names),lwd=7,col=c(hit_color,colors),horiz=TRUE,inset=-0.4); |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
136 # ,xpd=TRUE |
7dd1f41aee4d
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
rnateam
parents:
diff
changeset
|
137 } |