KokosDev Zarr Datasets
Collection
Curated Zarr datasets packaged for scalable ML and analytics workflows across domains (single-cell, climate, hydrology, and more). • 5 items • Updated • 1
shape list | cell_type_counts dict | disease_labels list | benchmark dict | meta dict |
|---|---|---|---|---|
[
100000,
61497
] | {
"A2 amacrine cell": 20,
"B cell": 669,
"B-1a B cell": 4,
"B-1b B cell": 5,
"B-2 B cell": 9,
"BEST4+ colonocyte": 21,
"BEST4+ enterocyte": 6,
"Bergmann glial cell": 161,
"CD14-low, CD16-positive monocyte": 16,
"CD14-positive monocyte": 344,
"CD14-positive, CD16-low monocyte": 36,
"CD14-positive... | [
"Alzheimer disease",
"B-cell acute lymphoblastic leukemia",
"Barrett esophagus",
"COVID-19",
"Crohn disease",
"Down syndrome",
"HIV infectious disease",
"HIV infectious disease || leishmaniasis",
"HIV infectious disease || visceral leishmaniasis",
"Lewy body dementia",
"Parkinson disease",
"Wi... | {
"open_seconds": 0.0011517200618982315,
"read_chunk_seconds": 0.006099492311477661,
"chunk_shape": [
1000,
1000
],
"chunk_origin": [
84212,
38534
],
"shape": [
100000,
61497
]
} | {
"census_version": "2025-11-08T00:00:00",
"created_at": "2026-02-03T06:49:50.898169+00:00",
"max_cells": 100000,
"n_hvg": 0,
"obs_value_filter": "tissue_general == 'lung' and is_primary_data == True",
"organism": "Homo sapiens",
"schema_version": "1.0",
"seed": 0,
"source": "cellxgene-census",
"x_c... |
This dataset was exported from the CellxGene Census as a chunked + compressed Zarr store intended for easy streaming access.
tissue_general == 'lung' and is_primary_data == True100,000 cells × 61,497 geneslung.zarrThe high compression ratio is achieved through Blosc zstd compression optimized for sparse expression matrices typical in single-cell RNA-seq data.
obs/cell_typeobs/diseaseobs/tissueobs/sexobs/assay| cell_type | n_cells |
|---|---|
| neuron | 8,037 |
| oligodendrocyte | 4,890 |
| fibroblast | 4,539 |
| glutamatergic neuron | 3,367 |
| macrophage | 2,216 |
| endothelial cell | 1,941 |
| astrocyte | 1,808 |
| natural killer cell | 1,803 |
| T cell | 1,734 |
| malignant cell | 1,625 |
| GABAergic neuron | 1,589 |
| classical monocyte | 1,562 |
| basal cell of prostate epithelium | 1,401 |
| myeloid cell | 1,379 |
| plasma cell | 1,263 |
| epithelial cell of proximal tubule | 1,185 |
| adipocyte of omentum tissue | 1,170 |
| microglial cell | 1,164 |
| acinar cell of salivary gland | 1,074 |
| oligodendrocyte precursor cell | 1,044 |
| monocyte | 1,036 |
| blood vessel endothelial cell | 982 |
| pericyte | 942 |
| subcutaneous adipocyte | 932 |
| CD8-positive, alpha-beta T cell | 830 |
Total unique disease labels: 72
Alzheimer disease
B-cell acute lymphoblastic leukemia
Barrett esophagus
COVID-19
Crohn disease
Down syndrome
HIV infectious disease
HIV infectious disease || leishmaniasis
HIV infectious disease || visceral leishmaniasis
Lewy body dementia
Parkinson disease
Wilms tumor
acute myeloid leukemia
acute promyelocytic leukemia
adenocarcinoma
age related macular degeneration 7
anencephaly
arrhythmogenic right ventricular cardiomyopathy
atrial fibrillation || mitral valve insufficiency
basal cell carcinoma
basal laminar drusen
benign prostatic hyperplasia
breast cancer
breast carcinoma
cataract
chromophobe renal cell carcinoma
clear cell renal carcinoma
colon adenocarcinoma
colon sessile serrated adenoma/polyp
colorectal cancer
common variable immunodeficiency
cytomegalovirus infection
dementia
dilated cardiomyopathy
enamel caries
gastric intestinal metaplasia
gastritis
glioblastoma
hyperplastic polyp
hypertrophic cardiomyopathy
influenza
invasive ductal breast carcinoma
invasive lobular breast carcinoma
leukoencephalopathy, diffuse hereditary, with spheroids 1
long COVID-19
luminal A breast carcinoma
luminal B breast carcinoma
macular degeneration
malignant ovarian serous tumor
multiple sclerosis
myocardial infarction
myocarditis
neuroblastoma
neuroendocrine carcinoma
non-compaction cardiomyopathy
normal
obstructive nephropathy
oral cavity squamous cell carcinoma
pilocytic astrocytoma
plasma cell myeloma
prediabetes syndrome
prostatic acinar adenocarcinoma
pulmonary emphysema
pulpitis
respiratory failure
rheumatoid arthritis
temporal lobe epilepsy
triple-negative breast carcinoma
tubular adenoma
tubulovillous adenoma
type 2 diabetes mellitus
ulcerative colitis
X (dense 2D array)(1000, 1000)float32zstdobs/_index, obs/<col> (or obs/<col>_codes + obs/<col>_categories for categoricals)var/_index, var/<col> (or var/<col>_codes + var/<col>_categories for categoricals)import zarr
import numpy as np
import pandas as pd
from anndata import AnnData
root = zarr.open_group("lung.zarr", mode="r")
X = root["X"] # zarr Array (lazy / on-demand)
obs = pd.DataFrame(index=root["obs/_index"][:].astype(str))
for col in ["cell_type", "disease", "tissue", "sex", "assay"]:
codes_key = "obs/" + col + "_codes"
cats_key = "obs/" + col + "_categories"
if codes_key in root and cats_key in root:
obs[col] = pd.Categorical.from_codes(root[codes_key][:], root[cats_key][:].astype(str))
elif "obs/" + col in root:
obs[col] = root["obs/" + col][:].astype(str)
var = pd.DataFrame(index=root["var/_index"][:].astype(str))
for col in ["feature_name", "feature_id", "gene_symbol"]:
key = "var/" + col
if key in root:
var[col] = root[key][:].astype(str)
# Convert to in-memory AnnData (loads full matrix):
adata = AnnData(X=np.asarray(X), obs=obs, var=var)
import scanpy as sc
sc.pp.normalize_total(adata, target_sum=1e4)
sc.pp.log1p(adata)
sc.pp.highly_variable_genes(adata, n_top_genes=2000, flavor="seurat_v3")
adata = adata[:, adata.var["highly_variable"]].copy()
sc.pp.scale(adata, max_value=10)
sc.tl.pca(adata, svd_solver="arpack")
sc.pp.neighbors(adata, n_neighbors=15, n_pcs=50)
sc.tl.umap(adata)
sc.tl.leiden(adata, resolution=0.5)
Measured locally while building this dataset:
X[chunk] (1000×1000): 0.0864 s{
"open_seconds": 0.0021242350339889526,
"read_chunk_seconds": 0.08641284704208374,
"chunk_shape": [
1000,
1000
],
"chunk_origin": [
84212,
38534
],
"shape": [
100000,
61497
]
}
{
"census_version": "2025-11-08",
"created_at": "2026-02-03T06:49:50.898169+00:00",
"max_cells": 100000,
"n_hvg": 0,
"obs_value_filter": "tissue_general == 'lung' and is_primary_data == True",
"organism": "Homo sapiens",
"schema_version": "1.0",
"seed": 0,
"source": "cellxgene-census",
"x_chunks": [
1000,
1000
],
"x_compression": {
"clevel": 3,
"cname": "zstd",
"codec": "blosc",
"shuffle": "bitshuffle"
},
"shape": [
100000,
61497
],
"obs_arrays": [
"_index",
"assay",
"cell_type",
"disease",
"sex",
"tissue"
],
"var_arrays": [
"_index",
"feature_id",
"feature_length",
"feature_name",
"feature_type",
"n_measured_obs",
"nnz",
"soma_joinid"
]
}
This repo is intended for: KokosDev/single-cell-lung-zarr.
If you have a HuggingFace token locally, upload with:
python3.11 -m pip install huggingface_hub
HF_TOKEN=*** python3.11 build_lung_zarr.py --upload --repo-id "KokosDev/single-cell-lung-zarr"