There was an error while loading. Please reload this page.
1 parent 962143a commit ca35329Copy full SHA for ca35329
1 file changed
src/methods/cytovi/script.py
@@ -38,14 +38,25 @@
38
39
adata_to_correct = adata[:, markers_to_correct].copy()
40
41
+print("Scaling data", flush=True)
42
+
43
+# scale data. this will add a layer "scaled" to the anndata
44
+cytovi.scale(
45
+ adata=adata_to_correct,
46
+ transformed_layer_key="preprocessed",
47
+ batch_key="batch_str",
48
+ scaled_layer_key="scaled",
49
+ inplace=True,
50
+)
51
52
print(
53
f"Train CytoVI on {adata_to_correct.shape[0]} cells",
54
flush=True,
55
)
56
57
cytovi.CYTOVI.setup_anndata(
58
adata_to_correct,
- layer="preprocessed",
59
+ layer="scaled",
60
batch_key="batch_str",
61
sample_key="sample_key_str",
62
0 commit comments