The support.bioconductor.org editor has been updated to markdown! Please see more info at: Tutorial: Updated Support Site Editor

Question: Error retrieving data with biomaRt
0
gravatar for lluex.rova
12 months ago by
lluex.rova0
lluex.rova0 wrote:

Hi,

I am getting errors when trying to obtain uniprotkb ids from mgi_symbol with biomaRt after I updated all packages. An example of my code before:

mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl")
prot_retrieved <- getBM(attributes = c("mgi_symbol","uniprotswissprot"), filters = "mgi_symbol", values = c("Mfap1b", "Champ1"), mart = mouse)

This returns the error:

Error in getBM(attributes = c("mgi_symbol", "uniprotswissprot"), filters = "mgi_symbol",  :
  Invalid attribute(s): uniprotswissprot
Please use the function 'listAttributes' to get valid attribute names

After the update, "uniprotswissprot" attribute changed to "uniprot_swissprot". I corrected my code, and I got a new error:

Error in getBM(attributes = c("mgi_symbol", "uniprot_swissprot"), filters = "mgi_symbol",  :
  Query ERROR: caught BioMart::Exception::Usage: Attribute uniprot_swissprot NOT FOUND

Is it possible to fix this or to get uniprotkb ids from mgi_symbols? I have tried with the package UniProt.ws, but it is not possible to get any information from mgi_symbol (that I know of). Thanks.

 

sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

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

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

other attached packages:
[1] UniProt.ws_2.18.0   BiocGenerics_0.24.0 RCurl_1.95-4.10     bitops_1.0-6        RSQLite_2.0        
[6] biomaRt_2.34.2     

loaded via a namespace (and not attached):
 [1] Biobase_2.38.0        httr_1.3.1            tidyr_0.8.0           VGAM_1.0-5            bit64_0.9-7          
 [6] splines_3.4.3         gsubfn_0.6-6          gtools_3.5.0          assertthat_0.2.0      DO.db_2.9            
[11] rvcheck_0.0.9         stats4_3.4.3          blob_1.1.0            yaml_2.1.16           progress_1.1.2       
[16] pillar_1.1.0          backports_1.1.2       glue_1.2.0            chron_2.3-52          digest_0.6.15        
[21] RColorBrewer_1.1-2    checkmate_1.8.5       qvalue_2.10.0         colorspace_1.3-2      plyr_1.8.4           
[26] XML_3.98-1.9          pkgconfig_2.0.1       clusterProfiler_3.6.0 reactome.db_1.62.0    purrr_0.2.4          
[31] GO.db_3.5.0           scales_0.5.0          gdata_2.18.0          BiocParallel_1.12.0   tibble_1.4.2         
[36] IRanges_2.12.0        ggplot2_2.2.1         sqldf_0.4-11          STRINGdb_1.18.0       lazyeval_0.2.1       
[41] proto_1.0.0           magrittr_1.5          memoise_1.1.0         DOSE_3.4.0            poweRlaw_0.70.1      
[46] ReactomePA_1.22.0     gplots_3.0.1          graph_1.56.0          prettyunits_1.0.2     tools_3.4.3          
[51] hash_2.2.6            data.table_1.10.4-3   stringr_1.2.0         S4Vectors_0.16.0      munsell_0.4.3        
[56] plotrix_3.7           AnnotationDbi_1.40.0  compiler_3.4.3        caTools_1.17.1        rlang_0.1.6          
[61] grid_3.4.3            rappdirs_0.3.1        igraph_1.1.2          gtable_0.2.0          curl_3.1             
[66] DBI_0.7               reshape2_1.4.3        R6_2.2.2              gridExtra_2.3         graphite_1.24.1      
[71] bit_1.1-12            fastmatch_1.1-0       fgsea_1.4.1           KernSmooth_2.23-15    GOSemSim_2.4.1       
[76] stringi_1.1.6         Rcpp_0.12.15          png_0.1-7  
biomart R uniprot getbm • 227 views
ADD COMMENTlink written 12 months ago by lluex.rova0

Not really sure what's going on here, but for me this works using the uniprotswissprot version e.g.

library(biomaRt)
mouse <- useMart("ensembl", dataset = "mmusculus_gene_ensembl")
res <- getBM(attributes = c("mgi_symbol","uniprotswissprot"), 
             filters = "mgi_symbol", 
             values = c("Mfap1b", "Champ1"), 
             mart = mouse)
> res
  mgi_symbol uniprotswissprot
1     Mfap1b           C0HKD8
2     Mfap1b           C0HKD9
3     Champ1           Q8K327
> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /g/easybuild/x86_64/CentOS/7/nehalem/software/OpenBLAS/0.2.20-GCC-6.4.0-2.28/lib/libopenblas_nehalemp-r0.2.20.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] biomaRt_2.34.2

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.14         AnnotationDbi_1.40.0 magrittr_1.5         BiocGenerics_0.24.0 
 [5] progress_1.1.2       IRanges_2.12.0       bit_1.1-12           R6_2.2.2            
 [9] rlang_0.1.4          httr_1.3.1           stringr_1.2.0        blob_1.1.0          
[13] tools_3.4.3          parallel_3.4.3       Biobase_2.38.0       DBI_0.7             
[17] yaml_2.1.15          bit64_0.9-7          digest_0.6.12        assertthat_0.2.0    
[21] tibble_1.3.4         S4Vectors_0.16.0     bitops_1.0-6         curl_3.0            
[25] RCurl_1.95-4.8       memoise_1.1.0        RSQLite_2.0          stringi_1.1.6       
[29] compiler_3.4.3       BiocInstaller_1.28.0 prettyunits_1.0.2    stats4_3.4.3        
[33] XML_3.98-1.9
ADD REPLYlink written 12 months ago by Mike Smith3.2k

I have just updated all R packages again and biomaRt is working like before, with the attribute version "uniprotswissprot". I get the same results you show, thanks for you reply. I don't know what happened.

ADD REPLYlink written 12 months ago by lluex.rova0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 234 users visited in the last hour