Entering edit mode
Gundala Viswanath
▴
230
@gundala-viswanath-2872
Last seen 10.3 years ago
Dear experts,
Given the accession IDs such as these:
How can I extract the "chromosome name", "start" and "end" position
of each ID, with BioConductor.
AB002292
AB002296
AB002298
AB002303
..
EF565109
K03493
L36149
M16404
X80391
Z25470
I tried this, but it gives me so many coordinates sets instead of just
3 (corresponding
to query).
> library(biomaRt)
> acc <- c("AB002292", "X80391", "Z25470")
> mart <- useMart("ensembl")
> mart <-useDataset("hsapiens_gene_ensembl",mart)
> t <- getBM(attributes=c("chromosome_name", "start_position",
"end_position"), values=acc, mart=mart)
> t
Please kindly advice.
- Gundala Viswanath
Jakarta - Indonesia