diff --git a/.gitignore b/.gitignore index fa757a6..3e65b03 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ __pycache__/ /data/ /scripts/data/ /node_modules/ +.coverage # docs /docs/generated/ diff --git a/docs/notebooks/download_dataset_from_lamin.ipynb b/docs/notebooks/download_dataset_from_lamin.ipynb new file mode 100644 index 0000000..b4a6561 --- /dev/null +++ b/docs/notebooks/download_dataset_from_lamin.ipynb @@ -0,0 +1,1201 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[92m→\u001b[0m connected lamindb: scverse/spatialdata-db\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/lustre/groups/ml01/workspace/lea.zimmermann/software/miniconda3/envs/sddb_test/lib/python3.11/site-packages/dask/dataframe/__init__.py:31: FutureWarning: The legacy Dask DataFrame implementation is deprecated and will be removed in a future version. Set the configuration option `dataframe.query-planning` to `True` or None to enable the new Dask Dataframe implementation and silence this warning.\n", + " warnings.warn(\n" + ] + } + ], + "source": [ + "import lamindb as ln\n", + "import shutil\n", + "import spatialdata as sd\n", + "from spatialdata_db.integrations import store_dataset" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Get a list of available datasets:" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + " | uid | \n", + "key | \n", + "description | \n", + "suffix | \n", + "kind | \n", + "otype | \n", + "size | \n", + "hash | \n", + "n_files | \n", + "n_observations | \n", + "_hash_type | \n", + "_key_is_virtual | \n", + "_overwrite_versions | \n", + "space_id | \n", + "storage_id | \n", + "schema_id | \n", + "version | \n", + "is_latest | \n", + "run_id | \n", + "created_at | \n", + "created_by_id | \n", + "_aux | \n", + "_branch_code | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | \n", + "\n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " | \n", + " |
301 | \n", + "J3fKc0m6IfFKqGT10000 | \n", + "None | \n", + "View Visium SpatialData Example in Vitessce | \n", + ".vitessce.json | \n", + "None | \n", + "None | \n", + "1842 | \n", + "_ogAN9X4lJ-dYDkdL3SEYw | \n", + "NaN | \n", + "None | \n", + "md5 | \n", + "True | \n", + "False | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "257.0 | \n", + "2025-02-03 13:28:06.909252+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
300 | \n", + "dBWsSTHSEVoYm7t70000 | \n", + "vitessce_examples/visium.sdata.zarr | \n", + "Visium SpatialData Example | \n", + ".zarr | \n", + "dataset | \n", + "None | \n", + "1473180245 | \n", + "4r3hK7svWsNx1TIWdRyRsw | \n", + "9167.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "NaN | \n", + "2025-02-03 13:11:16.519472+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
298 | \n", + "wlgPi3jjfVoYUWjA0000 | \n", + "None | \n", + "10X, Visium, Mouse, healthy, brain, 2023 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "116459181 | \n", + "Ss6q2vgfyG3ARYWp0SUmsg | \n", + "443.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "252.0 | \n", + "2025-01-21 14:17:50.268625+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
292 | \n", + "bENTLCi4bBxkFdk30000 | \n", + "None | \n", + "10X, anndata, Human, healthy, lymph node | \n", + ".anndata.zarr | \n", + "dataset | \n", + "AnnData | \n", + "199002741 | \n", + "0f1ev_U6XEzhfdyka2aSVA | \n", + "2038.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "230.0 | \n", + "2025-01-20 16:49:45.453742+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
257 | \n", + "Gdt4nEPT3QTzdmXc0000 | \n", + "None | \n", + "10X, Visium, Human, healthy, lymph node | \n", + ".ome.zarr | \n", + "dataset | \n", + "None | \n", + "13404384 | \n", + "mTHeMyuDsPVFBsfON2SZMQ | \n", + "265.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "230.0 | \n", + "2024-12-19 09:56:39.264348+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
293 | \n", + "jsq1NJbwJfXL1EtX0000 | \n", + "None | \n", + "View Human Lymph Node Example in Vitessce | \n", + ".vitessce.json | \n", + "None | \n", + "None | \n", + "3005 | \n", + "qHci84d3Z-fLw8ML_3S0lg | \n", + "NaN | \n", + "None | \n", + "md5 | \n", + "True | \n", + "False | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "250.0 | \n", + "2025-01-20 16:51:28.656230+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
290 | \n", + "u7ShvF2TOpFCKKOT0000 | \n", + "None | \n", + "10X, Visium, Human, unknown, spinal_cord, 2020 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "27522152 | \n", + "jW3Cq3su6K5FgMgaaz9DvA | \n", + "263.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "NaN | \n", + "2025-01-19 21:54:04.931463+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
288 | \n", + "4gLfyEWea7fJpXyQ0000 | \n", + "None | \n", + "10X, Visium, Mouse, unknown, brain, 2020 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "54817412 | \n", + "yocuS6gw1aoX2zwDNZsebg | \n", + "327.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "243.0 | \n", + "2025-01-19 21:51:51.708790+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
284 | \n", + "AqRfNjb1YHyMDZt00000 | \n", + "None | \n", + "10X, Visium, Mouse, healthy, brain, 2022 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "54817400 | \n", + "NTOnZzCUoYiXjypzHEud7g | \n", + "327.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "239.0 | \n", + "2025-01-19 21:45:48.348520+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
278 | \n", + "h298F4wLSpYnMo2C0000 | \n", + "None | \n", + "10X, Visium, Human, unknown, brain_cerebellum,... | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "28680862 | \n", + "I3p1SB4RL5YR8EcLcsZsNQ | \n", + "227.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "248.0 | \n", + "2025-01-19 21:34:25.397573+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
276 | \n", + "o4CvH5ipm5g1Psyy0000 | \n", + "None | \n", + "10X, Visium, Human, healthy, prostate, 2021 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "34069617 | \n", + "Mjt1UQFsL-sd_eEXGnJWjQ | \n", + "259.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "247.0 | \n", + "2025-01-19 21:32:33.064038+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
274 | \n", + "PmbrQBYxBxayyhls0000 | \n", + "None | \n", + "10X, Visium, Human, unknown, heart, 2020 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "41793228 | \n", + "tNEMxpH6G5uoTY3CxRRMGw | \n", + "263.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "245.0 | \n", + "2025-01-19 21:30:51.916798+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
272 | \n", + "wg5zQhHX5cQ9UG4N0000 | \n", + "None | \n", + "10X, Visium, Mouse, unknown, brain, 2020 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "57953090 | \n", + "raOCaxJLh_weCxY7z4mu3w | \n", + "327.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "244.0 | \n", + "2025-01-19 21:29:00.556320+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
271 | \n", + "KgUohDusDLA4S6WW0000 | \n", + "None | \n", + "10X, Visium, Mouse, unknown, brain, 2020 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "38143587 | \n", + "Xdl3V5khe8508IjaJQhm8g | \n", + "327.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "241.0 | \n", + "2025-01-19 21:26:41.761595+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
270 | \n", + "8Xdm6p3J8FPOxok00000 | \n", + "None | \n", + "10X, Visium, Mouse, unknown, brain, 2020 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "38143587 | \n", + "1SFkEeE1UvvswCpuCstDPw | \n", + "327.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "241.0 | \n", + "2025-01-19 21:25:28.550886+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
269 | \n", + "McoRBaiIuHp0Q8RQ0000 | \n", + "None | \n", + "10X, Visium, Mouse, healthy, brain, 2022 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "54841203 | \n", + "PlYRrY4VI-frNKHES5gvqw | \n", + "327.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "240.0 | \n", + "2025-01-19 21:23:37.660374+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
268 | \n", + "SYTEY2CR0OfTdq4N0000 | \n", + "None | \n", + "10X, Visium, Mouse, unknown, brain, 2019 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "56180342 | \n", + "pgkbcq_Rhf24MfhY-1zc1Q | \n", + "327.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "NaN | \n", + "2025-01-19 21:19:25.551402+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
266 | \n", + "8XBBsxnNHuWCOeOb0000 | \n", + "None | \n", + "10X, Visium, Human, large intestine colorectal... | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "52401277 | \n", + "TUrS6Myy91ExOsSws_zQ2A | \n", + "323.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "237.0 | \n", + "2025-01-19 16:42:31.115433+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
265 | \n", + "LumVWsITkcZQteL70000 | \n", + "None | \n", + "Visium vitessce demo | \n", + ".vitessce.json | \n", + "None | \n", + "None | \n", + "2047 | \n", + "SdxuKSaTOOT23HkA2jlLdg | \n", + "NaN | \n", + "None | \n", + "md5 | \n", + "True | \n", + "False | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "235.0 | \n", + "2025-01-16 19:17:02.333550+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
263 | \n", + "0BDn4bWTAMtQmOXS0000 | \n", + "None | \n", + "View Human Lymph Node Example in Vitessce | \n", + ".vitessce.json | \n", + "None | \n", + "None | \n", + "3005 | \n", + "-PchR8TOA4y0lj6IjmayiA | \n", + "NaN | \n", + "None | \n", + "md5 | \n", + "True | \n", + "False | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "231.0 | \n", + "2025-01-08 13:31:22.631439+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
256 | \n", + "1X1HPFLZIq5Qlwra0000 | \n", + "None | \n", + "AnnData object for Human lymph node, 10X Genomics | \n", + ".anndata.zarr | \n", + "dataset | \n", + "AnnData | \n", + "199002959 | \n", + "YolRLEIAX6AE9IGLRSOjGA | \n", + "2038.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "230.0 | \n", + "2024-12-19 09:55:30.210836+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
262 | \n", + "I38PyB0QZJLwi3Io0000 | \n", + "None | \n", + "View Human Lymph Node Example in Vitessce | \n", + ".vitessce.json | \n", + "None | \n", + "None | \n", + "2987 | \n", + "6QGkKjYdn3QMkGBLOAip0w | \n", + "NaN | \n", + "None | \n", + "md5 | \n", + "True | \n", + "False | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "229.0 | \n", + "2024-12-19 10:12:16.511765+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
239 | \n", + "Co2Bwl9TymNlnv9c0000 | \n", + "None | \n", + "10X, Visium, Human, breast cancer, breast, 2022 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "53442529 | \n", + "Z05oc7m9alFGiMo1l33DOQ | \n", + "311.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "197.0 | \n", + "2024-12-16 15:04:08.589580+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
230 | \n", + "8mjX2vs8KhTS3Y4c0000 | \n", + "None | \n", + "10X, Visium, Human, prostate cancer, prostate,... | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "60838635 | \n", + "TNg5OjUQowqBR_B0komdBQ | \n", + "326.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "197.0 | \n", + "2024-12-16 11:05:27.316266+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
228 | \n", + "J6HsBBMXCJ8amco80000 | \n", + "None | \n", + "10X, Xenium, Human, cancer, intestine_colon, 2023 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "5129800776 | \n", + "AyFqQ-0ipr-sgDzUuEErmg | \n", + "786.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "197.0 | \n", + "2024-12-16 10:59:12.338173+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
227 | \n", + "AcJ31iZl6KgZR7BO0000 | \n", + "None | \n", + "10X, Xenium, Human, healthy, heart, 2024 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "1483994224 | \n", + "f7BgRVX9kNxvnSpm4BrOMA | \n", + "368.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "197.0 | \n", + "2024-12-16 10:56:05.258469+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
226 | \n", + "fVvF7TCAlJfKsWgo0000 | \n", + "None | \n", + "10X, Xenium, Human, glioblastoma, brain, 2024 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "25439820101 | \n", + "Y7XqV167fo0hN6xNsRQSWw | \n", + "2426.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "197.0 | \n", + "2024-12-16 10:48:23.337843+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
224 | \n", + "5UbbJ6cR0WzaBDHB0000 | \n", + "None | \n", + "10X, Xenium, Human, acute lymphoid leukemia, b... | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "2490544230 | \n", + "JBdHTZJUvNltQNjFB8UdcQ | \n", + "598.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "197.0 | \n", + "2024-12-16 10:27:24.088735+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "
222 | \n", + "ubllg1iYQBaiDJfW0000 | \n", + "None | \n", + "10X, VisiumHD, Mouse, Healthy, Brain, 2024 | \n", + ".zarr | \n", + "None | \n", + "spatialdata | \n", + "1099865189 | \n", + "r3sSzfkOliLFFfhDzmP9hw | \n", + "2215.0 | \n", + "None | \n", + "md5-d | \n", + "True | \n", + "True | \n", + "1 | \n", + "2 | \n", + "None | \n", + "None | \n", + "True | \n", + "197.0 | \n", + "2024-12-16 10:07:09.710482+00:00 | \n", + "8 | \n", + "None | \n", + "1 | \n", + "