forked from rli012/BioinfoHub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGet_ENSEMBL_Annotation_biomaRt.R
38 lines (29 loc) · 1.17 KB
/
Get_ENSEMBL_Annotation_biomaRt.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
library(biomaRt)
listMarts()
ensembl=useMart("ensembl")
ensembl
datasets <- listDatasets(ensembl)
head(datasets)
ensembl = useDataset("hsapiens_gene_ensembl",mart=ensembl)
attributes <- ensembl@attributes
View(attributes)
#affyids=c("202763_at","209310_s_at","207500_at")
annotation <- getBM(attributes=c('ensembl_gene_id', 'entrezgene_id', #'hgnc_symbol',
'external_gene_name', 'description', 'gene_biotype'),
#filters = 'affy_hg_u133_plus_2',
#values = affyids,
mart = ensembl)
annotation <- getBM(attributes=c('ensembl_gene_id', 'uniprot_gn_id', 'uniprotswissprot'),
#filters = 'affy_hg_u133_plus_2',
#values = affyids,
mart = ensembl)
dim(annotation)
View(annotation)
searchDatasets(mart = ensembl, pattern = "hsapiens")
searchAttributes(mart = ensembl, pattern = "hgnc")
### Ensembl Archive
listEnsemblArchives()
listMarts(host = 'oct2016.archive.ensembl.org')
ensembl86 <- useMart(host='oct2016.archive.ensembl.org',
biomart='ENSEMBL_MART_ENSEMBL',
dataset='hsapiens_gene_ensembl')