7.5 years ago by
Washington University, St Louis, USA
From the biomaRt documentation for 'getBM' it says: "Sometimes attributes where a value needs to be specified, for example upstream_flank with value 20 for obtaining upstream sequence flank regions of length 20bp, are treated as filters in BioMarts. To enable such a query to work, one must specify the attribute as a filter and set checkFilters = FALSE for the query to work." Also note that for the 'values' argument, "If multiple filters are specified then the argument should be a list of vectors of which the position of each vector corresponds to the position of the filters in the filters argument."
So, does this do what you are looking for?
agambiaeseq=getBM(attributes=c('gene_flank','start_position','end_position','chromosome_name','strand','ensembl_gene_id'),filters=c('ensembl_gene_id','upstream_flank'),values=list(ENSG='AGAP004677', Upstream=100), mart=mart, checkFilters=FALSE)
The output looks like:
gene_flank start_position end_position chromosome_name strand ensembl_gene_id
ATCTCAAAATGGCAACATGTCAAACGCTAAGAAGACACCTCTTCTATATTCCACCTTGATTTGAACGGTAACATTCAGTAGTCCGTGGCTTTCGGATTAT 157348 186936 2L -1 AGAP004677
It seems to correspond to what I imagine your query might look like at the VectorBase Biomart web interface.