ilumia复现工作生活

ID转换大全-2-illumina芯片的探针

2019-07-01  本文已影响0人  天涯清水

ID转换大全-2-illumina芯片的探针

基础知识参见:

参考https://vip.biotrainee.com

然后是illumina芯片的探针:

library(BiocManager)#loading package

BiocManager::install("illuminaHumanv4.db") #insatll package

library("illuminaHumanv4.db")#loading package

ls('package:illuminaHumanv4.db')#list package

probe2entrezID=toTable(illuminaHumanv4ENTREZID)#extract GeneID for probe

probe2symbol=toTable(illuminaHumanv4SYMBOL)#extract symbol for probe

probe2genename=toTable(illuminaHumanv4GENENAME)#extract genename for probe

my_probe = sample(unique(mappedLkeys(illuminaHumanv4ENTREZID)),30)#extract 30 samples randomly

tmp4 = probe2symbol[match(my_probe,probe2symbol$probe_id),]#match probe to genesymbol

tmp5 = probe2entrezID[match(my_probe,probe2entrezID$probe_id),]#match probe to geneid

tmp6 = probe2genename[match(my_probe,probe2genename$probe_id),]#match probe to genename

geneID<- tmp5$gene_id  #show the name for frame

genesymbol<- tmp4$symbol

genename<- tmp6$gene_name

write.table(probe,'probe4.csv',quote = F,col.names = F,row.names = F,sep="\t")
write.table(tmp4$symbol,'symbol4.csv',quote = F,col.names = F,row.names = F,sep = "\t")
write.table(tmp5$gene_id,'gene_ID4.csv',quote = F,col.names = F,row.names = F,sep = "\t")
write.table(tmp6$gene_name,'gene_Name4.csv',quote = F,col.names = F,row.names = F,sep="\t")

df<- data.frame(probe,gene_ID,gene_symbol,gene_name)#build frame

write.table(df,'IDconvert4.xls',quote = F,col.names = T,row.names = F,sep = "\t")
上一篇 下一篇

猜你喜欢

热点阅读