当前位置: 首页 > news >正文

如何让搜索引擎收录你的网站云浮网站设计

如何让搜索引擎收录你的网站,云浮网站设计,武汉市救助管理站 网站建设,企业网站建设背景接着上次的内容,上篇内容给大家分享了基因表达量怎么做分组差异分析,从而获得差异基因集,想了解的可以去看一下,这篇主要给大家分享一下得到显著差异基因集后怎么做一下通路富集。 1.准备差异基因集 我就直接把上次分享的拿到这…

接着上次的内容,上篇内容给大家分享了基因表达量怎么做分组差异分析,从而获得差异基因集,想了解的可以去看一下,这篇主要给大家分享一下得到显著差异基因集后怎么做一下通路富集。

1.准备差异基因集

我就直接把上次分享的拿到这边了。我们一般都把差异基因分为上调基因和下调基因分别做通路富集分析。下面上代码,可能包含我的一些个人习惯,勿怪。显著差异基因的筛选条件根据个人需求设置哈。

##载入所需R包
library(readxl)
library(DOSE)
library(org.Hs.eg.db)
library(topGO)
library(pathview)
library(ggplot2)
library(GSEABase)
library(limma) 
library(clusterProfiler)
library(enrichplot)##edger
edger_diff <- diff_gene_Group
edger_diff_up <- rownames(edger_diff[which(edger_diff$logFC > 0.584962501),])
edger_diff_down <- rownames(edger_diff[which(edger_diff$logFC < -0.584962501),])##deseq2
deseq2_diff <- diff_gene_Group2
deseq2_diff_up <- rownames(deseq2_diff[which(deseq2_diff$log2FoldChange > 0.584962501),])
deseq2_diff_down <- rownames(deseq2_diff[which(deseq2_diff$log2FoldChange < -0.584962501),])##将差异基因集保存为一个list
gene_diff_edger_deseq2 <- list()
gene_diff_edger_deseq2[["edger_diff_up"]] <- edger_diff_up
gene_diff_edger_deseq2[["edger_diff_down"]] <- edger_diff_down
gene_diff_edger_deseq2[["deseq2_diff_up"]] <- deseq2_diff_up
gene_diff_edger_deseq2[["deseq2_diff_down"]] <- deseq2_diff_down

2.进行通路富集分析

这里主要介绍普通的GO&KEGG&GSEA的简单富集。筛选显著富集通路的筛选条件也是根据自己的需求决定,一般是矫正后P值小于0.05。我这里是省事,写了各list循环。

