### R code from vignette source 'segmentSeq.Rnw' ################################################### ### code chunk number 1: 2)) stop("hS object contains wrong number of loci. Likely failure.") ################################################### ### code chunk number 11: segmentSeq.Rnw:107-109 ################################################### cS <- classifySeg(sD = sD, aD = aD, cD = hS, cl = cl) cS ################################################### ### code chunk number 12: segmentSeq.Rnw:112-114 ################################################### if(abs(nrow(cS) - 64) > 2) stop("cS object is the wrong size (should have ~142 rows). Likely failure.") if(any(abs(colSums(exp(cS@locLikelihoods)) - c(29,36)) > 2)) stop("cS object contains wrong number of loci. Likely failure.") ################################################### ### code chunk number 13: segPlot ################################################### par(mfrow = c(2,1), mar = c(2,6,2,2)) plotGenome(aD, hS, chr = ">Chr1", limits = c(1, 1e5), showNumber = FALSE, cap = 50) plotGenome(aD, cS, chr = ">Chr1", limits = c(1, 1e5), showNumber = FALSE, cap = 50) ################################################### ### code chunk number 14: figSeg ################################################### par(mfrow = c(2,1), mar = c(2,6,2,2)) plotGenome(aD, hS, chr = ">Chr1", limits = c(1, 1e5), showNumber = FALSE, cap = 50) plotGenome(aD, cS, chr = ">Chr1", limits = c(1, 1e5), showNumber = FALSE, cap = 50) ################################################### ### code chunk number 15: segmentSeq.Rnw:146-148 ################################################### loci <- selectLoci(cS, FDR = 0.05) loci ################################################### ### code chunk number 16: segmentSeq.Rnw:154-155 ################################################### groups(cS) <- list(NDE = c(1,1,1,1), DE = c("AGO6", "AGO6", "AGO4", "AGO4")) ################################################### ### code chunk number 17: segmentSeq.Rnw:159-160 ################################################### cS <- getPriors(cS, cl = cl) ################################################### ### code chunk number 18: segmentSeq.Rnw:164-165 ################################################### cS <- getLikelihoods(cS, nullData = TRUE, cl = cl) ################################################### ### code chunk number 19: segmentSeq.Rnw:170-171 ################################################### topCounts(cS, NULL, number = 3) ################################################### ### code chunk number 20: segmentSeq.Rnw:176-177 ################################################### topCounts(cS, "NDE", number = 3) ################################################### ### code chunk number 21: segmentSeq.Rnw:182-183 ################################################### topCounts(cS, "DE", number = 3) ################################################### ### code chunk number 22: