# #设置,回声= FALSE -------------------------------------------------------- knitr: opts_chunk美元集(消息= FALSE, fig.path = '数字 /') ## ---- 整洁= TRUE, eval = FALSE,整洁。Opts =list(缩进= 4,宽度。Cutoff = 90)---- # if (!requireNamespace(“BiocManager”,悄悄地= TRUE)) # install.packages (BiocManager) # BiocManager::安装(“MWASTools version = "重击 ") ## ---- 整洁= TRUE -------------------------------------------------------------- 库(MWASTools) # #——整洁= TRUE -------------------------------------------------------------- 数据(“metabo_SE”)metabo_SE # #——整洁= TRUE,结果=‘黑名单’,fig.width = 12, fig.height = 6, fig.pos =“中心”——# PCA模型PCA_model = QC_PCA (metabo_SE规模= FALSE,center = TRUE) # Plot PCA评分(PC1 vs PC2 & PC3 vs PC4) par(mfrow=c(1,2)) QC_PCA_scoreplot (PCA_model, metabo_SE, main=" PC1 vs PC2") QC_PCA_scoreplot (PCA_model, metabo_SE, px=3, py=4, main="PC3 vs PC4") ## ----tidy = TRUE, eval = TRUE, figure width = 12, figure height = 6----------------- # CV计算metabo_CV = QC_CV (metabo_SE, plot_hist = FALSE) #根据CV着色的NMR谱CV_spectrum = QC_CV_specNMR(metabo_SE,ref_sample = " QC1 ") ## ---- 整洁= TRUE -------------------------------------------------------------- # 根据简历截止0.30过滤metabolic-matrix metabo_SE = CV_filter (metabo_SE、metabo_CV CV_th = 0.30) # #——整洁= TRUE,整洁。Opts =list(缩进= 4,宽度。截止= 50 )--------------- # 运行mwa MWAS_T2D = MWAS_stats (metabo_SE disease_id =“T2D confounder_ids = c(“时代”,“性别”,“身体质量指数”),assoc_method =“物流”,mt_method = "黑洞 ") ## ---- 整洁= TRUE, fig.width = 12, fig.height = 8 ------------------------------ # 可视化mwa结果天际线= MWAS_skylineNMR (metabo_SE、MWAS_T2D ref_sample = " QC1 ") ## ---- 整洁= TRUE, fig.width = 12, fig.height = 6 ------------------------------ stocsy = STOCSY_NMR (metabo_SE,ppm_query = 1.04) # #——整洁= TRUE -------------------------------------------------------------- kegg_pathways = MWAS_KEGG_pathways(代谢物= c(“cpd: C00183”、“cpd: C00407”))头(kegg_pathways [c(2、4)])