Gene ID转换
LIBRARY(ORG.HS.EG.DB)
人共有多少个entrez id的基因呢?
x <- org.Hs.egENSEMBLTRANS# is an R object that contains mappings between Entrez Gene identifiers and Ensembl transcript accession numbers.
mapped_genes <- mappedkeys(x)# Get the entrez gene IDs that are mapped to an Ensembl ID

xx <- as.list(x[mapped_genes])# Convert to a list



2、能对应ensembl的gene ID的基因有多少个呢?
x <- org.Hs.egENSEMBL# is an R object that contains mappings between Entrez Gene identifiers and Ensembl gene accession numbers.
mapped_genes <- mappedkeys(x)#Get the entrez gene IDs that are mapped to an Ensembl ID
xx <- as.list(x[mapped_genes])# Convert to a list

3、那么基因对应的转录本分布情况如何呢?
table(unlist(lapply(xx,length)))

4、那么基因在染色体的分布情况如何呢?
x <- org.Hs.egCHR#is an R object that provides mappings between entrez gene identifiers and the chromosome that contains the gene of interest
mapped_genes <- mappedkeys(x)# Get the entrez gene identifiers that are mapped to a chromosome
xx <- as.list(x[mapped_genes])#Convert to a list



barplot(y)

5、那么有多多少基因是有GO注释的呢?
x <- org.Hs.egGO
mapped_genes <- mappedkeys(x)# Get the entrez gene identifiers that are mapped to a GO ID
xx <- as.list(x[mapped_genes])# Convert to a list

