Skip to content

Commit e6a95cc

Browse files
authored
Merge pull request #41 from kabilar/main
Update `suite2p_trigger` documentation
2 parents 2ac1cce + d7c1ac7 commit e6a95cc

File tree

8 files changed

+182
-94
lines changed

8 files changed

+182
-94
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
## Bug Report
11+
12+
### Description
13+
14+
A clear and concise description of what is the overall operation that is intended to be
15+
performed that resulted in an error.
16+
17+
### Reproducibility
18+
Include:
19+
- OS (WIN | MACOS | Linux)
20+
- DataJoint Element Version
21+
- MySQL Version
22+
- MySQL Deployment Strategy (local-native | local-docker | remote)
23+
- Minimum number of steps to reliably reproduce the issue
24+
- Complete error stack as a result of evaluating the above steps
25+
26+
### Expected Behavior
27+
A clear and concise description of what you expected to happen.
28+
29+
### Screenshots
30+
If applicable, add screenshots to help explain your problem.
31+
32+
### Additional Research and Context
33+
Add any additional research or context that was conducted in creating this report.
34+
35+
For example:
36+
- Related GitHub issues and PR's either within this repository or in other relevant
37+
repositories.
38+
- Specific links to specific lines or a focus within source code.
39+
- Relevant summary of Maintainers development meetings, milestones, projects, etc.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: DataJoint Contribution Guideline
4+
url: https://docs.datajoint.org/python/community/02-Contribute.html
5+
about: Please make sure to review the DataJoint Contribution Guidelines
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for a new feature
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
## Feature Request
11+
12+
### Problem
13+
14+
A clear and concise description how this idea has manifested and the context. Elaborate
15+
on the need for this feature and/or what could be improved. Ex. I'm always frustrated
16+
when [...]
17+
18+
### Requirements
19+
20+
A clear and concise description of the requirements to satisfy the new feature. Detail
21+
what you expect from a successful implementation of the feature. Ex. When using this
22+
feature, it should [...]
23+
24+
### Justification
25+
26+
Provide the key benefits in making this a supported feature. Ex. Adding support for this
27+
feature would ensure [...]
28+
29+
### Alternative Considerations
30+
31+
Do you currently have a work-around for this? Provide any alternative solutions or
32+
features you've considered.
33+
34+
### Related Errors
35+
Add any errors as a direct result of not exposing this feature.
36+
37+
Please include steps to reproduce provided errors as follows:
38+
- OS (WIN | MACOS | Linux)
39+
- DataJoint Element Version
40+
- MySQL Version
41+
- MySQL Deployment Strategy (local-native | local-docker | remote)
42+
- Minimum number of steps to reliably reproduce the issue
43+
- Complete error stack as a result of evaluating the above steps
44+
45+
### Screenshots
46+
If applicable, add screenshots to help explain your feature.
47+
48+
### Additional Research and Context
49+
Add any additional research or context that was conducted in creating this feature request.
50+
51+
For example:
52+
- Related GitHub issues and PR's either within this repository or in other relevant
53+
repositories.
54+
- Specific links to specific lines or a focus within source code.
55+
- Relevant summary of Maintainers development meetings, milestones, projects, etc.
56+
- Any additional supplemental web references or links that would further justify this
57+
feature request.

CHANGELOG.md

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

55
## [0.3.0] - 2022-10-7
6+
67
+ Add - Function `prairieviewreader` to parse metadata from Bruker PrarieView acquisition system
78

9+
810
## 0.2.1 - 2022-07-13
11+
912
+ Add - Adopt `black` formatting
1013
+ Add - Code of Conduct
1114

1215
## 0.2.0 - 2022-07-06
16+
1317
+ First release of `element-interface`.
1418
+ Bugfix - Fix for `tifffile` import.
1519
+ Add - Function `run_caiman` to trigger CNMF algorithm.
@@ -19,9 +23,11 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
1923
+ Update - Remove `extras_require` feature to allow this package to be published to PyPI.
2024

