forked from vitessce/vitessce-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmarimo.py
More file actions
52 lines (35 loc) · 937 Bytes
/
Copy pathmarimo.py
File metadata and controls
52 lines (35 loc) · 937 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import marimo
__generated_with = "0.13.15"
app = marimo.App(width="medium")
@app.cell
def _():
import marimo as mo
return (mo,)
@app.cell
def _():
from vitessce import VitessceConfig
from example_configs import dries as dries_config
return VitessceConfig, dries_config
@app.cell
def _(VitessceConfig, dries_config, mo):
vc = VitessceConfig.from_dict(dries_config)
vw = mo.ui.anywidget(vc.widget())
vw
return (vw,)
@app.cell(hide_code=True)
def _(mo):
mo.md(r"""As you interact with the widget above, watch as the Vitessce configuration below dynamically updates. For instance, as you zoom in the scatterplot, check the value of `coordinationSpace.embeddingZoom`""")
return
@app.cell
def _(vw):
vw._config
return
@app.cell
def _(vw):
vw._config["coordinationSpace"]["embeddingZoom"]
return
@app.cell
def _():
return
if __name__ == "__main__":
app.run()