biopython / biopython/biopython
PDBList.py update_pdb does not consider multiple file formats (in some parts...)
- Dominant language
- Python
- Stars
- 5.2k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 11
Description
### Setup
I am reporting a problem with Biopython version, Python version, and operating
system as follows:
```python
import sys; print(sys.version)
import platform; print(platform.python_implementation()); print(platform.platform())
import Bio; print(Bio.__version__)
```
```3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017, 13:04:09)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
CPython
Darwin-16.7.0-x86_64-i386-64bit
1.71
```
The PDBList.py method `update_pdb` is extremely useful, but just requires some minor updating!
### Expected behaviour
1. It should move obsoleted pdb files to the specified path
2. Currently the function does not return anything
### Actual behaviour
1. The part of the function which moves obsolete pdb entries has not kept up with the change to accept multiple `file_format`'s. Therefore it checks only for `pdb{pdb_code}.ent` and returns `Obsolete file [...]PDB/tt/pdb5tti.ent is missing` (even if `.ent` isn't the specified `file_format`)
2. It would also be useful to return the updates that have been applied (to provide a diff)
### Steps to reproduce
`pdbl = PDBList(server='ftp://ftp.wwpdb.org',
pdb='/PDB',
obsolete_pdb='/PDB/obsolete',
verbose=True)
pdbl.update_pdb()`
Contributor guide
Assessment
This issue has not been assessed yet.