## simulated data
library(oligoClasses)
library(IRanges)
library(VanillaICE)
data(oligoSetExample, package="oligoClasses")
## The oligoSnpSet class will likely be deprecated and made defunct
## in a future release. Instead, we favor
## RangedSummarizedExperiment-derived classes defined in VanillaICE
oligoSet <- oligoSet[chromosome(oligoSet) == 1, ]
grl <- hmm(oligoSet, p.hom=0, TAUP=1e10, is.log=FALSE)
g <- grl[[1]]
## To visualize each range in it's own panel surrounded by a
## frame of 2,000,000 bases:
## (here the frames are overlapping, but the method could be
## applied more generally to a collection of ranges from
## different chromsomes and samples)
xyplot2(cn~x | range, data=oligoSet,
range=g,
frame=2e6, panel=xypanel,
cex=2,
pch=".",
col.het="salmon",
fill.het="salmon",
col.hom="royalblue",
fill.hom="royalblue",
state.cex=0.5,
border="orange", scales=list(x="free"),
par.strip.text=list(cex=0.5),
xlab="Mb", ylab=expression(log[2]("copy number")))
Run the code above in your browser using DataLab