1)安装载入
if("org.Hs.eg.db" %in% rownames(installed.packages()) == FALSE) {source("http://bioconductor.org/biocLite.R");biocLite("org.Hs.eg.db")}
suppressMessages(library(org.Hs.eg.db))
2)查看该包所有的对象
ls("package:org.Hs.eg.db")
功能:
org.Hs.egACCNUM:Map Entrez Gene identi?ers to GenBank Accession Numbersorg.Hs.egALIAS2EG:Map between Common Gene Symbol Identi?ers and Entrez Geneorg.Hs.eg.db:Bioconductor annotation data packageorg.Hs.egCHR:Map Entrez Gene IDs to Chromosomesorg.Hs.egCHRLENGTHS:A named vector for the length of each of the chromosomesorg.Hs.egCHRLOC:Entrez Gene IDs to Chromosomal Locationorg.Hs.egENSEMBL:Map Ensembl gene accession numbers with Entrez Gene identi?ersorg.Hs.egENSEMBLPROT:Map Ensembl protein acession numbers with Entrez Gene identi?ersorg.Hs.egENSEMBLTRANS:Map Ensembl transcript acession numbers with Entrez Gene identi?ersorg.Hs.egENZYME:Map between Entrez Gene IDs and Enzyme Commission (EC) Numbersorg.Hs.egGENENAME:Map between Entrez Gene IDs and Genesorg.Hs.egGO:Maps between Entrez Gene IDs and Gene Ontology (GO) IDsorg.Hs.egMAP:Map between Entrez Gene Identi?ers and cytogenetic:Maps/bandsorg.Hs.egMAPCOUNTS Number of:Mapped keys for the:Maps in package org.Hs.eg.dborg.Hs.egOMIM:Map between Entrez Gene Identi?ers and Mendelian Inheritance in Man (MIM) identi?ersorg.Hs.egORGANISM:The Organism for org.Hs.egorg.Hs.egPATH:Mappings between Entrez Gene identi?ers and KEGG pathway identi?ersorg.Hs.egPFAM:Maps between Manufacturer Identi?ers and PFAM Identi?ersorg.Hs.egPMID:Map between Entrez Gene Identi?ers and PubMed Identi?ersorg.Hs.egPROSITE:Maps between Manufacturer Identi?ers and PROSITE Identi?ersorg.Hs.egREFSEQ:Map between Entrez Gene Identi?ers and RefSeq Identi?ersorg.Hs.egSYMBOL:Map between Entrez Gene Identi?ers and Gene Symbolsorg.Hs.egUNIGENE:Map between Entrez Gene Identi?ers and UniGene cluster identi?ersorg.Hs.egUNIPROT:Map Uniprot accession numbers with Entrez Gene identi?ersorg.Hs.eg_dbconn:Collect information about the package annotation DB
3)各个对象的简单使用
3.1)org.Hs.egACCNUM
该作用是将 Entrez Gene identi?ers( https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene) 与 GenBank accession numbers进行简单的mapping。依据的数据库是Entrez Gene ftp://ftp.ncbi.nlm.nih.gov/gene/DATA
以其中一个gene2ensembl为例:
wget ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/gene2ensembl.gz
其中第一列是物种id,第二列是GeneID, 第三列是Ensemble_geneID,第四列是RNA_id,第五列是Ensemble_RNAid,第六列是protein_id
x <- org.Hs.egACCNUM ### Bimap interfacemapped_genes <- mappedkeys(x) ## Get the entrez gene identifiers that are mapped to an ACCNUMxx <- as.list(x[mapped_genes]) # Convert to a listif(length(xx) > 0) {xx[1:5] # Get the ACCNUM for the first five genesxx[[1]] # Get the first one}#For the reverse map ACCNUM2EG:xx <- as.list(org.Hs.egACCNUM2EG) # Convert to a listif(length(xx) > 0){xx[1:5] # Gets the entrez gene identifiers for the first five Entrez Gene IDsxx[[1]] # Get the first one}
原文地址:https://www.cnblogs.com/djx571/p/9612719.html
时间: 2024-10-17 17:57:20