Skip to content

Commit 85c56ab

Browse files
authored
Add number of cells metric (#112)
1 parent e2c50a9 commit 85c56ab

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/metrics/quality/config.vsh.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ info:
2525
min: 0
2626
max: 1
2727
maximize: true
28+
- name: number_of_cells
29+
label: Number of Cells
30+
summary: "The number of cells in the spatial dataset."
31+
description: |
32+
The number of cells in the spatial dataset.
33+
references:
34+
doi: "10.1101/2023.02.13.528102"
35+
min: 0
36+
maximize: true
2837

2938
resources:
3039
- type: python_script

src/metrics/quality/script.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
metrics = {
2424
"proportion_of_assigned_reads": proportion_of_assigned_reads(sdata)[0],
2525
"proportion_of_annotated_cells": proportion_of_annotated_cells(sdata),
26+
"number_of_cells": sdata['counts'].n_obs,
2627
}
2728

2829
print("Write output AnnData to file", flush=True)

0 commit comments

Comments
 (0)