GSOC2010 Joao

From Biopython
Revision as of 16:01, 11 June 2010 by Joaor (Talk | contribs)
Jump to: navigation, search

Contents

Author & Mentors

João Rodrigues anaryin@gmail.com

Mentors

Eric Talevich
Diana Jaunzeikare
Peter Cock


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).


Community Bonding Period

  • Getting familiar with development environment (Git Hub account, Git, Biopython's repository, Bug tracking system, etc)
  • Gather scientific literature and discuss some of the to-be-implemented methods.


Week 1 [31st May - 6th June]

Renumbering residues of a structure

  • Read SEQRES record to account for gaps
  • Alternatively read ATOM records.


Probe disulphide bridges in the structure

  • Via NeighbourSearch class
  • Also use SSBOND in header


Extract Biological Unit

  • REMARK350 contains rotation and translation information
  • If REMARK is absent, do nothing.


Week 2 [7th – 13th June]

Structure Hydrogenation

  • Add all/polar hydrogens through interface with WHATIF server.
  • Optionally define a set pH


Hydrogenation Report

  • Produces a brief list of polar hydrogen atoms in the structure.
    • Chain | Residue [number] | Atom


Weeks 3-5 [14th June- 4th July]

Removal of disordered atoms


Residue name normalisation

  • Build conversion table from different nomenclatures (research them during c.bonding period )
  • Write function to make a given structure compliant with a given software nomenclature:
    • Amber
    • CNS/HADDOCK
    • GROMACS


Coarse Grain Structure

  • Implement function to reduce complexity of a structure
    • 1pt*c-alpha
    • 2pt*c-alpha / c-beta
    • 3pt*c-alpha / c-beta / side-chain pseudo-centroid OR side-chain centroid



Week 6 (Mid-Term) [5th - 11th July]

Testing and consolidating the features thoroughly.
Write documentation & examples for each feature, to be included in Biopython's Wiki and Bio.PDB's FAQ.
Mid-term Evaluations. Discussing with mentors current state of project and adjust following schedule to comply with project's needs.


Week 7 [12th - 19th July]

Add support for MODELLER's PIR format to Biopython


Allow conversion of Structure Object to Sequence Object

  • Based on Bio.PDB.Polypeptide function


Weeks 8-10 [20th July - 9th August]

Add Sequence/Structure Homology functions

  • Create call to Biopython's BLAST interfaces
    • Allow direct blast from structure object ( e.g. protein.find_homoseq() )
    • Returns list of tuples with E-Value *Dictionary (name, length of alignment, etc..)
  • Create interface with structural homology web services
    • e.g. Dali server
    • Return list of tuples with Z-Score*Dictionary (name, etc...)


Implement basic structure validation checks

  • Via NeighbourSearch class
    • Same Charge contacts
    • Atom Clashes
  • Via ResidueDepth Class
    • Buried Charges
  • Interface WHATIF PDBReport web service
    • Parse WARNING and ERROR messages


Week 11 [10th - 17th August]

Reviewing documentation, code, write tests for new functions.

Project Code

Hosted at this GitHub branch

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).

from Bio.PDB import PDBParser
 
p = PDBParser()
s = p.get_structure('example', '4PTI.pdb')
 
dir(s)
# Cut for viewing purposes
['__doc__', ... , 'renumber_residues', 'set_parent', 'xtra']
 
prot = s.as_protein()
 
dir(prot)
 
['__doc__', ... , 'renumber_residues', 'search_ss_bonds', 'set_parent', 'xtra']

Week 1

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.

Example:

from Bio.PDB import PDBParser
 
p = PDBParser()
s = p.get_structure('example', '1IHM.pdb')
 
print list(s.get_residues())[0]
<Residue ASP het=  resseq=1029 icode= >
 
s.renumber_residues()
print list(s.get_residues())[0]
<Residue ASP het=  resseq=1 icode= >


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.

The function returns an iterator with tuples of pairs of residues.

from Bio.PDB import PDBParser
 
p = PDBParser()
s = p.get_structure('example', '4PTI.pdb')
 
prot = s.as_protein()
 
for bond in prot.search_ss_bonds():
  print bond
 
(<Residue CYS het=  resseq=5 icode= >, <Residue CYS het=  resseq=55 icode= >)
(<Residue CYS het=  resseq=14 icode= >, <Residue CYS het=  resseq=38 icode= >)
(<Residue CYS het=  resseq=30 icode= >, <Residue CYS het=  resseq=51 icode= >)


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).

from Bio.PDB import PDBParser
 
p = PDBParser()
 
 
s1 = p.get_structure('a', '4PTI.pdb')
s1.build_biological_unit()
'Processed 0 transformations on the structure.' # Identity matrix is ignored.
 
s2 = p.get_structure('b', 'homol_1bd8.pdb') # A homology model
s2.build_biological_unit()
'PDB File lacks appropriate REMARK 350 entries to build Biological Unit.'
 
s3 = p.get_structure('c', '1IHM.pdb')
s3.build_biological_unit()
'Processed 59 transformations on the structure.'
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox