[BioC] Accession ID to Chromosome Name and Start-End

Sean Davis sdavis2 at mail.nih.gov
Fri Oct 3 14:35:34 CEST 2008


On Fri, Oct 3, 2008 at 3:29 AM, Gundala Viswanath <gundalav at gmail.com> wrote:
> 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)

Close.  You simply need to specify a filter on embl id.

 t <- getBM(attributes=c("chromosome_name", "start_position",
"end_position",'embl'), filters=c('embl'), values=acc, mart=mart)

I added a column in the output to show the embl id, also.

Sean



More information about the Bioconductor mailing list