Skip to content

Commit

Permalink
Bugfixes for new Pandas version
Browse files Browse the repository at this point in the history
  • Loading branch information
artuurC committed Sep 5, 2023
1 parent 25a4300 commit 447d625
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FlowSOM/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ def get_cluster_percentages_positive(fsom, cutoffs, cols_used=False, pretty_coln
perc_pos = np.empty((len(clusters), len(channels)))
perc_pos.fill(np.NaN)
for i, cluster in enumerate(clusters):
data_per_cluster = fsom.get_cell_data().to_df().loc[cl_per_cell == cluster, channels]
data_per_cluster = fsom.get_cell_data().to_df().loc[cl_per_cell == cluster, list(channels.keys())]
if data_per_cluster.shape[0] != 0:
for j, column in enumerate(data_per_cluster.columns):
cutoff = cutoffs[channels[column]]
Expand Down Expand Up @@ -626,7 +626,7 @@ def get_metacluster_percentages_positive(fsom, cutoffs, cols_used=False, pretty_
perc_pos = np.empty((len(metaclusters), len(channels)))
perc_pos.fill(np.NaN)
for i, cluster in enumerate(metaclusters):
data_per_metacluster = fsom.get_cell_data().to_df().loc[mcl_per_cell == cluster, channels]
data_per_metacluster = fsom.get_cell_data().to_df().loc[mcl_per_cell == cluster, list(channels.keys())]
if data_per_metacluster.shape[0] != 0:
for j, column in enumerate(data_per_metacluster.columns):
cutoff = cutoffs[channels[column]]
Expand Down

0 comments on commit 447d625

Please sign in to comment.