Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,3 +1,72 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- other
|
| 5 |
+
tags:
|
| 6 |
+
- spatial-transcriptomics
|
| 7 |
+
- xenium
|
| 8 |
+
- spatial-omics
|
| 9 |
+
- bioinformatics
|
| 10 |
+
pretty_name: DeepSpaceDB Xenium Preview
|
| 11 |
---
|
| 12 |
+
|
| 13 |
+
# DeepSpaceDB Xenium Preview
|
| 14 |
+
|
| 15 |
+
A collection of processed 10x Genomics Xenium spatial transcriptomics samples, curated from public GEO
|
| 16 |
+
depositions and in-house runs, stored as [SpatialData](https://spatialdata.scverse.org/) zarr stores.
|
| 17 |
+
|
| 18 |
+
**This is a small preview** of the full DeepSpaceDB Xenium collection: 3 human breast cancer samples
|
| 19 |
+
(DSIDX00001-DSIDX00003, GEO series GSE243168). `metadata.csv` lists only these samples.
|
| 20 |
+
|
| 21 |
+
## Structure
|
| 22 |
+
|
| 23 |
+
```
|
| 24 |
+
metadata.csv # one row per sample: organ, condition, species, source, quality, etc.
|
| 25 |
+
data/
|
| 26 |
+
DSIDX00001.zarr.zip # one zipped SpatialData zarr store per sample
|
| 27 |
+
...
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
Each `<id>.zarr.zip` is a [SpatialData](https://spatialdata.scverse.org/) store containing (where available):
|
| 31 |
+
- `images`: `morphology_focus` (DAPI/nuclear stain) and `he_image` (H&E, aligned via an `Affine`
|
| 32 |
+
transform to the same coordinate space as the other elements)
|
| 33 |
+
- `labels`: `cell_labels`, `nucleus_labels` (raster segmentation masks)
|
| 34 |
+
- `shapes`: `cell_boundaries`, `nucleus_boundaries`, `cell_circles`
|
| 35 |
+
- `points`: `transcripts` (per-molecule detections)
|
| 36 |
+
- `tables`: `table` (cell x gene raw count matrix, AnnData)
|
| 37 |
+
|
| 38 |
+
## Loading a sample
|
| 39 |
+
|
| 40 |
+
`spatialdata.read_zarr()` cannot currently read directly from a `.zip` (this is an open upstream
|
| 41 |
+
limitation - see [scverse/spatialdata#1141](https://github.com/scverse/spatialdata/pull/1141)) - extract
|
| 42 |
+
first, then read normally:
|
| 43 |
+
|
| 44 |
+
```python
|
| 45 |
+
import zipfile
|
| 46 |
+
import spatialdata as sd
|
| 47 |
+
|
| 48 |
+
zipfile.ZipFile("DSIDX00001.zarr.zip").extractall("DSIDX00001.zarr")
|
| 49 |
+
sdata = sd.read_zarr("DSIDX00001.zarr")
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## Selecting samples by metadata
|
| 53 |
+
|
| 54 |
+
`metadata.csv` lets you filter before downloading any zarr data:
|
| 55 |
+
|
| 56 |
+
```python
|
| 57 |
+
import pandas as pd
|
| 58 |
+
from huggingface_hub import hf_hub_download
|
| 59 |
+
|
| 60 |
+
meta = pd.read_csv(hf_hub_download(repo_id="vhoncharuk/DeepSpaceDB-Preview", repo_type="dataset", filename="metadata.csv"))
|
| 61 |
+
breast_samples = meta[meta.organ == "breast"]
|
| 62 |
+
|
| 63 |
+
for dsidx_id in breast_samples["id"]:
|
| 64 |
+
hf_hub_download(repo_id="vhoncharuk/DeepSpaceDB-Preview", repo_type="dataset", filename=f"data/{dsidx_id}.zarr.zip")
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
## Metadata columns
|
| 68 |
+
|
| 69 |
+
`id` (internal accession), `sample_id` (GEO GSM or source sample name), `series_id` (GEO GSE, or
|
| 70 |
+
source collection), `organism`, `condition` / `condition_detailed` (+ Disease Ontology IDs), `organ` /
|
| 71 |
+
`organ_detailed` (+ UBERON IDs), `sex`, `age_or_stage`, `ethnicity_or_strain`, `description`, `source`,
|
| 72 |
+
`URL`, `PMID`, `date_published`, `has_manual_annotation`, `platform`, `quality`.
|