Skip to content

Commit

Permalink
fixes tests for compute_close_cell_num
Browse files Browse the repository at this point in the history
  • Loading branch information
ackagel committed Sep 8, 2021
1 parent 7a4a4c5 commit c98b2ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ark/analysis/spatial_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def calculate_channel_spatial_enrichment(dist_matrices_dict, marker_thresholds,
dist_matrix = dist_matrices_dict[fov]

# Get close_num and close_num_rand
close_num, channel_nums, _ = spatial_analysis_utils.compute_close_cell_num(
close_num, channel_nums = spatial_analysis_utils.compute_close_cell_num(
dist_mat=dist_matrix, dist_lim=100, analysis_type="channel",
current_fov_data=current_fov_data, current_fov_channel_data=current_fov_channel_data,
thresh_vec=thresh_vec)
Expand Down
6 changes: 3 additions & 3 deletions ark/utils/spatial_analysis_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test_compute_close_cell_num():
thresh_vec = example_thresholds.iloc[0:20, 1].values

# not taking into account mark1labels_per_id return value
example_closenum, m1, _ = spatial_analysis_utils.compute_close_cell_num(
example_closenum, m1 = spatial_analysis_utils.compute_close_cell_num(
dist_mat=example_dist_mat, dist_lim=100, analysis_type="channel",
current_fov_data=all_data, current_fov_channel_data=fov_channel_data,
thresh_vec=thresh_vec)
Expand All @@ -127,7 +127,7 @@ def test_compute_close_cell_num():
# Subsetting threshold matrix to only include column with threshold values
thresh_vec = example_thresholds.iloc[0:20, 1].values

example_closenum, m1, _ = spatial_analysis_utils.compute_close_cell_num(
example_closenum, m1 = spatial_analysis_utils.compute_close_cell_num(
dist_mat=example_dist_mat, dist_lim=100, analysis_type="channel",
current_fov_data=all_data, current_fov_channel_data=fov_channel_data,
thresh_vec=thresh_vec)
Expand All @@ -140,7 +140,7 @@ def test_compute_close_cell_num():
all_data, example_dist_mat = test_utils._make_dist_exp_mats_spatial_utils_test()
cluster_ids = all_data.loc[:, settings.CLUSTER_ID].drop_duplicates().values

example_closenum, m1, _ = spatial_analysis_utils.compute_close_cell_num(
example_closenum, m1 = spatial_analysis_utils.compute_close_cell_num(
dist_mat=example_dist_mat, dist_lim=100, analysis_type="cluster",
current_fov_data=all_data, cluster_ids=cluster_ids)

Expand Down

0 comments on commit c98b2ce

Please sign in to comment.