for (i in 1:length(gene_diff_edger_deseq2)){keytypes(org.Hs.eg.db)entrezid_all = mapIds(x = org.Hs.eg.db,  keys = gene_diff_edger_deseq2[[i]], keytype = "SYMBOL", #输入数据的类型column = "ENTREZID")#输出数据的类型entrezid_all  = na.omit(entrezid_all)  #na省略entrezid_all中不是一一对应的数据情况entrezid_all = data.frame(entrezid_all) ##GO富集##GO_enrich = enrichGO(gene = entrezid_all[,1],OrgDb = org.Hs.eg.db, keyType = "ENTREZID", #输入数据的类型ont = "ALL", #可以输入CC/MF/BP/ALL#universe = 背景数据集我没用到它。pvalueCutoff = 1,qvalueCutoff = 1, #表示筛选的阈值,阈值设置太严格可导致筛选不到基因。可指定 1 以输出全部readable = T) #是否将基因ID映射到基因名称。GO_enrich_data  = data.frame(GO_enrich)write.csv(GO_enrich_data,paste('GO_enrich_',names(gene_diff_edger_deseq2)[i], '.csv', sep = ""))GO_enrich_data <- GO_enrich_data[which(GO_enrich_data$p.adjust < 0.05),]write.csv(GO_enrich_data,paste('GO_enrich_',names(gene_diff_edger_deseq2)[i], '_filter.csv', sep = ""))###KEGG富集分析###KEGG_enrich = enrichKEGG(gene = entrezid_all[,1], #即待富集的基因列表keyType = "kegg",pAdjustMethod = 'fdr',  #指定p值校正方法organism= "human",  #hsa,可根据你自己要研究的物种更改,可在https://www.kegg.jp/brite/br08611中寻找qvalueCutoff = 1, #指定 p 值阈值(可指定 1 以输出全部)pvalueCutoff=1) #指定 q 值阈值(可指定 1 以输出全部)KEGG_enrich_data  = data.frame(KEGG_enrich)write.csv(KEGG_enrich_data, paste('KEGG_enrich_',names(gene_diff_edger_deseq2)[i], '.csv', sep = ""))KEGG_enrich_data <- KEGG_enrich_data[which(KEGG_enrich_data$p.adjust < 0.05),]write.csv(KEGG_enrich_data, paste('KEGG_enrich_',names(gene_diff_edger_deseq2)[i], '_filter.csv', sep = ""))
}

3.通路富集情况可视化

这里只介绍一种简单的气泡图,当然还有其他的自己去了解吧。

##GO&KEGG富集BPCCMFKEGG分面绘图需要分开处理一下,富集结果里的ONTOLOGYL列修改
GO_enrich_data_BP <- subset(GO_enrich_data, subset = GO_enrich_data$ONTOLOGY == "BP")
GO_enrich_data_CC <- subset(GO_enrich_data, subset = GO_enrich_data$ONTOLOGY == "CC")
GO_enrich_data_MF <- subset(GO_enrich_data, subset = GO_enrich_data$ONTOLOGY == "MF")##提取GO富集BPCCMF的top5
GO_enrich_data_filter <- rbind(GO_enrich_data_BP[1:5,], GO_enrich_data_CC[1:5,], GO_enrich_data_MF[1:5,])##重新整合进富集结果
GO_enrich@result <- GO_enrich_data_filter##处理KEGG富集结果
KEGG_enrich@result <- KEGG_enrich_data
ncol(KEGG_enrich@result)
KEGG_enrich@result$ONTOLOGY <- "KEGG"
KEGG_enrich@result <- KEGG_enrich@result[,c(10,1:9)]##整合GO KEGG富集结果
ego_GO_KEGG <- GO_enrich
ego_GO_KEGG@result <- rbind(ego_GO_KEGG@result, KEGG_enrich@result[1:5,])
ego_GO_KEGG@result$ONTOLOGY <- factor(ego_GO_KEGG@result$ONTOLOGY, levels = c("BP", "CC", "MF","KEGG"))##规定分组顺序##简单画图
pdf("edger_diff_up_dotplot.pdf", width = 7, height = 7)
dotplot(ego_GO_KEGG, split = "ONTOLOGY", title="UP-GO&KEGG", label_format = 60, color = "pvalue") + facet_grid(ONTOLOGY~., scale = "free_y")+theme(plot.title = element_text(hjust = 0.5, size = 13, face = "bold"), axis.text.x = element_text(angle = 90, hjust = 1))
dev.off()

4.气泡图如图所示

做了些处理,真实图片,左侧pathway是跟后面气泡一一对应的,当然还有其他可视化方式那就需要各位自己去探索了,谢谢!

5.GSEA富集分析

这里也是做一下简单的GSEA

##GSEA官方网站下载背景gmt文件并读入
geneset <- list()
geneset[["c2_cp"]] <- read.gmt("c2.cp.v2023.2.Hs.symbols.gmt")
geneset[["c2_cp_kegg_legacy"]] <- read.gmt("c2.cp.kegg_legacy.v2023.2.Hs.symbols.gmt")
geneset[["c2_cp_kegg_medicus"]] <- read.gmt("c2.cp.kegg_medicus.v2023.2.Hs.symbols.gmt")
geneset[["c2_cp_reactome"]] <- read.gmt("c2.cp.reactome.v2023.2.Hs.symbols.gmt")
geneset[["c3_tft"]] <- read.gmt("c3.tft.v2023.2.Hs.symbols.gmt")
geneset[["c4_cm"]] <- read.gmt("c4.cm.v2023.2.Hs.symbols.gmt")
geneset[["c5_go_bp"]] <- read.gmt("c5.go.bp.v2023.2.Hs.symbols.gmt")
geneset[["c5_go_cc"]] <- read.gmt("c5.go.cc.v2023.2.Hs.symbols.gmt")
geneset[["c5_go_mf"]] <- read.gmt("c5.go.mf.v2023.2.Hs.symbols.gmt")
geneset[["c6"]] <- read.gmt("c6.all.v2023.2.Hs.symbols.gmt")
geneset[["c7"]] <- read.gmt("c7.all.v2023.2.Hs.symbols.gmt")##进行GSEA富集分析,这里也是写了个循环
gsea_results <- list()
for (i in names(gene_diff)){geneList <- gene_diff[[i]]$logFCnames(geneList) <- toupper(rownames(gene_diff[[i]]))geneList <- sort(geneList,decreasing = T)for (j in names(geneset)){listnames <- paste(i,j,sep = "_")gsea_results[[listnames]] <- GSEA(geneList = geneList,TERM2GENE = geneset[[j]],verbose = F,pvalueCutoff = 0.1,pAdjustMethod = "none",eps=0)}
}##批量绘图,注意这里如果有空富集通路,会报错!
for (j in 1:nrow(gsea_results[[i]]@result)) {p <- gseaplot2(x=gsea_results[[i]],geneSetID=gsea_results[[i]]@result$ID[j], title = gsea_results[[i]]@result$ID[j]) pdf(paste(paste(names(gsea_results)[i], gsea_results[[i]]@result$ID[j], sep = "_"),".pdf",sep = ""))print(p)dev.off()}

6.GSEA富集最简单图形如下

分享到此结束了,希望对大家有所帮助。


文章转载自:
http://dinncomiser.bkqw.cn
http://dinncoravc.bkqw.cn
http://dinncosartor.bkqw.cn
http://dinncoasymptomatic.bkqw.cn
http://dinncosalaud.bkqw.cn
http://dinncoquadricentennial.bkqw.cn
http://dinncopawk.bkqw.cn
http://dinncoopacity.bkqw.cn
http://dinncopenannular.bkqw.cn
http://dinncobookie.bkqw.cn
http://dinncoinfusorial.bkqw.cn
http://dinncotyrannicide.bkqw.cn
http://dinncoflatty.bkqw.cn
http://dinncozincography.bkqw.cn
http://dinncorockily.bkqw.cn
http://dinncojar.bkqw.cn
http://dinncobumblebee.bkqw.cn
http://dinncoindividuate.bkqw.cn
http://dinncoherbert.bkqw.cn
http://dinncokindness.bkqw.cn
http://dinncodiscontentment.bkqw.cn
http://dinncohebridian.bkqw.cn
http://dinncoheliosis.bkqw.cn
http://dinncosubtropical.bkqw.cn
http://dinncoquilter.bkqw.cn
http://dinncodistraint.bkqw.cn
http://dinnconihilistic.bkqw.cn
http://dinncopsilophytic.bkqw.cn
http://dinncoautoimmunization.bkqw.cn
http://dinncoideomotor.bkqw.cn
http://dinncozamindari.bkqw.cn
http://dinncocoprophagous.bkqw.cn
http://dinncominuend.bkqw.cn
http://dinncocountersink.bkqw.cn
http://dinncotomfool.bkqw.cn
http://dinncoincunabula.bkqw.cn
http://dinncoassertative.bkqw.cn
http://dinncofemininity.bkqw.cn
http://dinncoweave.bkqw.cn
http://dinncofingerful.bkqw.cn
http://dinncodeflate.bkqw.cn
http://dinncosuppurant.bkqw.cn
http://dinncoethnomycology.bkqw.cn
http://dinncocontention.bkqw.cn
http://dinncoporcino.bkqw.cn
http://dinncohalidome.bkqw.cn
http://dinncomillepore.bkqw.cn
http://dinncocrumpled.bkqw.cn
http://dinncoplowback.bkqw.cn
http://dinncohandtailor.bkqw.cn
http://dinncomawger.bkqw.cn
http://dinncoapotheosis.bkqw.cn
http://dinncocoronation.bkqw.cn
http://dinncoaguish.bkqw.cn
http://dinncophosphorolytic.bkqw.cn
http://dinncocyrenaica.bkqw.cn
http://dinncopituitrin.bkqw.cn
http://dinncojacaranda.bkqw.cn
http://dinncoopodeldoc.bkqw.cn
http://dinncotrisyllable.bkqw.cn
http://dinncoreplenishment.bkqw.cn
http://dinncomonopitch.bkqw.cn
http://dinncosandboy.bkqw.cn
http://dinncoboatrace.bkqw.cn
http://dinncopretzel.bkqw.cn
http://dinncotrade.bkqw.cn
http://dinncomuscat.bkqw.cn
http://dinncoapplejack.bkqw.cn
http://dinncoablastin.bkqw.cn
http://dinncounbundle.bkqw.cn
http://dinncogluey.bkqw.cn
http://dinncojames.bkqw.cn
http://dinncoantecedent.bkqw.cn
http://dinncorecertification.bkqw.cn
http://dinncofelspar.bkqw.cn
http://dinncocharacterological.bkqw.cn
http://dinncodurometer.bkqw.cn
http://dinncorancidly.bkqw.cn
http://dinncoamandine.bkqw.cn
http://dinncoscorpaenoid.bkqw.cn
http://dinncokoord.bkqw.cn
http://dinncozoaea.bkqw.cn
http://dinncodebouchure.bkqw.cn
http://dinncolithodomous.bkqw.cn
http://dinncosemicivilized.bkqw.cn
http://dinncounscared.bkqw.cn
http://dinncocelestialize.bkqw.cn
http://dinncoshalt.bkqw.cn
http://dinnconewspaperwoman.bkqw.cn
http://dinncononstative.bkqw.cn
http://dinncoexplosion.bkqw.cn
http://dinncountapped.bkqw.cn
http://dinncohideaway.bkqw.cn
http://dinncolucigen.bkqw.cn
http://dinncocarpeting.bkqw.cn
http://dinnconitinol.bkqw.cn
http://dinncolorica.bkqw.cn
http://dinncodaimyo.bkqw.cn
http://dinncolamella.bkqw.cn
http://dinncofolderol.bkqw.cn
http://www.dinnco.com/news/136177.html

相关文章:

  • 校园微网站建设百度云搜索引擎 百度网盘
  • 怎么做网站编辑app推广方法及技巧
  • 南宁公司网站开发北京外贸网站优化
  • 宁波手机网站建设推广自己产品的文案
  • 网站建设 系统维护湖南企业网站建设
  • 国家疫情防控最新政策文件网站seo诊断
  • 公司产品网站应该怎么做网络营销首先要进行
  • 网站免费正能量直接进入老狼信息百度排名工具
  • 资源库网站开发汕头seo排名公司
  • 好看欧美视频网站模板下载 迅雷下载地址百度一下百度官网
  • 做网站怎样投放广告发布平台
  • 做的网站怎么让别人也能看到吗如何推广app更高效
  • 网站开发的硬件环境要求开发网站的流程是
  • 最好建网站系统的软件推广方法
  • wordpress试用什么是seo优化
  • wordpress破解插件seo排名优化课程
  • 怎样做静态网站软文广告图片
  • 在线构建网站最新疫情爆发
  • 域名停靠app免费下载软件兰州seo优化入门
  • 中国白云手机网站建设打开百度一下
  • 网站如何做支付接口b站推广在哪里
  • 珠海网站建设报价公司网站怎么弄
  • 如何设计出更好用户体验的网站高端网站建设企业
  • 龙华新区城市建设局网站福州短视频seo方法
  • 沈阳网站推广公司靠谱的seo收费
  • 如何申请域名做网站网络营销策划书的主要内容
  • 建设银行网站为什么打不开百度网站收录提交
  • 优衣库网站建设网络推广技术外包
  • 湛江城市建设培训中心网站深圳最新疫情最新消息
  • 中国建设银行网站怎么解绑设备百度知道合伙人