Author & Mentors

Abstract

Biopython is a very popular library in Bioinformatics and Computational Biology. Its Bio.PDB module, originally developed by Thomas Hamelryck, is a simple yet powerful tool for structural biologists. Although it provides a reliable PDB parser feature and it allows several calculations (Neighbour Search, RMS) to be made on macromolecules, it still lacks a number of features that are part of a researcher's daily routine. Probing for disulphide bridges in a structure and adding polar hydrogen atoms accordingly are two examples that can be incorporated in Bio.PDB, given the module's clever structure and good overall organisation. Cosmetic operations such as chain removal and residue renaming – to account for the different existing nomenclatures – and renumbering would also be greatly appreciated by the community.

Another aspect that can be improved for Bio.PDB is a smooth integration/interaction layer for heavy-weights in macromolecule simulation such as MODELLER, GROMACS, AutoDock, HADDOCK. It could be argued that the easiest solution would be to code hooks to these packages' functions and routines. However, projects such as the recently developed edPDB or the more complete Biskit library render, in my opinion, such interfacing efforts redundant. Instead, I believe it to be more advantageous to include these software' input/output formats in Biopython's SeqIO and AlignIO modules. This, together with the creation of interfaces for model validation/structure checking services/software would allow Biopython to be used as a pre- and post-simulation tool. Eventually, it would pave the way for its inclusion in pipelines and workflows for structure modelling, molecular dynamics, and docking simulations.

Project Schedule

The schedule below was organised to be flexible, which means that some features will likely be done early. Also, the weeks include documentation and unit testing efforts for the features, with extended periods for reviewing these efforts at the two points during the project (halfway, final week).

Week 11 [10th - 17th August]

Reviewing documentation, code, write tests for new functions.

Project Code

Project Progress

Since I'm adding some methods that are useful/logical only for proteins, having them exposed in Structure.py for every molecule could be misleading. We decided then to add a 'as_protein()' method that allows protein-specific methods to be accessed. The following example demonstrates how this call works. Note how the "search_ss_bonds" method is absent from dir(s) but not from dir(prot).

Renumbering residues of a structure

Since parse_pdb_header is far from optimal and is likely to change in the future, I opted to forfeit reading SEQREQ records to account for gaps. However, ignoring this information and renumbering based on ATOM records would make us lose information on gaps. I opted to subtract the first residue number-1 to all residues thus making the numbering start in 1 and still keep gaps. I also added an argument (start) to allow the user to set which number to start the counting from.

Probe disulphide bridges in the structure

The same rationale from SEQRES applies for the exclusion of looking up SSBOND. Also, instead of using NeighborSearch to look for pairs of cysteins in bond distance, I instead used the minus operator since it has been overloaded to return the distance between two atoms (Page 10 of the FAQ). The average distance cited in the literature is 2.05A but other software packages and my own tests set 3.0A as a good threshold. Still, the user can set his own threshold manually.

Extract Biological Unit

Added parsing for REMARK350 to parse_pdb_header since there was already a bit written for another REMARK section. This extracts the transformation matrices and the translation vector from the header, that is then fed to the Structure function. Each new rotated structure is created as a new MODEL. I chose this because crystal structures very rarely have more than one MODEL instance and also because NMR models don't have REMARK 350 that often (at least to my knowledge).

Hydrogenation of PDB files

Following discussion between the mentors and me, we decided that maybe it was better to not only include a webserver for this purpose but also a local algorithm. This would not limit the user when there he/she lacks an internet connection.

The interface for the WHATIF Protonation service has been implemented, although it should be regarded as **highly experimental** for now. Interfacing this server included writing a small parser for a PDBXML-like format, which is expected to have serious bugs in its initial versions. I ran some simple tests and it works. It doesn't support water molecules yet, nor any other molecules other than proteins. Such issues will be hopefully solved later on..

For those brave enough to want to test it (and help me debug it), here's an example usage.

from Bio.Struct.WWWimport WHATIF
from Bio import Struct
server = WHATIF.WHATIF()# Performs a sort of PING to the server. Gracefully exits if the servers are down.# Get the protein structure
structure = Struct.read('4PTI.pdb')
protein = structure.as_protein()# This excludes water molecules# Upload the structure to the WHATIF server# This should convert the structure from a Structure object to a string via tempfile and PDBIO# I was having some issues uploading structures...id = server.UploadPDB(protein)# Protonate# Returns a Structure Object / WARNING! Bug prone for now.
protein_h = server.PDBasXMLwithSymwithPolarH(id)

Regarding the local implementation, after much reading I settled on using PyMol's algorithm. It seems to allow for protonation of any structure, regardless of its nature (protein, DNA, etc). Its vectorial and matrix operations can likely be optimized with Numpy and Biopython's Vector.py module. This first implementation works for proteins only. I'll add general molecule support later.

Coarse Grain Structure

A Center of Mass function was developed first as part of a new module Bio.Struct.Geometry. It allows for calculation of the center of geometry (all masses are equal) and center of mass (taking into account elemental masses for the atoms). The masses are a new Atom object feature derived from this list and from PyMol. Essentially, all atoms of a structure now get their mass defined when the Structure is created (check Atom.py and this thread for details). This is obviously experimental.

To calculate the center of mass of any Entity (Structure, Model, Chain, Residue) or a List of Atoms:

Removal of disordered atoms

Implement as part of Structure.py and based loosely on the contribution of Ramon Crehuet. The DisorderedAtom objects are removed from the residue and a single Atom object is added corresponding to the location of the user's choice (keep_loc argument) which defaults to A.

Sequence Homologues from Structures

Biopython supports BLAST (local and remote through NCBI servers). We bridged both Bio.PDB and Bio.Blast modules to allow an easier search for sequence homologues. For now, it supports remote BLAST through Bio.Blast.NCBIWWW and functions as a blackbox - i.e. users cannot change any search parameter. If one wants to fully use BLAST he/she should use the regular BLAST module. This is just a convenience function.

It is accessible only to Protein objects. It queries the PDB subset database of NCBI BLAST servers with the Structure object's sequence, auto-adjusting parameters for short sequences (less than 15 residues).

It returns a list ranked by Expectation Value with some informational values (e-value, identities, positives, gaps), the PDB code of the match, and the alignment.