Entering edit mode
Paul Leo
▴
970
@paul-leo-2092
Last seen 10.2 years ago
So have genomeGraphs making plots I need. BUT have come to a catch; I
want to add the genomeGraph plots as part of other plots using the
typical layout() command. However the genomeGraphs "plot" command
gdPlot() writes a new plot when it is called, or overwrites layout .
Can't find options to fix.
For example in below I would like to make a plot of x vs X^2 above a
genome graphs plot but this fails:
########## get goodies for genome graphs
library(GenomeGraphs)
mart <- useMart("ensembl", dataset="hsapiens_gene_ensembl")
minStrand <- makeGeneRegion(chromosome = 17,start = 30450000, end =
30550000,strand = "-", biomart = mart)
ideogram <- makeIdeogram(chromosome = 17)
genomeAxis <- makeGenomeAxis(add53 = TRUE,add35 = TRUE)
####################
nf <- layout(matrix(c(1,2), byrow=TRUE))
layout.show(nf)
x<-1:100
y<-x^2
plot(x,y)
gdPlot(list(ideogram, plusStrand, genomeAxis, minStrand), minBase =
30450000, maxBase = 30550000)
> sessionInfo()
R version 2.9.0 (2009-04-17)
x86_64-pc-linux-gnu
locale:
LC_CTYPE=en_AU.UTF-8;LC_NUMERIC=C;LC_TIME=en_AU.UTF-8;LC_COLLATE=en_AU
.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_AU.UTF-8;LC_PAPER=en_AU.UTF-8;LC_N
AME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_AU.UTF-8;LC_IDENTI
FICATION=C
attached base packages:
[1] grid stats graphics grDevices utils datasets
methods
[8] base
other attached packages:
[1] GenomeGraphs_1.4.0 biomaRt_2.0.0
loaded via a namespace (and not attached):
[1] lattice_0.17-22 RCurl_0.94-1 tools_2.9.0 XML_1.95-3