lamindb 1.10.0__py3-none-any.whl → 1.10.1__py3-none-any.whl

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.
lamindb/__init__.py CHANGED
@@ -108,7 +108,7 @@ Backwards compatibility.
108
108
 
109
109
  # ruff: noqa: I001
110
110
  # denote a release candidate for 0.1.0 with 0.1rc1, 0.1a1, 0.1b1, etc.
111
- __version__ = "1.10.0"
111
+ __version__ = "1.10.1"
112
112
 
113
113
  import warnings
114
114
 
@@ -340,6 +340,12 @@ if ZARR_INSTALLED:
340
340
  ds = sparse_dataset(elem)
341
341
  return _subset_sparse(ds, indices)
342
342
  else:
343
+ indices = tuple(
344
+ idim.tolist()
345
+ if isinstance(idim, np.ndarray) and idim.dtype == "bool"
346
+ else idim
347
+ for idim in indices
348
+ )
343
349
  return read_elem_partial(elem, indices=indices)
344
350
 
345
351
  # this is needed because accessing zarr.Group.keys() directly is very slow
@@ -36,11 +36,12 @@ Directories.
36
36
  dir_scrnaseq_cellranger
37
37
  dir_iris_images
38
38
 
39
- Dataframe, AnnData, MuData.
39
+ Dictionary, Dataframe, AnnData, MuData, SpatialData.
40
40
 
41
41
  .. autosummary::
42
42
  :toctree: .
43
43
 
44
+ dict_cxg_uns
44
45
  df_iris
45
46
  df_iris_in_meter
46
47
  df_iris_in_meter_study1
@@ -55,6 +56,7 @@ Dataframe, AnnData, MuData.
55
56
  mudata_papalexi21_subset
56
57
  schmidt22_crispra_gws_IFNG
57
58
  schmidt22_perturbseq
59
+ spatialdata_blobs
58
60
 
59
61
  Other.
60
62
 
