Closed drchristhorpe closed 1 year ago
Just look at the file:pdb_entries_type.txt in your db_path, and the first row only contain two fields in this file. Adding a column name for the first row can solve this problem.
Amazing, that's done the trick, thank you.
Hi @drchristhorpe - sorry for a delayed reply and thanks for interest in our package!
I've looked at the issue in more detail today and it seems that pdb_entry_type.txt
available at the PDB mirrors (e.g. https://ftp.ebi.ac.uk/pub/databases/pdb/derived_data/ ) changed a format recently (1st row is now a "weird" entry without a code) which causes the error. I'll provide a fix for that tomorrow and release the v0.2.6, until that time the trick suggested by @wangdepin (thanks!) should do the job.
Fixed in v0.2.6
.
That's wonderful, thank you so much. All working perfectly
Whenever I attempt to install the PDBChains plugin I get the error message below. Running localpdb v0.2.5
I've deleted and resinstalled both localpdb and the data.
================
(base) chris@janeway:/media/chris/data$ localpdb_setup -db_path /media/chris/data/localpdb -plugins PDBChain localpdb is up to date and set up in the directory '/media/chris/data/localpdb'.
Setting up plugin: 'PDBChain'... Attempting to install plugin 'PDBChain' for localpdb version(s): 20221209 Traceback (most recent call last): File "/home/chris/anaconda3/bin/localpdb_setup", line 8, in
sys.exit(main())
File "/home/chris/anaconda3/lib/python3.8/site-packages/localpdb/localpdb_setup.py", line 391, in main
install_plugins(args)
File "/home/chris/anaconda3/lib/python3.8/site-packages/localpdb/localpdb_setup.py", line 210, in install_plugins
lpdb = PDB(args.db_path, version=lpdb_version)
File "/home/chris/anaconda3/lib/python3.8/site-packages/localpdb/PDB.py", line 70, in init
self.entries, self.chains = parse_pdb_data(self._pdb_entries_fn, self._pdb_entries_type_fn,
File "/home/chris/anaconda3/lib/python3.8/site-packages/localpdb/utils/prot.py", line 24, in parse_pdb_data
entriestype = {key: (type, method) for (key, type_, method) in list(map(str.split, f.readlines()))}
File "/home/chris/anaconda3/lib/python3.8/site-packages/localpdb/utils/prot.py", line 24, in
entriestype = {key: (type, method) for (key, type_, method) in list(map(str.split, f.readlines()))}
ValueError: not enough values to unpack (expected 3, got 2)