Skip to content

Commit

Permalink
fix for NaN gene_expr value
Browse files Browse the repository at this point in the history
  • Loading branch information
vickydaiya authored Nov 28, 2023
1 parent 4fb1983 commit cdba0f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions containers/gene-expression/context/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def get_gene_expr(matrix: anndata.AnnData, clid_column: str, gene_expr_column: s
merged_obs = matrix.obs.merge(
ct_marker_genes_df[[clid_column, gene_expr_column]], how="left"
)
merged_obs.fillna({gene_expr_column: '[]'}, inplace=True)
merged_obs[gene_expr_column] = merged_obs[gene_expr_column].apply(json.dumps)
merged_obs.index = matrix.obs.index
matrix.obs = merged_obs
Expand Down

0 comments on commit cdba0f9

Please sign in to comment.