[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
Mon Mar 22 02:50:24 UTC 2010


http://bugzilla.open-bio.org/show_bug.cgi?id=2948





------- Comment #3 from eric.talevich at gmail.com  2010-03-21 22:50 EST -------
(In reply to comment #2)
> 
> 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:
> 
> ...

Thanks for triaging this, Carlos. However, I think it would be better if the
code is a direct reflection of the actual PDB specification:
http://www.wwpdb.org/documentation/format32/sect2.html

It looks like "continuation" numbers are ignored by this code, so only the text
starting in column 11 onward (hh[10:]) is ever used, also dropping leading
spaces. Similarly, the key found by regexp is just the first
whitespace-delimited word. Can you change your patch to use string methods
instead of regular expressions?


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