Skip to content

Commit

Permalink
deploy: eb36ec3
Browse files Browse the repository at this point in the history
  • Loading branch information
rcpeene committed May 24, 2024
1 parent d463fd8 commit 21e0065
Show file tree
Hide file tree
Showing 183 changed files with 8,722 additions and 6,794 deletions.
15 changes: 7 additions & 8 deletions FAQ.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=87e54e7c" />

<!-- Pre-loaded scripts that we'll load fully later -->
<link rel="preload" as="script" href="_static/scripts/bootstrap.js?digest=8d27b9dea8ad943066ae" />
Expand All @@ -52,7 +52,7 @@
<script>let toggleOpenOnPrint = 'true';</script>
<script src="_static/togglebutton.js?v=4a39c7ea"></script>
<script>var togglebuttonSelector = '.toggle, .admonition.dropdown';</script>
<script src="_static/design-tabs.js?v=36754332"></script>
<script src="_static/design-tabs.js?v=f930bc37"></script>
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=G-TJPN1M4PDX"></script>
<script>
window.dataLayer = window.dataLayer || [];
Expand Down Expand Up @@ -192,17 +192,17 @@
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="basics/background.html">Background</a></li>
<li class="toctree-l1"><a class="reference internal" href="basics/download_nwb.html">Downloading an NWB File</a></li>
<li class="toctree-l1"><a class="reference internal" href="basics/stream_nwb.html">Streaming an NWB File with remfile</a></li>
<li class="toctree-l1"><a class="reference internal" href="basics/read_nwb.html">Reading an NWB File</a></li>
<li class="toctree-l1"><a class="reference internal" href="basics/use_nwbwidgets.html">Exploring an NWB File</a></li>
<li class="toctree-l1"><a class="reference internal" href="basics/stream_nwb.html">Streaming an NWB File with fsspec</a></li>
<li class="toctree-l1"><a class="reference internal" href="basics/get_dandiset_metadata.html">Getting Experimental Metadata from DANDI</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Visualizing NWB Files</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="visualization/visualize_2p_raw.html">Visualizing Raw 2-Photon Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="visualization/visualize_neuropixel_probes.html">Visualizing Neuropixel Probe Locations</a></li>
<li class="toctree-l1"><a class="reference internal" href="visualization/visualize_unit_metrics.html">Visualizing Unit Quality Metrics</a></li>
<li class="toctree-l1"><a class="reference internal" href="visualization/visualize_lfp_responses.html">Visualizing LFP Responses to Stimulus</a></li>
<li class="toctree-l1"><a class="reference internal" href="visualization/visualize_lfp_responses.html">Visualizing LFP Responses to Stimuli</a></li>
<li class="toctree-l1"><a class="reference internal" href="visualization/visualize_unit_responses.html">Visualizing Neuronal Unit Responses</a></li>
<li class="toctree-l1"><a class="reference internal" href="visualization/visualize_2p_responses.html">Visualizing 2P Responses to Stimulus</a></li>
<li class="toctree-l1"><a class="reference internal" href="visualization/visualize_unit_spikes.html">Visualizing Neuronal Unit Spikes</a></li>
Expand All @@ -214,22 +214,21 @@
<li class="toctree-l1"><a class="reference internal" href="first-order/current_source_density.html">Current Source Density Analysis</a></li>
<li class="toctree-l1"><a class="reference internal" href="first-order/classify_waveforms.html">Classifying Fast-Spiking and Regular-Spiking Neurons</a></li>
<li class="toctree-l1"><a class="reference internal" href="first-order/test_2p_responses.html">Statistically Testing 2P Responses to Stimulus</a></li>
<li class="toctree-l1"><a class="reference internal" href="first-order/test_unit_spikes.html">Statistically Testing Spike Responses to Stimulus</a></li>
<li class="toctree-l1"><a class="reference internal" href="first-order/suite2p.html">Identifying Regions of Interest with Segmentation</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Higher-Order Analysis</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="higher-order/glm.html">Generalized Linear Models</a></li>
<li class="toctree-l1"><a class="reference internal" href="higher-order/tca.html">Tensor Decomposition of Spiking Activity Through Trials</a></li>
<li class="toctree-l1"><a class="reference internal" href="higher-order/cebra_time.html">Using CEBRA-Time to Identify Latent Embeddings</a></li>
<li class="toctree-l1"><a class="reference internal" href="higher-order/tca.html">Tensor Decomposition of Spiking Activity Through Trials</a></li>
<li class="toctree-l1"><a class="reference internal" href="higher-order/behavioral_state.html">Behavioral state from trial outcomes</a></li>

