cellestial 0.49.2__tar.gz → 0.49.3__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.49.2 → cellestial-0.49.3}/PKG-INFO +8 -10
- {cellestial-0.49.2 → cellestial-0.49.3}/README.md +7 -9
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/layers/arrow.py +1 -3
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/core/subdimensionals.py +5 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/core/utilities.py +0 -2
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/differential/utilities.py +0 -2
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/spatial/utilities.py +1 -5
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/util/utilities.py +2 -2
- {cellestial-0.49.2 → cellestial-0.49.3}/pyproject.toml +1 -1
- {cellestial-0.49.2 → cellestial-0.49.3}/LICENSE +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/_version.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/datasets/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/datasets/datasets.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/frames/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/frames/build.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/frames/operations.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/layers/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/layers/_deferred.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/layers/bracket.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/layers/ondata_legend.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/layers/outline.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/layers/stream.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/layers/utilities.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/base/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/base/base.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/basic/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/basic/bar.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/basic/scatter.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/common/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/common/xyplot.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/common/xyplots.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/core/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/core/dimensional.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/core/distribution.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/core/distributions.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/core/subdimensional.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/differential/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/differential/markers.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/differential/volcano.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/heatmap/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/heatmap/dotplot.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/heatmap/heatmap.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/heatmap/stacked_violin.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/heatmap/utilities.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/quick/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/quick/elbow.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/quick/highest.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/single/quick/ridge.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/spatial/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/spatial/spatial.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/spatial/spatials.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/themes/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/themes/_distributions.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/themes/_heatmaps.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/themes/_scatters.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/util/__init__.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/util/colors.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/util/dendrogram.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/util/errors.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/util/markers.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/util/operations.py +0 -0
- {cellestial-0.49.2 → cellestial-0.49.3}/cellestial/util/save.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cellestial
|
|
3
|
-
Version: 0.49.
|
|
3
|
+
Version: 0.49.3
|
|
4
4
|
Summary: Interactive single-cell and spatial omics visualization library
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -44,12 +44,10 @@ Description-Content-Type: text/markdown
|
|
|
44
44
|
[](https://www.pola.rs/)
|
|
45
45
|
[](https://lets-plot.org/)
|
|
46
46
|
|
|
47
|
-
<img align="
|
|
47
|
+
<img align="left" src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/cellestial.svg" alt="Cellestial Logo" width="280">
|
|
48
48
|
|
|
49
49
|
The __Grammar of Graphics__ for single-cell omics.
|
|
50
50
|
|
|
51
|
-
## Introduction
|
|
52
|
-
|
|
53
51
|
__Cellestial__ is an interactive and a highly customizable _Single-Cell_ & _Spatial_ omics data visualization library. Built on top [Lets-Plot](https://lets-plot.org/), it offers a ggplot-like layered and modular approach offering __high customizability__ and __publication-ready figures__.
|
|
54
52
|
|
|
55
53
|
Cellestial is highly integrated with scverse's [AnnData](https://github.com/scverse/anndata) with room for integration with any upcoming single-cell omics data type in the Python single-cell omics ecosystem.
|
|
@@ -90,7 +88,7 @@ cl.umap(
|
|
|
90
88
|
```
|
|
91
89
|
|
|
92
90
|
<p align="center">
|
|
93
|
-
<img src="assets/first-umap.svg" alt="UMAP coloured by cell type" width="600">
|
|
91
|
+
<img src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/first-umap.svg" alt="UMAP coloured by cell type" width="600">
|
|
94
92
|
</p>
|
|
95
93
|
|
|
96
94
|
## Examples
|
|
@@ -120,7 +118,7 @@ gggrid(
|
|
|
120
118
|
</details>
|
|
121
119
|
|
|
122
120
|
<p align="center">
|
|
123
|
-
<img src="assets/spatial-categorical.svg" alt="Spatial categorical overlay" width="800">
|
|
121
|
+
<img src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/spatial-categorical.svg" alt="Spatial categorical overlay" width="800">
|
|
124
122
|
</p>
|
|
125
123
|
|
|
126
124
|
### Dimensionality reduction with layers
|
|
@@ -157,7 +155,7 @@ gggrid([outlined, streamed])
|
|
|
157
155
|
</details>
|
|
158
156
|
|
|
159
157
|
<p align="center">
|
|
160
|
-
<img src="assets/dimensionality-layers.svg" alt="UMAP with cluster outlines and velocity stream" width="800">
|
|
158
|
+
<img src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/dimensionality-layers.svg" alt="UMAP with cluster outlines and velocity stream" width="800">
|
|
161
159
|
</p>
|
|
162
160
|
|
|
163
161
|
### Marker genes
|
|
@@ -194,7 +192,7 @@ cl.heatmap(
|
|
|
194
192
|
</details>
|
|
195
193
|
|
|
196
194
|
<p align="center">
|
|
197
|
-
<img src="assets/heatmap.svg" alt="Marker gene heatmap" width="700">
|
|
195
|
+
<img src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/heatmap.svg" alt="Marker gene heatmap" width="700">
|
|
198
196
|
</p>
|
|
199
197
|
|
|
200
198
|
### Statistical comparisons
|
|
@@ -226,7 +224,7 @@ cl.boxplot(
|
|
|
226
224
|
</details>
|
|
227
225
|
|
|
228
226
|
<p align="center">
|
|
229
|
-
<img src="assets/boxplot-bracket.svg" alt="Boxplot with significance brackets" width="600">
|
|
227
|
+
<img src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/boxplot-bracket.svg" alt="Boxplot with significance brackets" width="600">
|
|
230
228
|
</p>
|
|
231
229
|
|
|
232
230
|
### Ridge plots
|
|
@@ -248,7 +246,7 @@ cl.ridge(
|
|
|
248
246
|
</details>
|
|
249
247
|
|
|
250
248
|
<p align="center">
|
|
251
|
-
<img src="assets/ridge.svg" alt="Ridge plot of B2M expression" width="600">
|
|
249
|
+
<img src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/ridge.svg" alt="Ridge plot of B2M expression" width="600">
|
|
252
250
|
</p>
|
|
253
251
|
|
|
254
252
|
## Migrating from Scanpy
|
|
@@ -7,12 +7,10 @@
|
|
|
7
7
|
[](https://www.pola.rs/)
|
|
8
8
|
[](https://lets-plot.org/)
|
|
9
9
|
|
|
10
|
-
<img align="
|
|
10
|
+
<img align="left" src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/cellestial.svg" alt="Cellestial Logo" width="280">
|
|
11
11
|
|
|
12
12
|
The __Grammar of Graphics__ for single-cell omics.
|
|
13
13
|
|
|
14
|
-
## Introduction
|
|
15
|
-
|
|
16
14
|
__Cellestial__ is an interactive and a highly customizable _Single-Cell_ & _Spatial_ omics data visualization library. Built on top [Lets-Plot](https://lets-plot.org/), it offers a ggplot-like layered and modular approach offering __high customizability__ and __publication-ready figures__.
|
|
17
15
|
|
|
18
16
|
Cellestial is highly integrated with scverse's [AnnData](https://github.com/scverse/anndata) with room for integration with any upcoming single-cell omics data type in the Python single-cell omics ecosystem.
|
|
@@ -53,7 +51,7 @@ cl.umap(
|
|
|
53
51
|
```
|
|
54
52
|
|
|
55
53
|
<p align="center">
|
|
56
|
-
<img src="assets/first-umap.svg" alt="UMAP coloured by cell type" width="600">
|
|
54
|
+
<img src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/first-umap.svg" alt="UMAP coloured by cell type" width="600">
|
|
57
55
|
</p>
|
|
58
56
|
|
|
59
57
|
## Examples
|
|
@@ -83,7 +81,7 @@ gggrid(
|
|
|
83
81
|
</details>
|
|
84
82
|
|
|
85
83
|
<p align="center">
|
|
86
|
-
<img src="assets/spatial-categorical.svg" alt="Spatial categorical overlay" width="800">
|
|
84
|
+
<img src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/spatial-categorical.svg" alt="Spatial categorical overlay" width="800">
|
|
87
85
|
</p>
|
|
88
86
|
|
|
89
87
|
### Dimensionality reduction with layers
|
|
@@ -120,7 +118,7 @@ gggrid([outlined, streamed])
|
|
|
120
118
|
</details>
|
|
121
119
|
|
|
122
120
|
<p align="center">
|
|
123
|
-
<img src="assets/dimensionality-layers.svg" alt="UMAP with cluster outlines and velocity stream" width="800">
|
|
121
|
+
<img src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/dimensionality-layers.svg" alt="UMAP with cluster outlines and velocity stream" width="800">
|
|
124
122
|
</p>
|
|
125
123
|
|
|
126
124
|
### Marker genes
|
|
@@ -157,7 +155,7 @@ cl.heatmap(
|
|
|
157
155
|
</details>
|
|
158
156
|
|
|
159
157
|
<p align="center">
|
|
160
|
-
<img src="assets/heatmap.svg" alt="Marker gene heatmap" width="700">
|
|
158
|
+
<img src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/heatmap.svg" alt="Marker gene heatmap" width="700">
|
|
161
159
|
</p>
|
|
162
160
|
|
|
163
161
|
### Statistical comparisons
|
|
@@ -189,7 +187,7 @@ cl.boxplot(
|
|
|
189
187
|
</details>
|
|
190
188
|
|
|
191
189
|
<p align="center">
|
|
192
|
-
<img src="assets/boxplot-bracket.svg" alt="Boxplot with significance brackets" width="600">
|
|
190
|
+
<img src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/boxplot-bracket.svg" alt="Boxplot with significance brackets" width="600">
|
|
193
191
|
</p>
|
|
194
192
|
|
|
195
193
|
### Ridge plots
|
|
@@ -211,7 +209,7 @@ cl.ridge(
|
|
|
211
209
|
</details>
|
|
212
210
|
|
|
213
211
|
<p align="center">
|
|
214
|
-
<img src="assets/ridge.svg" alt="Ridge plot of B2M expression" width="600">
|
|
212
|
+
<img src="https://raw.githubusercontent.com/datavil/cellestial/master/assets/ridge.svg" alt="Ridge plot of B2M expression" width="600">
|
|
215
213
|
</p>
|
|
216
214
|
|
|
217
215
|
## Migrating from Scanpy
|
|
@@ -95,9 +95,7 @@ def _axis_arrow_layers(
|
|
|
95
95
|
tip_y = (yend - y0) * _TIP_FRACTION
|
|
96
96
|
|
|
97
97
|
# semi-square L (stopping short of both tips), drawn as one connected path
|
|
98
|
-
path_frame = pl.DataFrame(
|
|
99
|
-
{"x": [xend - tip_x, x0, x0], "y": [y0, y0, yend - tip_y]}
|
|
100
|
-
)
|
|
98
|
+
path_frame = pl.DataFrame({"x": [xend - tip_x, x0, x0], "y": [y0, y0, yend - tip_y]})
|
|
101
99
|
|
|
102
100
|
layers = geom_path(
|
|
103
101
|
data=path_frame,
|
|
@@ -14,6 +14,7 @@ if TYPE_CHECKING:
|
|
|
14
14
|
from anndata import AnnData
|
|
15
15
|
from lets_plot.plot.subplots import SupPlotsSpec
|
|
16
16
|
|
|
17
|
+
|
|
17
18
|
def dimensionals(
|
|
18
19
|
data: AnnData,
|
|
19
20
|
keys: Sequence[str],
|
|
@@ -281,6 +282,7 @@ def dimensionals(
|
|
|
281
282
|
|
|
282
283
|
return scttrs
|
|
283
284
|
|
|
285
|
+
|
|
284
286
|
def umaps(
|
|
285
287
|
data: AnnData,
|
|
286
288
|
keys: Sequence[str],
|
|
@@ -543,6 +545,7 @@ def umaps(
|
|
|
543
545
|
|
|
544
546
|
return scttrs
|
|
545
547
|
|
|
548
|
+
|
|
546
549
|
def tsnes(
|
|
547
550
|
data: AnnData,
|
|
548
551
|
keys: Sequence[str],
|
|
@@ -803,6 +806,7 @@ def tsnes(
|
|
|
803
806
|
|
|
804
807
|
return scttrs
|
|
805
808
|
|
|
809
|
+
|
|
806
810
|
def pcas(
|
|
807
811
|
data: AnnData,
|
|
808
812
|
keys: Sequence[str],
|
|
@@ -1064,6 +1068,7 @@ def pcas(
|
|
|
1064
1068
|
|
|
1065
1069
|
return scttrs
|
|
1066
1070
|
|
|
1071
|
+
|
|
1067
1072
|
def expressions(
|
|
1068
1073
|
data: AnnData,
|
|
1069
1074
|
keys: Sequence[str],
|
|
@@ -166,7 +166,6 @@ def _build_volcano_frame(
|
|
|
166
166
|
return frame
|
|
167
167
|
|
|
168
168
|
|
|
169
|
-
|
|
170
169
|
def _build_markers_frame(
|
|
171
170
|
data: AnnData,
|
|
172
171
|
*,
|
|
@@ -306,4 +305,3 @@ def _build_markers_frame(
|
|
|
306
305
|
|
|
307
306
|
msg = f"Unsupported data type: `{type(data)}`"
|
|
308
307
|
raise UnsupportedDataTypeError(msg)
|
|
309
|
-
|
|
@@ -358,10 +358,7 @@ def _spatial_components(
|
|
|
358
358
|
scale_factor = scale_factors.get(scalef_key)
|
|
359
359
|
if scale_factor is None:
|
|
360
360
|
if image:
|
|
361
|
-
_warn(
|
|
362
|
-
f"Scale factor `{scalef_key}` missing; "
|
|
363
|
-
"spots may not align with the image."
|
|
364
|
-
)
|
|
361
|
+
_warn(f"Scale factor `{scalef_key}` missing; spots may not align with the image.")
|
|
365
362
|
scale_factor = 1.0
|
|
366
363
|
spot_coordinates = data.obsm[spatial_key] * scale_factor
|
|
367
364
|
|
|
@@ -376,4 +373,3 @@ def _spatial_components(
|
|
|
376
373
|
|
|
377
374
|
msg = f"Unsupported data type: `{type(data)}`"
|
|
378
375
|
raise UnsupportedDataTypeError(msg)
|
|
379
|
-
|
|
@@ -287,6 +287,7 @@ def _fill_gradient(
|
|
|
287
287
|
midpoint=mid_value,
|
|
288
288
|
)
|
|
289
289
|
|
|
290
|
+
|
|
290
291
|
# cache to avoid recomputing for every plot in a grid...
|
|
291
292
|
@lru_cache(maxsize=32)
|
|
292
293
|
def _grid_places(total: int, ncol: int | None) -> tuple[frozenset[int], frozenset[int]]:
|
|
@@ -588,8 +589,7 @@ def _resolve_embedding_key(
|
|
|
588
589
|
return key.upper()
|
|
589
590
|
|
|
590
591
|
prefix_matches = [
|
|
591
|
-
key for key in candidates
|
|
592
|
-
if any(key.upper().startswith(t) for t in search_targets)
|
|
592
|
+
key for key in candidates if any(key.upper().startswith(t) for t in search_targets)
|
|
593
593
|
]
|
|
594
594
|
if not prefix_matches:
|
|
595
595
|
msg = (
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|