I was trying to obtain the promoter regions of a set of A. thaliana genes (model plant) using function getBM() from biomaRt but I didn't manage to make it work. First I tried to use getSequences() but apparently it only works with ENSEMBL_MART_ENSEMBL and not plants_mart. I found somewhere on this forum that getBM() could work, but the example on that topic was not what I wanted...
Basically I would like to use "gene_flank" and "upstream_flank" as attributes but I always get this error:
"Error in getBM(attributes = attrs, filters = "ensembl_gene_id", values = c("AT1G64000", :
Query ERROR: caught BioMart::Exception::Usage: Requests for flank sequence must be accompanied by an upstream_flank or downstream_flank request"
this is a sample of the code:
AtMart= useMart("plants_mart", host="plants.ensembl.org", dataset= "athaliana_eg_gene") attributes = listAttributes(AtMart) filter = listFilters(AtMart) attrs <- c("ensembl_gene_id", "ensembl_transcript_id", "gene_flank", "upstream_flank") p = getBM(attributes = attrs, filters = "ensembl_gene_id", values = c("AT1G64000", "AT3G46520"), mart = AtMart )
I think that I need to state somewhere the size of the flanking region, but I don't know where... I tried to add it in the values field, but that is only related with filtering.
Does anyone know how to do this or why this error is occurring?
Thanks in advance
> sessionInfo() R version 3.2.5 (2016-04-14) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu precise (12.04.5 LTS) locale:  LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8  LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8  LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C  LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages:  stats4 parallel stats graphics grDevices utils datasets methods base other attached packages:  GenomicFeatures_1.22.13 AnnotationDbi_1.32.3 Biobase_2.30.0 GenomicRanges_1.22.4  GenomeInfoDb_1.6.3 IRanges_2.4.8 S4Vectors_0.8.11 BiocGenerics_0.16.1  biomaRt_2.26.1 BiocInstaller_1.20.3 loaded via a namespace (and not attached):  XVector_0.10.0 GenomicAlignments_1.6.3 zlibbioc_1.16.0  BiocParallel_1.4.3 tools_3.2.5 SummarizedExperiment_1.0.2  DBI_0.4-1 lambda.r_1.1.7 futile.logger_1.4.1  rtracklayer_1.30.4 futile.options_1.0.0 bitops_1.0-6  RCurl_1.95-4.8 RSQLite_1.0.0 Biostrings_2.38.4  Rsamtools_1.22.0 XML_3.98-1.4