hmmer() error and blast.pdb() warning

Issue #524 resolved
Barry Grant created an issue

I see errors with the hmmer() function with the CRAN version (bio3d_2.3-3):

> aa <- get.seq("1ake_A")
> hmm <- hmmer(aa)

# <... cut output splash (which is mostly annoying) ...>
# < Access-Control-Allow-Methods: HEAD, POST, GET,  OPTIONS, DELETE, PUT
# < Access-Control-Allow-Headers: x-requested-with,  Content-Type, origin, authorization, accept, clie$
# < Content-Length: 16
# < 
# * Connection #1 to host www.ebi.ac.uk left intact
# Error in resurl["uuid", 1] : incorrect number of dimensions

And blast.pdb() has a needless warning now

> hmm <- blast.pdb(aa)

# Searching ... please wait (updates every 5 seconds) RID = ZM2Y000W014 
# .
# Reporting 209 hits
Warning message:
In scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
  EOF within quoted string
> 
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.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] stats     graphics  grDevices utils     datasets 
[6] methods   base     

other attached packages:
[1] bio3d_2.3-3

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.13    XML_3.98-1.9    digest_0.6.12  
 [4] rprojroot_1.2   bitops_1.0-6    grid_3.4.1     
 [7] backports_1.1.1 magrittr_1.5    evaluate_0.10.1
[10] stringi_1.1.5   rmarkdown_1.6   tools_3.4.1    
[13] stringr_1.2.0   RCurl_1.95-4.8  yaml_2.1.14    
[16] parallel_3.4.1  rsconnect_0.8.5 compiler_3.4.1 
[19] htmltools_0.3.6 knitr_1.17     
> 

Comments (10)

  1. Barry Grant reporter

    Looks like the hmmer() error it is fixed in the development version (master branch). The warning with blast.pdb() is still there.

    FYI: Note that the 39 hits I get with 1ake_A do not have the species distribution to your plot.blast() results here http://bio3d.uib.no/bio3d-pdb.html

    PRplot.pnglot Attached

  2. Lars Skjærven

    The hmmer bug was fixed some time ago and the development version should work (see below). Note that we had to use blast.pdb on the workshop since the hmmer server timed out.

    > devtools::install_bitbucket("Grantlab/bio3d", subdir = "ver_devel/bio3d/")
    > library(bio3d)
    
    > aa <- get.seq("1ake_A")
    Fetching... Please wait. Done.
    
    > hmm <- hmmer(aa, verbose=F)
    
    > hmm$url
    [1] "http://www.ebi.ac.uk/Tools/hmmer/results/79B629D0-BF32-11E7-BE28-D3A153F04F9B"
    

    will check into the blast warning.

  3. Lars Skjærven

    hmmer_plot.png

    > sessionInfo()
    R version 3.4.1 (2017-06-30)
    Platform: x86_64-apple-darwin15.6.0 (64-bit)
    Running under: macOS Sierra 10.12.6
    
    Matrix products: default
    BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
    LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
    
    locale:
    [1] C/UTF-8/C/C/C/C
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base     
    
    other attached packages:
    [1] bio3d_2.3-3.9000 devtools_1.13.3 
    
    loaded via a namespace (and not attached):
     [1] Rcpp_0.12.11   knitr_1.17     xml2_1.1.1     magrittr_1.5   roxygen2_6.0.1
     [6] R6_2.2.2       stringr_1.2.0  httr_1.3.1     tools_3.4.1    parallel_3.4.1
    [11] grid_3.4.1     git2r_0.19.0   withr_2.0.0    commonmark_1.4 digest_0.6.12 
    [16] crayon_1.3.2   bitops_1.0-6   RCurl_1.95-4.8 testthat_1.0.2 curl_2.8.1    
    [21] memoise_1.1.0  stringi_1.1.5  compiler_3.4.1 XML_3.98-1.9  
    
  4. Lars Skjærven

    Looks like the legend covers the entire plot in your case. Difficult to debug since I can't reproduce it. I haven't seen this before either. Out systems from sessioninfo() look very similar, so this is odd.

  5. Lars Skjærven

    Changing quote="\"" to quote="" fixes the EOF within quoted string (line 82, get.blast.R). Note that this warning is from reading the unfinished blast job in the try-catch statement. There are no difference between the two cases below (which corresponds to reading the finished blast job results):

    > res1 = read.csv("https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Get&FORMAT_OBJECT=Alignment&ALIGNMENT_VIEW=Tabular&RESULTS_FILE=on&FORMAT_TYPE=CSV&ALIGNMENTS=20000&RID=ZM5X14AJ015", 
                         header = FALSE, sep = ",", quote="\"", dec=".",
                         fill = TRUE, comment.char="", stringsAsFactors=FALSE)
    
    > res2 = read.csv("https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Get&FORMAT_OBJECT=Alignment&ALIGNMENT_VIEW=Tabular&RESULTS_FILE=on&FORMAT_TYPE=CSV&ALIGNMENTS=20000&RID=ZM5X14AJ015", 
                         header = FALSE, sep = ",", quote="", dec=".",
                         fill = TRUE, comment.char="", stringsAsFactors=FALSE)
    
    > identical(res2, res1)
    [1] TRUE
    
  6. Xinqiu Yao

    Fixed the blast.pdb() warning as Lars suggested (see commit)

    Also tested hmmer() and I got almost the same results as Lars (but somehow not identical; no clue yet).

    > sessionInfo()
    R version 3.4.1 (2017-06-30)
    Platform: x86_64-w64-mingw32/x64 (64-bit)
    Running under: Windows 7 x64 (build 7601) Service Pack 1
    
    Matrix products: default
    
    locale:
    [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
    [4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base     
    
    other attached packages:
    [1] bio3d_2.3-3.9000
    
    loaded via a namespace (and not attached):
     [1] Rcpp_0.12.13    roxygen2_6.0.1  XML_3.98-1.9    crayon_1.3.4    digest_0.6.12   withr_2.1.0     bitops_1.0-6   
     [8] commonmark_1.4  grid_3.4.1      R6_2.2.2        magrittr_1.5    httr_1.3.1      stringi_1.1.5   curl_3.0       
    [15] rstudioapi_0.7  testthat_1.0.2  xml2_1.1.1      devtools_1.13.3 tools_3.4.1     stringr_1.2.0   RCurl_1.95-4.8 
    [22] parallel_3.4.1  compiler_3.4.1  memoise_1.1.0  
    

    Rplot.png

  7. Modesto Redrejo Rodríguez

    I’m having the same issue with the HMMER searches. I tried both the CRAN version and the biobucket versions. I’m using an updated RStudio with MacOS Mojave.

    Any advice would be very much appreciated.

  8. Xinqiu Yao

    Which issue are you talking about? If it is the error mentioned above, it should be fixed already if you use the Bitbucket development version. If it is the plotting issue, it might be related to the computer environment (If so, try to find another computer and see what you can get).

  9. Log in to comment