Skip to content

Commit

Permalink
🎨 Restore static folder & nbstripout
Browse files Browse the repository at this point in the history
Signed-off-by: zethson <[email protected]>
  • Loading branch information
Zethson committed Oct 22, 2024
1 parent 278b526 commit b6f3f0e
Show file tree
Hide file tree
Showing 3 changed files with 369 additions and 34 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ repos:
- id: nbstripout
exclude: |
(?x)(
docs/static/|
docs/examples/|
docs/notes/
)
Expand Down
153 changes: 137 additions & 16 deletions docs/static/2024-04-02-marshall-2022.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,37 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\ud83d\udca1 connected lamindb: scverse/spatial\n"
]
}
],
"source": [
"!lamin load scverse/spatial"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\ud83d\udca1 connected lamindb: scverse/spatial\n",
"\ud83d\udca1 notebook imports: anndata==0.10.7 lamindb==0.70.3 numpy==1.26.4 scanpy==1.10.1 vitessce==3.2.5\n",
"\ud83d\udca1 loaded: Transform(uid='VwUYGOmA3koC65cN', name='marshall-2022', key='2024-04-02-marshall-2022', version='2', type='notebook', updated_at=2024-04-23 12:40:36 UTC, created_by_id=2)\n",
"\ud83d\udca1 loaded: Run(uid='v6SbqImFKgQZdOBlsUcW', started_at=2024-04-23 13:45:52 UTC, is_consecutive=True, transform_id=20, created_by_id=2)\n"
]
}
],
"source": [
"import lamindb as ln\n",
"\n",
Expand All @@ -39,7 +58,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -60,9 +79,18 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/opt/miniconda3/envs/py310/lib/python3.10/site-packages/vitessce/__init__.py:42: UserWarning: Extra installs are necessary to use widgets: No module named 'anywidget'\n",
" warn(f'Extra installs are necessary to use widgets: {e}')\n"
]
}
],
"source": [
"from anndata import read_h5ad\n",
"import numpy as np\n",
Expand Down Expand Up @@ -121,7 +149,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -138,7 +166,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -161,13 +189,82 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"{'version': '1.0.15',\n",
" 'name': 'Marshall et al., 2022 iScience',\n",
" 'description': 'Marshall et al., 2022 iScience. Spatial transcriptomics (Slide-seqV2) in the healthy human kidney (Puck_200903_13)',\n",
" 'datasets': [{'uid': 'A',\n",
" 'name': 'marshall_2022',\n",
" 'files': [{'fileType': 'anndata.zarr',\n",
" 'url': 'https://scverse-spatial-eu-central-1.s3-eu-central-1.amazonaws.com/.lamindb/XIG5GCp05YtUAn9M.anndata.zarr',\n",
" 'options': {'obsLocations': {'path': 'obsm/X_spatial'},\n",
" 'obsSegmentations': {'path': 'obsm/X_segmentations'},\n",
" 'obsEmbedding': [{'path': 'obsm/X_umap',\n",
" 'dims': [0, 1],\n",
" 'embeddingType': 'UMAP'}],\n",
" 'obsSets': [{'name': 'Bead Type', 'path': 'obs/cell_type'}],\n",
" 'obsFeatureMatrix': {'path': 'X'},\n",
" 'featureLabels': {'path': 'var/feature_name'}}}]}],\n",
" 'coordinationSpace': {'dataset': {'A': 'A'}, 'embeddingType': {'A': 'UMAP'}},\n",
" 'layout': [{'component': 'obsSets',\n",
" 'coordinationScopes': {'dataset': 'A'},\n",
" 'x': 3.0,\n",
" 'y': 0.0,\n",
" 'w': 3.0,\n",
" 'h': 6.0},\n",
" {'component': 'obsSetSizes',\n",
" 'coordinationScopes': {'dataset': 'A'},\n",
" 'x': 6.0,\n",
" 'y': 0.0,\n",
" 'w': 6.0,\n",
" 'h': 6.0},\n",
" {'component': 'scatterplot',\n",
" 'coordinationScopes': {'dataset': 'A', 'embeddingType': 'A'},\n",
" 'x': 0.0,\n",
" 'y': 0.0,\n",
" 'w': 3.0,\n",
" 'h': 6.0},\n",
" {'component': 'spatial',\n",
" 'coordinationScopes': {'dataset': 'A'},\n",
" 'x': 0.0,\n",
" 'y': 6.0,\n",
" 'w': 3.0,\n",
" 'h': 6.0},\n",
" {'component': 'layerController',\n",
" 'coordinationScopes': {'dataset': 'A'},\n",
" 'x': 3.0,\n",
" 'y': 6.0,\n",
" 'w': 3.0,\n",
" 'h': 6.0},\n",
" {'component': 'featureList',\n",
" 'coordinationScopes': {'dataset': 'A'},\n",
" 'x': 6.0,\n",
" 'y': 6.0,\n",
" 'w': 3.0,\n",
" 'h': 6.0},\n",
" {'component': 'description',\n",
" 'coordinationScopes': {'dataset': 'A'},\n",
" 'x': 9.0,\n",
" 'y': 6.0,\n",
" 'w': 3.0,\n",
" 'h': 6.0}],\n",
" 'initStrategy': 'auto'}"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from vitessce import (\n",
" VitessceConfig,\n",
Expand Down Expand Up @@ -219,7 +316,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -228,18 +325,42 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"... uploading config.vitessce.json: 100.0%\n",
"\ud83d\udca1 go to: https://lamin.ai/scverse/spatial/artifact/sKxat1sh8unY0n0IkqNb\n"
]
}
],
"source": [
"vc_artifact = save_vitessce_config(vc, description=\"Marshall et al., 2022 iScience\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 12,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u2757 cells [(9, 11)] were not run consecutively\n",
"... uploading 2024-04-02-marshall-2022.ipynb: 100.0%\n",
"\u2705 saved transform.source_code: Artifact(uid='uOM8vBTTl3u72AyybkwW', suffix='.ipynb', description='Source of transform VwUYGOmA3koC65cN', version='2', size=7404, hash='NXzsZfmqWWpsTk-wIDa8Yg', hash_type='md5', visibility=0, key_is_virtual=True, updated_at=2024-04-23 13:55:20 UTC, storage_id=2, created_by_id=2)\n",
"... uploading run_env_pip_v6SbqImFKgQZdOBlsUcW.txt: 100.0%\n",
"\u2705 saved run.environment: Artifact(uid='iWaFLxrJN9TDrBZhCqrf', suffix='.txt', description='requirements.txt', size=10914, hash='WMhSDgtH_xsYI0nHNDNzuA', hash_type='md5', visibility=0, key_is_virtual=True, updated_at=2024-04-23 13:55:20 UTC, storage_id=2, created_by_id=2)\n",
"... uploading 2024-04-02-marshall-2022.html: 100.0%\n",
"\u2705 saved transform.latest_report: Artifact(uid='xGaILnIF0wJNiu6Evv7a', suffix='.html', description='Report of run v6SbqImFKgQZdOBlsUcW', version='2', size=301331, hash='KF9Z0Cc9eCDFuuxS9hsPRg', hash_type='md5', visibility=0, key_is_virtual=True, updated_at=2024-04-23 13:55:20 UTC, storage_id=2, created_by_id=2)\n",
"\u2705 go to: https://lamin.ai/scverse/spatial/transform/VwUYGOmA3koC65cN\n"
]
}
],
"source": [
"ln.finish()"
]
Expand Down
Loading

0 comments on commit b6f3f0e

Please sign in to comment.