Hi,

I am trying to use4 bioMart to retrieve the exon coordinates using the example provided below:

library(biomaRt)
ensembl = useMart("ensembl")

ensembl = useDataset("hsapiens_gene_ensembl",mart=ensembl)

getBM(attributes =
c("chromosome_name","exon_chrom_start","exon_chrom_end","rank"),
filters = 'hgnc_symbol', values=c("KIT"),mart=ensembl)

The above works fine. However, when I tried to add "hgnc_symbol" to the attributes list, it gave me error:

getBM(attributes =
c("hgnc_symbol","chromosome_name","exon_chrom_start","exon_chrom_end","rank"),
filters = 'hgnc_symbol', values=c("KIT"),mart=ensembl)


Error in getBM(attributes = c("hgnc_symbol", "chromosome_name", "exon_chrom_start",  : 
  Query ERROR: caught BioMart::Exception::Usage: Attributes from multiple attribute pages are not allowed

But if I keep "hgnc_symbol" in the atributes list and remove "exon_chrom_start" and "exon_chrom_end", then it worked again:
getBM(attributes =
c("hgnc_symbol","chromosome_name","ensembl_transcript_id","rank"),
filters = 'hgnc_symbol', values=c("KIT"),mart=ensembl)

Can anyone tell me why is that?

Thanks

John


________________________________
 From: Hans-Rudolf Hotz <hrh@fmi.ch>

onductor@r-project.org> 
Sent: Thursday, November 21, 2013 5:38 AM
Subject: Re: [BioC] exon genomic coordinates


Hi John

You can use the BioMart database, which you can access with the biomaRt 
package to get all exons for all transcripts for a given giene, eg:

library(biomaRt)
ensembl = useMart("ensembl")
#assuming you are interested in mouse
mouse.ensembl = useDataset("mmusculus_gene_ensembl",mart=ensembl)

getBM(attributes = 
c("chromosome_name","exon_chrom_start","exon_chrom_end","ensembl_exon_id","ensembl_transcript_id","ensembl_gene_id"), 
filters = 'mgi_symbol', values=c("KIT"),mart=mouse.ensembl)


Hope this helps

Hans-Rudolf


On 11/21/2013 09:14 AM, array chip wrote:
> Hi,
>
>
> Can anyone suggest how to retrieve the genomic coordinates for all exons for a given gene by say gene symbol? For example, how to retrieve the coordinates for all 21 exons for gene KIT?
>
> Thanks
>
> John
>     [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

>
	[[alternative HTML version deleted]]

