与常用的基因功能注释数据库类似,Disease Ontolog通过参照MeSH, ICD等疾病分类标准,对人类的常见疾病与罕见病进行了归纳整理,提供了一个统一的,标准化的疾病分类系统。
安装补充包
获得基础数据
1 2 3 4 5 6 7 8 9 10 11 12 13
| tmp <- DOSE:::get_DO_data('DO') DO <- list(TERM2GENE=data.frame(), TERM2NAME=data.frame()) DO$TERM2NAME <- as.data.frame(tmp$PATHID2NAME) names(DO$TERM2NAME) <- 'name' DO$TERM2NAME['gsid'] <- rownames(DO$TERM2NAME) rownames(DO$TERM2NAME) <- NULL DO$TERM2NAME <- DO$TERM2NAME[c('gsid', 'name')] for (PATHID in names(tmp$PATHID2EXTID)){ line <- tmp$PATHID2EXTID[[PATHID]] lc_gsid <- rep(x = PATHID, times = length(line)) DO$TERM2GENE <- rbind(DO$TERM2GENE, cbind(lc_gsid, line)) } colnames(DO$TERM2GENE) <- c('gsid', 'gene')
|
转化ENTREZID
1 2 3 4 5 6 7 8 9 10 11 12 13
| tmp <- AnnotationDbi::select(org.Hs.eg.db::org.Hs.eg.db,keys=DO$TERM2GENE$gene,columns='SYMBOL', keytype='ENTREZID') DO$TERM2GENE$gene <- tmp$SYMBOL DO$TERM2GENE <- na.omit(DO$TERM2GENE) saveRDS(DO,'DO.hsa.rds')
|