error on writing rough fit structures using outpath option in pdbfit

Issue #143 resolved
Former user created an issue

xyz <- pdbfit(pdbs, core.inds,outpath="/tmp/")

Note: Accessing on-line PDB file Error in file(con, "r") : cannot open the connection RMate stopped at line 0 Calls: pdbfit ... fit.xyz -> mylapply -> FUN -> read.pdb -> readLines -> file In addition: Warning message: In file(con, "r") : cannot open: HTTP status was '404 Not Found' Execution halted

Comments (4)

  1. Lars Skjærven

    Hi Anonymous, Can you provide some more information on how you generated the pdbs object? Please also check that the files listed in pdbs$id exists. e.g:

    head(pdbs$id)
    > headpdbs$id)
    [1] "split_chain/1pe4_A.pdb" "split_chain/1a8n_A.pdb" "split_chain/4kkl_A.pdb"
    
    > file.exists(pdbs$id)
     [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
    
  2. Barry Grant

    The error reports that it "cannot open the connection" in relation to "accessing on-line PDB file". This implies that the structures in your input 'pdbs' (specifically the pdbs$id component) can not be read from the RCSB database. This could be because they don't exist or because your internet connection to the database was unsuccessful. Note also the message "cannot open: HTTP status was '404 Not Found".

    To solve this you could try working with local files (e.g. similar to those Lars used in the example above). To download the files try the get.pdb() function. For example:

    myflies <- get.pdb(pdbs$id, path="myLocalDirectory")
    file.exists(myfiles)
    

    More information on the contents of your pdbs$id would be required to assist further.

  3. Barry Grant

    Have not been able to replicate this reported issue and no additional information has been provided as requested. Therefore I am marking this as resolved for now.

    Here is another example of proper operation.

    aln  <- read.fasta( system.file("examples/kif1a.fa",package="bio3d") )
    pdbs <- read.fasta.pdb( aln )
    xyz <- pdbfit(pdbs, outpath="tmp")
    
  4. Log in to comment