# #——回声= FALSE,隐藏= TRUE,消息= FALSE,警告= FALSE -------------- devtools: load_all (".") ## ---- 装饰图案,eval = TRUE,消息= FALSE,警告= FALSE ------------------ 库(ELMER)图书馆(DT)图书馆(dplyr) # #——数据,eval = TRUE,消息= FALSE,警告= FALSE --------------------- 图书馆(MultiAssayExperiment) lusc。exp lusc。met ## ----远端探针,eval=TRUE, message=FALSE, warning =FALSE ------------远端探针。探测器< - get.feature。探针(基因组= "hg38", met。## ----mae, eval=TRUE, message=FALSE, warning =FALSE ---------------------- library(MultiAssayExperiment) mae <- createMAE(exp = lusc. exp) - createMAE(exp = lusc. exp) - createMAE(exp = lusc. exp) - createMAE(exp = lusc. exp) - createMAE(exp = lusc. exp)exp, met = lusc。满足,保存= TRUE,线性化。exp = TRUE,过滤。探针=远端。探针,保存。文件名= " mae_bioc2017。rda”,满足。平台= 450 k,基因组=“hg38”,TCGA = TRUE)美colData (mae) [1:5,] % > % as.data.frame % > % datatable(选项=列表(scrollX = TRUE)) sampleMap (mae) [1:5,] % > % as.data.frame % > % datatable(选项=列表(scrollX = TRUE )) ## ---- eval = TRUE,消息= FALSE,警告= FALSE,结果= "隐藏 "--------- sig.diff < - get.diff。(数据= mae,组。col =“定义”,group1 =“原发性实体瘤”,group2 =“实体组织正常”,minSubgroupFrac = 0.2, sig.dif = 0.3, diff.dir =“hypo”,#在组1核中搜索低甲基化探针= 1,dir。## ----eval=TRUE, message=FALSE, warning =FALSE --------------------------- as.data.frame(sig.diff) %>% datatable(options = list(scrollX =TRUE)) # get.diff.meth自动保存输出文件。csv包含所有探测的统计信息。 # getMethdiff.hypo.probes.significant.csv contains only the significant probes which # is the same with sig.diff dir(path = "result", pattern = "getMethdiff") ## ---- eval = TRUE, message = FALSE, warning = FALSE, results = "hide"---- nearGenes <- GetNearGenes(data = mae, probes = sig.diff$probe, numFlankingGenes = 20, # 10 upstream and 10 dowstream genes cores = 1) Hypo.pair <- get.pair(data = mae, group.col = "definition", group1 = "Primary solid Tumor", group2 = "Solid Tissue Normal", nearGenes = nearGenes, minSubgroupFrac = 0.4, # % of samples to use in to create groups U/M permu.dir = "result/permu", permu.size = 100, # Please set to 100000 to get significant results pvalue = 0.05, Pe = 0.01, # Please set to 0.001 to get significant results filter.probes = TRUE, # See preAssociationProbeFiltering function filter.percentage = 0.05, filter.portion = 0.3, dir.out = "result", cores = 1, label = "hypo") ## ---- eval = TRUE, message = FALSE, warning = FALSE---------------------- Hypo.pair %>% datatable(options = list(scrollX = TRUE)) # get.pair automatically save output files. #getPair.hypo.all.pairs.statistic.csv contains statistics for all the probe-gene pairs. #getPair.hypo.pairs.significant.csv contains only the significant probes which is # same with Hypo.pair. dir(path = "result", pattern = "getPair") ## ----eval=TRUE, message=FALSE, warning = FALSE--------------------------- # Identify enriched motif for significantly hypomethylated probes which # have putative target genes. enriched.motif <- get.enriched.motif(data = mae, probes = Hypo.pair$Probe, dir.out = "result", label = "hypo", min.incidence = 10, lower.OR = 1.1) names(enriched.motif) # enriched motifs head(enriched.motif["P73_HUMAN.H10MO.A"]) ## probes in the given set that have TP53 motif. # get.enriched.motif automatically save output files. # getMotif.hypo.enriched.motifs.rda contains enriched motifs and the probes with the motif. # getMotif.hypo.motif.enrichment.csv contains summary of enriched motifs. dir(path = "result", pattern = "getMotif") motif.enrichment <- read.csv("result/getMotif.hypo.motif.enrichment.csv") motif.enrichment %>% datatable(options = list(scrollX = TRUE)) # motif enrichment figure will be automatically generated. dir(path = "result", pattern = "motif.enrichment.pdf") ## ----eval=TRUE, message=FALSE, warning = FALSE, results = "hide"--------- ## identify regulatory TF for the enriched motifs TF <- get.TFs(data = mae, group.col = "definition", group1 = "Primary solid Tumor", group2 = "Solid Tissue Normal", minSubgroupFrac = 0.4, enriched.motif = enriched.motif, dir.out = "result", cores = 1, label = "hypo") ## ----eval=TRUE, message=FALSE, warning = FALSE--------------------------- TF %>% datatable(options = list(scrollX = TRUE)) # get.TFs automatically save output files. # getTF.hypo.TFs.with.motif.pvalue.rda contains statistics for all TF with average # DNA methylation at sites with the enriched motif. # getTF.hypo.significant.TFs.with.motif.summary.csv contains only the significant probes. dir(path = "result", pattern = "getTF") # TF ranking plot based on statistics will be automatically generated. dir(path = "result/TFrankPlot_family/", pattern = "pdf") ## ----sessioninfo, eval=TRUE---------------------------------------------- sessionInfo()