Problem Still Persists : Reading PDB file from a Local Disk.

Issue #425 resolved
prasanthbioinfo123 created an issue
> library(bio3d)
> setwd("/home/prasanth/GNM/AURKA/GNM/Free/")
> pdb <- read.pdb("4j8n.pdb")
Error in .read_pdb(file, multi = multi, hex = hex, maxlines = maxlines,  : 
  basic_string::substr
> pdb <- read.pdb("4j8n.pdb", maxlines = -1, multi = FALSE, rm.insert = FALSE, rm.alt = TRUE, ATOM.only = FALSE, hex = FALSE, verbose = TRUE)
Error in .read_pdb(file, multi = multi, hex = hex, maxlines = maxlines,  : 
  basic_string::substr
> pdb <- read.pdb("4j8n.pdb", maxlines = -1, hex = FALSE)
Error in .read_pdb(file, multi = multi, hex = hex, maxlines = maxlines,  : 
  basic_string::substr
> pdb <- read.pdb("4j8n")
  Note: Accessing on-line PDB file

I am using R 3.2.2 and RStudio 1.0.44 (Ubuntu machine)

Comments (4)

  1. prasanthbioinfo123 reporter

    The program accesses the on-line database (RCSB) to download structure even though the directory of the file (pdb) was set. You had commented to add ".pdb" extension, which still makes its search over on-line. Without extension of .pdb, I am not able to access my local file.

  2. Lars Skjærven

    hmmm...

    > library(bio3d)
    > get.pdb("1rx2")
    trying URL 'http://www.rcsb.org/pdb/files/1rx2.pdb'
    Content type 'text/plain;charset=UTF-8' length unknown
    .......... .......... .......... .......... ..........
    .......... .......... .......... .......... ..........
    .......... .......... .......... .......... ..........
    .........
    downloaded 159 KB
    
    [1] "./1rx2.pdb"
    > pdb <- read.pdb("1rx2.pdb")
       PDB has ALT records, taking A only, rm.alt=TRUE
    
    > sessionInfo()
    R version 3.2.3 (2015-12-10)
    Platform: x86_64-pc-linux-gnu (64-bit)
    Running under: Ubuntu 16.04.1 LTS
    
    locale:
     [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
     [3] LC_TIME=nb_NO.UTF-8        LC_COLLATE=en_US.UTF-8    
     [5] LC_MONETARY=nb_NO.UTF-8    LC_MESSAGES=en_US.UTF-8   
     [7] LC_PAPER=nb_NO.UTF-8       LC_NAME=C                 
     [9] LC_ADDRESS=C               LC_TELEPHONE=C            
    [11] LC_MEASUREMENT=nb_NO.UTF-8 LC_IDENTIFICATION=C       
    
    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base     
    
    other attached packages:
    [1] bio3d_2.3-1
    
    loaded via a namespace (and not attached):
    [1] parallel_3.2.3 tools_3.2.3    Rcpp_0.12.8    grid_3.2.3     tcltk_3.2.3   
    

    Can you try the same as me outside RStuido, i.e. in the conventional R console through the terminal?

  3. Log in to comment