# #——包括= FALSE ----------------------------------------------------------- knitr: opts_chunk美元集(崩溃= TRUE,评论= " # > ",fig.align =“中心”,fig.show =“黑名单”,eval = TRUE,整洁。opts = list(空白= FALSE,宽度。cutoff = 60), tidy = TRUE, message =FALSE, warning =FALSE) ## ----install- ppg -bioconductor, eval=FALSE------------------------------------- ## #安装PFP from github,要求bioconductor依赖包预安装# if (!requireNamespace(“BiocManager”,悄悄地= TRUE)) # install.packages (BiocManager) # BiocManager::安装(“亲 ") ## ---- install-pkg-github eval = FALSE ------------------------------------------- # ## 从github安装项目,需要预装biocondutor依赖包#如果需要(devtools)) (! # install.packages (devtools) # devtools:: install_github(“aib-group / ") ## ---- install-database-bioconductor eval = FALSE -------------------------------- # ## 从github安装项目,需要生物导体依赖包预安装# if (!requireNamespace(“BiocManager”,悄悄地= TRUE)) # install.packages (BiocManager) # BiocManager::安装(“org.Hs.eg.db ") ## ---- load-pkg eval = TRUE,包括= TRUE ----------------------------------------- 库(PFP) # # general-pipline, eval = TRUE,包括= TRUE -------------------------------- # 加载数据——人类的基因列表;PFPRefnet对象为人;测试PFP #对象;不同基因的列表。data("gene_list_hsa") data("PFPRefnet_hsa") data("PFP_test1") data("data_std") # Step1:计算网络相似度得分。PFP_test <- calc_PFP_score(genes = gene_list_hsa,PFPRefnet = PFPRefnet_hsa) # Step2:根据PFP评分对通路进行排序。 rank1 <- rank_PFP(object = PFP_test,total_rank = TRUE,thresh_value=0.5) ## ----a the_target_gene,eval=TRUE, include=TRUE-------------------------------- # Step1: select the max score of pathway. pathway_select <- refnet_info(rank1)[1,"id"] gene_test <- pathways_score(rank1)$genes_score[[pathway_select]]$ENTREZID # Step2: get the correlation coefficient score of the edge. edges_coexp <- get_exp_cor_edges(gene_test,data_std) # Step3: Find the difference genes that are of focus. gene_list2 <- unique(c(edges_coexp$source,edges_coexp$target)) # Step4: Find the edge to focus on. edges_kegg <- get_bg_related_kegg(gene_list2,PFPRefnet=PFPRefnet_hsa, rm_duplicated = TRUE) # Step5: Find the associated network require(org.Hs.eg.db) net_test <- get_asso_net(edges_coexp = edges_coexp, edges_kegg = edges_kegg, if_symbol = TRUE, gene_info_db = org.Hs.eg.db) ## ----a PFP example, fig.height=6, fig.width=7.2, warning=FALSE---------------- plot_PFP(PFP_test) ## ----a rank PFP, fig.height=6, fig.width=7.2, warning=FALSE------------------- plot_PFP(rank1) ## ----echo=FALSE--------------------------------------------------------------- sessionInfo()