I am trying to retrieve gene flanks 500 bp upstream from an input of entrez ids using getSequence in biomaRt. This is the exact same code used in the documentation (section 6.7) except it is 100 bp and different entrez ids. I am getting the following error:
Error in .processResults(postRes, mart = mart, hostURLsep = sep, fullXmlQuery = fullXmlQuery, : Query ERROR: caught BioMart::Exception::Usage: Requests for flank sequence must be accompanied by an upstream_flank or downstream_flank request
This is my code:
ensembl <- useEnsembl(biomart = "genes", dataset = "mmusculus_gene_ensembl") entrez = c("240327", "60440") a <- getSequence(id = entrez, type="entrezgene_id", seqType="coding_gene_flank", upstream=500, mart=ensembl)
How do I resolve the error so that I can obtain the flank sequenes?