BioMart Error message when pulling sequences
1
0
Entering edit mode
Luca • 0
@6045cdbe
Last seen 20 months ago
United Kingdom

Hello everyone,

I'm trying to get some sequences surrounding SNPs, but I get the error message below. Any solutions?

Error message:

Error in .processResults(postRes, mart = mart, sep = sep, fullXmlQuery = fullXmlQuery, : 
The query to the BioMart webservice returned an invalid result.
The number of columns in the result table does not equal the number of attributes in the query.
Please report this on the support site at http://support.bioconductor.org

Rep example:

snp_mart <- biomaRt::useMart("ENSEMBL_MART_SNP", dataset = "hsapiens_snp")


getBM(
  mart = snp_mart,
  attributes = c("refsnp_id",
                 "allele",
                 "upstream_flank",
                 "downstream_flank"
                 ), 
  filters = "snp_filter",
  values = "rs580060"   
)

Session info:

R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: OS X Snow Leopard 12.6.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] dplyr_1.1.1    biomaRt_2.46.3

loaded via a namespace (and not attached):
 [1] progress_1.2.2       tidyselect_1.2.0     xfun_0.37            repr_1.1.4           purrr_1.0.1          vctrs_0.6.1         
 [7] generics_0.1.3       BiocFileCache_1.14.0 htmltools_0.5.2      stats4_4.0.2         yaml_2.2.1           base64enc_0.1-3     
[13] utf8_1.2.2           blob_1.2.2           XML_3.99-0.8         rlang_1.1.0          pillar_1.9.0         glue_1.6.2          
[19] withr_2.5.0          DBI_1.1.2            rappdirs_0.3.3       dbplyr_2.1.1         BiocGenerics_0.36.1  bit64_4.0.5         
[25] lifecycle_1.0.3      stringr_1.5.0        evaluate_0.20        memoise_2.0.1        Biobase_2.50.0       knitr_1.37          
[31] tzdb_0.2.0           IRanges_2.24.1       fastmap_1.1.0        curl_4.3.2           parallel_4.0.2       fansi_1.0.3         
[37] AnnotationDbi_1.52.0 Rcpp_1.0.8.3         readr_2.1.1          openssl_2.0.0        cachem_1.0.6         S4Vectors_0.28.1    
[43] vroom_1.5.7          jsonlite_1.8.4       bit_4.0.4            askpass_1.1          hms_1.1.1            digest_0.6.29       
[49] stringi_1.7.6        cli_3.6.1            tools_4.0.2          magrittr_2.0.3       tibble_3.2.1         RSQLite_2.2.9       
[55] crayon_1.5.2         tidyr_1.3.0          pkgconfig_2.0.3      ellipsis_0.3.2       xml2_1.3.3           prettyunits_1.1.1   
[61] skimr_2.1.3          assertthat_0.2.1     rmarkdown_2.20       httr_1.4.5           rstudioapi_0.13      R6_2.5.1            
[67] compiler_4.0.2
biomaRt bioma • 816 views
ADD COMMENT
0
Entering edit mode

Even when using getSequence() function I get an error:

command:

plain_mart <- biomaRt::useMart("ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl")

biomaRt::getSequence( 
  id = "BRCA1", 
  type = "hgnc_symbol", 
  seqType = "gene_flank", # gene_exon, transcript_exon,transcript_exon_intron, gene_exon_intron, cdna, coding,coding_transcript_flank,coding_gene_flank,transcript_flank,gene_flank,peptide, 3utr or 5utr
  mart = plain_mart
)

Error:

Error in .processResults(postRes, mart = mart, sep = sep, fullXmlQuery = fullXmlQuery, : 
The query to the BioMart webservice returned an invalid result.
The number of columns in the result table does not equal the number of attributes in the query.
Please report this on the support site at http://support.bioconductor.org

Same sessionInfo as above

ADD REPLY
0
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 4 hours ago
EMBL Heidelberg

The error message could be a lot more helpful here, but the manual page for getSequence() says:

'gene_flank': gives the flanking region of the gene excluding the UTRs, this must be accompanied with a given value for the upstream or downstream attribute

If I add the upstream argument I get:

plain_mart <- biomaRt::useMart("ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl")

biomaRt::getSequence( 
  id = "BRCA1", 
  type = "hgnc_symbol", 
  seqType = "gene_flank", 
  coding,coding_transcript_flank,coding_gene_flank,transcript_flank,gene_flank,peptide, 3utr or 5utr
  mart = plain_mart,
  upstream = 50
)
#>                                           gene_flank hgnc_symbol
#> 1 TGATTTCCTATTCTGAGAGGCTATTGCTCAGCGGTTTCCGTGGCAACAGT       BRCA1
ADD COMMENT
0
Entering edit mode

The next version of biomaRt will now give a hopefully more informative error message:

biomaRt::getSequence( 
  id = "BRCA1", 
  type = "hgnc_symbol", 
  seqType = "gene_flank", 
  mart = plain_mart
)
#> Error: You must provide either the 'upstream' or 'downstream' argument when requesting flanking sequences.
ADD REPLY

Login before adding your answer.

Traffic: 444 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