[Biopython-dev] [Bug 2948] _parse_pdb_header_list: bug in TITLE handling
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Sat Mar 20 06:26:10 UTC 2010
http://bugzilla.open-bio.org/show_bug.cgi?id=2948
crosvera at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |crosvera at gmail.com
------- Comment #2 from crosvera at gmail.com 2010-03-20 02:26 EST -------
Here I show an example about what Paul says:
bash-4.0$ python
Python 2.6.4 (r264:75706, Mar 10 2010, 15:54:34)
[GCC 4.4.1 (CRUX)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio.PDB import *
>>> parser=PDBParser()
>>> structure = parser.get_structure("2beg", "2BEG.pdb")
>>> structure.header.keys()
['structure_method', 'head', 'journal', 'journal_reference', 'compound',
'keywords', 'name', 'author', 'deposition_date', 'release_date', 'source',
'resolution', 'structure_reference']
>>> structure.header['head']
'protein fibril'
>>> structure.header['name']
" d structure of alzheimer's abeta(1-42) fibrils"
I made a patch, which change the regex.
From: tail=re.sub("\A\w+\s+\d*\s*","",h)
TO: tail=re.sub("\A\w+\s+\d*\s+","",h
Seems that this patch works. The result I got is this:
bash-4.0$ python
Python 2.6.4 (r264:75706, Mar 10 2010, 15:54:34)
[GCC 4.4.1 (CRUX)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from Bio.PDB import *
>>> parser=PDBParser()
>>> structure = parser.get_structure("2beg", "2BEG.pdb")
>>> structure.header.keys()
['structure_method', 'head', 'journal', 'journal_reference', 'compound',
'keywords', 'name', 'author', 'deposition_date', 'release_date', 'source',
'resolution', 'structure_reference']
>>> structure.header['head']
'protein fibril'
>>> structure.header['name']
" 3d structure of alzheimer's abeta(1-42) fibrils"
>>>
I propose this patch. (my first one).
--
Carlos RÃos V.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list