Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into main
  • Loading branch information
kabilar committed Mar 8, 2022
2 parents 4335f47 + 7df79d6 commit 131892c
Show file tree
Hide file tree
Showing 16 changed files with 314 additions and 156 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ ENV/
.mypy_cache/

# datajoint
dj_local_conf.json
dj_local_conf_old.json
dj_local_con*.json

# emacs
**/*~
Expand All @@ -122,3 +121,6 @@ Diagram.ipynb

# vscode
.vscode/settings.json

# notes
temp*
4 changes: 2 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN pip install -e /main/element-session
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

WORKDIR /main/workflow-array-ephys

ENTRYPOINT ["tail", "-f", "/dev/null"]
ENTRYPOINT ["tail", "-f", "/dev/null"]
26 changes: 19 additions & 7 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,32 @@ RUN /entrypoint.sh echo "Installed dependencies."
WORKDIR /main/workflow-array-ephys

# Option 1 - Install DataJoint's remote fork of the workflow and elements
RUN git clone https://github.com/datajoint/workflow-array-ephys.git /main/workflow-array-ephys
# RUN git clone https://github.com/datajoint/workflow-array-ephys.git /main/

# Option 2 - Install user's remote fork of element and workflow
# Option 2 - Install user's remote fork of element and workflow
# or an unreleased version of the element
# 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-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-array-ephys
# COPY --chown=anaconda:anaconda ./element-array-ephys /main/element-array-ephys
# RUN pip install /main/element-array-ephys
# COPY --chown=anaconda:anaconda ./workflow-array-ephys /main/workflow-array-ephys
RUN mkdir /main/element-lab
COPY --chown=anaconda:anaconda ./element-lab /main/element-lab
RUN pip install -e /main/element-lab
RUN mkdir /main/element-animal
COPY --chown=anaconda:anaconda ./element-animal /main/element-animal
RUN pip install -e /main/element-animal
RUN mkdir /main/element-session
COPY --chown=anaconda:anaconda ./element-session /main/element-session
RUN pip install -e /main/element-session
RUN mkdir /main/element-array-ephys
COPY --chown=anaconda:anaconda ./element-array-ephys /main/element-array-ephys
RUN pip install -e /main/element-array-ephys
COPY --chown=anaconda:anaconda ./workflow-array-ephys /main/workflow-array-ephys
# RUN rm -f /main/workflow-array-ephys/dj_local_conf.json

# Install the workflow
RUN pip install /main/workflow-array-ephys
RUN pip install -r /main/workflow-array-ephys/requirements_test.txt
RUN pip install -r /main/workflow-array-ephys/requirements_test.txt
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# DataJoint Workflow - Array Electrophysiology

Workflow for extracellular array electrophysiology data acquired with a polytrode probe (e.g.
Neuropixels, Neuralynx) using the `SpikeGLX` or `OpenEphys` acquisition software and processed
Workflow for extracellular array electrophysiology data acquired with a polytrode probe (e.g.
Neuropixels, Neuralynx) using the `SpikeGLX` or `OpenEphys` acquisition software and processed
with MATLAB- or python-based `Kilosort` spike sorting software.

A complete electrophysiology workflow can be built using the DataJoint Elements.
Expand All @@ -11,17 +11,17 @@ A complete electrophysiology workflow can be built using the DataJoint Elements.
+ [element-array-ephys](https://github.com/datajoint/element-array-ephys)

This repository provides demonstrations for:
1. Set up a workflow using DataJoint Elements (see
1. Set up a workflow using DataJoint Elements (see
[workflow_array_ephys/pipeline.py](workflow_array_ephys/pipeline.py))
2. Ingestion of data/metadata based on a predefined file structure, file naming
convention, and directory lookup methods (see
2. Ingestion of data/metadata based on a predefined file structure, file naming
convention, and directory lookup methods (see
[workflow_array_ephys/paths.py](workflow_array_ephys/paths.py)).
3. Ingestion of clustering results.

## Workflow architecture

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

### element-lab
Expand All @@ -40,12 +40,12 @@ https://github.com/datajoint/element-animal/blob/main/images/subject_diagram.svg

## Installation instructions

+ The installation instructions can be found at [datajoint-elements/install.md](
https://github.com/datajoint/datajoint-elements/blob/main/install.md).
+ The installation instructions can be found at the
[datajoint-elements repository](https://github.com/datajoint/datajoint-elements/blob/main/gh-pages/docs/install.md).

## 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)).
[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)).
2 changes: 1 addition & 1 deletion docker-compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ services:
db:
condition: service_healthy
networks:
main:
main:
14 changes: 11 additions & 3 deletions docker-compose-test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# export COMPOSE_DOCKER_CLI_BUILD=0 # some machines need for smooth --build
# .env file: TEST_DATA_DIR=<local parent directory of workflow_ephys_data{1,2}>
# docker-compose -f docker-compose-test.yaml up --build
# docker exec -it workflow-array-ephys_workflow_1 /bin/bash
# docker-compose -f docker-compose-test.yaml down

version: "2.4"
Expand All @@ -22,20 +25,25 @@ services:
- DJ_HOST=db
- DJ_USER=root
- DJ_PASS=simple
- EPHYS_ROOT_DATA_DIR=/main/test_data
- EPHYS_ROOT_DATA_DIR=/main/test_data/workflow_ephys_data1/,/main/test_data/workflow_ephys_data2/
- DATABASE_PREFIX=test_
command:
- bash
- -c
- |
echo "------ INTEGRATION TESTS ------"
pytest -sv --cov-report term-missing --cov=workflow-array-ephys -p no:warnings
pytest -sv --cov-report term-missing --cov=workflow_array_ephys -p no:warnings tests/
tail -f /dev/null
volumes:
- ${TEST_DATA_DIR}:/main/test_data
- ./apt_requirements.txt:/tmp/apt_requirements.txt
- ../element-lab:/main/element-lab
- ../element-animal:/main/element-animal
- ../element-session:/main/element-session
- ../element-array-ephys:/main/element-array-ephys
- .:/main/workflow-array-ephys
depends_on:
db:
condition: service_healthy
networks:
main:
main:
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
datajoint>=0.13.0
element-array-ephys==0.1.0b0
element-lab==0.1.0b0
element-lab>=0.1.0b0
element-animal==0.1.0b0
element-session==0.1.0b0
element-interface @ git+https://github.com/datajoint/element-interface.git
ipykernel==6.0.1
ipykernel==6.0.1
Loading

0 comments on commit 131892c

Please sign in to comment.