Skip to content

Commit

Permalink
Fill missing lineage/clade values before DB push
Browse files Browse the repository at this point in the history
  • Loading branch information
atc3 committed Jan 17, 2024
1 parent 9735355 commit 30668b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions services/server/cg_server/db_seed/seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ def seed_database(conn, schema="public"):
isolate_df["collection_date"] = pd.to_datetime(isolate_df["collection_date"])
isolate_df["submission_date"] = pd.to_datetime(isolate_df["submission_date"])
# print(isolate_df.columns)
if 'gisaid_lineage' in isolate_df.columns:
isolate_df['gisaid_lineage'] = isolate_df['gisaid_lineage'].fillna('Unassigned')
if 'lineage' in isolate_df.columns:
isolate_df['lineage'] = isolate_df['lineage'].fillna('Unassigned')
if 'clade' in isolate_df.columns:
isolate_df['clade'] = isolate_df['clade'].fillna('Unassigned')

# Make a column for each metadata field
metadata_cols = []
Expand Down

0 comments on commit 30668b9

Please sign in to comment.