cellestial 0.58.2__tar.gz → 0.59.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cellestial-0.58.2 → cellestial-0.59.0}/PKG-INFO +1 -1
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/complex/annotated_heatmap.py +4 -4
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/frames/__init__.py +4 -3
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/frames/build.py +2 -2
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/layers/__init__.py +1 -2
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/layers/arrow.py +3 -3
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/layers/bracket.py +1 -1
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/layers/ondata_legend.py +1 -1
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/layers/outline.py +3 -3
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/layers/stream.py +2 -2
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/base/base.py +2 -2
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/basic/bar.py +2 -2
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/basic/scatter.py +3 -3
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/common/xyplot.py +3 -3
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/common/xyplots.py +2 -2
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/core/dimensional.py +5 -5
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/core/distribution.py +7 -7
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/core/distributions.py +47 -13
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/core/subdimensional.py +19 -19
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/core/subdimensionals.py +30 -40
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/core/utilities.py +16 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/differential/volcano.py +7 -5
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/heatmap/dotplot.py +4 -4
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/heatmap/heatmap.py +8 -8
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/heatmap/stacked_violin.py +5 -5
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/quick/elbow.py +1 -1
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/quick/highest.py +2 -2
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/quick/ridge.py +4 -4
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/spatial/spatial.py +6 -6
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/spatial/spatials.py +5 -5
- cellestial-0.59.0/cellestial/themes/__init__.py +11 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/util/__init__.py +2 -23
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/util/operations.py +5 -5
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/util/utilities.py +20 -20
- {cellestial-0.58.2 → cellestial-0.59.0}/pyproject.toml +1 -1
- cellestial-0.58.2/cellestial/themes/__init__.py +0 -20
- {cellestial-0.58.2 → cellestial-0.59.0}/LICENSE +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/README.md +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/__init__.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/_version.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/complex/__init__.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/datasets/__init__.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/datasets/datasets.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/frames/operations.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/layers/_deferred.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/layers/utilities.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/__init__.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/base/__init__.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/basic/__init__.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/common/__init__.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/core/__init__.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/differential/__init__.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/differential/markers.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/differential/utilities.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/heatmap/__init__.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/heatmap/utilities.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/single/quick/__init__.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/spatial/__init__.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/spatial/utilities.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/themes/_distributions.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/themes/_heatmaps.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/themes/_scatters.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/util/colors.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/util/dendrogram.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/util/errors.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/util/markers.py +0 -0
- {cellestial-0.58.2 → cellestial-0.59.0}/cellestial/util/save.py +0 -0
|
@@ -359,7 +359,7 @@ def annotated_heatmap(
|
|
|
359
359
|
color_low: str = "#0000ff",
|
|
360
360
|
color_mid: str = "#ffffff",
|
|
361
361
|
color_high: str = "#ff0000",
|
|
362
|
-
|
|
362
|
+
midpoint: Literal["mean", "median", "mid"] | float = "mid",
|
|
363
363
|
max_rows: int | None = 1000,
|
|
364
364
|
value_column: str = "value",
|
|
365
365
|
variable_column: str = "variable",
|
|
@@ -446,7 +446,7 @@ def annotated_heatmap(
|
|
|
446
446
|
Color for mid values in the heatmap gradient.
|
|
447
447
|
color_high : str, default='#ff0000'
|
|
448
448
|
Color for high values in the heatmap gradient.
|
|
449
|
-
|
|
449
|
+
midpoint : {'mean', 'median', 'mid'} | float, default='mid'
|
|
450
450
|
Midpoint for the heatmap color gradient.
|
|
451
451
|
max_rows : int | None, default=1000
|
|
452
452
|
Cap the number of plotted rows by averaging contiguous observations
|
|
@@ -495,7 +495,7 @@ def annotated_heatmap(
|
|
|
495
495
|
|
|
496
496
|
import cellestial as cl
|
|
497
497
|
|
|
498
|
-
data = cl.datasets.pbmc3k(
|
|
498
|
+
data = cl.datasets.pbmc3k()
|
|
499
499
|
markers = ["C1QA", "PSAP", "CD79A", "CD79B", "CST3", "LYZ"]
|
|
500
500
|
|
|
501
501
|
cl.annotated_heatmap(
|
|
@@ -608,7 +608,7 @@ def annotated_heatmap(
|
|
|
608
608
|
color_low=color_low,
|
|
609
609
|
color_mid=color_mid,
|
|
610
610
|
color_high=color_high,
|
|
611
|
-
|
|
611
|
+
midpoint=midpoint,
|
|
612
612
|
)
|
|
613
613
|
+ key_scale
|
|
614
614
|
+ observation_scale
|
|
@@ -4,11 +4,12 @@ from cellestial.frames.build import (
|
|
|
4
4
|
anndata_variables_frame,
|
|
5
5
|
build_frame,
|
|
6
6
|
)
|
|
7
|
-
from cellestial.frames.operations import
|
|
7
|
+
from cellestial.frames.operations import ( # noqa: F401
|
|
8
|
+
_highest_expressed_genes_frame,
|
|
9
|
+
_pca_variance_frame,
|
|
10
|
+
)
|
|
8
11
|
|
|
9
12
|
__all__ = [
|
|
10
|
-
"_highest_expressed_genes_frame",
|
|
11
|
-
"_pca_variance_frame",
|
|
12
13
|
"anndata_observations_frame",
|
|
13
14
|
"anndata_variable_columns",
|
|
14
15
|
"anndata_variables_frame",
|
|
@@ -350,7 +350,7 @@ def build_frame(
|
|
|
350
350
|
import cellestial as cl
|
|
351
351
|
import scanpy as sc
|
|
352
352
|
|
|
353
|
-
data = cl.datasets.pbmc3k(
|
|
353
|
+
data = cl.datasets.pbmc3k()
|
|
354
354
|
frame = cl.build_frame(data, axis=0, include_dimensions=2)
|
|
355
355
|
frame.head()
|
|
356
356
|
|
|
@@ -362,7 +362,7 @@ def build_frame(
|
|
|
362
362
|
import cellestial as cl
|
|
363
363
|
import scanpy as sc
|
|
364
364
|
|
|
365
|
-
data = cl.datasets.pbmc3k(
|
|
365
|
+
data = cl.datasets.pbmc3k()
|
|
366
366
|
frame = cl.build_frame(data, variable_keys=["CD14", "HBA1"], include_dimensions=2)
|
|
367
367
|
frame.head()
|
|
368
368
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from cellestial.layers._deferred import DeferredLayer
|
|
2
|
-
from cellestial.layers.arrow import _modify_axis, arrow_axis
|
|
2
|
+
from cellestial.layers.arrow import _modify_axis, arrow_axis # noqa: F401
|
|
3
3
|
from cellestial.layers.bracket import bracket
|
|
4
4
|
from cellestial.layers.ondata_legend import ondata_legend
|
|
5
5
|
from cellestial.layers.outline import cluster_outlines
|
|
@@ -8,7 +8,6 @@ from cellestial.layers.utilities import borders
|
|
|
8
8
|
|
|
9
9
|
__all__ = [
|
|
10
10
|
"DeferredLayer",
|
|
11
|
-
"_modify_axis",
|
|
12
11
|
"arrow_axis",
|
|
13
12
|
"borders",
|
|
14
13
|
"bracket",
|
|
@@ -273,7 +273,7 @@ def arrow_axis(
|
|
|
273
273
|
|
|
274
274
|
import cellestial as cl
|
|
275
275
|
|
|
276
|
-
data = cl.datasets.pbmc3k(
|
|
276
|
+
data = cl.datasets.pbmc3k()
|
|
277
277
|
|
|
278
278
|
umap = cl.umap(data,"HBA2")
|
|
279
279
|
umap
|
|
@@ -287,7 +287,7 @@ def arrow_axis(
|
|
|
287
287
|
|
|
288
288
|
import cellestial as cl
|
|
289
289
|
|
|
290
|
-
data = cl.datasets.pbmc3k(
|
|
290
|
+
data = cl.datasets.pbmc3k()
|
|
291
291
|
|
|
292
292
|
umap = cl.umap(data,"HBA2")
|
|
293
293
|
umap + cl.arrow_axis()
|
|
@@ -301,7 +301,7 @@ def arrow_axis(
|
|
|
301
301
|
|
|
302
302
|
import cellestial as cl
|
|
303
303
|
|
|
304
|
-
data = cl.datasets.pbmc3k(
|
|
304
|
+
data = cl.datasets.pbmc3k()
|
|
305
305
|
|
|
306
306
|
umap = cl.umap(data,"HBA2")
|
|
307
307
|
umap + cl.arrow_axis(length=0.20,color="dark_violet")
|
|
@@ -192,7 +192,7 @@ def cluster_outlines(
|
|
|
192
192
|
|
|
193
193
|
from lets_plot import *
|
|
194
194
|
|
|
195
|
-
data = cl.datasets.pbmc3k(
|
|
195
|
+
data = cl.datasets.pbmc3k()
|
|
196
196
|
|
|
197
197
|
umap = (
|
|
198
198
|
cl.umap(data, key="cell_type_lvl1", axis_type="arrow", size=0.5, legend_ondata=True)
|
|
@@ -209,7 +209,7 @@ def cluster_outlines(
|
|
|
209
209
|
|
|
210
210
|
from lets_plot import *
|
|
211
211
|
|
|
212
|
-
data = cl.datasets.pbmc3k(
|
|
212
|
+
data = cl.datasets.pbmc3k()
|
|
213
213
|
|
|
214
214
|
umap = (
|
|
215
215
|
cl.umap(data, key="cell_type_lvl1", axis_type="arrow", size=0.5, legend_ondata=True)
|
|
@@ -226,7 +226,7 @@ def cluster_outlines(
|
|
|
226
226
|
|
|
227
227
|
from lets_plot import *
|
|
228
228
|
|
|
229
|
-
data = cl.datasets.pbmc3k(
|
|
229
|
+
data = cl.datasets.pbmc3k()
|
|
230
230
|
|
|
231
231
|
umap = (
|
|
232
232
|
cl.umap(data, key="cell_type_lvl1", axis_type="arrow", size=0.5, legend_ondata=True)
|
|
@@ -138,7 +138,7 @@ def stream(
|
|
|
138
138
|
|
|
139
139
|
import cellestial as cl
|
|
140
140
|
|
|
141
|
-
data = cl.datasets.pancreas(
|
|
141
|
+
data = cl.datasets.pancreas()
|
|
142
142
|
|
|
143
143
|
plot = cl.umap(
|
|
144
144
|
data,
|
|
@@ -162,7 +162,7 @@ def stream(
|
|
|
162
162
|
|
|
163
163
|
import cellestial as cl
|
|
164
164
|
|
|
165
|
-
data = cl.datasets.pancreas(
|
|
165
|
+
data = cl.datasets.pancreas()
|
|
166
166
|
|
|
167
167
|
plot = cl.umap(
|
|
168
168
|
data,
|
|
@@ -65,7 +65,7 @@ def plot(
|
|
|
65
65
|
import cellestial as cl
|
|
66
66
|
import scanpy as sc
|
|
67
67
|
|
|
68
|
-
data = cl.datasets.pbmc3k(
|
|
68
|
+
data = cl.datasets.pbmc3k()
|
|
69
69
|
|
|
70
70
|
p1 = (
|
|
71
71
|
cl.plot(data, aes(x='cell_type_lvl1', y='n_genes'))
|
|
@@ -80,7 +80,7 @@ def plot(
|
|
|
80
80
|
import cellestial as cl
|
|
81
81
|
import scanpy as sc
|
|
82
82
|
|
|
83
|
-
data = cl.datasets.pbmc3k(
|
|
83
|
+
data = cl.datasets.pbmc3k()
|
|
84
84
|
|
|
85
85
|
p2 = (
|
|
86
86
|
cl.plot(data, aes(x='cell_type_lvl1', y='n_genes'))
|
|
@@ -67,7 +67,7 @@ def bar(
|
|
|
67
67
|
import cellestial as cl
|
|
68
68
|
import scanpy as sc
|
|
69
69
|
|
|
70
|
-
data = cl.datasets.pbmc3k(
|
|
70
|
+
data = cl.datasets.pbmc3k()
|
|
71
71
|
|
|
72
72
|
p1 = (
|
|
73
73
|
cl.bar(data, mapping=aes('leiden', fill='predicted_doublet'))
|
|
@@ -84,7 +84,7 @@ def bar(
|
|
|
84
84
|
import cellestial as cl
|
|
85
85
|
import scanpy as sc
|
|
86
86
|
|
|
87
|
-
data = cl.datasets.pbmc3k(
|
|
87
|
+
data = cl.datasets.pbmc3k()
|
|
88
88
|
|
|
89
89
|
p2 = (
|
|
90
90
|
cl.bar(data, mapping=aes('cell_type_lvl1', fill='leiden'))
|
|
@@ -73,7 +73,7 @@ def scatter(
|
|
|
73
73
|
|
|
74
74
|
import cellestial as cl
|
|
75
75
|
|
|
76
|
-
data = cl.datasets.pbmc3k(
|
|
76
|
+
data = cl.datasets.pbmc3k()
|
|
77
77
|
|
|
78
78
|
cl.scatter(
|
|
79
79
|
data,
|
|
@@ -91,7 +91,7 @@ def scatter(
|
|
|
91
91
|
|
|
92
92
|
import cellestial as cl
|
|
93
93
|
|
|
94
|
-
data = cl.datasets.pbmc3k(
|
|
94
|
+
data = cl.datasets.pbmc3k()
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
cl.scatter(
|
|
@@ -109,7 +109,7 @@ def scatter(
|
|
|
109
109
|
|
|
110
110
|
import cellestial as cl
|
|
111
111
|
|
|
112
|
-
data = cl.datasets.pbmc3k(
|
|
112
|
+
data = cl.datasets.pbmc3k()
|
|
113
113
|
|
|
114
114
|
|
|
115
115
|
cl.scatter(
|
|
@@ -107,7 +107,7 @@ def xyplot(
|
|
|
107
107
|
|
|
108
108
|
import cellestial as cl
|
|
109
109
|
|
|
110
|
-
data = cl.datasets.pbmc3k(
|
|
110
|
+
data = cl.datasets.pbmc3k()
|
|
111
111
|
|
|
112
112
|
cl.xyplot(
|
|
113
113
|
data,
|
|
@@ -126,7 +126,7 @@ def xyplot(
|
|
|
126
126
|
|
|
127
127
|
import cellestial as cl
|
|
128
128
|
|
|
129
|
-
data = cl.datasets.pbmc3k(
|
|
129
|
+
data = cl.datasets.pbmc3k()
|
|
130
130
|
|
|
131
131
|
cl.xyplot(
|
|
132
132
|
data,
|
|
@@ -145,7 +145,7 @@ def xyplot(
|
|
|
145
145
|
|
|
146
146
|
import cellestial as cl
|
|
147
147
|
|
|
148
|
-
data = cl.datasets.pbmc3k(
|
|
148
|
+
data = cl.datasets.pbmc3k()
|
|
149
149
|
|
|
150
150
|
cl.xyplot(
|
|
151
151
|
data,
|
|
@@ -148,7 +148,7 @@ def xyplots(
|
|
|
148
148
|
|
|
149
149
|
import cellestial as cl
|
|
150
150
|
|
|
151
|
-
data = cl.datasets.pbmc3k(
|
|
151
|
+
data = cl.datasets.pbmc3k()
|
|
152
152
|
|
|
153
153
|
cl.xyplots(
|
|
154
154
|
data,
|
|
@@ -169,7 +169,7 @@ def xyplots(
|
|
|
169
169
|
|
|
170
170
|
import cellestial as cl
|
|
171
171
|
|
|
172
|
-
data = cl.datasets.pbmc3k(
|
|
172
|
+
data = cl.datasets.pbmc3k()
|
|
173
173
|
|
|
174
174
|
cl.xyplots(
|
|
175
175
|
data,
|
|
@@ -59,7 +59,7 @@ def dimensional(
|
|
|
59
59
|
color_low: str = "#e6e6e6",
|
|
60
60
|
color_mid: str | None = None,
|
|
61
61
|
color_high: str = "#377eb8",
|
|
62
|
-
|
|
62
|
+
midpoint: Literal["mean", "median", "mid"] | float = "median",
|
|
63
63
|
axis_type: Literal["axis", "arrow"] | None = None,
|
|
64
64
|
arrow_length: float = 0.25,
|
|
65
65
|
arrow_size: float = 1,
|
|
@@ -129,7 +129,7 @@ def dimensional(
|
|
|
129
129
|
The color to use for the middle part of the color gradient.
|
|
130
130
|
color_high : str, default='#377EB8'
|
|
131
131
|
The color to use for the high end of the color gradient.
|
|
132
|
-
|
|
132
|
+
midpoint : {'mean', 'median', 'mid'} | float, default='median'
|
|
133
133
|
The midpoint (in data value) of the color gradient.
|
|
134
134
|
Can be 'mean', 'median' and 'mid' or a number (float or int).
|
|
135
135
|
- If 'mean', the midpoint is the mean of the data.
|
|
@@ -200,7 +200,7 @@ def dimensional(
|
|
|
200
200
|
|
|
201
201
|
import cellestial as cl
|
|
202
202
|
|
|
203
|
-
data = cl.datasets.pbmc3k(
|
|
203
|
+
data = cl.datasets.pbmc3k()
|
|
204
204
|
|
|
205
205
|
cl.dimensional(data,key="cell_type_lvl1",axis_type="arrow",legend_ondata=True)
|
|
206
206
|
|
|
@@ -213,7 +213,7 @@ def dimensional(
|
|
|
213
213
|
|
|
214
214
|
import cellestial as cl
|
|
215
215
|
|
|
216
|
-
data = cl.datasets.pbmc3k(
|
|
216
|
+
data = cl.datasets.pbmc3k()
|
|
217
217
|
|
|
218
218
|
cl.dimensional(data,key="CD14",axis_type="arrow",color_high="red")
|
|
219
219
|
|
|
@@ -332,7 +332,7 @@ def dimensional(
|
|
|
332
332
|
color_low=color_low,
|
|
333
333
|
color_mid=color_mid,
|
|
334
334
|
color_high=color_high,
|
|
335
|
-
|
|
335
|
+
midpoint=midpoint,
|
|
336
336
|
)
|
|
337
337
|
# else: let letsplot handle it
|
|
338
338
|
|
|
@@ -144,7 +144,7 @@ def violin(
|
|
|
144
144
|
|
|
145
145
|
from lets_plot import *
|
|
146
146
|
|
|
147
|
-
data = cl.datasets.pbmc3k(
|
|
147
|
+
data = cl.datasets.pbmc3k()
|
|
148
148
|
|
|
149
149
|
violin = (
|
|
150
150
|
cl.violin(
|
|
@@ -173,7 +173,7 @@ def violin(
|
|
|
173
173
|
|
|
174
174
|
from lets_plot import *
|
|
175
175
|
|
|
176
|
-
data = cl.datasets.pbmc3k(
|
|
176
|
+
data = cl.datasets.pbmc3k()
|
|
177
177
|
|
|
178
178
|
violin = (
|
|
179
179
|
cl.violin(
|
|
@@ -203,7 +203,7 @@ def violin(
|
|
|
203
203
|
|
|
204
204
|
from lets_plot import *
|
|
205
205
|
|
|
206
|
-
data = cl.datasets.pbmc3k(
|
|
206
|
+
data = cl.datasets.pbmc3k()
|
|
207
207
|
|
|
208
208
|
violin = (
|
|
209
209
|
cl.violin(
|
|
@@ -383,7 +383,7 @@ def boxplot(
|
|
|
383
383
|
|
|
384
384
|
from lets_plot import *
|
|
385
385
|
|
|
386
|
-
data = cl.datasets.pbmc3k(
|
|
386
|
+
data = cl.datasets.pbmc3k()
|
|
387
387
|
|
|
388
388
|
boxplot = (
|
|
389
389
|
cl.boxplot(
|
|
@@ -410,7 +410,7 @@ def boxplot(
|
|
|
410
410
|
|
|
411
411
|
from lets_plot import *
|
|
412
412
|
|
|
413
|
-
data = cl.datasets.pbmc3k(
|
|
413
|
+
data = cl.datasets.pbmc3k()
|
|
414
414
|
|
|
415
415
|
boxplot = (
|
|
416
416
|
cl.boxplot(
|
|
@@ -438,7 +438,7 @@ def boxplot(
|
|
|
438
438
|
|
|
439
439
|
from lets_plot import *
|
|
440
440
|
|
|
441
|
-
data = cl.datasets.pbmc3k(
|
|
441
|
+
data = cl.datasets.pbmc3k()
|
|
442
442
|
|
|
443
443
|
boxplot = (
|
|
444
444
|
cl.boxplot(
|
|
@@ -596,7 +596,7 @@ def histogram(
|
|
|
596
596
|
|
|
597
597
|
from lets_plot import *
|
|
598
598
|
|
|
599
|
-
data = cl.datasets.pbmc3k(
|
|
599
|
+
data = cl.datasets.pbmc3k()
|
|
600
600
|
|
|
601
601
|
histogram = (
|
|
602
602
|
cl.histogram(data, "n_genes_by_counts", bins=50)
|
|
@@ -33,6 +33,7 @@ def violins(
|
|
|
33
33
|
axis: Literal[0, 1] | None = None,
|
|
34
34
|
color: str | None = None,
|
|
35
35
|
fill: str | None = None,
|
|
36
|
+
threshold: float | None = None,
|
|
36
37
|
add_keys: Sequence[str] | str | None = None,
|
|
37
38
|
tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None,
|
|
38
39
|
geom_fill: str | None = None,
|
|
@@ -41,6 +42,7 @@ def violins(
|
|
|
41
42
|
point_alpha: float = 0.7,
|
|
42
43
|
point_size: float = 0.5,
|
|
43
44
|
point_geom: Literal["jitter", "point", "sina"] = "jitter",
|
|
45
|
+
point_mapping: FeatureSpec | None = None,
|
|
44
46
|
observations_name: str = "Barcode",
|
|
45
47
|
variables_name: str = "Variable",
|
|
46
48
|
show_points: bool = True,
|
|
@@ -97,6 +99,8 @@ def violins(
|
|
|
97
99
|
Fill aesthetic to split the violin plot (categorical).
|
|
98
100
|
Shortcut for mapping=aes(fill=...)
|
|
99
101
|
e,g., 'cell_type' or 'leiden'.
|
|
102
|
+
threshold : float | None, default=None
|
|
103
|
+
If provided, filters out rows where the value column is below the threshold.
|
|
100
104
|
add_keys : Sequence[str] | str | None, default=None
|
|
101
105
|
Additional keys to include in the dataframe.
|
|
102
106
|
tooltips: {'none'} | Sequence[str] | FeatureSpec | None, default=None
|
|
@@ -115,11 +119,11 @@ def violins(
|
|
|
115
119
|
Size for the points in the violin plot.
|
|
116
120
|
point_geom : {'jitter','point','sina'}, default is 'jitter'
|
|
117
121
|
Geom type of the points, default is geom_jitter.
|
|
118
|
-
|
|
119
|
-
|
|
122
|
+
point_mapping : FeatureSpec | None, default=None
|
|
123
|
+
Additional aesthetic mappings for the points, the result of `aes()`.
|
|
120
124
|
observations_name : str, default='Barcode'
|
|
121
125
|
The name to give to barcode (or index) column in the dataframe.
|
|
122
|
-
variables_name : str, default='
|
|
126
|
+
variables_name : str, default='Variable'
|
|
123
127
|
The name to give to variable index column in the dataframe.
|
|
124
128
|
show_points : bool, default=True
|
|
125
129
|
Whether to show points.
|
|
@@ -154,10 +158,10 @@ def violins(
|
|
|
154
158
|
Cell horizontal spacing in px.
|
|
155
159
|
vspace : float | None, default=None
|
|
156
160
|
Cell vertical spacing in px.
|
|
157
|
-
fit : bool, default=
|
|
161
|
+
fit : bool | None, default=None
|
|
158
162
|
Whether to stretch each plot to match the aspect ratio of its cell (fit=True),
|
|
159
163
|
or to preserve the original aspect ratio of plots (fit=False).
|
|
160
|
-
align : bool, default=
|
|
164
|
+
align : bool | None, default=None
|
|
161
165
|
If True, align inner areas (i.e. “geom” bounds) of plots.
|
|
162
166
|
However, cells containing other (sub)grids are not participating
|
|
163
167
|
in the plot “inner areas” layouting.
|
|
@@ -200,7 +204,7 @@ def violins(
|
|
|
200
204
|
|
|
201
205
|
import cellestial as cl
|
|
202
206
|
|
|
203
|
-
data = cl.datasets.pbmc3k(
|
|
207
|
+
data = cl.datasets.pbmc3k()
|
|
204
208
|
|
|
205
209
|
cl.violins(
|
|
206
210
|
data,
|
|
@@ -226,6 +230,14 @@ def violins(
|
|
|
226
230
|
variable_keys=variable_keys,
|
|
227
231
|
axis=axis,
|
|
228
232
|
)
|
|
233
|
+
_collect_aes_columns(
|
|
234
|
+
data,
|
|
235
|
+
keys=[],
|
|
236
|
+
mapping=point_mapping,
|
|
237
|
+
metadata_columns=metadata_columns,
|
|
238
|
+
variable_keys=variable_keys,
|
|
239
|
+
axis=axis,
|
|
240
|
+
)
|
|
229
241
|
# Tooltips are shared across subplots; pull their fields into the shared
|
|
230
242
|
# frame so each subplot's unpivot index can keep them.
|
|
231
243
|
_resolve_tooltips(
|
|
@@ -260,6 +272,7 @@ def violins(
|
|
|
260
272
|
axis=axis,
|
|
261
273
|
color=color,
|
|
262
274
|
fill=fill,
|
|
275
|
+
threshold=threshold,
|
|
263
276
|
add_keys=add_keys,
|
|
264
277
|
tooltips=tooltips,
|
|
265
278
|
geom_fill=geom_fill,
|
|
@@ -268,6 +281,7 @@ def violins(
|
|
|
268
281
|
point_alpha=point_alpha,
|
|
269
282
|
point_size=point_size,
|
|
270
283
|
point_geom=point_geom,
|
|
284
|
+
point_mapping=point_mapping,
|
|
271
285
|
observations_name=observations_name,
|
|
272
286
|
variables_name=variables_name,
|
|
273
287
|
show_points=show_points,
|
|
@@ -319,6 +333,7 @@ def boxplots(
|
|
|
319
333
|
axis: Literal[0, 1] | None = None,
|
|
320
334
|
color: str | None = None,
|
|
321
335
|
fill: str | None = None,
|
|
336
|
+
threshold: float | None = None,
|
|
322
337
|
add_keys: Sequence[str] | str | None = None,
|
|
323
338
|
tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None,
|
|
324
339
|
geom_fill: str | None = None,
|
|
@@ -327,6 +342,7 @@ def boxplots(
|
|
|
327
342
|
point_alpha: float = 0.7,
|
|
328
343
|
point_size: float = 0.5,
|
|
329
344
|
point_geom: Literal["jitter", "point", "sina"] = "jitter",
|
|
345
|
+
point_mapping: FeatureSpec | None = None,
|
|
330
346
|
observations_name: str = "Barcode",
|
|
331
347
|
variables_name: str = "Variable",
|
|
332
348
|
show_points: bool = True,
|
|
@@ -383,6 +399,8 @@ def boxplots(
|
|
|
383
399
|
Fill aesthetic to split the boxplot (categorical).
|
|
384
400
|
Shortcut for mapping=aes(fill=...)
|
|
385
401
|
e,g., 'cell_type' or 'leiden'.
|
|
402
|
+
threshold : float | None, default=None
|
|
403
|
+
If provided, filters out rows where the value column is below the threshold.
|
|
386
404
|
add_keys : Sequence[str] | str | None, default=None
|
|
387
405
|
Additional keys to include in the dataframe.
|
|
388
406
|
tooltips: {'none'} | Sequence[str] | FeatureSpec | None, default=None
|
|
@@ -401,9 +419,11 @@ def boxplots(
|
|
|
401
419
|
Size for the points in the boxplot.
|
|
402
420
|
point_geom : {'jitter','point','sina'}, default is 'jitter'
|
|
403
421
|
Geom type of the points, default is geom_jitter.
|
|
422
|
+
point_mapping : FeatureSpec | None, default=None
|
|
423
|
+
Additional aesthetic mappings for the points, the result of `aes()`.
|
|
404
424
|
observations_name : str, default='Barcode'
|
|
405
425
|
The name to give to barcode (or index) column in the dataframe.
|
|
406
|
-
variables_name : str, default='
|
|
426
|
+
variables_name : str, default='Variable'
|
|
407
427
|
The name to give to variable index column in the dataframe.
|
|
408
428
|
show_points : bool, default=True
|
|
409
429
|
Whether to show points.
|
|
@@ -437,10 +457,10 @@ def boxplots(
|
|
|
437
457
|
Cell horizontal spacing in px.
|
|
438
458
|
vspace : float | None, default=None
|
|
439
459
|
Cell vertical spacing in px.
|
|
440
|
-
fit : bool, default=
|
|
460
|
+
fit : bool | None, default=None
|
|
441
461
|
Whether to stretch each plot to match the aspect ratio of its cell (fit=True),
|
|
442
462
|
or to preserve the original aspect ratio of plots (fit=False).
|
|
443
|
-
align : bool, default=
|
|
463
|
+
align : bool | None, default=None
|
|
444
464
|
If True, align inner areas (i.e. “geom” bounds) of plots.
|
|
445
465
|
However, cells containing other (sub)grids are not participating
|
|
446
466
|
in the plot “inner areas” layouting.
|
|
@@ -483,7 +503,7 @@ def boxplots(
|
|
|
483
503
|
|
|
484
504
|
import cellestial as cl
|
|
485
505
|
|
|
486
|
-
data = cl.datasets.pbmc3k(
|
|
506
|
+
data = cl.datasets.pbmc3k()
|
|
487
507
|
|
|
488
508
|
cl.boxplots(
|
|
489
509
|
data,
|
|
@@ -509,6 +529,14 @@ def boxplots(
|
|
|
509
529
|
variable_keys=variable_keys,
|
|
510
530
|
axis=axis,
|
|
511
531
|
)
|
|
532
|
+
_collect_aes_columns(
|
|
533
|
+
data,
|
|
534
|
+
keys=[],
|
|
535
|
+
mapping=point_mapping,
|
|
536
|
+
metadata_columns=metadata_columns,
|
|
537
|
+
variable_keys=variable_keys,
|
|
538
|
+
axis=axis,
|
|
539
|
+
)
|
|
512
540
|
# Tooltips are shared across subplots; pull their fields into the shared
|
|
513
541
|
# frame so each subplot's unpivot index can keep them.
|
|
514
542
|
_resolve_tooltips(
|
|
@@ -543,6 +571,7 @@ def boxplots(
|
|
|
543
571
|
axis=axis,
|
|
544
572
|
color=color,
|
|
545
573
|
fill=fill,
|
|
574
|
+
threshold=threshold,
|
|
546
575
|
add_keys=add_keys,
|
|
547
576
|
tooltips=tooltips,
|
|
548
577
|
geom_fill=geom_fill,
|
|
@@ -551,6 +580,7 @@ def boxplots(
|
|
|
551
580
|
point_alpha=point_alpha,
|
|
552
581
|
point_size=point_size,
|
|
553
582
|
point_geom=point_geom,
|
|
583
|
+
point_mapping=point_mapping,
|
|
554
584
|
observations_name=observations_name,
|
|
555
585
|
variables_name=variables_name,
|
|
556
586
|
show_points=show_points,
|
|
@@ -605,6 +635,7 @@ def histograms(
|
|
|
605
635
|
fill: str | None = None,
|
|
606
636
|
bins: int | None = None,
|
|
607
637
|
binwidth: float | None = None,
|
|
638
|
+
threshold: float | None = None,
|
|
608
639
|
add_keys: Sequence[str] | str | None = None,
|
|
609
640
|
tooltips: Literal["none"] | Sequence[str] | FeatureSpec | None = None,
|
|
610
641
|
geom_fill: str | None = None,
|
|
@@ -665,6 +696,8 @@ def histograms(
|
|
|
665
696
|
Number of bins. Overridden by `binwidth` if both are provided.
|
|
666
697
|
binwidth : float | None, default=None
|
|
667
698
|
Width of each bin. Takes precedence over `bins`.
|
|
699
|
+
threshold : float | None, default=None
|
|
700
|
+
If provided, filters out rows where the value column is below the threshold.
|
|
668
701
|
add_keys : Sequence[str] | str | None, default=None
|
|
669
702
|
Additional keys to include in the dataframe.
|
|
670
703
|
tooltips: {'none'} | Sequence[str] | FeatureSpec | None, default=None
|
|
@@ -709,10 +742,10 @@ def histograms(
|
|
|
709
742
|
Cell horizontal spacing in px.
|
|
710
743
|
vspace : float | None, default=None
|
|
711
744
|
Cell vertical spacing in px.
|
|
712
|
-
fit : bool, default=
|
|
745
|
+
fit : bool | None, default=None
|
|
713
746
|
Whether to stretch each plot to match the aspect ratio of its cell (fit=True),
|
|
714
747
|
or to preserve the original aspect ratio of plots (fit=False).
|
|
715
|
-
align : bool, default=
|
|
748
|
+
align : bool | None, default=None
|
|
716
749
|
If True, align inner areas (i.e. "geom" bounds) of plots.
|
|
717
750
|
However, cells containing other (sub)grids are not participating
|
|
718
751
|
in the plot "inner areas" layouting.
|
|
@@ -748,7 +781,7 @@ def histograms(
|
|
|
748
781
|
|
|
749
782
|
import cellestial as cl
|
|
750
783
|
|
|
751
|
-
data = cl.datasets.pbmc3k(
|
|
784
|
+
data = cl.datasets.pbmc3k()
|
|
752
785
|
|
|
753
786
|
cl.histograms(
|
|
754
787
|
data,
|
|
@@ -810,6 +843,7 @@ def histograms(
|
|
|
810
843
|
fill=fill,
|
|
811
844
|
bins=bins,
|
|
812
845
|
binwidth=binwidth,
|
|
846
|
+
threshold=threshold,
|
|
813
847
|
add_keys=add_keys,
|
|
814
848
|
tooltips=tooltips,
|
|
815
849
|
geom_fill=geom_fill,
|