</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Openscope Experimental Projects</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="projects/cred_assign_figures.html">Replicating OpenScope Credit Assignment project figures</a></li>
<li class="toctree-l1"><a class="reference internal" href="projects/glo.html">OpenScope’s Global/Local Oddball Dataset</a></li>
<li class="toctree-l1"><a class="reference internal" href="projects/illusion.html">OpenScope’s Illusion Dataset</a></li>
<li class="toctree-l1"><a class="reference internal" href="projects/dendritic_coupling.html">OpenScope’s Dendritic Coupling Dataset</a></li>
<li class="toctree-l1"><a class="reference internal" href="projects/vippo.html">OpenScope’s Vision2Hippocampus Dataset</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Embargoed Datasets</span></p>
<ul class="nav bd-sidenav">
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed _images/cebra_pipeline.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
10 changes: 5 additions & 5 deletions _sources/basics/background.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[Apply Here!](https://alleninstitute.org/division/neural-dynamics/openscope/)

### DANDI
At the Allen Institute, we frequently 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 and acts as a centralized repository where researchers can deposit data. While some of these notebooks use pre-loaded data from DANDI, the ultimate purpose of this Databook is to teach users to take any dataset off DANDI and reproduce the analysis within these notebooks.
At the Allen Institute, we frequently utilize a platform called [DANDI](https://dandiarchive.org/) (Distributed Archives for Neurophysiology Data Integration). DANDI is a platform that allows open-source data sharing and archiving and acts as a centralized repository where researchers can deposit data. While some of these notebooks use pre-loaded data from DANDI, the ultimate purpose of this Databook is to teach users to take any dataset off DANDI and reproduce the analysis within these notebooks.

At the beginning of each notebook, we need to download the data that we will be analyzing. Our data is stored in NWB files (explained below), and the NWB files for a given experiment are contained in datasets called dandisets which are available for download from the [DANDI Archive](https://dandiarchive.org/). First, we identify what dandiset we want to access, and from there we identify the filepath for the specific NWB file we want to download. While these notebooks provide most of the steps to download and access an NWB file, here are instruction for accessing a particular filepath for any file stored on DANDI:

Expand All @@ -18,19 +18,19 @@ At the beginning of each notebook, we need to download the data that we will be
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`.

### NWB FILES
Throughout these notebooks, we analyze data that is stored in NWB (Neurodata Without Borders) files. NWB files utilize a standardized format for storing and sharing optical data, behavioral data, and 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. During analysis within these notebooks, we often need to access data within different parts of an NWB file. To explore the specifications of NWB format or to clarify the documentation used within NWB files, you can explore the [NWB Format Specification](https://nwb-schema.readthedocs.io/en/latest/) website. This is a helpful resource to understand how to access different parts of an NWB file that may not be provided in examples within our notebooks.
Throughout these notebooks, we analyze data that is stored in NWB (Neurodata Without Borders) files. NWB files utilize a standardized format for storing and sharing optical data, behavioral data, and 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. During analysis within these notebooks, we often need to access data within different parts of an NWB file. To explore the specifications of the NWB format or to clarify the documentation used within NWB files, you can explore the [NWB Format Specification](https://nwb-schema.readthedocs.io/en/latest/) website. This is a helpful resource to understand how to access different parts of an NWB file that may not be provided in examples within our notebooks.

In order to do basic reading of NWB files we utilize [PyNWB](https://github.com/NeurodataWithoutBorders/pynwb), which is a Python package that allows users to read, write, and manipulate NWB files. We explain how to utilize PyNWB and how to explore NWB files in our [Reading an NWB file](./read_nwb.ipynb) notebook. In addition to viewing raw data, it is also useful to graphically visualize data that is stored in NWB files. In our notebooks, we do so by utilizing [NWBWidgets](https://github.com/NeurodataWithoutBorders/nwbwidgets), which is an interactive package that can be used in Jupyter notebooks to easily visualize data. Some examples of what this package can do is display time series data, spatial data, and spike trains. To visualize data from NWB files using methods that don't require Jupyter, you can utilize [HDFView](https://www.hdfgroup.org/downloads/hdfview/), a graphical user interface tool. To explore how to use these methods to visualize data from NWB files, please reference our [Explore an NWB file](./use_newwidgets.ipynb) notebook.
In order to do basic reading of NWB files we utilize [PyNWB](https://github.com/NeurodataWithoutBorders/pynwb), which is a Python package that allows users to read, write, and manipulate NWB files. We explain how to utilize PyNWB and how to explore NWB files in our [Reading an NWB file](./read_nwb.ipynb) notebook. In addition to viewing raw data, it is also useful to graphically visualize data that is stored in NWB files. In our notebooks, we do so by utilizing [NWBWidgets](https://github.com/NeurodataWithoutBorders/nwbwidgets), which is an interactive package that can be used in Jupyter notebooks to easily visualize data. Some examples of what this package can do is display time series data, spatial data, and spike trains. To visualize data from NWB files using methods that don't require Jupyter, you can utilize [HDFView](https://www.hdfgroup.org/downloads/hdfview/), a graphical user interface tool. To explore how to use these methods to visualize data from NWB files, please reference our [Explore an NWB file](./use_nwbwidgets.ipynb) notebook.


### Understanding Data Collection Techniques
In this Databook, we will be analyzing data from two different types of experimental techniques: two-photon calcium imaging (ophys) and extracellular electrophysiology (ecephys).

Two-photon calcium imaging utilizes a fluorescence indicator that emits fluorescence when bound to calcium ions. The intensity of fluorescence is proportional to the concentration of calcium, and this allows us to measure and visualize neural activity at the cellular level. A specialized microscope detects the fluorescence and the data is converted to a visual image. The Allen Institute uses the [Suite2P](https://github.com/MouseLand/suite2p) algorithm to identify regions of interest, ROIs, from the images that are putative neurons, and each neuron's activity can be studied over the duration of an experiment.

Extracellular electrophysiology is a technique that analyzes the electrical activity of neurons in the brain. At the Allen Institute, we use Neuropixel probes which are inserted into the brain and record the local electrical activity of neurons in a specific location. The probe is only 10mm long and 70 microns wide, but has hundreds of channels that run along its length. Each channel can record electrical activity from a singular neuron or a group of neurons in the form of action potential (spikes) or local field potentials (LFPs).
Extracellular electrophysiology is a technique that analyzes the electrical activity of neurons in the brain. At the Allen Institute, we use Neuropixel probes which are inserted into the brain and record the local electrical activity of neurons in a specific location. The probe is only 10mm long and 70 microns wide, but has hundreds of channels that run along its length. Each channel can record electrical activity from a singular neuron or a group of neurons in the form of action potentials (spikes) or local field potentials (LFPs).

Ultimately, both experimental techniques are used to collect information about neuronal activity in the brain, but the way the data is analyzed for each technique is different. We provide notebooks that explain the analysis for both ophys and ecephys. The first notebook that discusses ophys analysis is [Visualizing Raw 2-Photon Images](./visualize_2p_raw.ipynb) and the first notebook that discusses ecephys analysis is [Visualizing LFP responses to Stimulus](visualize_lfp_responses.ipynb).
Ultimately, both experimental techniques are used to collect information about neuronal activity in the brain, but the way the data is analyzed for each technique is different. We provide notebooks that explain the analysis for both ophys and ecephys. The first notebook that discusses ophys analysis is [Visualizing Raw 2-Photon Images](../visualization/visualize_2p_raw.ipynb) and the first notebook that discusses ecephys analysis is [Visualizing LFP responses to Stimuli](../visualization/visualize_lfp_responses.ipynb).

**Resources for Ophys:**
1) [In vivo two photon calcium imaging of neuronal networks](https://www.pnas.org/doi/epdf/10.1073/pnas.1232232100) is a paper that can provide an introduction to two-photon calcium imaging techniques
Expand Down
12 changes: 4 additions & 8 deletions _sources/basics/download_nwb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
"metadata": {},
"outputs": [],
"source": [
"import warnings\n",
"warnings.filterwarnings('ignore')\n",
"\n",
"try:\n",
" from databook_utils.dandi_utils import dandi_stream_open\n",
"except:\n",
Expand Down Expand Up @@ -71,13 +74,6 @@
"id": "a309c067",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"A newer version (0.55.1) of dandi/dandi-cli is available. You are using 0.46.6\n"
]
},
{
"name": "stdout",
"output_type": "stream",
Expand Down Expand Up @@ -199,7 +195,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.10"
"version": "3.10.8"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 21e0065

Please sign in to comment.