Skip to content

Commit e961e36

Browse files
authored
Merge pull request #7 from czbiohub-sf/add-clean-hein-dataset
Update hein 2024 dataset to include enriched version and more annotation
2 parents 4f37daf + 0bbdedc commit e961e36

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

grassp/datasets/example_data.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,30 @@
1515
from .. import io
1616

1717

18-
def hein_2024() -> AnnData:
18+
def hein_2024(enrichment: Literal["raw", "enriched"] = "raw") -> AnnData:
1919
"""Download the Hein 2024 dataset.
2020
This dataset is described in https://www.cell.com/cell/fulltext/S0092-8674(24)01344-8.
2121
22+
Parameters
23+
----------
24+
enrichment
25+
Whether to return the raw or enriched dataset. The enriched dataset is calculated exacly like in the paper and replicates are collapsed. The raw
26+
2227
Returns
2328
-------
2429
AnnData
2530
The Hein 2024 dataset.
2631
"""
27-
filename = settings.datasetdir / "hein_2024.h5ad"
28-
url = "https://drive.google.com/uc?export=download&id=1RMPQucHYbQgzIu-GcwoqApvwa8mODDOp"
29-
return scanpy.read(filename, backup_url=url)
32+
if enrichment == "raw":
33+
filename = settings.datasetdir / "hein_2024_raw.h5ad"
34+
url = "https://public.czbiohub.org/proteinxlocation/internal/hein2024_raw.h5ad"
35+
return scanpy.read(filename, backup_url=url)
36+
elif enrichment == "enriched":
37+
filename = settings.datasetdir / "hein_2024_enriched.h5ad"
38+
url = "https://public.czbiohub.org/proteinxlocation/internal/hein2024_enriched.h5ad"
39+
return scanpy.read(filename, backup_url=url)
40+
else:
41+
raise ValueError("Enrichment argument must be either 'raw' or 'enriched'")
3042

3143

3244
def itzhak_2016() -> AnnData:

0 commit comments

Comments
 (0)