Skip to content

Commit

Permalink
Merge 4af9d8f into c804ea5
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-l-kong authored Nov 9, 2020
2 parents c804ea5 + 4af9d8f commit 5905440
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
4 changes: 4 additions & 0 deletions ark/analysis/spatial_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ def create_neighborhood_matrix(all_data, dist_matrices_dict, included_fovs=None,
cell_neighbor_counts.loc[current_fov_neighborhood_data.index, fov_cluster_names] = counts
cell_neighbor_freqs.loc[current_fov_neighborhood_data.index, fov_cluster_names] = freqs

# drop label column, as this interferes with the neighborhood clustering step
cell_neighbor_counts = cell_neighbor_counts.drop(columns=cell_label_col)
cell_neighbor_freqs = cell_neighbor_freqs.drop(columns=cell_label_col)

return cell_neighbor_counts, cell_neighbor_freqs


Expand Down
2 changes: 0 additions & 2 deletions ark/analysis/spatial_analysis_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,6 @@ def test_generate_cluster_matrix_results():
all_data_pos, dist_mat_pos, distlim=51
)

neighbor_counts = neighbor_counts.drop(settings.CELL_LABEL, axis=1)

# error checking
with pytest.raises(ValueError):
# pass bad columns
Expand Down
Loading

0 comments on commit 5905440

Please sign in to comment.