Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,9 @@
"\n",
"# Connect to DANDI and get the dandiset\n",
"dandiset_id = \"001636\"\n",
"dandiset_version = \"0.260518.1819\" # published version; \"draft\" changes without notice\n",
"client = DandiAPIClient()\n",
"dandiset = client.get_dandiset(dandiset_id, \"draft\")\n",
"dandiset = client.get_dandiset(dandiset_id, dandiset_version)\n",
"\n",
"# Select a session with a corticostriatal neuron\n",
"asset_path = \"sub-Venus/sub-Venus_ses-Venus++v4806++PostMPTP++Depth17700um++20000204_behavior+ecephys.nwb\"\n",
Expand Down
3 changes: 2 additions & 1 deletion 001636/TurnerLab/motor_cortex/turner_m1_glm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,11 @@
"\n",
"# Stream NWB file from DANDI\n",
"dandiset_id = \"001636\"\n",
"dandiset_version = \"0.260518.1819\" # published version; \"draft\" changes without notice\n",
"session_id = \"Venus++v2703++PreMPTP++Depth19880um++19990607\"\n",
"\n",
"client = DandiAPIClient()\n",
"dandiset = client.get_dandiset(dandiset_id)\n",
"dandiset = client.get_dandiset(dandiset_id, dandiset_version)\n",
"assets = list(dandiset.get_assets())\n",
"asset = next(a for a in assets if session_id in a.path)\n",
"print(f\"Streaming: {asset.path}\")\n",
Expand Down
3 changes: 2 additions & 1 deletion 001636/TurnerLab/motor_cortex/turner_m1_peth.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,11 @@
"\n",
"# Stream NWB file from DANDI\n",
"dandiset_id = \"001636\"\n",
"dandiset_version = \"0.260518.1819\" # published version; \"draft\" changes without notice\n",
"session_id = \"Venus++v4529++PostMPTP++Depth20600um++20000127\"\n",
"\n",
"client = DandiAPIClient()\n",
"dandiset = client.get_dandiset(dandiset_id)\n",
"dandiset = client.get_dandiset(dandiset_id, dandiset_version)\n",
"assets = list(dandiset.get_assets())\n",
"asset = next(a for a in assets if session_id in a.path)\n",
"print(f\"Streaming: {asset.path}\")\n",
Expand Down
3 changes: 2 additions & 1 deletion 001636/TurnerLab/motor_cortex/turner_m1_usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,9 @@
"\n",
"# Connect to DANDI and get the dandiset\n",
"dandiset_id = \"001636\"\n",
"dandiset_version = \"0.260518.1819\" # published version; \"draft\" changes without notice\n",
"client = DandiAPIClient()\n",
"dandiset = client.get_dandiset(dandiset_id, \"draft\")\n",
"dandiset = client.get_dandiset(dandiset_id, dandiset_version)\n",
"\n",
"# Get all assets - users can filter this list to select any session\n",
"assets = dandiset.get_assets()\n",
Expand Down
5 changes: 3 additions & 2 deletions 001754/CatalystNeuro/001754_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,10 @@
"source": [
"# List all NWB files in the dandiset\n",
"dandiset_id = \"001754\"\n",
"dandiset_version = \"0.260728.1352\" # published version; \"draft\" changes without notice\n",
"\n",
"with DandiAPIClient() as client:\n",
" dandiset = client.get_dandiset(dandiset_id, \"draft\")\n",
" dandiset = client.get_dandiset(dandiset_id, dandiset_version)\n",
" print(f\"Dandiset: {dandiset.get_raw_metadata()['name']}\\n\")\n",
" assets = list(dandiset.get_assets())\n",
" for asset in sorted(assets, key=lambda a: a.path):\n",
Expand Down Expand Up @@ -322,7 +323,7 @@
"file_path = \"sub-Rat1/sub-Rat1_ses-19980425T124500_behavior+ecephys.nwb\"\n",
"\n",
"with DandiAPIClient() as client:\n",
" asset = client.get_dandiset(dandiset_id, \"draft\").get_asset_by_path(file_path)\n",
" asset = client.get_dandiset(dandiset_id, dandiset_version).get_asset_by_path(file_path)\n",
" s3_url = asset.get_content_url(follow_redirects=1, strip_query=True)\n",
"\n",
"remote_file = remfile.File(s3_url)\n",
Expand Down
Loading