From 21897595199d80c6263f250001e3997a6c8f2016 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 25 Jul 2023 14:42:38 -0500 Subject: [PATCH 01/36] [WIP] Schedule GitHub workflow --- .github/workflows/test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f75c71c0..dd1b66a3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -3,6 +3,8 @@ on: push: pull_request: workflow_dispatch: + schedule: + - cron: "14 25 * * *" jobs: devcontainer-build: uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main From d0f6ee1341efb83b8344bdf48eccd92aaabec7d7 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 25 Jul 2023 14:49:49 -0500 Subject: [PATCH 02/36] Update test workflow --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index dd1b66a3..8a4ec130 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,7 +4,7 @@ on: pull_request: workflow_dispatch: schedule: - - cron: "14 25 * * *" + - cron: "0 8 * * 1" jobs: devcontainer-build: uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main From 5b72027d74d2a5a9924f874c18ccf771a500c9ce Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 25 Jul 2023 15:07:08 -0500 Subject: [PATCH 03/36] Update changelog and version --- CHANGELOG.md | 5 +++++ element_calcium_imaging/version.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c118e37..0181b9dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ 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.7.8] - 2023-07-25 + ++ Update - GitHub Actions to run every Monday at 8am + ## [0.7.7] - 2023-07-13 + Add - Environment variables for the Python version in the Dev Container @@ -156,6 +160,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and + Add - `scan` and `imaging` modules + Add - Readers for `ScanImage`, `ScanBox`, `Suite2p`, `CaImAn` +[0.7.8]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.8 [0.7.7]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.7 [0.7.6]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.6 [0.7.5]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.5 diff --git a/element_calcium_imaging/version.py b/element_calcium_imaging/version.py index da1e782f..df06bb35 100644 --- a/element_calcium_imaging/version.py +++ b/element_calcium_imaging/version.py @@ -1,2 +1,2 @@ """Package metadata.""" -__version__ = "0.7.7" +__version__ = "0.7.8" From 89d4ed196aaa70b5ad822ef8904af39d8a11ea59 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 25 Jul 2023 15:13:08 -0500 Subject: [PATCH 04/36] Update context --- .devcontainer/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yaml b/.devcontainer/docker-compose.yaml index e6d47ce8..8f3d743f 100644 --- a/.devcontainer/docker-compose.yaml +++ b/.devcontainer/docker-compose.yaml @@ -4,7 +4,7 @@ services: cpus: 4 mem_limit: 8g # build: - # context: ../.. + # context: .. # dockerfile: ./.devcontainer/Dockerfile image: datajoint/element_calcium_imaging_devcontainer:latest extra_hosts: From 5dea1d927c64299a2bb198128b32971e3338de35 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 25 Jul 2023 15:33:13 -0500 Subject: [PATCH 05/36] Fix syntax --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4077ba38..89bbe16b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -23,7 +23,7 @@ "vscode": { "extensions": [ "ms-python.python@2023.8.0", - "ms-toolsai.jupyter@2023.3.1201040234", + "ms-toolsai.jupyter@2023.3.1201040234" ] } } From 461f904f581e585cef6af39a88b58e92e755ca99 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 25 Jul 2023 15:35:41 -0500 Subject: [PATCH 06/36] Remove deprecated Docker and Compose files --- Dockerfile | 15 --------------- docker-compose-build.yaml | 26 -------------------------- 2 files changed, 41 deletions(-) delete mode 100644 Dockerfile delete mode 100644 docker-compose-build.yaml diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c144a405..00000000 --- a/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -ARG PY_VER -ARG DISTRO -ARG IMAGE -ARG PKG_NAME -ARG PKG_VERSION - -FROM datajoint/${IMAGE}:py${PY_VER}-${DISTRO} -COPY --chown=anaconda:anaconda ./requirements.txt ./setup.py \ - /main/ -COPY --chown=anaconda:anaconda ./${PKG_NAME} /main/${PKG_NAME} -RUN \ - cd /main && \ - pip install . && \ - rm -R /main/* -WORKDIR /main diff --git a/docker-compose-build.yaml b/docker-compose-build.yaml deleted file mode 100644 index 81984c7c..00000000 --- a/docker-compose-build.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# PY_VER=3.8 IMAGE=djbase DISTRO=alpine PKG_NAME=$(python -c "print([p for p in __import__('setuptools').find_packages() if '.' not in p][0])") PKG_VERSION=$(cat ${PKG_NAME}/version.py | awk -F\' '/__version__/ {print $2}') HOST_UID=$(id -u) docker-compose -f docker-compose-build.yaml up --exit-code-from element --build -# -# Intended for updating dependencies and docker image. -# Used to build release artifacts. -version: "2.4" -services: - element: - build: - context: . - args: - - PY_VER - - DISTRO - - IMAGE - - PKG_NAME - - PKG_VERSION - image: datajoint/${PKG_NAME}:${PKG_VERSION} - user: ${HOST_UID}:anaconda - volumes: - - .:/main - command: - - sh - - -lc - - | - set -e - rm -R build dist *.egg-info || echo "No prev build" - python setup.py bdist_wheel sdist From d17d01481575494e4db7f4595ecc767e91ca109d Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 25 Jul 2023 17:33:23 -0500 Subject: [PATCH 07/36] Update `extras_require` --- .devcontainer/Dockerfile | 10 +--------- setup.py | 14 +++++++++++++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 7da05001..37396813 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -31,16 +31,8 @@ COPY ./ /tmp/element-calcium-imaging/ RUN \ # workflow dependencies - # apt-get install gcc ffmpeg libsm6 libxext6 -y && \ - # pip install --no-cache-dir Pygments==2.14.0 && \ - # git clone https://github.com/datajoint/CaImAn.git && \ - # pip install --no-cache-dir -r ./CaImAn/requirements.txt && \ - # pip install --no-cache-dir ./CaImAn && \ - pip install git+https://github.com/datajoint/sbxreader && \ - pip install git+https://github.com/atlab/scanreader && \ - pip install --no-cache-dir -e /tmp/element-calcium-imaging[elements,nd2,suite2p,tests] && \ + pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman,elements,extract,nd2,sbxreader,scanreader,suite2p,tests] && \ # clean up - # rm -rf /tmp/CaImAn && \ rm -rf /tmp/element-calcium-imaging && \ apt-get clean diff --git a/setup.py b/setup.py index 5e2e9980..47275c88 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python from os import path - from setuptools import find_packages, setup +import urllib.request pkg_name = "element_calcium_imaging" here = path.abspath(path.dirname(__file__)) @@ -12,6 +12,15 @@ with open(path.join(here, pkg_name, "version.py")) as f: exec(f.read()) +with urllib.request.urlopen( + "https://raw.githubusercontent.com/flatironinstitute/CaImAn/master/requirements.txt" +) as f: + caiman_requirements = f.read().decode("UTF-8").split("\n") + +caiman_requirements.remove("") +caiman_requirements.append("future") +caiman_requirements.append("caiman @ git+https://github.com/datajoint/CaImAn") + setup( name=pkg_name.replace("_", "-"), version=__version__, # noqa: F821 @@ -32,6 +41,7 @@ "plotly", ], extras_require={ + "caiman": caiman_requirements, "elements": [ "element-animal>=0.1.8", "element-event>=0.2.3", @@ -41,6 +51,8 @@ ], "extract": ["matlabengine", "scipy"], "nd2": ["nd2"], + "sbxreader": ["sbxreader @ git+https://github.com/jcouto/sbxreader@0.2.3"], + "scanreader": ["scanreader @ git+https://github.com/atlab/scanreader"], "suite2p": ["suite2p[io]>=0.12.1"], "tests": ["pytest", "pytest-cov", "shutils"], }, From f32f2fbc8f04f83730fc3f02d0ea35ac6e0ef83f Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 25 Jul 2023 17:34:58 -0500 Subject: [PATCH 08/36] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0181b9dc..dbe5e92b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and ## [0.7.8] - 2023-07-25 + Update - GitHub Actions to run every Monday at 8am ++ Update - `extras_require` to include `caiman`, `sbxreader`, and `scanreader` ## [0.7.7] - 2023-07-13 From bf55fd9ebd8705a68dd2155a8a0d93f2198f3867 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 12:35:24 -0500 Subject: [PATCH 09/36] Update version and changelog --- CHANGELOG.md | 4 ++-- element_calcium_imaging/version.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbe5e92b..04a094d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ 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.7.8] - 2023-07-25 +## [0.8.0] - 2023-07-25 + Update - GitHub Actions to run every Monday at 8am + Update - `extras_require` to include `caiman`, `sbxreader`, and `scanreader` @@ -161,7 +161,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and + Add - `scan` and `imaging` modules + Add - Readers for `ScanImage`, `ScanBox`, `Suite2p`, `CaImAn` -[0.7.8]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.8 +[0.8.0]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.8.0 [0.7.7]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.7 [0.7.6]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.6 [0.7.5]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.5 diff --git a/element_calcium_imaging/version.py b/element_calcium_imaging/version.py index df06bb35..de2c353f 100644 --- a/element_calcium_imaging/version.py +++ b/element_calcium_imaging/version.py @@ -1,2 +1,2 @@ """Package metadata.""" -__version__ = "0.7.8" +__version__ = "0.8.0" From a77988fee7101591dc4a725accf54d3cbddb2a1c Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 13:56:03 -0500 Subject: [PATCH 10/36] Revert "Update version and changelog" This reverts commit bf55fd9ebd8705a68dd2155a8a0d93f2198f3867. --- CHANGELOG.md | 4 ++-- element_calcium_imaging/version.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04a094d5..dbe5e92b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ 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.8.0] - 2023-07-25 +## [0.7.8] - 2023-07-25 + Update - GitHub Actions to run every Monday at 8am + Update - `extras_require` to include `caiman`, `sbxreader`, and `scanreader` @@ -161,7 +161,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and + Add - `scan` and `imaging` modules + Add - Readers for `ScanImage`, `ScanBox`, `Suite2p`, `CaImAn` -[0.8.0]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.8.0 +[0.7.8]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.8 [0.7.7]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.7 [0.7.6]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.6 [0.7.5]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.5 diff --git a/element_calcium_imaging/version.py b/element_calcium_imaging/version.py index de2c353f..df06bb35 100644 --- a/element_calcium_imaging/version.py +++ b/element_calcium_imaging/version.py @@ -1,2 +1,2 @@ """Package metadata.""" -__version__ = "0.8.0" +__version__ = "0.7.8" From 9d3d523369dad125e47f9fd9b8eadf64cb80929d Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 14:02:33 -0500 Subject: [PATCH 11/36] Remove version pin --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 47275c88..d456dfe7 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ ], "extract": ["matlabengine", "scipy"], "nd2": ["nd2"], - "sbxreader": ["sbxreader @ git+https://github.com/jcouto/sbxreader@0.2.3"], + "sbxreader": ["sbxreader @ git+https://github.com/jcouto/sbxreader"], "scanreader": ["scanreader @ git+https://github.com/atlab/scanreader"], "suite2p": ["suite2p[io]>=0.12.1"], "tests": ["pytest", "pytest-cov", "shutils"], From 4a93d2517cad747590fd7cc7d0283cd3d49744df Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 14:05:36 -0500 Subject: [PATCH 12/36] Add numpy dependency --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index d456dfe7..d43a7728 100644 --- a/setup.py +++ b/setup.py @@ -38,6 +38,7 @@ "datajoint>=0.13.0", "ipykernel>=6.0.1", "ipywidgets", + "numpy", "plotly", ], extras_require={ From d0b8cb437275930943fcbc2be8a0809dfce9d801 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 14:11:01 -0500 Subject: [PATCH 13/36] Update caiman requirements --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index d43a7728..edbd49a6 100644 --- a/setup.py +++ b/setup.py @@ -18,8 +18,6 @@ caiman_requirements = f.read().decode("UTF-8").split("\n") caiman_requirements.remove("") -caiman_requirements.append("future") -caiman_requirements.append("caiman @ git+https://github.com/datajoint/CaImAn") setup( name=pkg_name.replace("_", "-"), @@ -42,7 +40,9 @@ "plotly", ], extras_require={ - "caiman": caiman_requirements, + "caiman": [caiman_requirements, + "future", + "caiman @ git+https://github.com/datajoint/CaImAn"], "elements": [ "element-animal>=0.1.8", "element-event>=0.2.3", From 192f0f30c11702e700cf0727bf6f5f31ee06a923 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 14:28:31 -0500 Subject: [PATCH 14/36] Refactor numpy installation --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index edbd49a6..f5f57523 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,6 @@ "https://raw.githubusercontent.com/flatironinstitute/CaImAn/master/requirements.txt" ) as f: caiman_requirements = f.read().decode("UTF-8").split("\n") - caiman_requirements.remove("") setup( @@ -32,11 +31,11 @@ keywords="neuroscience calcium-imaging science datajoint", packages=find_packages(exclude=["contrib", "docs", "tests*"]), scripts=[], + setup_requires=["numpy"], install_requires=[ "datajoint>=0.13.0", "ipykernel>=6.0.1", "ipywidgets", - "numpy", "plotly", ], extras_require={ From c6822f168f46f5e06a92288e8f3830c9c4bb4ca2 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 14:43:42 -0500 Subject: [PATCH 15/36] Update image name --- .devcontainer/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/docker-compose.yaml b/.devcontainer/docker-compose.yaml index 8f3d743f..0794c02e 100644 --- a/.devcontainer/docker-compose.yaml +++ b/.devcontainer/docker-compose.yaml @@ -6,7 +6,7 @@ services: # build: # context: .. # dockerfile: ./.devcontainer/Dockerfile - image: datajoint/element_calcium_imaging_devcontainer:latest + image: datajoint/element_calcium_imaging:latest extra_hosts: - fakeservices.datajoint.io:127.0.0.1 environment: From cf37df4801b5e734deef01dcc7a5ddccad1e02be Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 15:13:03 -0500 Subject: [PATCH 16/36] Update caiman installation --- .devcontainer/Dockerfile | 3 ++- setup.py | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 37396813..4fbd9c05 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -30,7 +30,8 @@ RUN \ COPY ./ /tmp/element-calcium-imaging/ RUN \ - # workflow dependencies + # pipeline dependencies + pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman_requirements] && \ pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman,elements,extract,nd2,sbxreader,scanreader,suite2p,tests] && \ # clean up rm -rf /tmp/element-calcium-imaging && \ diff --git a/setup.py b/setup.py index f5f57523..c66b8523 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,9 @@ "https://raw.githubusercontent.com/flatironinstitute/CaImAn/master/requirements.txt" ) as f: caiman_requirements = f.read().decode("UTF-8").split("\n") + caiman_requirements.remove("") +caiman_requirements.append("future") setup( name=pkg_name.replace("_", "-"), @@ -31,7 +33,6 @@ keywords="neuroscience calcium-imaging science datajoint", packages=find_packages(exclude=["contrib", "docs", "tests*"]), scripts=[], - setup_requires=["numpy"], install_requires=[ "datajoint>=0.13.0", "ipykernel>=6.0.1", @@ -39,9 +40,8 @@ "plotly", ], extras_require={ - "caiman": [caiman_requirements, - "future", - "caiman @ git+https://github.com/datajoint/CaImAn"], + "caiman_requirements": [caiman_requirements], + "caiman": ["caiman @ git+https://github.com/datajoint/CaImAn"], "elements": [ "element-animal>=0.1.8", "element-event>=0.2.3", From 82d2b876e48ef650e2e65a06583df69d7c58f385 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 15:35:27 -0500 Subject: [PATCH 17/36] Update Dockerfile --- .devcontainer/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 4fbd9c05..9fd5c5cc 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -31,8 +31,9 @@ COPY ./ /tmp/element-calcium-imaging/ RUN \ # pipeline dependencies + apt-get install gcc && \ pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman_requirements] && \ - pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman,elements,extract,nd2,sbxreader,scanreader,suite2p,tests] && \ + pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman,elements,nd2,sbxreader,scanreader,suite2p,tests] && \ # clean up rm -rf /tmp/element-calcium-imaging && \ apt-get clean From 9af720737c69f46e4a9cd4e9b957f2e38fa5ac66 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 15:39:09 -0500 Subject: [PATCH 18/36] Update Dockerfile --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 9fd5c5cc..9142fee4 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -31,7 +31,7 @@ COPY ./ /tmp/element-calcium-imaging/ RUN \ # pipeline dependencies - apt-get install gcc && \ + apt-get install gcc -y && \ pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman_requirements] && \ pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman,elements,nd2,sbxreader,scanreader,suite2p,tests] && \ # clean up From bc0486579f883c428189d47b58fb97df34ec3527 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 15:47:33 -0500 Subject: [PATCH 19/36] Update Dockerfile --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 9142fee4..2fbd30fa 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -31,7 +31,7 @@ COPY ./ /tmp/element-calcium-imaging/ RUN \ # pipeline dependencies - apt-get install gcc -y && \ + apt-get install gcc ffmpeg libsm6 libxext6 -y && \ pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman_requirements] && \ pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman,elements,nd2,sbxreader,scanreader,suite2p,tests] && \ # clean up From 999c9b442347858fa73b980f5d7acaa75d16c445 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 15:53:11 -0500 Subject: [PATCH 20/36] Update Dockerfile --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 2fbd30fa..b6690fa0 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -31,7 +31,7 @@ COPY ./ /tmp/element-calcium-imaging/ RUN \ # pipeline dependencies - apt-get install gcc ffmpeg libsm6 libxext6 -y && \ + apt-get install gcc g++ ffmpeg libsm6 libxext6 -y && \ pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman_requirements] && \ pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman,elements,nd2,sbxreader,scanreader,suite2p,tests] && \ # clean up From 1670e6f6a69b23519b4fe1489ba55a8f1c3178b4 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 26 Jul 2023 17:21:17 -0500 Subject: [PATCH 21/36] Fix format --- docs/src/index.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 34ad6bc1..dc2e74d1 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -21,7 +21,9 @@ combined with other Elements to assemble a fully functional pipeline. ![pipeline](https://raw.githubusercontent.com/datajoint/element-calcium-imaging/main/images/pipeline_imaging.svg) -+ We have designed three variations of the pipeline to handle different use cases. Displayed above is the default `imaging` schema. Details on all of the `imaging` schemas can be found in the [Data Pipeline](./pipeline.md) documentation page. ++ We have designed three variations of the pipeline to handle different use cases. +Displayed above is the default `imaging` schema. Details on all of the `imaging` +schemas can be found in the [Data Pipeline](./pipeline.md) documentation page. ## Getting Started @@ -39,4 +41,5 @@ combined with other Elements to assemble a fully functional pipeline. ## Support -+ If you need help getting started or run into any errors, please contact our team by email at support@datajoint.com. \ No newline at end of file ++ If you need help getting started or run into any errors, please contact our team by +email at support@datajoint.com. From 2cbca81715bcae0fa51159f2035598e126e1b4a5 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 27 Jul 2023 13:22:40 -0500 Subject: [PATCH 22/36] Update requirements --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c66b8523..1b514a7b 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ "elements": [ "element-animal>=0.1.8", "element-event>=0.2.3", - "element-interface>=0.5.4", + "element-interface>=0.6.0", "element-lab>=0.3.0", "element-session>=0.1.5", ], From c8cfbcb082b2e21fb625ec1926d4ff13998f8049 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 27 Jul 2023 14:21:29 -0500 Subject: [PATCH 23/36] Update changelog --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d844bc55..53369483 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,9 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and ## [0.7.9] - 2023-07-27 + Update - GitHub Actions to run every Monday at 8am -+ Update - Increment `element-interface` version -+ Update - `extras_require` to include `caiman`, `sbxreader`, and `scanreader` ++ Update - Dev Container to install CaImAn and rename Docker image ++ Update - Update `extras_require` to increment `element-interface` version ++ Update - Update `extras_require` to include `caiman`, `sbxreader`, and `scanreader` ## [0.7.8] - 2023-07-27 From 4b535868217a583a9a6a2459fe45961c856e6f27 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 27 Jul 2023 14:22:52 -0500 Subject: [PATCH 24/36] Update changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53369483..9e2daad7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,8 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and + Update - GitHub Actions to run every Monday at 8am + Update - Dev Container to install CaImAn and rename Docker image -+ Update - Update `extras_require` to increment `element-interface` version -+ Update - Update `extras_require` to include `caiman`, `sbxreader`, and `scanreader` ++ Update - `extras_require` to increment `element-interface` version ++ Update - `extras_require` to include `caiman`, `sbxreader`, and `scanreader` ## [0.7.8] - 2023-07-27 From bada53eaf47cd8c2250d764f1638921a349f9f2c Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Mon, 7 Aug 2023 16:26:02 -0500 Subject: [PATCH 25/36] Remove pipeline script --- notebooks/tutorial_pipeline.py | 48 ---------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 notebooks/tutorial_pipeline.py diff --git a/notebooks/tutorial_pipeline.py b/notebooks/tutorial_pipeline.py deleted file mode 100644 index a31c076b..00000000 --- a/notebooks/tutorial_pipeline.py +++ /dev/null @@ -1,48 +0,0 @@ -import datajoint as dj -from element_animal import subject -from element_animal.subject import Subject -from element_calcium_imaging import imaging, scan, imaging_report, db_prefix, plotting -from element_lab import lab -from element_lab.lab import Lab, Location, Project, Protocol, Source, User -from element_lab.lab import Device as Equipment -from element_lab.lab import User as Experimenter -from element_session import session_with_datetime as session -from element_session.session_with_datetime import Session -import element_interface -import pathlib - - -# Declare functions for retrieving data -def get_imaging_root_data_dir(): - """Retrieve imaging root data directory.""" - imaging_root_dirs = dj.config.get("custom", {}).get("imaging_root_data_dir", None) - if not imaging_root_dirs: - return None - elif isinstance(imaging_root_dirs, (str, pathlib.Path)): - return [imaging_root_dirs] - elif isinstance(imaging_root_dirs, list): - return imaging_root_dirs - else: - raise TypeError("`imaging_root_data_dir` must be a string, pathlib, or list") - - -def get_image_files(scan_key, file_type: str): - """Retrieve the list of absolute paths associated with a given Scan.""" - # Folder structure: root / subject / session / .tif or .sbx or .nd2 - session_dir = element_interface.utils.find_full_path( - get_imaging_root_data_dir(), - (session.SessionDirectory & scan_key).fetch1("session_dir"), - ) - - filepaths = [fp.as_posix() for fp in session_dir.glob(file_type)] - - if not filepaths: - raise FileNotFoundError(f"No {file_type} file found in {session_dir}") - return filepaths - - -# Activate schemas -lab.activate(db_prefix + "lab") -subject.activate(db_prefix + "subject", linking_module=__name__) -session.activate(db_prefix + "session", linking_module=__name__) -imaging.activate(db_prefix + "imaging", db_prefix + "scan", linking_module=__name__) From 4e5e3d3c01974a196bc56a97cd9326dd64385ce0 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 8 Aug 2023 14:54:44 -0500 Subject: [PATCH 26/36] Revert "Remove pipeline script" This reverts commit bada53eaf47cd8c2250d764f1638921a349f9f2c. --- notebooks/tutorial_pipeline.py | 48 ++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 notebooks/tutorial_pipeline.py diff --git a/notebooks/tutorial_pipeline.py b/notebooks/tutorial_pipeline.py new file mode 100644 index 00000000..a31c076b --- /dev/null +++ b/notebooks/tutorial_pipeline.py @@ -0,0 +1,48 @@ +import datajoint as dj +from element_animal import subject +from element_animal.subject import Subject +from element_calcium_imaging import imaging, scan, imaging_report, db_prefix, plotting +from element_lab import lab +from element_lab.lab import Lab, Location, Project, Protocol, Source, User +from element_lab.lab import Device as Equipment +from element_lab.lab import User as Experimenter +from element_session import session_with_datetime as session +from element_session.session_with_datetime import Session +import element_interface +import pathlib + + +# Declare functions for retrieving data +def get_imaging_root_data_dir(): + """Retrieve imaging root data directory.""" + imaging_root_dirs = dj.config.get("custom", {}).get("imaging_root_data_dir", None) + if not imaging_root_dirs: + return None + elif isinstance(imaging_root_dirs, (str, pathlib.Path)): + return [imaging_root_dirs] + elif isinstance(imaging_root_dirs, list): + return imaging_root_dirs + else: + raise TypeError("`imaging_root_data_dir` must be a string, pathlib, or list") + + +def get_image_files(scan_key, file_type: str): + """Retrieve the list of absolute paths associated with a given Scan.""" + # Folder structure: root / subject / session / .tif or .sbx or .nd2 + session_dir = element_interface.utils.find_full_path( + get_imaging_root_data_dir(), + (session.SessionDirectory & scan_key).fetch1("session_dir"), + ) + + filepaths = [fp.as_posix() for fp in session_dir.glob(file_type)] + + if not filepaths: + raise FileNotFoundError(f"No {file_type} file found in {session_dir}") + return filepaths + + +# Activate schemas +lab.activate(db_prefix + "lab") +subject.activate(db_prefix + "subject", linking_module=__name__) +session.activate(db_prefix + "session", linking_module=__name__) +imaging.activate(db_prefix + "imaging", db_prefix + "scan", linking_module=__name__) From 041d2660d356785ae51612373b890d8216d10312 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 8 Aug 2023 15:54:10 -0500 Subject: [PATCH 27/36] Update version and changelog --- CHANGELOG.md | 5 +++++ element_calcium_imaging/version.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e2daad7..a01bf786 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ 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.8.0] - 2023-08-08 + ++ Update - Rename `get_image_files` to `get_calcium_imaging_files`, and update arguments + ## [0.7.9] - 2023-07-27 + Update - GitHub Actions to run every Monday at 8am @@ -167,6 +171,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and + Add - `scan` and `imaging` modules + Add - Readers for `ScanImage`, `ScanBox`, `Suite2p`, `CaImAn` +[0.8.0]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.8.0 [0.7.9]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.9 [0.7.8]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.8 [0.7.7]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.7.7 diff --git a/element_calcium_imaging/version.py b/element_calcium_imaging/version.py index 77bce0f8..de2c353f 100644 --- a/element_calcium_imaging/version.py +++ b/element_calcium_imaging/version.py @@ -1,2 +1,2 @@ """Package metadata.""" -__version__ = "0.7.9" +__version__ = "0.8.0" From c932fec87ad2e853daaad93a87b814973d45fd5d Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 8 Aug 2023 16:11:26 -0500 Subject: [PATCH 28/36] Remove CaImAn installation --- .devcontainer/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b6690fa0..203b62bd 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -22,7 +22,7 @@ RUN \ apt-get install sudo git bash-completion graphviz default-mysql-client s3fs procps -y && \ usermod -aG sudo vscode && \ echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \ - pip install --no-cache-dir --upgrade black pip && \ + pip install --no-cache-dir --upgrade black pip nbconvert && \ echo '. /etc/bash_completion' >> /home/vscode/.bashrc && \ echo 'export PS1="\[\e[32;1m\]\u\[\e[m\]@\[\e[34;1m\]\H\[\e[m\]:\[\e[33;1m\]\w\[\e[m\]$ "' >> /home/vscode/.bashrc && \ apt-get clean @@ -32,8 +32,9 @@ COPY ./ /tmp/element-calcium-imaging/ RUN \ # pipeline dependencies apt-get install gcc g++ ffmpeg libsm6 libxext6 -y && \ - pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman_requirements] && \ - pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman,elements,nd2,sbxreader,scanreader,suite2p,tests] && \ + # pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman_requirements] && \ + # pip install --no-cache-dir -e /tmp/element-calcium-imaging[caiman] && \ + pip install --no-cache-dir -e /tmp/element-calcium-imaging[elements,nd2,sbxreader,scanreader,suite2p,tests] && \ # clean up rm -rf /tmp/element-calcium-imaging && \ apt-get clean From 7c44dbaf34bb3d9317472debde7feb0ede8047ed Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 8 Aug 2023 16:17:13 -0500 Subject: [PATCH 29/36] Update readme --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 049bea1f..fe1ae460 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -[![PyPI version](https://badge.fury.io/py/element-calcium-imaging.svg)](http://badge.fury.io/py/element-calcium-imaging) - # DataJoint Element for Functional Calcium Imaging DataJoint Element for functional calcium imaging with @@ -32,11 +30,19 @@ documentation page. ## Getting Started -+ Install from PyPI ++ Please fork this repository + ++ Clone the repository to your computer + + ```bash + git clone https://github.com//element-calcium-imaging + ``` + ++ Install with `pip` - ```bash - pip install element-calcium-imaging - ``` + ```bash + pip install -e . + ``` + [Interactive tutorial on GitHub Codespaces](#interactive-tutorial) From 1b40870f77d1da81eb7168e984392960b74dc910 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Tue, 8 Aug 2023 16:52:01 -0500 Subject: [PATCH 30/36] Update `get_calcium_imaging_files` --- element_calcium_imaging/scan.py | 21 ++++++++++----------- notebooks/tutorial_pipeline.py | 17 +++++++++++++---- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/element_calcium_imaging/scan.py b/element_calcium_imaging/scan.py index 15f0a4be..ea0bdc36 100644 --- a/element_calcium_imaging/scan.py +++ b/element_calcium_imaging/scan.py @@ -104,16 +104,17 @@ def get_processed_root_data_dir() -> Union[str, pathlib.Path]: return get_imaging_root_data_dir()[0] -def get_image_files(scan_key: dict, file_type: str) -> list: - """Retrieve the list of image files associated with a given Scan. +def get_calcium_imaging_files(scan_key: dict, acq_software: str) -> list: + """Retrieve the list of absolute paths of the calcium imaging files associated with a given Scan and a given acquisition software (e.g. .tif, .sbx, etc.). Args: scan_key: Primary key of a Scan entry. + acq_software: Primary key of a AcquisitionSoftware entry (i.e. "ScanImage" "Scanbox", "NIS", or "PrairieView") Returns: A list of full file paths. """ - return _linking_module.get_image_files(scan_key, file_type) + return _linking_module.get_calcium_imaging_files(scan_key, acq_software) # ----------------------------- Table declarations ---------------------- @@ -289,12 +290,12 @@ def make(self, key): """Populate the ScanInfo with the information parsed from image files.""" acq_software = (Scan & key).fetch1("acq_software") + scan_filepaths = get_calcium_imaging_files(key, acq_software) if acq_software == "ScanImage": import scanreader # Read the scan - scan_filepaths = get_image_files(key, "*.tif") scan = scanreader.read_scan(scan_filepaths) # Insert in ScanInfo @@ -370,7 +371,6 @@ def make(self, key): import sbxreader # Read the scan - scan_filepaths = get_image_files(key, "*.sbx") sbx_meta = sbxreader.sbx_get_metadata(scan_filepaths[0]) sbx_matinfo = sbxreader.sbx_get_info(scan_filepaths[0]) is_multiROI = bool( @@ -429,7 +429,6 @@ def make(self, key): import nd2 # Read the scan - scan_filepaths = get_image_files(key, "*.nd2") nd2_file = nd2.ND2File(scan_filepaths[0]) is_multiROI = False # MultiROI to be implemented later @@ -519,7 +518,6 @@ def estimate_nd2_scan_duration(nd2_scan_obj): elif acq_software == "PrairieView": from element_interface import prairie_view_loader - scan_filepaths = get_image_files(key, "*.tif") PVScan_info = prairie_view_loader.get_prairieview_metadata( scan_filepaths[0] ) @@ -612,30 +610,31 @@ def make(self, key): acq_software, nchannels = (Scan * ScanInfo & key).fetch1( "acq_software", "nchannels" ) + scan_filepaths = get_calcium_imaging_files(key, acq_software) if acq_software == "ScanImage": import scanreader # Switch from FYXCT to TCYX - data = scanreader.read_scan(get_image_files(key, "*.tif"))[ + data = scanreader.read_scan(scan_filepaths)[ key["field_idx"] ].transpose(3, 2, 0, 1) elif acq_software == "Scanbox": from sbxreader import sbx_memmap # Switch from TFCYX to TCYX - data = sbx_memmap(get_image_files(key, "*.sbx"))[:, key["field_idx"]] + data = sbx_memmap(scan_filepaths)[:, key["field_idx"]] elif acq_software == "NIS": import nd2 - nd2_file = nd2.ND2File(get_image_files(key, "*.nd2")[0]) + nd2_file = nd2.ND2File(scan_filepaths[0]) nd2_dims = {k: i for i, k in enumerate(nd2_file.sizes)} valid_dimensions = "TZCYX" assert set(nd2_dims) <= set( valid_dimensions - ), f"Unknown dimensions {set(nd2_dims)-set(valid_dimensions)} in file {get_image_files(key, '*.nd2')[0]}." + ), f"Unknown dimensions {set(nd2_dims)-set(valid_dimensions)} in file {scan_filepaths[0]}." # Sort the dimensions in the order of TZCYX, skipping the missing ones. data = nd2_file.asarray().transpose( diff --git a/notebooks/tutorial_pipeline.py b/notebooks/tutorial_pipeline.py index a31c076b..c49f7034 100644 --- a/notebooks/tutorial_pipeline.py +++ b/notebooks/tutorial_pipeline.py @@ -26,18 +26,27 @@ def get_imaging_root_data_dir(): raise TypeError("`imaging_root_data_dir` must be a string, pathlib, or list") -def get_image_files(scan_key, file_type: str): - """Retrieve the list of absolute paths associated with a given Scan.""" +def get_calcium_imaging_files(scan_key, acq_software: str): + """Retrieve the list of absolute paths of the calcium imaging files associated with a given Scan and a given acquisition software (e.g. .tif, .sbx, etc.).""" # Folder structure: root / subject / session / .tif or .sbx or .nd2 session_dir = element_interface.utils.find_full_path( get_imaging_root_data_dir(), (session.SessionDirectory & scan_key).fetch1("session_dir"), ) - filepaths = [fp.as_posix() for fp in session_dir.glob(file_type)] + if acq_software == "ScanImage": + filepaths = [fp.as_posix() for fp in session_dir.glob("*.tif")] + elif acq_software == "Scanbox": + filepaths = [fp.as_posix() for fp in session_dir.glob("*.sbx")] + elif acq_software == "NIS": + filepaths = [fp.as_posix() for fp in session_dir.glob("*.nd2")] + elif acq_software == "PrairieView": + filepaths = [fp.as_posix() for fp in session_dir.glob("*.tif")] + else: + raise NotImplementedError(f"{acq_software} is not implemented") if not filepaths: - raise FileNotFoundError(f"No {file_type} file found in {session_dir}") + raise FileNotFoundError(f"No {acq_software} file found in {session_dir}") return filepaths From 56cebce5933ad1fdbfca9be6046cd3dd3469fc2f Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Wed, 9 Aug 2023 17:18:53 -0500 Subject: [PATCH 31/36] Format with `black` --- element_calcium_imaging/scan.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/element_calcium_imaging/scan.py b/element_calcium_imaging/scan.py index ea0bdc36..8ed8259d 100644 --- a/element_calcium_imaging/scan.py +++ b/element_calcium_imaging/scan.py @@ -616,9 +616,9 @@ def make(self, key): import scanreader # Switch from FYXCT to TCYX - data = scanreader.read_scan(scan_filepaths)[ - key["field_idx"] - ].transpose(3, 2, 0, 1) + data = scanreader.read_scan(scan_filepaths)[key["field_idx"]].transpose( + 3, 2, 0, 1 + ) elif acq_software == "Scanbox": from sbxreader import sbx_memmap From c66c110153bad02aea86d55d7cbcb886b92bd077 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 10 Aug 2023 17:38:24 +0000 Subject: [PATCH 32/36] Update instructions --- docs/src/index.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index dc2e74d1..6e1c540d 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -27,11 +27,19 @@ schemas can be found in the [Data Pipeline](./pipeline.md) documentation page. ## Getting Started -+ Install from PyPI ++ Please fork the [repository](https://github.com/datajoint/element-calcium-imaging){:target="_blank"} - ```bash - pip install element-calcium-imaging - ``` ++ Clone the repository to your computer + + ```bash + git clone https://github.com//element-calcium-imaging + ``` + ++ Install with `pip` + + ```bash + pip install -e . + ``` + [Data Pipeline](./pipeline.md) - Pipeline and table descriptions From b46c3029442d056725c5103c3bd031341e717e2a Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 10 Aug 2023 17:39:42 +0000 Subject: [PATCH 33/36] Update import statements --- element_calcium_imaging/imaging.py | 2 +- element_calcium_imaging/imaging_no_curation.py | 2 +- element_calcium_imaging/imaging_preprocess.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/element_calcium_imaging/imaging.py b/element_calcium_imaging/imaging.py index 420aab79..28f5034f 100644 --- a/element_calcium_imaging/imaging.py +++ b/element_calcium_imaging/imaging.py @@ -9,7 +9,7 @@ from . import imaging_report, scan from .scan import ( - get_image_files, + get_calcium_imaging_files, get_imaging_root_data_dir, get_processed_root_data_dir, ) diff --git a/element_calcium_imaging/imaging_no_curation.py b/element_calcium_imaging/imaging_no_curation.py index 610f23a7..814c20f3 100644 --- a/element_calcium_imaging/imaging_no_curation.py +++ b/element_calcium_imaging/imaging_no_curation.py @@ -9,7 +9,7 @@ from . import imaging_report, scan from .scan import ( - get_image_files, + get_calcium_imaging_files, get_imaging_root_data_dir, get_processed_root_data_dir, ) diff --git a/element_calcium_imaging/imaging_preprocess.py b/element_calcium_imaging/imaging_preprocess.py index 37c5cafc..32f682b8 100644 --- a/element_calcium_imaging/imaging_preprocess.py +++ b/element_calcium_imaging/imaging_preprocess.py @@ -9,7 +9,7 @@ from . import imaging_report, scan from .scan import ( - get_image_files, + get_calcium_imaging_files, get_imaging_root_data_dir, get_processed_root_data_dir, ) From 6dbfe263eaeceace16395a69d8e70914518f2293 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 10 Aug 2023 17:55:19 +0000 Subject: [PATCH 34/36] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a01bf786..9cede632 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and ## [0.8.0] - 2023-08-08 + Update - Rename `get_image_files` to `get_calcium_imaging_files`, and update arguments ++ Update - Remove CaImAn installation from the Dev Container due to memory limits of a free GitHub Codespace account ++ Update - Installation instructions ## [0.7.9] - 2023-07-27 From d5213a08a6acff87db65a09d54c77667ab578a0b Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 10 Aug 2023 13:03:40 -0500 Subject: [PATCH 35/36] Update element_calcium_imaging/scan.py Co-authored-by: Thinh Nguyen --- element_calcium_imaging/scan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/element_calcium_imaging/scan.py b/element_calcium_imaging/scan.py index 8ed8259d..310ba5ba 100644 --- a/element_calcium_imaging/scan.py +++ b/element_calcium_imaging/scan.py @@ -109,7 +109,7 @@ def get_calcium_imaging_files(scan_key: dict, acq_software: str) -> list: Args: scan_key: Primary key of a Scan entry. - acq_software: Primary key of a AcquisitionSoftware entry (i.e. "ScanImage" "Scanbox", "NIS", or "PrairieView") + acq_software: name of the acquisition software, matching AcquisitionSoftware entry (i.e. "ScanImage" "Scanbox", "NIS", or "PrairieView") Returns: A list of full file paths. From 797e8ad8571c44fba01cb5bace3207d8c1635a92 Mon Sep 17 00:00:00 2001 From: Kabilar Gunalan Date: Thu, 10 Aug 2023 13:04:03 -0500 Subject: [PATCH 36/36] Update notebooks/tutorial_pipeline.py Co-authored-by: Thinh Nguyen --- notebooks/tutorial_pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/tutorial_pipeline.py b/notebooks/tutorial_pipeline.py index c49f7034..ea982b2c 100644 --- a/notebooks/tutorial_pipeline.py +++ b/notebooks/tutorial_pipeline.py @@ -27,7 +27,7 @@ def get_imaging_root_data_dir(): def get_calcium_imaging_files(scan_key, acq_software: str): - """Retrieve the list of absolute paths of the calcium imaging files associated with a given Scan and a given acquisition software (e.g. .tif, .sbx, etc.).""" + """Retrieve the list of absolute paths of the calcium imaging files associated with a given Scan and a given acquisition software (e.g. "ScanImage", "PrairieView", etc.).""" # Folder structure: root / subject / session / .tif or .sbx or .nd2 session_dir = element_interface.utils.find_full_path( get_imaging_root_data_dir(),