# #设置,包括= FALSE ------------------------------------------------ knitr: opts_chunk设置(echo = TRUE) knitr:美元:opts_chunk美元设置(图。width=5, fig.height=4) ## ----results='hide', message=FALSE, warning=FALSE------------------------ library(BDMMAcorrect) require(summarizeexperiment) data(Microbiome_dat) ###访问表型信息col_data <- colData(Microbiome_dat) pheno <- data.frame(col_data$main,col_data“美元)批< - col_data[3] # # #访问分类阅读数计数< - t(化验(Microbiome_dat)) # # #表示表型变量是否连续连续< - mcols (col_data) [1:2 ,] ## ---- 回声= TRUE ---------------------------------------------------------- 图= VBatch (Microbiome_dat = Microbiome_dat,方法=“布雷”)打印(图 ) ## ---- 回声= TRUE ---------------------------------------------------------- main_variable < -把[1]main_variable (main_variable = = 0) < -“控制”main_variable [main_variable = = 1] < -“案例”图< - VBatch (Microbiome_dat = Microbiome_dat main_variable = main_variable,方法=“布雷”)打印(图[[1 ]]) ## ---- 回声= TRUE ---------------------------------------------------------- 打印(图[[2 ]]) ## ---- 回声= TRUE ---------------------------------------------------------- 输出< - BDMMA (Microbiome_dat = Microbiome_dat burn_in = 4000, sample_period = 4000)打印(输出selected.taxa美元)头(输出parameter_summary美元)打印(PIP)美元输出打印(输出bFDR美元 ) ## ---- 包括= FALSE ------------------------------------------------------ 美元knitr: opts_chunk设置(图。宽度= 6,fig.height = 2.5 ) ## ---- 回声= TRUE ---------------------------------------------------------- 图< - trace_plot(跟踪美元=输出跟踪参数= c(“alpha_1”,“beta1_10”)打印(图 ) ## ---- 回声= TRUE ---------------------------------------------------------- ### 模拟计算计数< - rmultinom(100、10000、代表(0.02,50)# # #协变量模拟主要< - rbinom(100, 0.5) < -“rnorm(100 0 1) # # #模拟批次批< - c(代表(50),代表(50))图书馆(SummarizedExperiment) col_data < DataFrame(主要,糊涂,批处理)mcols (col_data)美元连续< - c (0 l, 1 l,将不同的数据集打包到一个summarizeexperiment对象Microbiome_dat <- summarizeexperiment (list(counts), colData=col_data)