Skip to content

Commit

Permalink
update README, improve markdown formatting, specify `long_description…
Browse files Browse the repository at this point in the history
…_content_type` to markdown
  • Loading branch information
Thinh Nguyen committed Apr 27, 2021
1 parent f05e1fe commit 3c9662b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
47 changes: 31 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ See [Background](Background.md) for the background information and development t

## The Pipeline Architecture

![ephys pipeline diagram](images/attached_ephys_element.svg)
![element-array-ephys diagram](images/attached_ephys_element.svg)

As the diagram depicts, the array ephys element starts immediately downstream from ***Session***,
and also requires some notion of ***Location*** as a dependency for ***InsertionLocation***.
Expand All @@ -27,32 +27,47 @@ and also requires some notion of ***Location*** as a dependency for ***Insertion
+ An electrode here refers to one recordable electrode site on the Neuropixels probe (e.g. for Neuropixels 1.0, there are 960 sites per shank)
+ ***Probe*** - record of an actual physical probe, identifiable by some unique ID (e.g. probe's serial number)
+ ***ElectrodeConfig*** - particular electrode configuration to be used for ephys recording
+ ***ElectrodeConfig.Electrode*** - corresponding electrodes in ***ProbeType.Electrode*** that are used for recording in this electrode configuration
(e.g. for Neuropixels 1.0 or 2.0, there can be at most 384 electrodes usable for recording per probe)
+ ***ElectrodeConfig.Electrode*** - corresponding electrodes in ***ProbeType.Electrode*** that are used for recording in this electrode configuration (e.g. for Neuropixels 1.0 or 2.0, there can be at most 384 electrodes usable for recording per probe)

### Extracellular ephys recording

+ ***ProbeInsertion*** - a surgical insertion of a probe onto the animal.
Every experimental session consists of one or more ***ProbeInsertion***, with corresponding ***InsertionLocation***
+ ***EphysRecording*** - each ***ProbeInsertion*** is accompanied by a corresponding ***EphysRecording***,
specifying the ***ElectrodeConfig*** used for the recording from the ***Probe*** defined in such ***ProbeInsertion***
+ ***get_npx_data_dir*** method - the class ***EphysRecording*** requires user
to supply a method to retrieve the directory containing the recorded neuropixels data (e.g. `*.ap.meta`, `*.ap.bin`, etc.),
where the method's input arguments are the primary attributes identifying one ***EphysRecording***
+ ***ProbeInsertion*** - a surgical insertion of a probe onto the animal. Every experimental session consists of one or more ***ProbeInsertion***, with corresponding ***InsertionLocation***
+ ***EphysRecording*** - each ***ProbeInsertion*** is accompanied by a corresponding ***EphysRecording***, specifying the ***ElectrodeConfig*** used for the recording from the ***Probe*** defined in such ***ProbeInsertion***

### Clusters and spikes

This ephys element features automatic ingestion for spike sorting results from the ***kilosort*** method.

+ ***Clustering*** - specify instance(s) of clustering on an ***EphysRecording***, by some ***ClusteringMethod***
+ ***get_ks_data_dir*** method - the class ***Clustering*** requires user
to supply a method to retrieve the directory containing the kilosort results,
where the method's input arguments are the primary attributes identifying one ***Clustering***
+ ***Unit*** - Identified unit(s) from one ***Clustering***, with associated ***ClusterQualityLabel***
+ ***UnitSpikeTimes*** - spike times per unit
+ ***Waveform*** - mean waveform across spikes per unit per recording electrode
+ ***Curation*** - specify instance(s) of curations performed on the output of a given ***Clustering***
+ ***CuratedClustering*** - set of results from a particular round of clustering/curation
+ ***CuratedClustering.Unit*** - Identified unit(s) from one ***Curation***, and the associated properties (e.g. cluster quality, spike times, spike depths, etc.)
+ ***WaveformSet*** - A set of spike waveforms for units out of a given CuratedClustering


## Usage

### Element activation

To activate the `element-array-ephys`, ones need to provide:

1. Schema names
+ schema name for the probe module
+ schema name for the ephys module

2. Upstream tables
+ Session table
+ SkullReference table (Reference table for InsertionLocation, specifying the skull reference)

3. Utility functions
+ get_ephys_root_data_dir()
+ get_session_directory()

For more detail, check the docstring of the `element-array-ephys`:

help(probe.activate)
help(ephys.activate)

### Example usage

See [this project](https://github.com/datajoint/workflow-array-ephys) for an example usage of this Array Electrophysiology Element.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
version=__version__,
description="DataJoint Element for Extracellular Array Electrophysiology",
long_description=long_description,
long_description_content_type='text/markdown',
author='DataJoint NEURO',
author_email='[email protected]',
license='MIT',
Expand Down

0 comments on commit 3c9662b

Please sign in to comment.