Skip to content

Commit b31c3b0

Browse files
committed
issue #53 : introducing comically large fonts
1 parent 1077fbd commit b31c3b0

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

R/genophenogram.R

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

R/mavevis.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ dashboard <- function(ssid,uniprotId=NULL,pdbs=NULL,mainChains=NULL,
325325

326326
cat("Plotting...")
327327

328-
img.width <- length(wt.aa) * 0.13 + 3
328+
# img.width <- length(wt.aa) * 0.13 + 3
329+
img.width <- length(wt.aa) * 0.13 + 4
329330
img.height <- 4.5 + 0.13 * if(is.null(td)) 0 else td$num.tracks()
330331

331332
for (outFormat in outFormats) {

0 commit comments

Comments
 (0)