File size: 707 Bytes
925ee3b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""Pancreas endocrinogenesis dataset."""

from __future__ import annotations

from pathlib import Path

import anndata as ad
from anndata import AnnData


def pancreas() -> AnnData:
    """Load the pancreas endocrinogenesis dataset.

    This dataset contains ~3,700 cells from mouse pancreas
    endocrinogenesis (Bastidas-Ponce et al. 2019), commonly used
    for RNA velocity benchmarking.

    Returns
    -------
    AnnData with unspliced and spliced layers.
    """
    cache_path = Path.home() / ".cache" / "scptr" / "pancreas.h5ad"
    if cache_path.exists():
        return ad.read_h5ad(cache_path)

    from ._registry import fetch
    path = fetch("pancreas.h5ad")
    return ad.read_h5ad(path)