Can't retrieve upstream flank (biomaRt)
1
0
Entering edit mode
Pete • 0
@ffb80adf
Last seen 12 weeks ago
United States

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?

biomaRt • 163 views
ADD COMMENT
0
Entering edit mode
Mike Smith ★ 5.1k
@mike-smith
Last seen 4 hours ago
EMBL Heidelberg / de.NBI

Thanks for the error report. This was due to a bug introduced in the latest version. I've hopefully fixed it in version 2.48.2:

library(biomaRt)
packageVersion("biomaRt")
#> [1] '2.48.2'
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)
a
#>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      coding_gene_flank
#> 1 GAATCAGACAGGTAGCCAAGAAGGGCAATGGGGAGCCCAGGACCAGATACAGATGAATTACACTGGAAGCTGGAAGGGGTGGGACCTCTGCTGATATGGTCTACATTTAACAGAGGCACGGAGGAGCCTGAAAGGTAAAATAAACTTGTGAAGAGACAGTGGAGAATAAACTATTAAAATCTCATGTGATGGTCTCAGTTACCCGCAGAAAGAATGACCCTACTCTGTCACTCATAGGTGAAACCTAGAGTAGCCAACCTCATAGAAGTGAAAAGAAGGGTGGTAGTCTACCAGGCTGTGGGAAGAGTGAAATTGGATAATGTTAGTCAAAGTCTCAATTGTGTAAAATGAACACAGGGGAGTTTGAATGCATGATTACAACTACTATGAATGGTATATGTAGCATTGTGCTTGAAATTTGCTACAATGAAAATCTGAAATTCCATGCACACCCTCTTTGTTCTCCCTTCTTTCTTCCAGTGCCTTTATTGCTTGAAGTC
#> 2 GTTACAGACATGCAGCCCAAGAAGGGCAATGGGGAGCCCATGACCAGATACAGCTGAATTACACTGGAAGCTGGAAGGGGAGGGACCTCTGCTGTTGTCGTCTACATTTAACAGAGGCACAGTGGAGTCTGAAAAGTAGAATGGATTTGTGAAAGGCAATGGAGAATAAACCTCGAAAGTCTCATGTGATGGTCTCAGCTACCTGCAGAAAGAATGACCCTAATCTGTCACTCAGAGATGAAACCTAGAGTAGCCAACCTCATGGAAGTGAAAAGAGGGGTGGTAGTTTGCCAGGCTGTGGGAAGAGTGAAATTGGATAATGTTAGTCAAAGTCCCAATTGTGTAAAATGAGCACAGGGGAGTTTGAATGCATAATTACAACCACTATGAATGGTATATGTAGCAATGGGCTTGAAATTTGCTACAATGAAAATGTGAAATTCCATGCACACCCTCTTTGTTCTCCCTTCTTTCTTCCAGTGCCTTTATTGCTTGAAGTG
#>   entrezgene_id
#> 1         60440
#> 2        240327

The new version should be available from Bioconductor in a couple of days. If you need it now, you can install directly from Github with:

BiocManager::install('grimbough/biomaRt', ref = 'RELEASE_3_13')
ADD COMMENT
0
Entering edit mode

Thank you for the reply. The getSequence command is working after installing the github version.

ADD REPLY

Login before adding your answer.

Traffic: 254 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6