# #——init = FALSE ---------------------------------------------------- 选项(宽度= 50)库(knitr)图书馆(晶格)图书馆(xtable) # #——缓存= TRUE ---------------------------------------------------------- suppressPackageStartupMessages(库(methylumi,静静地= TRUE))桑普< - read.table(执行(“extdata / samples.txt”、包=“methylumi”),9 =“t \”,头= TRUE) mldat < methylumiR(执行(extdata / exampledata.samples.txt,包= ' methylumi '),qcfile =执行(extdata / exampledata.controls.txt,包=“methylumi”),sampleDescriptions = = FALSE桑普)# #——缓存 --------------------------------------------------------- mldat # #——缓存= TRUE ---------------------------------------------------------- getAssayDataNameSubstitutions () ## ---- 缓存= TRUE ---------------------------------------------------------- md < - cmdscale(经销(t (exprs (mldat) [fData (mldat)染色体美元= = ' X '])), 2) # #——缓存= FALSE ---------------------------------------------------------情节(医学博士,pch = c(“F”,“M”)[pData (mldat)性别美元],坳= c(“红”、“蓝”)[pData (mldat)美元性别 ]) ## ---- 缓存= FALSE --------------------------------------------------------- avgPval < - colMeans (pvals (mldat)票面(las = 2) barplot (avgPval, ylab = "平均假定值 ") ## ---- 缓存= FALSE --------------------------------------------------------- controlTypes (mldat) # #——缓存= FALSE --------------------------------------------------------- qcplot (mldat,“杂交”)# #——缓存= TRUE ---------------------------------------------------------- 保持< - (avgPval < 0.05) pData (mldat)性别美元[9]< - mldat“F”。规范< - normalizeMethyLumiSet (mldat[,保持 ]) ## ---- 缓存= TRUE ---------------------------------------------------------- 库(limma) dm < - model.matrix(~ 1 +性别,data = pData (mldat.norm)) colnames (dm) fit1 < - lmFit (exprs (mldat.norm), dm) fit2 < - ebay (fit1) tt < - topTable (fit2系数= 2,genelist = fData (mldat.norm) [c(“象征”、“染色体”)],数量= 1536)x < -聚合(tt adj.P.Val美元=列表(tt染色体美元),中位数)colnames (x) < - c(“染色体”,调整假定值中位数)# #----results='asis'------------------------------------------------------ library(xtable) xt <- xtable(x,label="tab:chromosomepvals",标题="每条染色体的中位数调整p值,显示x染色体在男性和女性之间具有高度显著差异")数字(xt) <- 6 print(xt,include.rownames=FALSE,align="cr") ## ----genderProbesByChrom,图。保持高= ' '--------------------------------- 打印(xyplot (log10 (adj.P.Val) ~染色体,tt, ylab =“log10(假定值调整)”,主要=“假定值探测\ ndistinguising男性从女性 ")) ## ---- 结果= ' asis '------------------------------------------------------ toLatex (sessionInfo ())