Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

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.0] - 2021-05-04
### Added
+ Added version
34 changes: 26 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ convention, and directory lookup methods (see
[workflow_miniscope/ingest.py](workflow_miniscope/ingest.py))
3. Processing results.

See the [Element Miniscope documentation](https://elements.datajoint.org/description/miniscope/) for the background information and development timeline.
See the
[Element Miniscope documentation](https://elements.datajoint.org/description/miniscope/)
for the background information and development timeline.

For more information on the DataJoint Elements project, please visit https://elements.datajoint.org. This work is supported by the National Institutes of Health.
For more information on the DataJoint Elements project, please visit
https://elements.datajoint.org. This work is supported by the National Institutes of
Health.

## Workflow architecture

Expand All @@ -41,21 +45,35 @@ DataJoint Elements ([element-lab](https://github.com/datajoint/element-lab),

## Interacting with the DataJoint workflow

+ Our [YouTube tutorial](https://www.youtube.com/watch?v=nWUcPFZOSVw) walks through all
the key details of this 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)).


## Citation

+ If your work uses DataJoint and DataJoint Elements, please cite the respective Research Resource Identifiers (RRIDs) and manuscripts.
+ If your work uses DataJoint and DataJoint Elements, please cite the respective
Research Resource Identifiers (RRIDs) and manuscripts.

+ DataJoint for Python or MATLAB
+ Yatsenko D, Reimer J, Ecker AS, Walker EY, Sinz F, Berens P, Hoenselaar A, Cotton RJ, Siapas AS, Tolias AS. DataJoint: managing big scientific data using MATLAB or Python. bioRxiv. 2015 Jan 1:031658. doi: https://doi.org/10.1101/031658
+ Yatsenko D, Reimer J, Ecker AS, Walker EY, Sinz F, Berens P, Hoenselaar A, Cotton
RJ, Siapas AS, Tolias AS. DataJoint: managing big scientific data using MATLAB or
Python. bioRxiv. 2015 Jan 1:031658. doi: https://doi.org/10.1101/031658

+ DataJoint ([RRID:SCR_014543](https://scicrunch.org/resolver/SCR_014543)) - DataJoint for `<Select Python or MATLAB>` (version `<Enter version number>`)
+ DataJoint (
[RRID:SCR_014543](https://scicrunch.org/resolver/SCR_014543)) - DataJoint for `<Select Python or MATLAB>` (version
`<Enter version number>`)

+ DataJoint Elements
+ Yatsenko D, Nguyen T, Shen S, Gunalan K, Turner CA, Guzman R, Sasaki M, Sitonic D, Reimer J, Walker EY, Tolias AS. DataJoint Elements: Data Workflows for Neurophysiology. bioRxiv. 2021 Jan 1. doi: https://doi.org/10.1101/2021.03.30.437358

+ DataJoint Elements ([RRID:SCR_021894](https://scicrunch.org/resolver/SCR_021894)) - Element Miniscope (version `<Enter version number>`)
+ Yatsenko D, Nguyen T, Shen S, Gunalan K, Turner CA, Guzman R, Sasaki M, Sitonic D,
Reimer J, Walker EY, Tolias AS. DataJoint Elements: Data Workflows for
Neurophysiology. bioRxiv. 2021 Jan 1. doi:
https://doi.org/10.1101/2021.03.30.437358

+ DataJoint Elements (
[RRID:SCR_021894](https://scicrunch.org/resolver/SCR_021894)) - Element Miniscope
(version `<Enter version number>`)
15 changes: 9 additions & 6 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@ RUN python caimanmanager.py install --inplace
WORKDIR /main

RUN mkdir /main/element-lab \
/main/element-animal \
/main/element-session \
/main/element-interface \
/main/element-miniscope \
/main/workflow-miniscope
/main/element-animal \
/main/element-session \
/main/element-event \
/main/element-interface \
/main/element-miniscope \
/main/workflow-miniscope

# Copy user's local fork of elements and workflow
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-event /main/element-event
COPY --chown=anaconda:anaconda ./element-interface /main/element-interface
COPY --chown=anaconda:anaconda ./element-miniscope /main/element-miniscope
COPY --chown=anaconda:anaconda ./workflow-miniscope /main/workflow-miniscope
Expand All @@ -34,11 +36,12 @@ COPY --chown=anaconda:anaconda ./workflow-miniscope /main/workflow-miniscope
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-event
RUN pip install -e /main/element-interface
RUN pip install -e /main/element-miniscope
RUN pip install -e /main/workflow-miniscope
RUN pip install -r /main/workflow-miniscope/requirements_test.txt

WORKDIR /main/workflow-miniscope

ENTRYPOINT ["tail", "-f", "/dev/null"]
ENTRYPOINT ["tail", "-f", "/dev/null"]
81 changes: 36 additions & 45 deletions docker/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,58 +1,49 @@
FROM datajoint/djbase:py3.9-debian-8eb1715

ARG GITHUB_USERNAME=cbroz1
USER anaconda:anaconda

COPY ./workflow-miniscope/docker/apt_requirements.txt /tmp/
COPY ./docker/apt_requirements.txt /tmp/
RUN /entrypoint.sh echo "Installed dependencies."

# Install CaImAn
RUN git clone --branch master https://github.com/kabilar/CaImAn
WORKDIR /main
RUN git clone --branch master https://github.com/kabilar/CaImAn
WORKDIR /main/CaImAn
RUN conda install -n base -c conda-forge -y mamba
RUN /bin/bash -c 'mamba env update --n base --file environment.yml'
RUN /bin/bash -c 'mamba env update --n base --file environment.yml'
RUN pip install .
RUN python caimanmanager.py install --inplace

WORKDIR /main

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

# 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 "element-interface@git+https://github.com/<user>/element-interface"
# RUN pip install git+https://github.com/<user>/element-miniscope.git
# RUN git clone https://github.com/<user>/workflow-miniscope.git /main/workflow-miniscope

# Option 3 - Install user's local fork of element and workflow
RUN mkdir /main/element-lab \
/main/element-animal \
/main/element-session \
/main/element-interface \
/main/element-miniscope \
/main/workflow-miniscope

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-interface /main/element-interface
COPY --chown=anaconda:anaconda ./element-miniscope /main/element-miniscope
COPY --chown=anaconda:anaconda ./workflow-miniscope /main/workflow-miniscope

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-interface
RUN pip install -e /main/element-miniscope
RUN rm -f /main/workflow-miniscope/dj_local_conf.json

# Install the workflow
RUN pip install /main/workflow-miniscope
RUN pip install -r /main/workflow-miniscope/requirements_test.txt

RUN pip uninstall datajoint
RUN pip install git+
WORKDIR /main/workflow-miniscope

# 1. Install Elements from github user
RUN pip install --no-deps "element-interface@git+https://github.com/${GITHUB_USERNAME}/element-interface"
RUN pip install --no-deps "djarchive-client@git+https://github.com/${GITHUB_USERNAME}/djarchive-client"
RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-lab.git
RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-animal.git
RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-session.git
RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-event.git
RUN pip install git+https://github.com/${GITHUB_USERNAME}/element-miniscope.git
# RUN pip install git+https://github.com/${GITHUB_USERNAME}/workflow-miniscope.git
# end 1

# 2. Install local fork of element and workflow
# COPY --chown=anaconda:anaconda ../element-lab /main/
# COPY --chown=anaconda:anaconda ../element-animal /main/
# COPY --chown=anaconda:anaconda ../element-session /main/
# COPY --chown=anaconda:anaconda ../element-event /main/
# COPY --chown=anaconda:anaconda ../element-interface /main/
# COPY --chown=anaconda:anaconda ../element-miniscope /main/
COPY --chown=anaconda:anaconda . ./
# 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-event
# RUN pip install -e /main/element-interface
# RUN pip install -e /main/element-miniscope
RUN pip install -e .
# end 2

RUN rm -f ./dj_local_conf.json
RUN pip install -r ./requirements_test.txt
2 changes: 1 addition & 1 deletion docker/apt_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ffmpeg
libsm6
libxext6
libhdf5-dev
pkg-config
pkg-config
67 changes: 45 additions & 22 deletions docker/docker-compose-test.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
# docker-compose -f ./docker/docker-compose-test.yaml up --build
# docker-compose -f ./docker/docker-compose-test.yaml down
# docker-compose -f ./docker/docker-compose-test.yaml up --build --force-recreate --detach
# docker-compose -f ./docker/docker-compose-test.yaml down --volumes

version: "2.4"
x-net: &net
networks:
- main

services:
db:
<<: *net
image: datajoint/mysql:5.7
container_name: workflow-miniscope-test-db
networks:
miniscope:
image: mysql:5-debian
platform: linux/amd64
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
- MYSQL_ROOT_PASSWORD=simple
MYSQL_ROOT_PASSWORD: simple
MYSQL_USER: datajoint
MYSQL_PASSWORD: datajoint
volumes:
- mysql-miniscope:/var/lib/mysql
container_name: workflow-miniscope-test-db

workflow:
<<: *net
networks:
miniscope:
build:
context: ../../
dockerfile: ./workflow-miniscope/docker/Dockerfile.test
env_file: .env
context: ../.
dockerfile: ./docker/Dockerfile.test
args:
- GITHUB_USERNAME=cbroz1
image: workflow-miniscope-test:0.1.0
container_name: workflow-miniscope-test
environment:
- DJ_HOST=db
- DJ_USER=root
- DJ_PASS=simple
- MINISCOPE_ROOT_DATA_DIR=/main/test_data
- MINISCOPE_ROOT_DATA_DIR=/main/test_data/
- DATABASE_PREFIX=test_
command:
- bash
Expand All @@ -35,15 +44,29 @@ services:
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-interface:/main/element-interface
- ../../element-miniscope:/main/element-miniscope
# - ./apt_requirements.txt:/tmp/apt_requirements.txt
# - ../element-lab:/main/element-lab
# - ../element-animal:/main/element-animal
# - ../element-session:/main/element-session
# - ../element-event:/main/element-event
# - ../element-interface:/main/element-interface
# - ../element-miniscope:/main/element-miniscope
- ..:/main/workflow-miniscope
depends_on:
db:
condition: service_healthy
condition: service_started

adminer:
networks:
miniscope:
image: adminer
restart: always
ports:
- 8082:8080

networks:
main:
miniscope:
name: workflow-miniscope-network

volumes:
mysql-miniscope:
Comment on lines +67 to +68
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this required since the above code is commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @iamamutt - Could you remind me why volumes is here? I see it in the copy you drafted prior to this PR. Does networks not provide what we need on it's own?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CBroz1 That was there to map the data from the mysql database to a docker volume instead of bind mounting to the local filesystem. If you don't need access to the database data at all, you can delete the volumes section at the bottom, +72 to +73, and also it's mention at lines +19 to +20.

If you want a bind mounted volume, change - mysql-miniscope:/var/lib/mysql to - path/to/some/data/dir:/var/lib/mysql, and you can delete the volumes section at the end of the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. Thanks @iamamutt!

10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
datajoint>=0.13.0
element-lab==0.1.0b0
element-animal==0.1.0b0
element-session==0.1.0b0
element-miniscope==0.1.0
element-lab>=0.1.0b0
element-animal>=0.1.0b0
element-session>=0.1.0b0
element-miniscope>=0.1.0
element-interface @ git+https://github.com/datajoint/element-interface.git
djarchive-client @ git+https://github.com/datajoint/djarchive-client.git
jupytext==1.13.7
jupytext>=1.13.7
Loading