Skip to content

Commit

Permalink
add fix for reading dbj features and underscores in accession numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
dpark01 committed Nov 27, 2018
1 parent ad9a6ce commit a32be51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/genbank.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_feature_table_id(featureTableFile):
if not (
(seqid.startswith('gb|') or seqid.startswith('ref|'))):
raise Exception("reference annotation ID does not appear to refer to a GenBank or RefSeq accession: %s" % seqid)
m = re.search(r"(?P<db>(?:gb|ref))\|(?:(?P<accession>[a-zA-Z0-9\.]+))+.*", seqid)
m = re.search(r"(?P<db>(?:gb|ref|dbj))\|(?:(?P<accession>[a-zA-Z0-9\._]+))+.*", seqid)
if m:
seqid = m.group("accession")
else:
Expand Down

0 comments on commit a32be51

Please sign in to comment.