[Biopython (old issues only) - Bug #2949] (Resolved) _parse_pdb_header_list: REVDAT is for oldest entry.

[email protected] Sat, 12 Nov 2016 22:08:30 +0000
Newsgroups gmane.comp.python.bio.devel
Message-ID <redmine.journal-15374.20161112220830.ad98ddc60b16fe92@redmine.open-bio.org>
Issue #2949 has been updated by Lenna Peterson.

Description updated
Status changed from New to Resolved
% Done changed from 0 to 100

Migrated to github: https://github.com/biopython/biopython/issues/994

----------------------------------------
Bug #2949: _parse_pdb_header_list: REVDAT is for oldest entry.
https://redmine.open-bio.org/issues/2949#change-15374

* Author: Anonymous
* Status: Resolved
* Priority: Normal
* Assignee: Biopython Dev Mailing List
* Category: Main Distribution
* Target version: 1.52
* URL: 
----------------------------------------
Hi,

I don't know if this is considered a bug or a feature, but currently _parse_pdb_header_list in parse_pdb_header.py is grabbing the least recent date when I believe it should be grabbing the MOST current date.

Here is the current code:
        elif key=="REVDAT":
            rr=re.search("\d\d-\w\w\w-\d\d",tail)
            if rr!=None:
                dict['release_date']=_format_date(_nice_case(rr.group()))

And here is the fix, with additional REVDAT components added (can't hurt! :-) ):
        elif key=="REVDAT":
            #Modified by Paul T. Bathen to get most recent date instead of oldest date.
            #Also added additional dict entries
            if dict['release_date'] == "1909-01-08": #set in init
                rr=re.search("\d\d-\w\w\w-\d\d",tail)
                if rr!=None:
                    dict['release_date']=_format_date(_nice_case(rr.group()))

                dict['mod_number'] = hh[7:10].strip()
                dict['mod_id'] = hh[23:28].strip()
                dict['mod_type'] = hh[31:32].strip()

Paul



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org

_______________________________________________
Biopython-dev mailing list
[email protected]
http://mailman.open-bio.org/mailman/listinfo/biopython-dev