comparison test-data/archaea_relplot.scr @ 3:e84d1fc87829 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 10ccc47885ce71e602d66e157bd475f1facbd042
author bgruening
date Mon, 05 Dec 2022 14:29:00 +0000
parents 7dd1f41aee4d
children 7d63908343c3
comparison
equal deleted inserted replaced
2:dd991ca3d8ce 3:e84d1fc87829
46 # set margin 46 # set margin
47 # b, l, t, r 47 # b, l, t, r
48 par(mar=c(6,2.5,1,1)) 48 par(mar=c(6,2.5,1,1))
49 49
50 # open plot (and draw threshold) 50 # open plot (and draw threshold)
51 plot(c(0),c(0),type="l", 51 plot(c(0),c(0),type="l",
52 xlab="",ylab="", 52 xlab="",ylab="",
53 xlim=the_xlim,ylim=c(0,maxy), 53 xlim=the_xlim,ylim=c(0,maxy),
54 yaxp=c(0,1,2)) 54 yaxp=c(0,1,2))
55 55
56 ## title inside of plot 56 ## title inside of plot
85 rgb(0.6,0.1,0.6,0.9) 85 rgb(0.6,0.1,0.6,0.9)
86 ); 86 );
87 colors<-c(colors,colors); 87 colors<-c(colors,colors);
88 88
89 if (0>0) { 89 if (0>0) {
90 90
91 for (i in 1:0) { 91 for (i in 1:0) {
92 orientation <- signals[signal_starts[i]+signal_sizes[i]*2]; 92 orientation <- signals[signal_starts[i]+signal_sizes[i]*2];
93 sig_y <- maxy-i*anno_space; 93 sig_y <- maxy-i*anno_space;
94 94
95 for (j in 0:(signal_sizes[i]-1)) { 95 for (j in 0:(signal_sizes[i]-1)) {
96 96
97 sig_x <- c(signals[signal_starts[i]+j*2],signals[signal_starts[i]+j*2+1]); 97 sig_x <- c(signals[signal_starts[i]+j*2],signals[signal_starts[i]+j*2+1]);
98 98
99 ## draw arrows 99 ## draw arrows
100 if (orientation!=0) { 100 if (orientation!=0) {
101 the_code <- 1+(orientation+1)/2; 101 the_code <- 1+(orientation+1)/2;
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); 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);
103 } else { 103 } else {
107 } 107 }
108 } 108 }
109 109
110 #draw inferred on-signal 110 #draw inferred on-signal
111 hit_color <- rgb(0.1,0.6,0.1,0.9) 111 hit_color <- rgb(0.1,0.6,0.1,0.9)
112 112
113 if (0!=1) { 113 if (0!=1) {
114 114
115 on <- c(0,4,33,44,49); 115 on <- c(0,4,33,44,49);
116 off <- c(3,20,43,48,51); 116 off <- c(3,20,43,48,51);
117 117
118 if (length(on)>0) { 118 if (length(on)>0) {
119 for (i in 1:length(on)) { 119 for (i in 1:length(on)) {