Skip to content

Commit 2f17185

Browse files
authored
Merge pull request #198 from kushalbakshi/new-main
MAJOR REFACTOR: remove extra modules of imaging
2 parents bc6e167 + c85c7ce commit 2f17185

File tree

19 files changed

+116
-5986
lines changed

19 files changed

+116
-5986
lines changed

.github/workflows/test.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: Test
22
on:
33
push:
4+
branches:
5+
- main
46
pull_request:
7+
branches:
8+
- main
59
workflow_dispatch:
6-
schedule:
7-
- cron: "0 8 * * 1"
810
jobs:
911
devcontainer-build:
1012
uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main
@@ -13,12 +15,7 @@ jobs:
1315
strategy:
1416
matrix:
1517
py_ver: ["3.9", "3.10"]
16-
mysql_ver: ["8.0", "5.7"]
17-
include:
18-
- py_ver: "3.8"
19-
mysql_ver: "5.7"
20-
- py_ver: "3.7"
21-
mysql_ver: "5.7"
18+
mysql_ver: ["8.0"]
2219
steps:
2320
- uses: actions/checkout@v3
2421
- name: Set up Python ${{matrix.py_ver}}
@@ -34,4 +31,3 @@ jobs:
3431
python_version=${{matrix.py_ver}}
3532
black element_calcium_imaging --check --verbose --target-version py${python_version//.}
3633
black notebooks --check --verbose --target-version py${python_version//.}
37-

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
44
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
55

6+
## [0.11.0] - 2025-01-31
7+
8+
+ Feat - Single `imaging` module for all imaging data
9+
+ Update - Code fixes and improvements throughout
10+
611
## [0.10.1] - 2024-06-20
712

813
+ Fix - cleaner plotting in tutorial notebook
@@ -220,6 +225,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
220225
+ Add - `scan` and `imaging` modules
221226
+ Add - Readers for `ScanImage`, `ScanBox`, `Suite2p`, `CaImAn`
222227

228+
[0.11.0]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.11.0
223229
[0.10.0]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.10.0
224230
[0.9.5]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.9.5
225231
[0.9.4]: https://github.com/datajoint/element-calcium-imaging/releases/tag/0.9.4

README.md

Lines changed: 68 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
11
# DataJoint Element for Functional Calcium Imaging
22

3-
DataJoint Element for functional calcium imaging with
4-
[ScanImage](https://docs.scanimage.org/),
5-
[Scanbox](https://scanbox.org/),
6-
[Nikon NIS-Elements](https://www.microscope.healthcare.nikon.com/products/software/nis-elements),
7-
and `Bruker Prairie View` acquisition software; and
8-
[Suite2p](https://github.com/MouseLand/suite2p),
3+
DataJoint Element for functional calcium imaging with support for
4+
[ScanImage](https://docs.scanimage.org/), [Scanbox](https://scanbox.org/), [Nikon
5+
NIS-Elements](https://www.microscope.healthcare.nikon.com/products/software/nis-elements),
6+
and `Bruker Prairie View` acquisition software; and
7+
[Suite2p](https://github.com/MouseLand/suite2p),
98
[CaImAn](https://github.com/flatironinstitute/CaImAn), and
10-
[EXTRACT](https://github.com/schnitzer-lab/EXTRACT-public) analysis
11-
software. DataJoint Elements collectively standardize and automate
12-
data collection and analysis for neuroscience experiments. Each Element is a modular
13-
pipeline for data storage and processing with corresponding database tables that can be
14-
combined with other Elements to assemble a fully functional pipeline. This repository
15-
also provides a tutorial environment and notebooks to learn the pipeline.
9+
[EXTRACT](https://github.com/schnitzer-lab/EXTRACT-public) analysis software. DataJoint
10+
Elements collectively standardize and automate data collection and analysis for
11+
neuroscience experiments. Each Element is a modular pipeline for data storage and
12+
processing with corresponding database tables that can be combined with other Elements
13+
to assemble a fully functional pipeline. This repository also provides a tutorial
14+
environment and notebooks to learn the pipeline.
1615

1716
## Experiment Flowchart
1817

1918
![flowchart](https://raw.githubusercontent.com/datajoint/element-calcium-imaging/main/images/flowchart.svg)
2019

2120
## Data Pipeline Diagram
2221

23-
![pipeline](https://raw.githubusercontent.com/datajoint/element-calcium-imaging/main/images/pipeline_imaging.svg)
22+
![pipeline](https://raw.githubusercontent.com/datajoint/element-calcium-imaging/main/images/pipeline_imaging_no_curation.svg)
2423

25-
+ We have designed three variations of the pipeline to handle different use cases.
26-
Displayed above is the default `imaging` schema. Details on all of the `imaging`
27-
schemas can be found in the [Data
28-
Pipeline](https://datajoint.com/docs/elements/element-calcium-imaging/latest/pipeline/)
29-
documentation page.
24+
### Legacy Support
25+
26+
+ Three variations of the pipeline were designed and supported through December 2024 to
27+
handle different use cases. However, based on community feedback and use cases, only
28+
one pipeline will be supported after December 2024. However, all three pipeline
29+
versions will remain available in their own branches for reference and use.
30+
+ Displayed above is the default `imaging` schema. Please see other branches for the
31+
`imaging` module with `Curation` table and the `imaging_preprocess` module.
3032

3133
## Getting Started
3234

@@ -55,37 +57,64 @@ or contact our team by email at [email protected].
5557

5658
## Interactive Tutorial
5759

58-
+ The easiest way to learn about DataJoint Elements is to use the tutorial notebooks within the included interactive environment configured using [Dev Container](https://containers.dev/).
60+
+ The easiest way to learn about DataJoint Elements is to use the tutorial notebooks
61+
within the included interactive environment configured using [Dev
62+
Container](https://containers.dev/).
5963

6064
### Launch Environment
6165

6266
Here are some options that provide a great experience:
6367

64-
- (*recommended*) Cloud-based Environment
65-
- Launch using [GitHub Codespaces](https://github.com/features/codespaces) using the `+` option which will `Create codespace on main` in the codebase repository on your fork with default options. For more control, see the `...` where you may create `New with options...`.
66-
- Build time for a codespace is a few minutes. This is done infrequently and cached for convenience.
67-
- Start time for a codespace is less than 1 minute. This will pull the built codespace from cache when you need it.
68-
- *Tip*: Each month, GitHub renews a [free-tier](https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#monthly-included-storage-and-core-hours-for-personal-accounts) quota of compute and storage. Typically we run into the storage limits before anything else since Codespaces consume storage while stopped. It is best to delete Codespaces when not actively in use and recreate when needed. We'll soon be creating prebuilds to avoid larger build times. Once any portion of your quota is reached, you will need to wait for it to be reset at the end of your cycle or add billing info to your GitHub account to handle overages.
69-
- *Tip*: GitHub auto names the codespace but you can rename the codespace so that it is easier to identify later.
70-
71-
- Local Environment
72-
> *Note: Access to example data is currently limited to MacOS and Linux due to the s3fs utility. Windows users are recommended to use the above environment.*
73-
- Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
74-
- Install [Docker](https://docs.docker.com/get-docker/)
75-
- Install [VSCode](https://code.visualstudio.com/)
76-
- Install the VSCode [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
77-
- `git clone` the codebase repository and open it in VSCode
78-
- Use the `Dev Containers extension` to `Reopen in Container` (More info is in the `Getting started` included with the extension.)
79-
80-
You will know your environment has finished loading once you either see a terminal open related to `Running postStartCommand` with a final message of `Done` or the `README.md` is opened in `Preview`.
68+
+ (*recommended*) Cloud-based Environment
69+
+ Launch using [GitHub Codespaces](https://github.com/features/codespaces) using the
70+
`+` option which will `Create codespace on main` in the codebase repository on your
71+
fork with default options. For more control, see the `...` where you may create `New
72+
with options...`.
73+
+ Build time for a codespace is a few minutes. This is done infrequently and cached
74+
for convenience.
75+
+ Start time for a codespace is less than 1 minute. This will pull the built codespace
76+
from cache when you need it.
77+
+ *Tip*: Each month, GitHub renews a
78+
[free-tier](https://docs.github.com/en/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#monthly-included-storage-and-core-hours-for-personal-accounts)
79+
quota of compute and storage. Typically we run into the storage limits before
80+
anything else since Codespaces consume storage while stopped. It is best to delete
81+
Codespaces when not actively in use and recreate when needed. We'll soon be creating
82+
prebuilds to avoid larger build times. Once any portion of your quota is reached,
83+
you will need to wait for it to be reset at the end of your cycle or add billing
84+
info to your GitHub account to handle overages.
85+
+ *Tip*: GitHub auto names the codespace but you can rename the codespace so that it
86+
is easier to identify later.
87+
88+
+ Local Environment
89+
> *Note: Access to example data is currently limited to MacOS and Linux due to the
90+
> s3fs utility. Windows users are recommended to use the above environment.*
91+
+ Install [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
92+
+ Install [Docker](https://docs.docker.com/get-docker/)
93+
+ Install [VSCode](https://code.visualstudio.com/)
94+
+ Install the VSCode [Dev Containers
95+
extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
96+
+ `git clone` the codebase repository and open it in VSCode
97+
+ Use the `Dev Containers extension` to `Reopen in Container` (More info is in the
98+
`Getting started` included with the extension.)
99+
100+
You will know your environment has finished loading once you either see a terminal open
101+
related to `Running postStartCommand` with a final message of `Done` or the `README.md`
102+
is opened in `Preview`.
81103

82104
Once the environment has launched, please run the following command in the terminal:
83-
```
105+
```sh
84106
MYSQL_VER=8.0 docker compose -f docker-compose-db.yaml up --build -d
85107
```
86108

87109
### Instructions
88110

89-
1. We recommend you start by navigating to the `notebooks` directory on the left panel and go through the `tutorial.ipynb` Jupyter notebook. Execute the cells in the notebook to begin your walk through of the tutorial.
111+
1. We recommend you start by navigating to the `notebooks` directory on the left panel
112+
and go through the `tutorial.ipynb` Jupyter notebook. Execute the cells in the
113+
notebook to begin your walk through of the tutorial.
90114

91-
1. Once you are done, see the options available to you in the menu in the bottom-left corner. For example, in Codespace you will have an option to `Stop Current Codespace` but when running Dev Container on your own machine the equivalent option is `Reopen folder locally`. By default, GitHub will also automatically stop the Codespace after 30 minutes of inactivity. Once the Codespace is no longer being used, we recommend deleting the Codespace.
115+
2. Once you are done, see the options available to you in the menu in the bottom-left
116+
corner. For example, in Codespace you will have an option to `Stop Current Codespace`
117+
but when running Dev Container on your own machine the equivalent option is `Reopen
118+
folder locally`. By default, GitHub will also automatically stop the Codespace after
119+
30 minutes of inactivity. Once the Codespace is no longer being used, we recommend
120+
deleting the Codespace.

docs/src/partnerships.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Key partnerships
22

3-
Several labs have developed DataJoint-based data management and processing pipelines for two-photon calcium imaging. Our team collaborated with several of them during their projects. Additionally, we interviewed these teams to understand their experiment workflow, pipeline design, associated tools, and interfaces.
3+
Several labs have developed DataJoint-based data management and processing pipelines for
4+
two-photon calcium imaging. Our team collaborated with several of them during their
5+
projects. Additionally, we interviewed these teams to understand their experiment
6+
workflow, pipeline design, associated tools, and interfaces.
47

58
These teams include:
69

docs/src/pipeline.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,23 @@ corresponding table in the database. Within the pipeline, Element Calcium Imagi
55
connects to upstream Elements including Lab, Animal, Session, and Event. For more
66
detailed documentation on each table, see the API docs for the respective schemas.
77

8-
The Element is composed of two main schemas, `scan` and `imaging`. To handle
9-
several use cases of this pipeline, we have designed two alternatives to the `imaging`
10-
schema, including `imaging_no_curation` and `imaging_preprocess`.
8+
The Element is composed of two main schemas, `scan` and `imaging`.
119

1210
## Diagrams
1311

1412
### `imaging` module
1513

1614
- Multiple scans are acquired during each session and each scan is processed independently.
1715

18-
![pipeline](https://raw.githubusercontent.com/datajoint/element-calcium-imaging/main/images/pipeline_imaging.svg)
19-
20-
### `imaging_no_curation` module
21-
22-
- Same as the `imaging` module, but without the `Curation` table.
23-
2416
![pipeline](https://raw.githubusercontent.com/datajoint/element-calcium-imaging/main/images/pipeline_imaging_no_curation.svg)
2517

26-
### `imaging_preprocess` module
27-
28-
- Same as the `imaging` module, and additional pre-processing steps can be performed on each scan prior to processing with Suite2p or CaImAn.
29-
30-
![pipeline](https://raw.githubusercontent.com/datajoint/element-calcium-imaging/main/images/pipeline_imaging_preprocess.svg)
31-
3218
### `multi-scan-processing` branch
3319

34-
- The processing pipeline is typically performed on a per-scan basis, however, depending on the nature of the research questions, different labs may opt to perform processing/segmentation on a concatenated set of data from multiple scans. To this end, we have extended the Calcium Imaging Element and provided a design version capable of supporting a multi-scan processing scheme.
20+
- The processing pipeline is typically performed on a per-scan basis, however, depending
21+
on the nature of the research questions, different labs may opt to perform
22+
processing/segmentation on a concatenated set of data from multiple scans. To this
23+
end, we have extended the Calcium Imaging Element and provided a design version
24+
capable of supporting a multi-scan processing scheme.
3525

3626
## Table descriptions
3727

@@ -89,7 +79,6 @@ schema, including `imaging_no_curation` and `imaging_preprocess`.
8979
| MaskType | Available labels for segmented masks |
9080
| ProcessingTask | Task defined by a combination of Scan and ProcessingParamSet |
9181
| Processing | The core table that executes a ProcessingTask |
92-
| Curation | Curated results |
9382
| MotionCorrection | Results of the motion correction procedure |
9483
| MotionCorrection.RigidMotionCorrection | Details of the rigid motion correction performed on the imaging data |
9584
| MotionCorrection.NonRigidMotionCorrection | Details of nonrigid motion correction performed on the imaging data |

docs/src/roadmap.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ the common motifs to create Element Calcium Imaging. Major features include:
1818
- [ ] Deepinterpolation
1919
- [x] Data export to NWB
2020
- [x] Data publishing to DANDI
21-
- [x] Widgets for manual ROI mask creation and curation for cell segmentation of Fluorescent voltage sensitive indicators, neurotransmitter imaging, and neuromodulator imaging
22-
- [ ] Expand creation widget to provide pixel weights for each mask based on Fluorescence intensity traces at each pixel
21+
- [x] Widgets for manual ROI mask creation and curation for cell segmentation of
22+
Fluorescent voltage sensitive indicators, neurotransmitter imaging, and neuromodulator
23+
imaging
24+
- [ ] Expand creation widget to provide pixel weights for each mask based on
25+
Fluorescence intensity traces at each pixel
2326

2427
Further development of this Element is community driven. Upon user requests and based on
25-
guidance from the Scientific Steering Group we will continue adding features to this
28+
guidance from the Scientific Steering Group, we will continue adding features to this
2629
Element.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from . import imaging
2+
3+
imaging_no_curation = imaging # alias for backward compatibility

0 commit comments

Comments
 (0)