Skip to content

Commit 854cb09

Browse files
committed
example data
1 parent 1cf8215 commit 854cb09

4 files changed

Lines changed: 21 additions & 35 deletions

File tree

.github/workflows/execute-nbs.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ on:
77
- "docs/**"
88
- "environment.yml"
99

10-
defaults:
11-
run:
12-
shell: bash -el {0}
13-
1410
concurrency:
1511
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1612
cancel-in-progress: true

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
buck-out/
55

66
# Compiled files
7-
.venv/
7+
/.venv/
8+
/.pixi/*
9+
/pixi.*
810
__pycache__/
911
.ipynb_checkpoints/
1012
.*cache/

docs/notebooks/anndata_getting_started.ipynb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,9 @@
6666
],
6767
"source": [
6868
"datapath = pooch.retrieve(\n",
69-
" url=\"https://figshare.com/ndownloader/files/40067737\",\n",
69+
" path=pooch.os_cache(\"scverse_tutorials\"),\n",
70+
" url=\"https://exampledata.scverse.org/tutorials/scverse-getting-started-anndata-pbmc3k_processed.h5ad\",\n",
7071
" known_hash=\"md5:b80deb0997f96b45d06f19c694e46243\",\n",
71-
" path=\"./data\",\n",
72-
" fname=\"scverse-getting-started-anndata-pbmc3k_processed.h5ad\",\n",
7372
")"
7473
]
7574
},

docs/notebooks/basic-scrna-tutorial.ipynb

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"metadata": {},
2828
"outputs": [],
2929
"source": [
30-
"sc.settings.set_figure_params(dpi=50, facecolor=\"white\")"
30+
"sc.set_figure_params(dpi=50, facecolor=\"white\")"
3131
]
3232
},
3333
{
@@ -42,20 +42,6 @@
4242
"We are reading in the count matrix into an [AnnData](https://anndata.readthedocs.io/en/latest/tutorials/notebooks/getting-started.html) object, which holds many slots for annotations and different representations of the data."
4343
]
4444
},
45-
{
46-
"cell_type": "code",
47-
"execution_count": 3,
48-
"id": "f0448e97",
49-
"metadata": {},
50-
"outputs": [],
51-
"source": [
52-
"EXAMPLE_DATA = pooch.create(\n",
53-
" path=pooch.os_cache(\"scverse_tutorials\"),\n",
54-
" base_url=\"doi:10.6084/m9.figshare.22716739.v1/\",\n",
55-
")\n",
56-
"EXAMPLE_DATA.load_registry_from_doi()"
57-
]
58-
},
5945
{
6046
"cell_type": "code",
6147
"execution_count": 4,
@@ -94,18 +80,21 @@
9480
}
9581
],
9682
"source": [
97-
"samples = {\n",
98-
" \"s1d1\": \"s1d1_filtered_feature_bc_matrix.h5\",\n",
99-
" \"s1d3\": \"s1d3_filtered_feature_bc_matrix.h5\",\n",
100-
"}\n",
101-
"adatas = {}\n",
102-
"\n",
103-
"for sample_id, filename in samples.items():\n",
104-
" path = EXAMPLE_DATA.fetch(filename)\n",
83+
"def download_sample(sample_id: str, known_hash: str) -> ad.AnnData:\n",
84+
" path = pooch.retrieve(\n",
85+
" path=pooch.os_cache(\"scverse_tutorials\"),\n",
86+
" url=f\"https://exampledata.scverse.org/tutorials/neurips-2021/{sample_id}_filtered_feature_bc_matrix.h5\",\n",
87+
" known_hash=known_hash,\n",
88+
" )\n",
10589
" sample_adata = sc.read_10x_h5(path)\n",
10690
" sample_adata.var_names_make_unique()\n",
107-
" adatas[sample_id] = sample_adata\n",
91+
" return sample_adata\n",
10892
"\n",
93+
"samples = {\n",
94+
" \"s1d1\": \"md5:a99285913ea3f3d22600d3d2f8a88e34\",\n",
95+
" \"s1d3\": \"md5:825f7f7578e3dc0b8955f5a97a402338\",\n",
96+
"}\n",
97+
"adatas = {id_: download_sample(id_, known_hash) for id_, known_hash in samples.items()}\n",
10998
"adata = ad.concat(adatas, label=\"sample\")\n",
11099
"adata.obs_names_make_unique()"
111100
]
@@ -1347,7 +1336,7 @@
13471336
"name": "stderr",
13481337
"output_type": "stream",
13491338
"text": [
1350-
"\r",
1339+
"\r\n",
13511340
" 0%| | 0/1 [00:00<?, ?it/s]"
13521341
]
13531342
},
@@ -1362,15 +1351,15 @@
13621351
"name": "stderr",
13631352
"output_type": "stream",
13641353
"text": [
1365-
"\r",
1354+
"\r\n",
13661355
"100%|██████████| 1/1 [00:17<00:00, 17.34s/it]"
13671356
]
13681357
},
13691358
{
13701359
"name": "stderr",
13711360
"output_type": "stream",
13721361
"text": [
1373-
"\r",
1362+
"\r\n",
13741363
"100%|██████████| 1/1 [00:17<00:00, 17.34s/it]"
13751364
]
13761365
},

0 commit comments

Comments
 (0)