Skip to content

Commit

Permalink
Make sure we only drop cell_size if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-l-kong committed Feb 17, 2023
1 parent 7929a23 commit e49645b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ark/phenotyping/cell_cluster_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,7 @@ def cluster_cells(base_dir, cell_pysom, cell_som_cluster_cols):
# ensure the weights columns are valid indexes, do so by ensuring
# the cluster_counts_norm and weights columns are the same
# minus the metadata columns (and possibly cluster col) that appear in cluster_counts_norm
cols_to_drop = ['fov', 'segmentation_label', 'cell_size']
if 'cell_som_cluster' in cell_pysom.cell_data:
if 'cell_som_cluster' in cell_pysom.cell_data.columns.values:
cols_to_drop.append('cell_som_cluster')

# the cell_som_input_data and weights columns are the same
Expand Down

0 comments on commit e49645b

Please sign in to comment.