Skip to content

Commit

Permalink
Store database and primary accessions from DR lines in EMBL files (Bu…
Browse files Browse the repository at this point in the history
…g 3069)
  • Loading branch information
peterjc committed May 18, 2010
1 parent 63f6afc commit d96ab57
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Bio/GenBank/Scanner.py
Expand Up @@ -658,7 +658,7 @@ def _feed_header_lines(self, consumer, lines):
'RL' : 'journal',
'OS' : 'organism',
'OC' : 'taxonomy',
#'DR' : data reference?
#'DR' : data reference
'CC' : 'comment',
#'XX' : splitter
}
Expand Down Expand Up @@ -729,9 +729,12 @@ def _feed_header_lines(self, consumer, lines):
# e.g.
# DR MGI; 98599; Tcrb-V4.
#
# TODO - Data reference...
# How should we store the secondary identifier (if present)? Ignore it?
pass
# TODO - How should we store any secondary identifier?
parts = data.rstrip(".").split(";")
#Turn it into "database_identifier:primary_identifier" to
#mimic the GenBank parser. e.g. "MGI:98599"
consumer.dblink("%s:%s" % (parts[0].strip(),
parts[1].strip()))
elif line_type == 'RA':
# Remove trailing ; at end of authors list
consumer.authors(data.rstrip(";"))
Expand Down

0 comments on commit d96ab57

Please sign in to comment.