画图如何预测基因的功能

医院小动作让看病更贵更烦 http://www.zgbdf.net/baidianfengjiankangzixun/redianguanzhu/9192.html

冠状病毒结合的宿主细胞受体ACE2在人组织中的表达情况

ACE2在TCGA肺癌数据的表达情况(请不要过度解读这个图的结果!)

我们平时在做分析的时候,找到差异基因之后要做的就是看看这个基因有什么功能,既然ACE2这个基因这么可恶,那么我们来预测一下这个基因在人肺组织样本都有哪些功能呢?

画图

1.获得人肺组织表达谱数据

lungTMP-read.csv("Lung.csv",header=T,check.names=F,row.names=1)

2.数据清洗按照ACE2基因表达量按照中位数分成高低表达组

ACE2geneexp-data.frame(t(lungTMP[str_sub(rownames(lungTMP),end=15)==gene,]),check.names=F)ACE2geneexp$group-ifelse(ACE2geneexp$ENSG.10median(ACE2geneexp$ENSG.10),"high","low")ACE2geneexp$group-as.factor(ACE2geneexp$group)

3.计算差异基因

library(limma)design-model.matrix(~0+group)contrast.matrix-makeContrasts(contrasts=c("grouphigh-grouplow"),levels=design)fit1-contrasts.fit(lmFit(lungTMP,design),contrast.matrix)fit2-eBayes(fit1)dif-topTable(fit2,coef="grouphigh-grouplow",n=nrow(fit2),adjust="BH",sort.by="P")

4.用Y叔的神包clusterProfiler分析

library(clusterProfiler)library(org.Hs.eg.db)library(ggplot2)library(annoE)genecluster-AnnoENSG(EntrezID=T,data=dif)genecluster-genecluster[order(genecluster$logFC,decreasing=T),]gene-genecluster$EntrezGenegenelist-genecluster$logFCnames(genelist)-geneego-enrichGO(gene=gene,ont="ALL",OrgDb=org.Hs.eg.db,pAdjustMethod="BH",pvalueCutoff=0.05,qvalueCutoff=0.05,readable=TRUE)go.plot-dotplot(ego,showCategory=10,split="ONTOLOGY")+facet_grid(ONTOLOGY~.,scale="free")go.plot

备注:上面annoE是站长自己写的注释基因的包。

emapplot(ego)

5.用GOplot包再画个八卦图

library(GOplot)circ-circle_dat(david,geneFC)GOCircle(circ)

画图素材:

1、在GTEx上下载其中人肺组织表达谱数据

2、需要annoE包

3、GOplot中准备circ的代码

上面的素材,大家可以自行准备,当然如果嫌麻烦大家可以在文末赞赏,可以获得出图代码和相关数据!

参考文献

1.Zhou,P.etal.Apneumoniaoutbreakassociatedwithanewcoronavirusofprobablebatorigin.Nature


转载请注明:http://www.bjgongshangzhuce.com/jywh/5911.html


当前时间: