labstructbioinf / localpdb

Python package to manage protein structures and their annotations
MIT License
40 stars 5 forks source link

PDB FTP change unsupported #37

Closed kristycarp closed 11 months ago

kristycarp commented 1 year ago

When updating the localpdb files (with localpdb_setup -db_path [DB PATH HERE] --update) , I get the following error:

Failed to download url: 'http://ftp.rcsb.org/pub/pdb/derived_data/index/entries.idx' to destination: '[DESTINATION FOLDER]/localpdb/data/20231013/pdb_entries.txt'
Failed to download file_type: "entries"

I am fairly certain this is because of the (recent?) PDB change that makes their HTTP downloads available at files.rcsb.org, whereas their FTP downloads are still at ftp.rcsb.org (see https://www.wwpdb.org/ftp/pdb-ftp-sites).

I tried to tweak the remote_sources.yml file to reflect these changes, but was only able to successfully update my localpdb files with these very janky changes to the localpdb code:

I had to do all of this because 1) simply changing the url of the rcsb mirror in remote_sources.yml to files.rcsb.org led to an error saying that ftp://files.rcsb.org is inaccessible and I couldn't figure out how to make it go to http://files.rcsb.org instead; and 2) simply changing the download_proto of the rcsb mirror in remote_sources.yml to ftp (from http) led to errors with checking versioning that were only fixed by the other tweaks mentioned above.

However, I suspect that this is not the smartest of solutions and that myself and other users would benefit from a fix from the localpdb creators that either properly changes the protocol type from HTTP to FTP, or properly updates the HTTP address to files.rcsb.org.

jludwiczak commented 1 year ago

Hi @kristycarp - thanks for raising the issue and providing the temporary workaround. I believe seting -mirror option to either pdbe or pdbj can solve this too (these are identical replicates of default rcsb mirror) - at least this was helpful in recent e-mail conversation regarding similar / or same issue. I'm away now but I'll look into this more thoroughly at the beginning of November and provide a proper fix.

KYQiu21 commented 12 months ago

Setting the mirror as pdbe works for me. Thanks.