2125
## 0.1.0a1 - 2022-01-12
26+
2227
+ Change - Rename the package `element-data-loader` to `element-interface`.
2328

2429
## 0.1.0a0 - 2021-06-21
30+
2531
+ Add - Readers for: `ScanImage`, `Suite2p`, `CaImAn`.
2632

2733
[0.3.0]: https://github.com/datajoint/element-interface/releases/tag/0.3.0

README.md

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,24 @@ repositories for example usage of `element-interface`.
6060
loaded_dataset = suite2p_loader.Suite2p(output_dir)
6161
```
6262
63-
6463
+ Suite2p wrapper functions for triggering analysis
6564
66-
Each step of Suite2p (registration, segmentation and deconvolution)
67-
can be run independently for single plane tiff files. The functions in this
68-
package will facilitate this process. Requirements include the [ops dictionary](
69-
https://suite2p.readthedocs.io/en/latest/settings.html) and db dictionary.
70-
These wrapper functions were developed primarily because `run_s2p` cannot
71-
individually run deconvolution using the `spikedetect` flag
72-
([Suite2p Issue #718](https://github.com/MouseLand/suite2p/issues/718)).
65+
+ Functions to independently run Suite2p's motion correction, segmentation, and deconvolution steps. These functions currently work for single plane tiff files. If running all Suite2p pre-processing steps concurrently, these functions are not required and one can run `suite2p.run_s2p()`.
7366
74-
```python
75-
from element_data_loader.suite2p_trigger import motion_correction_suite2p,
76-
segmentation_suite2p, deconvolution_suite2p
77-
from suite2p import default_ops
67+
+ These wrapper functions were developed primarily because `run_s2p` cannot individually run deconvolution using the `spikedetect` flag ([Suite2p Issue #718](https://github.com/MouseLand/suite2p/issues/718)).
7868
79-
ops = dict(default_ops(), nonrigid=False, two_step_registration=False)
80-
```
81-
Details of db dictionary can be found [here](https://github.com/MouseLand/suite2p/blob/4b6c3a95b53e5581dbab1feb26d67878db866068/jupyter/run_pipeline_tiffs_or_batch.ipynb)
69+
+ Requirements
70+
+ [ops dictionary](https://suite2p.readthedocs.io/en/latest/settings.html)
71+
+ [db dictionary](https://github.com/MouseLand/suite2p/blob/4b6c3a95b53e5581dbab1feb26d67878db866068/jupyter/run_pipeline_tiffs_or_batch.ipynb)
72+
73+
+ Note that the ops dictionary returned from the `motion_correction_suite2p` and `segmentation_suite2p` functions is only a subset of the keys generated with the `suite2p.default_ops()` function.
8274
8375
```python
76+
import element_interface
77+
import suite2p
78+
79+
ops = dict(suite2p.default_ops(), nonrigid=False, two_step_registration=False)
80+
8481
db = {
8582
'h5py': [], # single h5 file path
8683
'h5py_key': 'data',
@@ -91,13 +88,13 @@ repositories for example usage of `element-interface`.
9188
}
9289
9390
ops.update(do_registration=1, roidetect=False, spikedetect=False)
94-
registration_ops = motion_registration_suite2p(ops, db)
91+
motion_correction_ops = element_interface.suite2p_trigger.motion_correction_suite2p(ops, db)
9592
96-
registration_ops.update(do_registration=0, roidetect=True, spikedetect=False)
97-
segmentation_ops = segmentation_suite2p(registration_ops, db)
93+
motion_correction_ops.update(do_registration=0, roidetect=True, spikedetect=False)
94+
segmentation_ops = element_interface.suite2p_trigger.segmentation_suite2p(motion_correction_ops, db)
9895
9996
segmentation_ops.update(do_registration=0, roidetect=False, spikedetect=True)
100-
spikes = deconvolution_suite2p(segmentation_ops, db)
97+
spikes = element_interface.suite2p_trigger.deconvolution_suite2p(segmentation_ops, db)
10198
```
10299
103100

0 commit comments

Comments
 (0)