Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,7 @@
as scalars instead of lists, as required by `file_score.yaml` (PR #130).

* Clean up stale mock parameters and dead code (PR #133).


* Fix bug in `average_batch_r2` where the R2 was computed on all cell types of a donor at once
instead of on each cell type separately (PR #127).
4 changes: 2 additions & 2 deletions src/metrics/average_batch_r2/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@
s2_view_ct = s2_view[s2_view.obs["cell_type"] == ct]
if (
s1_view_ct.shape[0] < 20 or s2_view_ct.shape[0] < 20
): # Skip Rˆ2 calculation if there are less than 10 cells
): # Skip Rˆ2 calculation if there are less than 20 cells
print(
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"
)
continue

r2_list, marker_list = batch_r2(s1_view, s2_view)
r2_list, marker_list = batch_r2(s1_view_ct, s2_view_ct)

marker_list = [ct + "_" + donor + "_" + x for x in marker_list]
r2_info = [*r2_info, *marker_list]
Expand Down
Loading