Skip to content
Browse files

Updating fauna parsing to only include puburl when present

There had been a bug where empty strings for "pubmed_id" were resulting in truncated URLs for puburl.
  • Loading branch information...
trvrb committed Aug 7, 2019
1 parent 5de14b4 commit 95c4cd9de1e87011ad7f7c2ea89c908aad2f278e
Showing with 3 additions and 3 deletions.
  1. +3 −3 vdb/
@@ -291,12 +291,12 @@ def parse_gb_entries(self, handle, **kwargs):
reference = references[idx] # <class 'Bio.SeqFeature.Reference'>
keys = reference.__dict__.keys()
s['title'] = reference.title
if "authors" in keys and reference.authors is not None:
if "authors" in keys and reference.authors:
first_author = re.match(r'^([^,]*)', reference.authors).group(0)
s['authors'] = first_author + " et al"
if "journal" in keys and reference.journal is not None:
if "journal" in keys and reference.journal:
s['journal'] = reference.journal
if "pubmed_id" in keys and reference.pubmed_id is not None:
if "pubmed_id" in keys and reference.pubmed_id:
s["puburl"] = "" + reference.pubmed_id
print("Couldn't find the reference for " + s['accession'])

0 comments on commit 95c4cd9

Please sign in to comment.
You can’t perform that action at this time.