@@ -80,7 +80,7 @@ genophenogram <- function(wt.aa, pos, mut.aa, score, syn.med, stop.med,
8080 }
8181
8282 # calculate the relative space in the plot to be allocated for legends and feature tracks.
83- legend.share <- 1.4 / img.width
83+ legend.share <- 1.8 / img.width
8484 # layout(cbind(c(3,1),c(4,2)),widths=c(9.5,.5),heights=c(2,9))
8585 if (is.null(tracks )) {
8686 layout(cbind(c(3 ,1 ),c(4 ,2 )),widths = c(1 - legend.share ,legend.share ),heights = c(2 ,9 ))
@@ -93,14 +93,14 @@ genophenogram <- function(wt.aa, pos, mut.aa, score, syn.med, stop.med,
9393 # ##########
9494 aas <- toChars(" AVLIMFYWRHKDESTNQGCP*" )
9595 # set up the empty plot space for the main panel
96- op <- par(cex = .6 ,las = 1 ,mar = c(5 ,5 ,0 ,0 )+ .1 )
96+ op <- par(cex = .8 ,las = 1 ,mar = c(5 ,5 ,0 ,0 )+ .1 )
9797 plot(NA ,type = " n" ,
9898 xlim = c(startPos - 4.5 ,endPos + 1 ),ylim = c(0 ,length(aas )+ 1 ),axes = FALSE ,
9999 xaxs = " i" ,xlab = " AA position" ,ylab = " AA residue" ,main = " "
100100 )
101101 # add x and y axes
102102 # axis(1,c(1,seq(5,length(wt.aa),5)))
103- axis(1 ,seq((startPos %/% 5 )* 5 ,(endPos %/% 5 )* 5 ,5 ))
103+ axis(1 ,seq((startPos %/% 5 )* 5 ,(endPos %/% 5 )* 5 ,5 ), cex.axis = 1.5 )
104104 axis(2 ,at = 1 : 21 ,labels = rev(aas ))
105105
106106 # #add amino acid group labels
@@ -199,7 +199,7 @@ genophenogram <- function(wt.aa, pos, mut.aa, score, syn.med, stop.med,
199199
200200 # ####Legend
201201 # ##########
202- op <- par(cex = .6 ,mar = c(5 ,3 ,0 ,4 )+ .1 )
202+ op <- par(cex = .8 ,mar = c(5 ,3 ,0 ,4 )+ .1 )
203203 plot(NA ,type = " n" ,xlim = c(- 1 ,1 ),ylim = c(0 ,13 ),axes = FALSE ,xlab = " " ,ylab = " " )
204204 # autodetect above wt-level scores and draw appropriate legend
205205 if (any(score > syn.med , na.rm = TRUE )) {# with red colors
@@ -242,14 +242,14 @@ genophenogram <- function(wt.aa, pos, mut.aa, score, syn.med, stop.med,
242242 barvals <- t(apply(barvals ,1 ,function (xs )xs / sum(xs )))
243243 barcums <- cbind(0 ,t(apply(barvals ,1 ,function (x )sapply(1 : 11 ,function (i )sum(x [1 : i ])))))
244244
245- par(cex = .6 ,mar = c(0 ,5 ,1 ,0 )+ .1 )
245+ par(cex = .8 ,mar = c(0 ,5 ,1 ,0 )+ .1 )
246246 plot(
247247 0 ,type = " n" ,
248248 xlim = c(startPos - 4.5 ,endPos + 1 ),
249249 # xlim=c(-3.5,length(wt.aa)+1),
250250 ylim = c(0 ,1 ),
251251 axes = FALSE ,xlab = " " ,xaxs = " i" ,
252- ylab = " pos/neutral/neg "
252+ ylab = " census "
253253 )
254254 # n <- length(wt.aa)
255255 n <- nrow(barcums )
@@ -283,7 +283,7 @@ genophenogram <- function(wt.aa, pos, mut.aa, score, syn.med, stop.med,
283283 )
284284 }
285285
286- axis(2 )
286+ axis(2 , at = 0 : 1 , labels = 0 : 1 )
287287 par(op )
288288
289289
@@ -294,17 +294,17 @@ genophenogram <- function(wt.aa, pos, mut.aa, score, syn.med, stop.med,
294294 tracks $ draw()
295295
296296 # ## Track legend
297- op <- par(cex = .6 ,mar = c(0 ,3 ,1 ,4 )+ .1 )
297+ op <- par(cex = .8 ,mar = c(0 ,3 ,1 ,4 )+ .1 )
298298 plot(NA ,type = " n" ,xlim = c(- 1 ,1 ),ylim = c(0 ,11 ),axes = FALSE ,xlab = " " ,ylab = " " )
299299 orangeRamp <- colorRampPalette(c(" white" ," orange" ))(11 )
300300 blueRamp <- colorRampPalette(c(" white" ," steelblue3" ))(11 )
301301 rect(0 ,0 : 10 ,1 ,1 : 11 ,col = orangeRamp ,border = NA )
302302 rect(- 1 ,0 : 10 ,0 ,1 : 11 ,col = blueRamp ,border = NA )
303303
304304 axis(4 ,at = c(.5 ,5.5 ,10.5 ),labels = c(" 0%" ," 50%" ," 100%" ))
305- mtext(" relative interface burial" ,side = 4 ,line = 2 ,las = 3 ,cex = 0.7 )
305+ mtext(" interface burial" ,side = 4 ,line = 2 ,las = 3 ,cex = 0.7 )
306306 axis(2 ,at = c(.5 ,5.5 ,10.5 ),labels = c(" 0%" ," 50%" ," 100%" ))
307- mtext(" relative surface accessibility" ,side = 2 ,line = 2 ,las = 3 ,cex = 0.7 )
307+ mtext(" surface accessibility" ,side = 2 ,line = 2 ,las = 3 ,cex = 0.7 )
308308 par(op )
309309
310310 }
0 commit comments