# #——风格,回声= FALSE,结果= '飞机 '------------------------------------ BiocStyle:减价 () ## ---- 回声= FALSE,警告= FALSE,消息= FALSE -------------------------- 库(MsFeatures)库(SummarizedExperiment) # #——加载数据,消息= FALSE ----------------------------------------------- 图书馆(MsFeatures)图书馆(SummarizedExperiment)数据(“se ") ## ---- fdev --------------------------------------------------------------------- rowData (se)头(化验(se )) ## ---- feature-rt-mz-plot fig.width = 8, fig.height = 6, fig.cap =“情节的保留时间和m / z数据集的所有功能。”构成了rowData (se)——情节(rtm美元,rowData (se) mzm美元,xlab =“保留时间”,ylab =“m / z”,主要=“特性”,上校= " # 00000060 ")网格 () ## ----------------------------------------------------------------------------- se < - groupFeatures (se, param = SimilarRtimeParam (10), rtime = " rtm ") ## ----------------------------------------------------------------------------- 表(featureGroups (se )) ## ----------------------------------------------------------------------------- 构成了rowData (se)分裂(rtm美元,featureGroups(se)) |> vapply(FUN = mean, numeric(1)) |> sort() ## ----丰度相关性-heatmap, fig.cap = " related of features based on their丰度。",fig.width = 12, fig.height = 14---- library(pheatmap) fvals <- log2(assay(se)) cormat <- cor(t(fvals), use = " pairs .complete.obs") ann <- data.frame(fgroup = featureGroups(se)) rownames(ann) <- rownames(cormat) res <- pheatmap(cormat, annotation_row = ann, cluster_rows = TRUE,cluster_cols = TRUE) ## ----abundance-correlation---------------------------------------------------- se <- groupFeatures(se, abundance- esimilarityparam (threshold = 0.7, transform = log2), i = 1) table(featureGroups(se)) ## ----abundance-correlation-fg003, fig.width = 8, fig.height = 8, fig.cap = "最初分组到特征组FG.003的特征的成对相关图。"---- fts <- grep("FG。003", featureGroups(se)) pairs(t(fvals[fts,]), gap = 0.1, main = "FG.003") ## ----abundance-correlation-fg008, fig.width = 8, fig.height = 8, fig.cap = "初步分组到特征组FG.008的特征的成对相关图。"---- fts <- grep("FG. "008”,featureGroups (se))对(t (fvals [fts,]),差距= 0.1,主要= " FG.008 ") ## ---- abundance-correlation-fg008-table,结果= "飞机 "---------------------- tmp < - as.data.frame构成了rowData (se) ((fts, c(“rtm”、“mzm”,“feature_group”)])tmp < - tmp[订单(tmp feature_group美元)]knitr:: kable (tmp ) ## ----------------------------------------------------------------------------- featureGroups (se) < - NA_character_ featureGroups (se)[30:6 0] < -“成品”se < groupFeatures (se, SimilarRtimeParam (10),rtime = " rtm ") ## ----------------------------------------------------------------------------- featureGroups (se) # #——sessioninfo回声= FALSE -------------------------------------------------- sessionInfo ()