Skip to content

Commit 77ae355

Browse files
committed
compute average_batch_r2 per cell type
* Pass the cell type subsets to batch_r2() instead of the donor-level views * Correct the cell count in the skip comment
1 parent 79a262f commit 77ae355

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/metrics/average_batch_r2/script.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@
6363
s2_view_ct = s2_view[s2_view.obs["cell_type"] == ct]
6464
if (
6565
s1_view_ct.shape[0] < 20 or s2_view_ct.shape[0] < 20
66-
): # Skip Rˆ2 calculation if there are less than 10 cells
66+
): # Skip Rˆ2 calculation if there are less than 20 cells
6767
print(
6868
f"Warning: Rˆ2 not computed for donor {donor} cell type {ct}. Too few cells were present: {s1_view_ct.shape[0]} for split 1 and {s2_view_ct.shape[0]} for split 2"
6969
)
7070
continue
7171

72-
r2_list, marker_list = batch_r2(s1_view, s2_view)
72+
r2_list, marker_list = batch_r2(s1_view_ct, s2_view_ct)
7373

7474
marker_list = [ct + "_" + donor + "_" + x for x in marker_list]
7575
r2_info = [*r2_info, *marker_list]

0 commit comments

Comments
 (0)