Skip to content

Commit

Permalink
update user guide
Browse files Browse the repository at this point in the history
  • Loading branch information
bendichter committed Oct 29, 2021
1 parent 0c67b47 commit c5e8cf0
Showing 1 changed file with 22 additions and 69 deletions.
91 changes: 22 additions & 69 deletions DANDI User Guide.ipynb → DANDI User Guide, Part I.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"id": "404a40ef-a93d-4482-8249-f66967bc741c",
"metadata": {},
"source": [
"# Part 1, Converting data to NWB\n",
"# Part I\n",
"\n",
"## Converting data to NWB\n",
"\n",
"This is part 3 of the DANDI User Training on Nov 1, 2021.\n",
"\n",
Expand All @@ -26,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": null,
"id": "aa5bd1ad-cdb4-413e-8a8f-c8340fb8f739",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -118,25 +120,17 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": null,
"id": "b9ebc17f-4b15-4c2c-b028-3b284785f22e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/home/jovyan/dandi-notebooks\n"
]
}
],
"outputs": [],
"source": [
"!pwd"
]
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": null,
"id": "2fb3ab28-5e0a-4484-b0fa-9d4fc113e658",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -176,7 +170,7 @@
"id": "5594e0c8-fd05-4f9e-830d-a0380c6ade46",
"metadata": {},
"source": [
"# Part 2, Uploading to DANDI\n",
"# Uploading to DANDI\n",
"\n",
"When you register a dandiset, it creates a permenant ID. For instructional purposes, we will be using a staging version of DANDI, so that we do not create real IDs for pretend datasets.\n",
"\n",
Expand Down Expand Up @@ -242,7 +236,7 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": null,
"id": "53cbeb15-679d-432b-8b9d-daf943829590",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -271,32 +265,17 @@
"id": "7d980104-839e-44ae-8031-ae3d20517eb7",
"metadata": {},
"source": [
"## Part 3, Visualization NWB files\n",
"## Visualization NWB files\n",
"\n",
"NWB Widgets is a library of interactive data visualizations that works automatically with any NWB file. This can be very useful for visually confirming any conversion."
]
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "b141a5a5-1e84-4796-b53e-ded9360ece51",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "202325d29684459f9af43420939b054d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Label(value='session_description:', layout=Layout(max_height='40px', max_width='…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"from nwbwidgets import nwb2widget\n",
"\n",
Expand All @@ -313,7 +292,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": null,
"id": "bbc614dc-577a-47fd-bbe6-51a45c263f21",
"metadata": {},
"outputs": [],
Expand All @@ -324,33 +303,23 @@
"# neuropixel, Giocomo Lab (46 GB)\n",
"#dandiset_id, filepath = \"000053\", \"sub-npI1/sub-npI1_ses-20190415_behavior+ecephys.nwb\"\n",
"\n",
"# neuropixel, Allen Intitute\n",
"#dandiset_id, filepath = \"000022\", \"sub-744912845/sub-744912845_ses-766640955.nwb\"\n",
"\n",
"# ecephys, Buzsaki Lab (15.2 GB)\n",
"dandiset_id, filepath = \"000003\", \"sub-YutaMouse41/sub-YutaMouse41_ses-YutaMouse41-150831_behavior+ecephys.nwb\""
"#dandiset_id, filepath = \"000003\", \"sub-YutaMouse41/sub-YutaMouse41_ses-YutaMouse41-150831_behavior+ecephys.nwb\""
]
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": null,
"id": "1fa74623-67c1-46af-8b06-6a6f33e721f1",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "edce05c4de4d4cd7a3a9162b27fe2eda",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Label(value='session_description:', layout=Layout(max_height='40px', max_width='…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"from dandi.dandiapi import DandiAPIClient\n",
"from pynwb import NWBHDF5IO\n",
"from nwbwidgets import nwb2widget\n",
"\n",
"with DandiAPIClient() as client:\n",
" asset = client.get_dandiset(dandiset_id, \"draft\").get_asset_by_path(filepath)\n",
Expand All @@ -360,22 +329,6 @@
"nwb = io.read()\n",
"nwb2widget(nwb)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2c564363-710d-449b-9b4d-98e93504118f",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "c2b6b9ec-2f72-446d-bd50-3bc19e70befc",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -394,7 +347,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down

0 comments on commit c5e8cf0

Please sign in to comment.