Skip to content

Commit

Permalink
Cope with missing date lines in SwissProt files (reported by Jan T Kim)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc committed Mar 8, 2013
1 parent 7cb1f59 commit 6d4d383
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Bio/SeqIO/SwissIO.py
Expand Up @@ -96,9 +96,11 @@ def SwissIterator(handle):
record.dbxrefs.append(dbxref)
annotations = record.annotations
annotations['accessions'] = swiss_record.accessions
annotations['date'] = swiss_record.created[0]
annotations[
'date_last_sequence_update'] = swiss_record.sequence_update[0]
if swiss_record.created:
annotations['date'] = swiss_record.created[0]
if swiss_record.sequence_update:
annotations[
'date_last_sequence_update'] = swiss_record.sequence_update[0]
if swiss_record.annotation_update:
annotations['date_last_annotation_update'] = swiss_record.annotation_update[0]
if swiss_record.gene_name:
Expand Down

0 comments on commit 6d4d383

Please sign in to comment.