dotools_py.dt.example_visium

Contents

dotools_py.dt.example_visium#

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

Download a 10x Visium dataset from the heart.

Downloads a dataset of the human heart. The sample comes from fresh frozen tissue and includes the H&E image.

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.

Examples

>>> import dotools_py as do
>>> do.dt.example_visium()
2026-04-17 14:45:48,428 - Downloading data to /Users/david/Library/Caches/dotools_datasets
Downloading Molecule info: 100%|██████████| 142M/142M [00:01<00:00, 118MiB/s]
Downloading filtered matrix: 100%|██████████| 11.6M/11.6M [00:00<00:00, 112MiB/s]
Downloading raw matrix: 100%|██████████| 13.4M/13.4M [00:00<00:00, 115MiB/s]
Downloading spatial: 100%|██████████| 8.78M/8.78M [00:00<00:00, 111MiB/s]
Downloading metrics: 100%|██████████| 945/945 [00:00<00:00, 19.3MiB/s]
Downloading web summary: 7.29MiB [00:00, 13.7MiB/s]
>>> adata = do.io.read_visium("/Users/david/Library/Caches/dotools_datasets/visium")
>>> adata
AnnData object with n_obs × n_vars = 4247 × 36601
obs: 'in_tissue', 'array_row', 'array_col'
var: 'gene_ids', 'feature_types', 'genome'
uns: 'spatial'
obsm: 'spatial'