dotools_py.dt.example_10x

Contents

dotools_py.dt.example_10x#

dotools_py.dt.example_10x(path=None)[source]#

Download scRNA 10x dataset.

Downloads an example dataset of PBMC from healthy donors and malignant B cells. Two H5 files for each dataset will be downloaded (raw_feature_bc_matrix.h5) and (filtered_feature_bc_matrix.h5) and will be saved following the CellRanger output format (e.g., dataset/outs/*.h5).

Parameters:
path str | PathLike[str] | Path (default: None)

Absolute path where the data is saved. If set to None, it will be saved to the user cache folder.

Return type:

None

Returns:

Returns None.

Example

>>> import dotools_py as do
>>> do.dt.example_10x()
2026-04-17 14:37:49,503 - Downloading data to /Users/david/Library/Caches/dotools_datasets
Downloading healthy filtered: 100%|██████████| 20.8M/20.8M [00:01<00:00, 14.0MiB/s]
Downloading healthy raw: 100%|██████████| 147M/147M [00:01<00:00, 117MiB/s]
Downloading disease filtered: 100%|██████████| 18.7M/18.7M [00:01<00:00, 12.7MiB/s]
Downloading disease raw: 100%|██████████| 144M/144M [00:06<00:00, 22.9MiB/s]
>>> adata = do.io.read_10x_h5("/Users/david/Library/Caches/dotools_datasets/healthy/outs/filtered_feature_bc_matrix.h5")
>>> adata
AnnData object with n_obs × n_vars = 7865 × 33538
var: 'gene_ids', 'feature_types', 'genome', 'pattern', 'read', 'sequence'