Entering edit mode
10.0 years ago
kindlychung
▴
60
Here is the code:
require(biomaRt)
ensembl = useMart("ensembl", ,dataset="hsapiens_gene_ensembl")
# filters = listFilters(ensembl)
# filters[1:5, ]
# attributes = listAttributes(ensembl)
# ensembl_attr = cbind(attributes$name, attributes$description)
# head(ensembl_attr, 15)
getBM(c("hgnc_symbol", "start_position", "end_position"), filters=c("chromosome_name", "start", "end"), values=list(16, 1100000, 1250000), mart=ensembl)
Result:
hgnc_symbol start_position end_position
1 1103280 1105461
2 1111627 1113399
3 TPSB2 1227272 1230184
4 1206560 1207124
5 1223639 1224143
6 1156976 1157974
7 1159548 1160176
8 CACNA1H 1153241 1221771
9 TPSG1 1221651 1225257
10 TPSAB1 1240696 1242554
11 1148224 1148754
As you can see, some gene names are missing, why is that?