I should've probably mentioned the exact error I'm getting:

Error in getBM(attributes = attrs, filters = list(ensembl_gene_id =
"ENSG00000165702",  :
  Query ERROR: caught BioMart::Exception: non-BioMart die(): Can't use an
undefined value as an ARRAY reference at
/ensemblweb/wwwmart/www_74/biomart-perl/lib/BioMart/Dataset/GenomicSequence.pm
line 396.

G.


On Sat, Dec 28, 2013 at 1:42 PM, Greg Slodkowicz <gregs@ebi.ac.uk> wrote:

> Dear all,
> I'm having some trouble fetching flanking regions for a gene from the
> Ensembl Biomart:
>
> library(biomaRt)
> ensembl <- useMart(biomart = "ENSEMBL_MART_ENSEMBL",
> dataset="hsapiens_gene_ensembl",
>       host="www.ensembl.org", path="/biomart/martservice")
>
> attrs <- c("ensembl_gene_id", "upstream_flank")
> gene_ann <- getBM(attributes=attrs,
> filters=list(ensembl_gene_id="ENSG00000165702", upstream_flank=100),
> mart=ensembl, checkFilters=F)
> gene_ann
>
> (here's a Gist: https://gist.github.com/jergosh/8159092)
>
> I also tried passing the parameters differently but it doesn't make any
> difference:
>
> gene_ann <- getBM(attributes=attrs, filters=c("ensembl_gene_id",
> "upstream_flank"), values=list(ensembl_gene_id="ENSG00000165702",
> upstream_flank=100), mart=ensembl, checkFilters=F)
>
> Am I doing something wrong?
>
> Best,
> Greg
>
> --
> Greg Slodkowicz
> PhD student, Nick Goldman group
> European Bioinformatics Institute (EMBL-EBI)
>



-- 
Greg Slodkowicz
PhD student, Nick Goldman group
European Bioinformatics Institute (EMBL-EBI)

	[[alternative HTML version deleted]]

