-
Notifications
You must be signed in to change notification settings - Fork 25
Initial Edits for Basics Section #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7688c7a
753ad28
e60af1e
a0b39fa
a3a6660
9b4b5b7
63fc80c
14e7c85
6c97f3e
a1a9fa2
f3d7914
f9d78d1
c705542
2f850c7
2bb5ffd
ab79f3b
2267847
53f17e4
8acaca6
d5955d9
dafebd5
b27e99d
68f7d67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| "cells": [ | ||
| { | ||
| "attachments": {}, | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "# Preliminary Knowledge" | ||
| ] | ||
| }, | ||
| { | ||
| "attachments": {}, | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "### DANDI\n", | ||
| "Throughout these notebooks, we utilize a platform called [DANDI](https://dandiarchive.org/) (Data Archive and Neurophysiology Imaging). DANDI is a platform that allows open-source data sharing and archiving add acts as a centralized repository where research can deposit data. While we have provided some pre-loaded data from DANDI in the notebooks, the purpose of this databooks is to take any dataset off DANDI and reproduce the analysis within these notebooks. You should familiarize youself with DANDI before running through the notebooks, and explore how Dandisets are organized on the website. \n", | ||
| "\n", | ||
| "One step that may be confusing when running through the notebooks for the first time is finding a filepath for a certain file within a Dandiset. These are the steps for accessing a filepath you can try out yourself: \n", | ||
| "1) Click [here](https://dandiarchive.org/dandiset/000535?search=allen%20institute%202%20photon&pos=2) to access a Dandiset uploaded by researchers at the Allen Institute. \n", | ||
| "2) On the right side of the page, click the \"files\" tab.\n", | ||
| "3) You will now see a list of folders. Click on any folder. \n", | ||
| "4) Once you have entered the folder, you will see a list of files with 4 blue buttons to the right of each file name. Select any file you would like and click the \"i\" icon in the blue circle. \n", | ||
| "5) This will pull up a new tab with a bunch of red code. At the top of the code, you will see `\"id\" :`, `\"path\" :`, and `\"access\":`. Copy the code to the right of `\"path\" :`. It will look like this `\"sub-460654/sub-460654_ses-20190611T181840_behavior+ophys.nwb\"`. This is the filepath you will insert in various notebooks when it asks for `dandi_filepath`. \n" | ||
| ] | ||
| }, | ||
| { | ||
| "attachments": {}, | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "### NWB FILES\n", | ||
| "NWB (Neurodata Without Borders) files utilize a standardized format for storing and sharing neurophysiology data. Their purpose is to address the need for a universal data format that makes analysis accessible across different experimental techniques. NWB files contain raw data, processed data, analysis results, and metadata all organized in a uniform manner across different research projects. It would be useful to understand the format of these files before running through the notebooks because we will be accessing many different modules within various files to retreive data. Click [here](https://nwb-schema.readthedocs.io/en/latest/) to explore NWB format specification." | ||
| ] | ||
| }, | ||
| { | ||
| "attachments": {}, | ||
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "### Understanding Data Colletion Techniques\n", | ||
| "In this databook, we will be analyzing data from two different types of experimental techniques: optical imagine (ophys) and extracellular electrophysiology (ecephys). To truly grasp what is happening during the analysis process, you should familiarize youself with these experimental modalities. \n", | ||
| "\n", | ||
| "Resouces for ophys:\n", | ||
| "1) [this paper](https://www.pnas.org/doi/epdf/10.1073/pnas.1232232100) will provide an introduction to two-photon calcium imaging. \n", | ||
| "\n", | ||
| "Resources for ecephys:\n", | ||
| "1) [this paper](https://www.nature.com/articles/s41586-020-03171-x) from the Allen Institute will provide an introduction to ecephys and the use of neuropixel probes. \n", | ||
| "2) [here](https://portal.brain-map.org/explore/circuits/visual-coding-neuropixels) is a visualization of the neuropixel probes that may come in handy when trying to visualualize how the data is collected from the probe itself." | ||
| ] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "language_info": { | ||
| "name": "python" | ||
| }, | ||
| "orig_nbformat": 4 | ||
| }, | ||
| "nbformat": 4, | ||
| "nbformat_minor": 2 | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,7 +53,7 @@ | |
| "metadata": {}, | ||
rcpeene marked this conversation as resolved.
Show resolved
Hide resolved
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could be reworded/restructured to seem a bit more natural with the rest of the text. Perhaps something like "In the cells below, the dandi api i used to facilitate the download. the method... etc. etc. and Reply via ReviewNB
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe it already is one paragraph? |
||
| "source": [ | ||
| "### Downloading an NWB File\n", | ||
| "To examine an NWB File locally, it must first be downloaded. `dandiset_id` and `dandi_filepath` may be changed to select a different file off of DANDI. If the file of interest already downloaded, you don't need to run the download cell again. When trying to download an embargoed file, refer to the code from the [Downloading an NWB File](./download_nwb.ipynb) notebook." | ||
| "To examine an NWB File locally, it must first be downloaded. `dandiset_id` and `dandi_filepath` may be changed to select a different file off of DANDI. If the file of interest already downloaded, you don't need to run the download cell again. When trying to download an embargoed file, refer to the code from the [Downloading an NWB File](./download_nwb.ipynb) notebook. In the cells below, the DANDI API is used to faciliate the download. The `get_dandiset()` methods retrieves a specific dataset within DANDI while the `get_asset_by_path()` method retrieves a specific file within that dataset. " | ||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -73,10 +73,22 @@ | |
| "execution_count": 4, | ||
| "id": "83d7e5f7", | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "outputs": [ | ||
| { | ||
| "name": "stdout", | ||
| "output_type": "stream", | ||
| "text": [ | ||
| "sub-699733573_ses-715093703.nwb\n", | ||
| "./sub-699733573_ses-715093703.nwb\n" | ||
| ] | ||
| } | ||
| ], | ||
| "source": [ | ||
| "filename = dandi_filepath.split(\"/\")[-1]\n", | ||
| "filepath = f\"{download_loc}/{filename}\"" | ||
| "filepath = f\"{download_loc}/{filename}\"\n", | ||
| "\n", | ||
| "print(filename)\n", | ||
| "print(filepath)" | ||
| ] | ||
| }, | ||
| { | ||
|
|
@@ -85,13 +97,6 @@ | |
| "id": "1c5db129", | ||
| "metadata": {}, | ||
| "outputs": [ | ||
| { | ||
| "name": "stderr", | ||
| "output_type": "stream", | ||
| "text": [ | ||
| "A newer version (0.53.0) of dandi/dandi-cli is available. You are using 0.46.6\n" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "stdout", | ||
| "output_type": "stream", | ||
|
|
@@ -104,6 +109,7 @@ | |
| "client = dandiapi.DandiAPIClient()\n", | ||
| "my_dandiset = client.get_dandiset(dandiset_id)\n", | ||
| "file = my_dandiset.get_asset_by_path(dandi_filepath)\n", | ||
| "\n", | ||
| "# this may take awhile, especially if the file to download is large\n", | ||
| "file.download(filepath)\n", | ||
| "\n", | ||
|
|
@@ -132,17 +138,17 @@ | |
| "name": "stderr", | ||
| "output_type": "stream", | ||
| "text": [ | ||
| "c:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\hdmf\\spec\\namespace.py:531: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.1.3 because version 1.5.1 is already loaded.\n", | ||
| "c:\\Users\\katrina.ager\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\hdmf\\spec\\namespace.py:531: UserWarning: Ignoring cached namespace 'hdmf-common' version 1.1.3 because version 1.6.0 is already loaded.\n", | ||
| " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n", | ||
| "c:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\hdmf\\spec\\namespace.py:531: UserWarning: Ignoring cached namespace 'core' version 2.2.2 because version 2.6.0-alpha is already loaded.\n", | ||
| "c:\\Users\\katrina.ager\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\hdmf\\spec\\namespace.py:531: UserWarning: Ignoring cached namespace 'core' version 2.2.2 because version 2.5.0 is already loaded.\n", | ||
| " warn(\"Ignoring cached namespace '%s' version %s because version %s is already loaded.\"\n" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "stdout", | ||
| "output_type": "stream", | ||
| "text": [ | ||
| "root pynwb.file.NWBFile at 0x2285253481232\n", | ||
| "root pynwb.file.NWBFile at 0x2179856764832\n", | ||
| "Fields:\n", | ||
| " acquisition: {\n", | ||
| " raw_running_wheel_rotation <class 'pynwb.base.TimeSeries'>,\n", | ||
|
|
@@ -191,7 +197,7 @@ | |
| " session_id: 715093703\n", | ||
| " session_start_time: 2019-01-19 00:54:18-08:00\n", | ||
| " stimulus_notes: brain_observatory_1.1\n", | ||
| " subject: subject abc.EcephysSpecimen at 0x2285271628048\n", | ||
| " subject: subject abc.EcephysSpecimen at 0x2179856428960\n", | ||
| "Fields:\n", | ||
| " age: P118D\n", | ||
| " age_in_days: 118.0\n", | ||
|
|
@@ -223,7 +229,7 @@ | |
| { | ||
| "data": { | ||
| "application/vnd.jupyter.widget-view+json": { | ||
| "model_id": "ff394f60aa434277a364cc6bd96495c5", | ||
| "model_id": "fb037fcb861e489896b6812becc84a8e", | ||
| "version_major": 2, | ||
| "version_minor": 0 | ||
| }, | ||
|
|
@@ -256,7 +262,7 @@ | |
| "name": "python", | ||
| "nbconvert_exporter": "python", | ||
| "pygments_lexer": "ipython3", | ||
| "version": "3.9.10" | ||
| "version": "3.9.13" | ||
| } | ||
| }, | ||
| "nbformat": 4, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For step one, it reads as though you mean "click here to access any dandiset from the allen institute". Maybe say "access an example 2-Photon Dandiset from the allen institute openscope project"
Reply via ReviewNB