if(require("BSgenome.Hsapiens.UCSC.hg18")){
bsgenome <- BSgenome.Hsapiens.UCSC.hg18
snp_exp <- getExampleSnpExperiment(bsgenome)
seqlevels(snp_exp, force=TRUE) <- "chr22"
fit <- hmm2(snp_exp)
g <- reduce(hemizygous(fit), min.gapwidth=500e3)
trellis_param <- HmmTrellisParam()
fig <- xyplotList(g, snp_exp, trellis_param)
vps <- viewports()
xygrid(fig[[1]], vps, g)
}
Run the code above in your browser using DataLab