Skip to content
This repository was archived by the owner on Dec 8, 2023. It is now read-only.

trialized and localization notebooks #54

Merged
merged 20 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ A complete electrophysiology workflow can be built using the DataJoint Elements.
+ [element-animal](https://github.com/datajoint/element-animal)
+ [element-session](https://github.com/datajoint/element-session)
+ [element-array-ephys](https://github.com/datajoint/element-array-ephys)
+ Optionally, [element-event](https://github.com/datajoint/element-event)

This repository provides demonstrations for:
1. Set up a workflow using DataJoint Elements (see
Expand All @@ -17,11 +18,12 @@ This repository provides demonstrations for:
convention, and directory lookup methods (see
[workflow_array_ephys/paths.py](workflow_array_ephys/paths.py)).
3. Ingestion of clustering results.
4. Ingestion of experimental condition information and downstream [PSTH analysis](https://www.sciencedirect.com/topics/neuroscience/peristimulus-time-histogram).

## Workflow architecture

The electrophysiology workflow presented here uses components from 4 DataJoint
Elements (`element-lab`, `element-animal`, `element-session`,
The electrophysiology workflow presented here uses components from 5 DataJoint
Elements (`element-lab`, `element-animal`, `element-session`, `element-event`,
`element-array-ephys`) assembled together to form a fully functional workflow.

### element-lab
Expand All @@ -34,9 +36,17 @@ https://github.com/datajoint/element-lab/raw/main/images/lab_diagram.svg)
![element-animal](
https://github.com/datajoint/element-animal/raw/main/images/subject_diagram.svg)

### assembled with element-array-ephys
### Assembled with element-array-ephys

![element-array-ephys](images/attached_array_ephys_element.svg)
![attached-element-array-ephys](images/attached_array_ephys_element.svg)

### Assembled with element-event and workflow analysis

![attached-trial-analysis](./images/attached_trial_analysis.svg)

## Assembled with element-electrode-localization

![attached-electrode-localization](./images/attached_electrode_localization.svg)

## Installation instructions

Expand All @@ -45,7 +55,8 @@ https://github.com/datajoint/element-animal/raw/main/images/subject_diagram.svg)

## Interacting with the DataJoint workflow

+ Please refer to the following workflow-specific
[Jupyter notebooks](/notebooks) for an in-depth explanation of how to run the
workflow ([03-process.ipynb](notebooks/03-process.ipynb)) and explore the data
([05-explore.ipynb](notebooks/05-explore.ipynb)).
Please refer to the following workflow-specific
[Jupyter notebooks](/notebooks) for an in-depth explanation of how to ...
+ run the workflow ([03-process.ipynb](notebooks/03-process.ipynb))
+ explore the data ([05-explore.ipynb](notebooks/05-explore.ipynb))
+ visualize trial-based analyses ([07-downstream-analysis.ipynb](notebooks/07-downstream-analysis.ipynb))
2 changes: 2 additions & 0 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ COPY --chown=anaconda:anaconda ./element-lab /main/element-lab
COPY --chown=anaconda:anaconda ./element-animal /main/element-animal
COPY --chown=anaconda:anaconda ./element-session /main/element-session
COPY --chown=anaconda:anaconda ./element-trial /main/element-trial
COPY --chown=anaconda:anaconda ./element-electrode-localization /main/element-electrode-localization
COPY --chown=anaconda:anaconda ./element-array-ephys /main/element-array-ephys
COPY --chown=anaconda:anaconda ./workflow-array-ephys /main/workflow-array-ephys

Expand All @@ -25,6 +26,7 @@ RUN pip install -e /main/element-lab
RUN pip install -e /main/element-animal
RUN pip install -e /main/element-session
RUN pip install -e /main/element-trial
RUN pip install -e /main/element-electrode-localization
RUN pip install -e /main/element-array-ephys
RUN pip install -e /main/workflow-array-ephys
RUN pip install -r /main/workflow-array-ephys/requirements_test.txt
Expand Down
19 changes: 13 additions & 6 deletions docker/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,34 @@ WORKDIR /main/workflow-array-ephys
# RUN pip install git+https://github.com/<user>element-lab.git
# RUN pip install git+https://github.com/<user>/element-animal.git
# RUN pip install git+https://github.com/<user>/element-session.git
# RUN pip install git+https://github.com/<user>/element-trial.git
# RUN pip install git+https://github.com/<user>/element-electrode-localization.git
# RUN pip install git+https://github.com/<user>/element-array-ephys.git
# RUN git clone https://github.com/<user>/workflow-array-ephys.git /main/workflow-array-ephys

# Option 3 - Install user's local fork of element and workflow
RUN mkdir /main/element-lab \
/main/element-animal \
/main/element-session \
/main/element-array-ephys \
/main/workflow-array-ephys
RUN mkdir -p /main/element-lab \
/main/element-animal \
/main/element-session \
/main/element-trial \
/main/element-array-ephys \
/main/workflow-array-ephys

COPY --chown=anaconda:anaconda ./element-lab /main/element-lab
COPY --chown=anaconda:anaconda ./element-animal /main/element-animal
COPY --chown=anaconda:anaconda ./element-session /main/element-session
COPY --chown=anaconda:anaconda ./element-trial /main/element-trial
COPY --chown=anaconda:anaconda ./element-electrode-localization /main/element-electrode-localization
COPY --chown=anaconda:anaconda ./element-array-ephys /main/element-array-ephys
COPY --chown=anaconda:anaconda ./workflow-array-ephys /main/workflow-array-ephys

RUN pip install -e /main/element-lab
RUN pip install -e /main/element-animal
RUN pip install -e /main/element-session
RUN pip install -e /main/element-trial
RUN pip install -e /main/element-electrode-localization
RUN pip install -e /main/element-array-ephys
RUN rm -f /main/workflow-array-ephys/dj_local_conf.json
# RUN rm -f /main/workflow-array-ephys/dj_local_conf.json

# Install the workflow
RUN pip install /main/workflow-array-ephys
Expand Down
9 changes: 6 additions & 3 deletions docker/docker-compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ x-net: &net
networks:
- main
services:
array-ephys-dev-db:
db:
<<: *net
image: datajoint/mysql:5.7
container_name: workflow-array-ephys-dev-db
environment:
- MYSQL_ROOT_PASSWORD=simple
array-ephys-dev-workflow:
workflow:
<<: *net
build:
context: ../../
dockerfile: ./workflow-array-ephys/docker/Dockerfile.dev
env_file: .env
image: workflow_array_ephys_dev:0.1.0a4
image: workflow-array-ephys-dev:0.1.0a4
container_name: workflow-array-ephys-dev
environment:
- EPHYS_ROOT_DATA_DIR=/main/test_data/workflow_ephys_data1/,/main/test_data/workflow_ephys_data2/
volumes:
Expand All @@ -27,6 +29,7 @@ services:
- ../../element-animal:/main/element-animal
- ../../element-session:/main/element-session
- ../../element-trial:/main/element-trial
- ../../element-electrode-localization:/main/element-electrode-localization
- ../../element-array-ephys:/main/element-array-ephys
- ..:/main/workflow-array-ephys
depends_on:
Expand Down
12 changes: 8 additions & 4 deletions docker/docker-compose-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,25 @@ x-net: &net
networks:
- main
services:
array-ephys-test-db:
db:
<<: *net
image: datajoint/mysql:5.7
container_name: workflow-array-ephys-test-db
environment:
- MYSQL_ROOT_PASSWORD=simple
array-ephys-test-workflow:
workflow:
<<: *net
build:
context: ../../
dockerfile: ./workflow-array-ephys/docker/Dockerfile.test
env_file: .env
image: workflow_array_ephys_test:0.1.0a4
image: workflow-array-ephys-test:0.1.0a4
container_name: workflow-array-ephys-test
environment:
- DJ_HOST=db
- DJ_USER=root
- DJ_PASS=simple
- EPHYS_MODE=no-curation
- EPHYS_ROOT_DATA_DIR=/main/test_data/workflow_ephys_data1/,/main/test_data/workflow_ephys_data2/
- DATABASE_PREFIX=test_
command:
Expand All @@ -40,11 +43,12 @@ services:
- ../../element-lab:/main/element-lab
- ../../element-animal:/main/element-animal
- ../../element-session:/main/element-session
- ../../element-electrode-localization:/main/element-electrode-localization
- ../../element-trial:/main/element-trial
- ../../element-array-ephys:/main/element-array-ephys
- ..:/main/workflow-array-ephys
depends_on:
array-ephys-test-db:
db:
condition: service_healthy
networks:
main:
25 changes: 25 additions & 0 deletions images/attached_electrode_localization.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading