[Biopython] Biopython & p3d

Christian Fufezan fufezan at uni-muenster.de
Wed Oct 21 07:25:01 UTC 2009


Hello Biopython,

we ( Michael Specht & I ) published recently p3d, a python module for  
structural bioinformatics and were wondering if it wouldn't be a good  
good thing if could join the Biopython project. We understand that  
Biopython has already a PDB parser but we programmed an alternative  
version since we found the Biopython.pdb syntax to be too non- 
pythonian. One example why is shown below:

Biopython:

def test6(structure):
	'''get protein surrounding (5) of NAG'''
	bucket = set()
	atom_list=Selection.unfold_entities(structure,'A')
	ns = NeighborSearch(atom_list)
	for model in structure.get_list():
		for chain in model.get_list():
			for residue in chain.get_list():
				if residue.get_resname() == 'NAG':
					for atom in residue.get_list():
						centre = atom.get_coord()
						R = 5.0
						neighbor_list = ns.search(centre,R)
						neighbors = Selection.unfold_entities(neighbor_list,'A')
						for atom2 in neighbors:
							if 'O' in atom2.get_name():
								bucket.add(atom2)
	print '     found',len(bucket),' oxygens around NAG'
	return

p3d:

def test6(pdb):
	''' protein surrounding (5) of resname NAG'''
	bgl = pdb.query('resname NAG')
	bucket = pdb.query('protein and oxygen and within 5 of ',bgl)
	print '     found',len(bucket),' oxygens around NAG'
	return

Certainly, Biopythons PDB module has its advantages and the is no way  
p3d could replace it, but both modules have their advantages :) The  
fact that biopythons.pdb parser uses a KTree written in C and we wrote  
one in python makes certain queries to the protein structure faster in  
Biopyhton; however if the query involves more complex demands,  
multiple loops are inevitable in biopython, whereas p3d offers a human  
readable query function that combines all aspects. The link to our  
publication is:
http://www.biomedcentral.com/1471-2105/10/258

Looking forward to hear from you, maybe one can also envision a  
combined module with a new all advantages together.

Kind regards

Christian Fufezan





More information about the Biopython mailing list