Skip to content

Commit 55f7717

Browse files
author
Thinh Nguyen
committed
moved from canonical-ephys
1 parent 0896c85 commit 55f7717

17 files changed

+1740
-2
lines changed

.gitignore

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
.idea/
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.coverage
43+
.coverage.*
44+
.cache
45+
nosetests.xml
46+
coverage.xml
47+
*.cover
48+
.hypothesis/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
58+
# Flask stuff:
59+
instance/
60+
.webassets-cache
61+
62+
# Scrapy stuff:
63+
.scrapy
64+
scratchpaper.*
65+
66+
# Sphinx documentation
67+
docs/_build/
68+
69+
# PyBuilder
70+
target/
71+
72+
# Jupyter Notebook
73+
.ipynb_checkpoints
74+
75+
# pyenv
76+
.python-version
77+
78+
# celery beat schedule file
79+
celerybeat-schedule
80+
81+
# SageMath parsed files
82+
*.sage.py
83+
84+
# dotenv
85+
./.env
86+
87+
# virtualenv
88+
.venv
89+
venv/
90+
ENV/
91+
92+
# Spyder project settings
93+
.spyderproject
94+
.spyproject
95+
96+
# Rope project settings
97+
.ropeproject
98+
99+
# mkdocs documentation
100+
/site
101+
102+
# mypy
103+
.mypy_cache/
104+
105+
# datajoint
106+
dj_local_conf.json
107+
dj_local_conf_old.json
108+
109+
# emacs
110+
**/*~
111+
**/#*#
112+
**/.#*
113+
docker-compose.yml

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Vathes LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,55 @@
1-
# elements-ephys
2-
DataJoint Elements for Extracellular Electrophysiology - U24 effort
1+
# DataJoint Element - Canonical Electrophysiology
2+
DataJoint Element for electrophysiology.
3+
This repository features DataJoint pipeline design for extracellular electrophysiology,
4+
with ***Neuropixels*** probe and ***kilosort*** spike sorting method.
5+
6+
The pipeline presented here is not a complete pipeline by itself, but rather a modular
7+
design of tables and dependencies specific to the extracellular electrophysiology workflow.
8+
9+
This modular pipeline element can be flexibly attached downstream
10+
to any particular design of experiment session, thus assembling a fully functional
11+
ephys pipeline.
12+
13+
## The Pipeline Architecture
14+
15+
![ephys pipeline diagram](images/attached_ephys_element.png)
16+
17+
As the diagram depicts, the ephys element starts immediately downstream from ***Session***,
18+
and also requires some notion of ***Location*** as a dependency for ***InsertionLocation***.
19+
20+
### The design of probe
21+
22+
+ ***ProbeType*** - a lookup table specifying the type of Neuropixels probe (e.g. "neuropixels 1.0", "neuropixels 2.0 single-shank")
23+
+ ***ProbeType.Electrode*** - all electrode and their properties for a particular probe type
24+
+ 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)
25+
+ ***Probe*** - record of an actual physical probe, identifiable by some unique ID (e.g. probe's serial number)
26+
+ ***ElectrodeConfig*** - particular electrode configuration to be used for ephys recording
27+
+ ***ElectrodeConfig.Electrode*** - corresponding electrodes in ***ProbeType.Electrode*** that are used for recording in this electrode configuration
28+
(e.g. for Neuropixels 1.0 or 2.0, there can be at most 384 electrodes usable for recording per probe)
29+
30+
### Extracellular ephys recording
31+
32+
+ ***ProbeInsertion*** - a surgical insertion of a probe onto the animal.
33+
Every experimental session consists of one or more ***ProbeInsertion***, with corresponding ***InsertionLocation***
34+
+ ***EphysRecording*** - each ***ProbeInsertion*** is accompanied by a corresponding ***EphysRecording***,
35+
specifying the ***ElectrodeConfig*** used for the recording from the ***Probe*** defined in such ***ProbeInsertion***
36+
+ ***get_npx_data_dir*** method - the class ***EphysRecording*** requires user
37+
to supply a method to retrieve the directory containing the recorded neuropixels data (e.g. `*.ap.meta`, `*.ap.bin`, etc.),
38+
where the method's input arguments are the primary attributes identifying one ***EphysRecording***
39+
40+
### Clusters and spikes
41+
42+
This ephys element features automatic ingestion for spike sorting results from the ***kilosort*** method.
43+
44+
+ ***Clustering*** - specify instance(s) of clustering on an ***EphysRecording***, by some ***ClusteringMethod***
45+
+ ***get_ks_data_dir*** method - the class ***Clustering*** requires user
46+
to supply a method to retrieve the directory containing the kilosort results,
47+
where the method's input arguments are the primary attributes identifying one ***Clustering***
48+
+ ***Unit*** - Identified unit(s) from one ***Clustering***, with associated ***ClusterQualityLabel***
49+
+ ***UnitSpikeTimes*** - spike times per unit
50+
+ ***Waveform*** - mean waveform across spikes per unit per recording electrode
51+
52+
53+
## Usage
54+
55+
See [this project](https://github.com/vathes/canonical-full-ephys-pipeline) for an example usage of this ephys pipeline element.

djephys/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .ephys import schema as ephys

0 commit comments

Comments
 (0)