diff --git a/containers/extract-summary/context/main.py b/containers/extract-summary/context/main.py index 28ce2b0..76887cd 100644 --- a/containers/extract-summary/context/main.py +++ b/containers/extract-summary/context/main.py @@ -32,7 +32,7 @@ def unique_rows_to_summary_rows( df["@type"] = "CellSummaryRow" df["percentage"] = df["count"] / df["count"].sum() - df["gene_expr"] = df["gene_expr"].astype(object).apply(json.loads) + df["gene_expr"] = df["gene_expr"].astype(object).apply(lambda x: [] if pd.isna(x) else json.loads(x)) return df.to_dict("records")