@@ -76,6 +78,7 @@ from ._core import (
76
78
  df_iris_in_meter,
77
79
  df_iris_in_meter_study1,
78
80
  df_iris_in_meter_study2,
81
+ dict_cxg_uns,
79
82
  dir_iris_images,
80
83
  dir_scrnaseq_cellranger,
81
84
  file_bam,
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from pathlib import Path
4
- from typing import TYPE_CHECKING
4
+ from typing import TYPE_CHECKING, Any
5
5
  from urllib.request import urlretrieve
6
6
 
7
7
  import anndata as ad
@@ -418,6 +418,38 @@ def mudata_papalexi21_subset() -> MuData: # pragma: no cover
418
418
  return mdata
419
419
 
420
420
 
421
+ def dict_cxg_uns() -> dict[str, Any]:
422
+ """An example CELLxGENE AnnData `.uns` dictionary."""
423
+ uns = {
424
+ "organism_ontology_term_id": "NCBITaxon:9606",
425
+ "spatial": {
426
+ "is_single": True,
427
+ "library_1": { # Dynamic library_id key
428
+ "images": {
429
+ "fullres": "path/to/fullres.jpg",
430
+ "hires": "path/to/hires.jpg",
431
+ },
432
+ "scalefactors": {
433
+ "spot_diameter_fullres": 89.43,
434
+ "tissue_hires_scalef": 0.177,
435
+ },
436
+ },
437
+ "library_2": { # Another dynamic library_id key
438
+ "images": {
439
+ "fullres": "path/to/fullres_2.jpg",
440
+ "hires": "path/to/hires_2.jpg",
441
+ },
442
+ "scalefactors": {
443
+ "spot_diameter_fullres": 120.34,
444
+ "tissue_hires_scalef": 0.355,
445
+ },
446
+ },
447
+ },
448
+ }
449
+
450
+ return uns
451
+
452
+
421
453
  def df_iris() -> pd.DataFrame:
422
454
  """The iris collection as in sklearn.
423
455
 
@@ -10,7 +10,7 @@ if TYPE_CHECKING:
10
10
 
11
11
 
12
12
  def anndata_ensembl_gene_ids_and_valid_features_in_obs() -> Schema:
13
- """Return a schema for an AnnData with Ensembl gene IDs and valid features in obs.
13
+ """An `AnnData` schema validating Ensembl gene IDs and valid features in obs.
14
14
 
15
15
  .. literalinclude:: scripts/define_schema_anndata_ensembl_gene_ids_and_valid_features_in_obs.py
16
16
  :language: python
@@ -10,7 +10,7 @@ if TYPE_CHECKING:
10
10
 
11
11
 
12
12
  def valid_features() -> Schema:
13
- """Return a schema for an AnnData with Ensembl gene IDs and valid features in obs.
13
+ """A `DataFrame` schema that validates that columns map on existing features.
14
14
 
15
15
  .. literalinclude:: scripts/define_valid_features.py
16
16
  :language: python
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lamindb
3
- Version: 1.10.0
3
+ Version: 1.10.1
4
4
  Summary: A data framework for biology.
5
5
  Author-email: Lamin Labs <open-source@lamin.ai>
6
6
  Requires-Python: >=3.10,<3.14
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python :: 3.12
11
11
  Classifier: Programming Language :: Python :: 3.13
12
12
  Requires-Dist: lamin_utils==0.15.0
13
13
  Requires-Dist: lamin_cli==1.6.1
14
- Requires-Dist: lamindb_setup[aws]==1.9.0
14
+ Requires-Dist: lamindb_setup[aws]==1.9.1
15
15
  Requires-Dist: pyyaml
16
16
  Requires-Dist: pyarrow
17
17
  Requires-Dist: pandera>=0.24.0
@@ -19,7 +19,7 @@ Requires-Dist: typing_extensions!=4.6.0
19
19
  Requires-Dist: python-dateutil
20
20
  Requires-Dist: pandas>=2.0.0
21
21
  Requires-Dist: scipy<1.15.0
22
- Requires-Dist: anndata>=0.8.0,<=0.12.0
22
+ Requires-Dist: anndata>=0.8.0,<=0.12.1
23
23
  Requires-Dist: fsspec
24
24
  Requires-Dist: graphviz
25
25
  Requires-Dist: psycopg2-binary
@@ -1,4 +1,4 @@
1
- lamindb/__init__.py,sha256=E2TEOJS9lT0g-yGTWuIdK6m0kyIF7prfBGxJTPhFHHA,2905
1
+ lamindb/__init__.py,sha256=cWTeR7mqoNI5I8jjkRldYjJOqmaCsy7n8wCvbbWbeNI,2905
2
2
  lamindb/_finish.py,sha256=3HVKRw27rQs_S2ior-JX2IU0vUkeG5a6p8XgEgdT8-U,21219
3
3
  lamindb/_tracked.py,sha256=-wK7BJv30nf4v2_nH5qDCyxHvug7ih6duQNGxDrj3UE,4447
4
4
  lamindb/_view.py,sha256=cod1RnZoLyzMVJcjWjytg78Sf4qsR8IAdqpwzsi8FTw,4950
@@ -21,7 +21,7 @@ lamindb/core/exceptions.py,sha256=FMEoSvT3FvtLkxQAt2oDXPeaPem8V5x5UBbTsPFYU5w,53
21
21
  lamindb/core/loaders.py,sha256=QH3r3Q_aPrbkgiWaV30TmxcLCs6zZFQLRW442DsTrNU,5456
22
22
  lamindb/core/types.py,sha256=_u8amXATAZN-nNGNWYGmyqYDcHbT_i0NZeLRhm_-ygI,378
23
23
  lamindb/core/storage/__init__.py,sha256=2gJyn9w6rzv3oPHjY756OfQYrLEXb37YuKMqh6ZjbF8,542
24
- lamindb/core/storage/_anndata_accessor.py,sha256=zDg_ugdjtnEV1aenh1ePEadM9vLNGcIEZDP55TECF1o,26379
24
+ lamindb/core/storage/_anndata_accessor.py,sha256=NOAqI-SHS8IwM0MwsZmRUtqG8r4tBTJ9T8888lhvQkw,26611
25
25
  lamindb/core/storage/_backed_access.py,sha256=5y3C_D1g89d831FAXr8-WashmmL3cdNfTR5s61vrMdA,7858
26
26
  lamindb/core/storage/_polars_lazy_df.py,sha256=_JhnU8RmoTzU2kp7kyHRSUTAkFhpCJo6NNnHxvBXQv4,2929
27
27
  lamindb/core/storage/_pyarrow_dataset.py,sha256=lRYYt7edUtwauhxd7RwFud6YPDbz2PFvYYgqLhfapfk,1398
@@ -43,16 +43,16 @@ lamindb/examples/cellxgene/_cellxgene.py,sha256=HP_skQJbNYDEYhiLUpaP9kfmtPivmgTu
43
43
  lamindb/examples/cellxgene/cxg_schema_versions.csv,sha256=Du_zk2rrMA4AbHwYp6vgLzZH1Krnmml_KVerc2IvvkI,2107
44
44
  lamindb/examples/croissant/__init__.py,sha256=a8LFsAvHzts_C2jlcbuF7kxwGEBWd4VERsluwDFh_iY,1418
45
45
  lamindb/examples/croissant/mini_immuno.anndata.zarr_metadata.json,sha256=XhY4wnFyMoK4Thkaolh2yJxtU6sX0bdFsJvRvt942k8,2921
46
- lamindb/examples/datasets/__init__.py,sha256=JsFd-nXGyBWV7VjvqCAT7Si5T4jBCqkzBkU3gzqi-5Y,1896
47
- lamindb/examples/datasets/_core.py,sha256=uaP0snoKuAE5nDTL_XIgPeEoXSp5sTrNNAyOPDciZRU,20286
46
+ lamindb/examples/datasets/__init__.py,sha256=TI91CjNMh0MqcZVcruO6xLGPYqqQ5o3p_E37huOV3GI,1976
47
+ lamindb/examples/datasets/_core.py,sha256=o_Kaz-i1W7ldXP2d1arUix_JvxPS9n2bpDAiW0M_yxA,21302
48
48
  lamindb/examples/datasets/_fake.py,sha256=BZF9R_1iF0HDnvtZNqL2FtsjSMuqDIfuFxnw_LJYIh4,953
49
49
  lamindb/examples/datasets/_small.py,sha256=60WKs6Oo2NE7HUqe6PLfiPxH_5TYUjr_iZdtFWiOeAA,3460
50
50
  lamindb/examples/datasets/mini_immuno.py,sha256=ZEL9T4zhCKm8ggqU7VVhuihVKPR3MmlkJNOtdygH2v4,6107
51
51
  lamindb/examples/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  lamindb/examples/fixtures/sheets.py,sha256=2oRAY2jQYCJuW_gCTGAs90XerYQHIe3pivoi0vzgXpc,9035
53
53
  lamindb/examples/schemas/__init__.py,sha256=NPDp7VjMOHStEIthx3xW9NSHtY7jnnMzrNPcSDgxT3M,241
54
- lamindb/examples/schemas/_anndata.py,sha256=XpoEI52FIv_hv5Is8lXrxfkBbYgsQ6ZCHIBuci0_AU0,1215
55
- lamindb/examples/schemas/_simple.py,sha256=rNzjKYRQ2t7LnLbT24MjQUVpEZQxgPM1gtsate0hBXc,916
54
+ lamindb/examples/schemas/_anndata.py,sha256=TAQrnBLZhH4TgbznrJDdGK_Gze6cf1MvyXuCcKIvb1g,1210
55
+ lamindb/examples/schemas/_simple.py,sha256=Dspj5QRmv241IstBxuc1E1Q5YeEqTOnOvakg7ChPj1k,911
56
56
  lamindb/integrations/__init__.py,sha256=Zh0ROuRmob1QGV2mCo3A7cFmdheJGq4CUdo7G16pRHU,286
57
57
  lamindb/integrations/_croissant.py,sha256=9zRkOg2pkaiylKslfKfxYzZ5I5813qhCfA4Er3Q3bB4,4166
58
58
  lamindb/integrations/_vitessce.py,sha256=s2F8KPpYVG0zUOTaDJgH1XAJtQDg1zrD_SxC4ZHUkHk,4035
@@ -137,7 +137,7 @@ lamindb/setup/_switch.py,sha256=njZJN__JOhVrBFGClQG1wobdhJJp6l_XzPGKtKSCrfU,434
137
137
  lamindb/setup/core/__init__.py,sha256=SevlVrc2AZWL3uALbE5sopxBnIZPWZ1IB0NBDudiAL8,167
138
138
  lamindb/setup/errors/__init__.py,sha256=bAHTxOUJW1rm4zpF0Pvqkftn8W6iMGnQ-uyNBu13Nfg,171
139
139
  lamindb/setup/types/__init__.py,sha256=ATaosOi6q-cDWB52T69_sRmLMqj8cHfc-vljzZsrJNw,169
140
- lamindb-1.10.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
141
- lamindb-1.10.0.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
142
- lamindb-1.10.0.dist-info/METADATA,sha256=Z3G73ZpT3c9KDMhhW6SWsW55CxFsqh93MCl2LUB2PH4,5199
143
- lamindb-1.10.0.dist-info/RECORD,,
140
+ lamindb-1.10.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
141
+ lamindb-1.10.1.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
142
+ lamindb-1.10.1.dist-info/METADATA,sha256=UYl8nK7xlSZg0L4GaKYNkMjXuNs36LvfgSJFq-StSho,5199
143
+ lamindb-1.10.1.dist-info/RECORD,,