Skip to content

Commit

Permalink
Handle case when accession is removed from provisions file #523
Browse files Browse the repository at this point in the history
  • Loading branch information
GopiGugan committed May 27, 2024
1 parent 5f2933f commit e97e5a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions covizu/utils/gisaid_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,9 @@ def convert_json(infile, provision):
md = metadata.get(accn, None)
if md is None:
print("Failed to retrieve metadata for accession {}".format(accn))
sys.exit()
revised.append([name, accn, location, coldate, md['gender'], md['age'], md['status']])
revised.append([name, accn, location, coldate, 'N/A', 'N/A', 'N/A'])
else:
revised.append([name, accn, location, coldate, md['gender'], md['age'], md['status']])

# replace list of samples
cluster['nodes'][variant] = revised
Expand Down

0 comments on commit e97e5a4

Please sign in to comment.