Spaces:
Sleeping
Sleeping
File size: 507 Bytes
e59f78e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import os
import urllib.request
import scanpy as sc
def collect_data():
os.makedirs("celldreamer/data/raw", exist_ok=True)
# Source: https://scanpy-tutorials.readthedocs.io/en/latest/integrating-data-using-ingest.html
url = "https://www.dropbox.com/s/qj1jlm9w10wmt0u/pancreas.h5ad?dl=1"
save_path = "celldreamer/data/raw/panc8_raw.h5ad"
urllib.request.urlretrieve(url, save_path)
adata = sc.read(save_path)
print(f"{adata.shape[0]} cells x {adata.shape[1]} genes")
|