You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Asinh transformation for cell-expressions: $asinh((x - translation)/cofactor)$.
74
74
75
75
Args:
76
-
adata: An `anndata` object.
76
+
adata: An `AnnData` object.
77
77
translation: Constant substracted to the marker expression before division by the cofactor.
78
78
cofactor: Scaling factor before computing the asinh.
79
79
"""
@@ -93,7 +93,7 @@ def inverse_transform(
93
93
If you scaled your data, the complete inverse consists in running [scyan.preprocess.unscale][] first, and then this function.
94
94
95
95
Args:
96
-
adata: An `anndata` object.
96
+
adata: An `AnnData` object.
97
97
obsm: Name of the anndata obsm to consider. If `None`, use `adata.X`.
98
98
obsm_names: Names of the ordered markers from obsm. It is required if obsm is not `None`, if there are less markers than in `adata.X`, and if the transformation to reverse is `logicle`. Usually, it corresponds to `model.var_names`.
99
99
transformation: Name of the transformation to inverse: one of `['logicle', 'asinh', None]`. By default, it chooses automatically depending on which transformation was previously run.
"""Tranforms the data such as (i) `std=1`, and (ii) either `0` is sent to `-1` (for CyTOF data) or `means=0` (for flow or spectral flow data); except if `center` is set (which overwrites the default behavior).
149
149
150
150
Args:
151
-
adata: An `anndata` object.
151
+
adata: An `AnnData` object.
152
152
max_value: Clip to this value after scaling.
153
153
center: If `None`, data is only centered for spectral or flow cytometry data (recommended), else, it is centered or not according to the value given.
154
154
"""
@@ -175,7 +175,7 @@ def unscale(
175
175
"""Reverse standardisation. It requires to have run [scyan.preprocess.scale][] before.
176
176
177
177
Args:
178
-
adata: An `anndata` object.
178
+
adata: An `AnnData` object.
179
179
obsm: Name of the adata obsm to consider. If `None`, use `adata.X`.
180
180
obsm_names: Names of the ordered markers from obsm. It is required if obsm is not `None`, and if there are less markers than in `adata.X`. Usually, it corresponds to `model.var_names`.
"""Class used to select cells on a UMAP using polygons.
51
47
52
48
!!! note
53
49
54
-
We recommend using it on Jupyter Notebooks. To be able to select the cells, you should first run `%matplotlib tk` on a blank jupyter cell. After the selection, you can run `%matplotlib inline` to retrieve the default behavior.
50
+
If used on a Jupyter Notebook, you should first run `%matplotlib tk`. After the selection, you can run `%matplotlib inline` to retrieve the default behavior.
55
51
56
52
```py
57
-
# Usage example (to be run on a jupyter notebook) (`%matplotlib tk` is required for the cell selection)
53
+
# Usage example (`%matplotlib tk` is required for the cell selection on jupyter notebooks)
f"Enclose cells within a polygon. Helper:\n - Click on the plot to add a polygon vertex\n - Press the 'esc' key to start a new polygon\n - Try holding the 'ctrl' key to move a single vertex\n - Once the polygon is finished and overlaid in red, you can close the window"
"""Class used to select cells on a scatterplot using polygons.
122
+
123
+
!!! note
124
+
125
+
If used on a Jupyter Notebook, you should first run `%matplotlib tk` on a blank jupyter cell. After the selection, you can run `%matplotlib inline` to retrieve the default behavior.
126
+
127
+
```py
128
+
# Usage example (`%matplotlib tk` is required for the cell selection on jupyter notebooks)
f"Enclose cells within a polygon. Helper:\n - Click on the plot to add a polygon vertex\n - Press the 'esc' key to start a new polygon\n - Try holding the 'ctrl' key to move a single vertex\n - Once the polygon is finished and overlaid in red, you can close the window"
0 commit comments