基因ID转换

#BiocManager::install("clusterProfiler")

#BiocManager::install("org.Hs.eg.db")

library(org.Hs.eg.db)

library("clusterProfiler")

data <- read.table("C:/Users/cendy/Desktop/counts.txt", header=TRUE, quote="\t",skip = 1)

geneList <- data$Geneid

source("http://bioconductor.org/biocLite.R")

options(BioC_mirror="http://mirrors.ustc.edu.cn/bioc/")

gene.df <- bitr(geneList, fromType = "ENSEMBL", #fromType是指你的数据ID类型是属于哪一类的

                toType = c("ENSEMBL", "SYMBOL"), #toType是指你要转换成哪种ID类型,可以写多种,也可以只写一种

                OrgDb = org.Hs.eg.db)#Orgdb是指对应的注释包是哪个

head(gene.df)

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容