Skip to content

Commit cddcccc

Browse files
committed
Update
1 parent 084cfac commit cddcccc

File tree

72 files changed

+4148
-3353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+4148
-3353
lines changed

docs/notebooks/__ipynb__/cellbrowser_to_vitessce_config_conversion.ipynb

Lines changed: 89 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -3,74 +3,37 @@
33
{
44
"cell_type": "code",
55
"execution_count": null,
6-
"id": "vblA",
7-
"metadata": {},
8-
"outputs": [],
9-
"source": [
10-
"import os\n",
11-
"import json\n",
12-
"from os.path import join\n",
13-
"from vitessce import (\n",
14-
" convert_cell_browser_project_to_anndata,\n",
15-
" AnnDataWrapper,\n",
16-
" VitessceConfig,\n",
17-
")\n",
18-
"from vitessce.data_utils import VAR_CHUNK_SIZE"
19-
]
20-
},
21-
{
22-
"cell_type": "code",
23-
"execution_count": null,
24-
"id": "lEQa",
25-
"metadata": {},
26-
"outputs": [],
27-
"source": [
28-
"## 3. Convert UCSC Cell Browser project to a Vitessce view config"
29-
]
30-
},
31-
{
32-
"cell_type": "code",
33-
"execution_count": null,
34-
"id": "Hstk",
6+
"id": "Hbol",
357
"metadata": {},
368
"outputs": [],
379
"source": [
3810
"import marimo as mo"
3911
]
4012
},
41-
{
42-
"cell_type": "code",
43-
"execution_count": null,
44-
"id": "PKri",
45-
"metadata": {},
46-
"outputs": [],
47-
"source": [
48-
"# Example run, coverting \"adultPancreas\" project:\n",
49-
"adata = convert_cell_browser_project_to_anndata(project_name=\"adultPancreas\", keep_only_marker_genes=True)"
50-
]
51-
},
5213
{
5314
"cell_type": "markdown",
54-
"id": "BYtC",
55-
"metadata": {},
56-
"source": [
57-
"## 3. Configure Vitessce with the AnnData-Zarr store"
58-
]
59-
},
60-
{
61-
"cell_type": "markdown",
62-
"id": "bkHC",
63-
"metadata": {},
15+
"id": "MJUe",
16+
"metadata": {
17+
"marimo": {
18+
"config": {
19+
"hide_code": true
20+
}
21+
}
22+
},
6423
"source": [
65-
"## 1. Convert UCSC Cell Browser project to a format that is supported by Vitessce\n",
66-
"#### Output:\n",
67-
"An AnnData object"
24+
"# Load UCSC Cell Browser project in Vitessce"
6825
]
6926
},
7027
{
7128
"cell_type": "markdown",
72-
"id": "MJUe",
73-
"metadata": {},
29+
"id": "vblA",
30+
"metadata": {
31+
"marimo": {
32+
"config": {
33+
"hide_code": true
34+
}
35+
}
36+
},
7437
"source": [
7538
"This notebook shows you how to use the `convert_cell_browser_project_to_anndata` function, which allows you to take an existing project, published in https://cells.ucsc.edu/ and:\n",
7639
"1. Convert it into the AnnData format that is supported by Vitessce\n",
@@ -84,27 +47,62 @@
8447
]
8548
},
8649
{
87-
"cell_type": "markdown",
88-
"id": "Kclp",
50+
"cell_type": "code",
51+
"execution_count": null,
52+
"id": "bkHC",
8953
"metadata": {},
54+
"outputs": [],
9055
"source": [
91-
"## 4. Render the Vitessce widget"
56+
"import os\n",
57+
"import json\n",
58+
"from os.path import join\n",
59+
"from vitessce import (\n",
60+
" convert_cell_browser_project_to_anndata,\n",
61+
" AnnDataWrapper,\n",
62+
" VitessceConfig,\n",
63+
")\n",
64+
"from vitessce.data_utils import VAR_CHUNK_SIZE"
9265
]
9366
},
9467
{
9568
"cell_type": "markdown",
96-
"id": "Xref",
69+
"id": "lEQa",
70+
"metadata": {
71+
"marimo": {
72+
"config": {
73+
"hide_code": true
74+
}
75+
}
76+
},
77+
"source": [
78+
"## 1. Convert UCSC Cell Browser project to a format that is supported by Vitessce\n",
79+
"#### Output:\n",
80+
"An AnnData object"
81+
]
82+
},
83+
{
84+
"cell_type": "code",
85+
"execution_count": null,
86+
"id": "PKri",
9787
"metadata": {},
88+
"outputs": [],
9889
"source": [
99-
"## 2. Save the AnnData object as a Zarr store"
90+
"# Example run, coverting \"adultPancreas\" project:\n",
91+
"adata = convert_cell_browser_project_to_anndata(project_name=\"adultPancreas\", keep_only_marker_genes=True)"
10092
]
10193
},
10294
{
10395
"cell_type": "markdown",
104-
"id": "Hbol",
105-
"metadata": {},
96+
"id": "Xref",
97+
"metadata": {
98+
"marimo": {
99+
"config": {
100+
"hide_code": true
101+
}
102+
}
103+
},
106104
"source": [
107-
"# Load UCSC Cell Browser project in Vitessce"
105+
"## 2. Save the AnnData object as a Zarr store"
108106
]
109107
},
110108
{
@@ -119,6 +117,20 @@
119117
"adata.write_zarr(zarr_filepath, chunks=[adata.shape[0], VAR_CHUNK_SIZE])"
120118
]
121119
},
120+
{
121+
"cell_type": "markdown",
122+
"id": "BYtC",
123+
"metadata": {
124+
"marimo": {
125+
"config": {
126+
"hide_code": true
127+
}
128+
}
129+
},
130+
"source": [
131+
"## 3. Configure Vitessce with the AnnData-Zarr store"
132+
]
133+
},
122134
{
123135
"cell_type": "code",
124136
"execution_count": null,
@@ -138,6 +150,20 @@
138150
"anndata_wrapper_inst.auto_view_config(vc)"
139151
]
140152
},
153+
{
154+
"cell_type": "markdown",
155+
"id": "Kclp",
156+
"metadata": {
157+
"marimo": {
158+
"config": {
159+
"hide_code": true
160+
}
161+
}
162+
},
163+
"source": [
164+
"## 4. Render the Vitessce widget"
165+
]
166+
},
141167
{
142168
"cell_type": "code",
143169
"execution_count": null,

0 commit comments

Comments
 (0)