Skip to content

Commit

Permalink
docs: update tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
schlegelp committed Jan 11, 2024
1 parent b44719b commit 064c89a
Show file tree
Hide file tree
Showing 8 changed files with 1,186 additions and 418 deletions.
806 changes: 720 additions & 86 deletions docs/source/tutorials/flywire_annotations.ipynb

Large diffs are not rendered by default.

440 changes: 244 additions & 196 deletions docs/source/tutorials/flywire_connectivity.ipynb

Large diffs are not rendered by default.

28 changes: 19 additions & 9 deletions docs/source/tutorials/flywire_mirror.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"accidentally flipped along the left-right (i.e. \"x\") axis. A detailed explanation\n",
"of this observation can be found in `Schlegel et al <https://www.biorxiv.org/content/10.1101/2023.06.27.546055v2.full>`_.\n",
"\n",
"Importantly, the official `side` labels we provide for FlyWire are biologically\n",
"Importantly, the official ``side`` labels we provide for FlyWire are biologically\n",
"correct. Let's illustrate this:\n",
"\n",
".. note:\n",
Expand All @@ -34,19 +34,27 @@
"import navis.interfaces.neuprint as neu\n",
"\n",
"from fafbseg import flywire\n",
"import fafbseg.flywire.NeuronCriteria as NC\n",
"\n",
"client = neu.Client(\"https://neuprint.janelia.org\", dataset=\"hemibrain:v1.2.1\")"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Found 8 neurons matching the given criteria.\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "59c4160c24894003964a44dfe6b2510a",
"model_id": "68d1dbd1ef77446e90012b86c57c66ad",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -60,7 +68,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0b0570118962469d957fb87a44f08a33",
"model_id": "4d4d98bf2d394bf485d3888e971d2244",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -73,12 +81,14 @@
}
],
"source": [
"# Fetch a neuron on the left side of the brain\n",
"# Fetch a couple neurons on the left side of the brain\n",
"# (note that \"side\" always refers to where the soma is)\n",
"da1 = flywire.search_annotations(\"hemibrain_type:DA1_lPN\", materialization=630)\n",
"da1_left = da1[da1.side == \"left\"]\n",
"meshes = flywire.get_mesh_neuron(da1_left.root_id.values, dataset=\"flat_630\", lod=3)\n",
"meshes = navis.downsample_neuron(meshes, 5) # slightly downsample neurons"
"meshes = flywire.get_mesh_neuron(\n",
" NC(type=\"DA1_lPN\", side=\"left\"), dataset=\"flat_630\", lod=3\n",
")\n",
"\n",
"# Slightly downsample neurons for visualization\n",
"meshes = navis.downsample_neuron(meshes, 5)"
]
},
{
Expand Down
Loading

0 comments on commit 064c89a

Please sign in to comment.