Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into main
  • Loading branch information
kabilar committed Aug 18, 2021
2 parents 1ce53f3 + 7c67f65 commit 6472c19
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 340 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ jobs:
needs: build
runs-on: ubuntu-latest
env:
TWINE_USERNAME: ${{secrets.twine_test_username}}
TWINE_PASSWORD: ${{secrets.twine_test_password}}
TWINE_USERNAME: ${{secrets.twine_username}}
TWINE_PASSWORD: ${{secrets.twine_password}}
outputs:
release_upload_url: ${{steps.create_gh_release.outputs.upload_url}}
steps:
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
docker load < "image-${{env.PKG_NAME}}-${PKG_VERSION}-py3.8-alpine.tar.gz"
docker-compose -f docker-compose-build.yaml run \
-e TWINE_USERNAME=${TWINE_USERNAME} -e TWINE_PASSWORD=${TWINE_PASSWORD} element \
sh -lc "pip install twine && python -m twine upload --repository testpypi dist/*"
sh -lc "pip install twine && python -m twine upload dist/*"
- name: Determine pip artifact paths
run: |
echo "PKG_WHEEL_PATH=$(ls dist/${PKG_NAME}-*.whl)" >> $GITHUB_ENV
Expand Down
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@

Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.

## [0.1.0a3] - 2021-04-26

## [0.1.0b0] - 2021-05-07
### Added
+ First beta release


## [0.1.0a5] - 2021-05-05
### Added
+ Added GitHub Action release process
+ `probe` and `ephys` elements
+ Readers for: `SpikeGLX`, `Open Ephys`, `Kilosort`
+ Probe table supporting: Neuropixels probes 1.0 - 3A, 1.0 - 3B, 2.0 - SS, 2.0 - MS

[0.1.0a3]: https://github.com/datajoint/element-array-ephys/releases/tag/0.1.0a3

[0.1.0b0]: https://github.com/datajoint/element-array-ephys/compare/0.1.0a5...0.1.0b0
[0.1.0a5]: https://github.com/datajoint/element-array-ephys/releases/tag/0.1.0a5
56 changes: 40 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_array_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,56 @@ 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 in the brain. Every experimental session consists of one or more entries in ***ProbeInsertion*** with a corresponding ***InsertionLocation*** each
+ ***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 from a given CuratedClustering

## Installation
```
pip install element-array-ephys
```

If you already have an older version of ***element-array-ephys*** installed using `pip`, upgrade with
```
pip install --upgrade element-array-ephys
```

## 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.
2 changes: 1 addition & 1 deletion element_array_ephys/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Package metadata."""
__version__ = '0.1.0a3'
__version__ = '0.1.0b0'
3 changes: 3 additions & 0 deletions images/attached_array_ephys_element.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/attached_ephys_element.png
Binary file not shown.
3 changes: 0 additions & 3 deletions images/attached_ephys_element.svg

This file was deleted.

Loading

0 comments on commit 6472c19

Please sign in to comment.