Skip to content

Commit 6ab3df2

Browse files
authored
Merge pull request #22 from ACRLab/dataset
Paper prep
2 parents a574fce + 983590e commit 6ab3df2

114 files changed

Lines changed: 1396 additions & 3361 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/draft-pdf.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Draft PDF
2+
on:
3+
push:
4+
paths:
5+
- paper/**
6+
- .github/workflows/draft-pdf.yaml
7+
8+
jobs:
9+
paper:
10+
runs-on: ubuntu-latest
11+
name: Paper Draft
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Build draft PDF
16+
uses: openjournals/openjournals-draft-action@master
17+
with:
18+
journal: joss
19+
paper-path: paper/paper.md
20+
- name: Upload
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: paper
24+
path: paper/paper.pdf

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# dir with input files
2-
*/data/
2+
snazzy_processing/data/*
3+
snazzy_analysis/data/*
4+
5+
# add annotated data for ROI length evaluation
6+
!snazzy_processing/data/20240611/
7+
snazzy_processing/data/20240611/*
8+
!snazzy_processing/data/20240611/annotated
9+
!snazzy_processing/data/20240611/emb_sizes
10+
311

412
# dir with output files
513
*/results/

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# SNAzzy: an image processing pipeline for investigating global Synchronous Network Activity
22

3+
SNAzzy is a Python package for studying synchronous network activity (SNA) in Drosophia embryos via high-thoughput microscopy.
4+
The software includes processing raw data into individual `.tif` files, quantification of fluorescence and changes in morphology, a custom peak detection algorithm, and a GUI for data visualization and curation.
5+
36
## Getting Started
47

8+
Refer to the README files inside the `snazzy_processing` or `snazzy_analysis` packages for details on running the code.
9+
510
### Installation
611

712
The project uses [conda](https://docs.conda.io) to manage dependencies.
@@ -19,6 +24,18 @@ Activate the environment:
1924
```
2025
conda activate snazzy-env
2126
```
27+
28+
## Testing
29+
30+
Tests can be run with pytest.
31+
32+
You can run the test suite from the project’s root directory to test everything at once.
33+
Make sure the environment is active, and then run:
34+
35+
```
36+
pytest
37+
```
38+
2239
## Contributing
2340

2441
Thank you for being interested in `snazzy`!

docs/source/Data_analysis/Graphical_User_Interface.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,13 @@ From this window it's possible to set:
9898
* To_remove: embryo numbers that will be analyzed, but will appear in the 'Removed' group.
9999
* Embryos that have it's first peak before the first peak threshold or that were marked by the user as removed will also be at the to_remove category.
100100
* Has_transients: if selected the code will try to identify and skip the first peak if it's likely just a transient.
101-
* Has_dsna: if selected the code will try to determine dSNA and ignore all peaks that happen after dSNA start.
102101
* Dff_strategy: Combo box with the baseline strategy methods. ``local_minima`` will pick the bottom 11 points out of the ``baseline_window_size`` and use that average as the baseline. ``baseline`` will split the DFF values into bins and use the average of the most frequent bin as the baseline. This method assumes that the bursts of activity are sparse, so that for all windows the most frequent bin falls into the baseline values.
103102

103+
The embryos listed in ``to_remove`` are not used for plotting and comparisons between Groups.
104+
There are different reasons for marking an embryo as removed.
105+
One example would be to remove embryos that already are in later stages of development when the imaging session starts.
106+
Another would be to remove unhealthy embryos, or embryos that don't hatch, if that is a requirement for the experiment.
107+
104108
Inside the File menu there is an option to open the ``json`` file and change any of its parameters.
105109
Updating the file causes the entire Dataset to be recreated with the new configuration data.
106110

docs/source/Data_analysis/Hatching_Point.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ It can also happen that an embryo is still inside the egg and a larva that alrea
1818
It's very rare that this scenario affects the ROI calculation, because we only consider the largest connected area for calculating the ROI, which is usually the VNC.
1919
If it does, then the only option is to remove that embryo.
2020

21-
When loading an experiment for the first time, it's worth it to visualize the structural channel signal of each embryo.
21+
When loading a dataset for the first time, it's worth it to visualize the structural channel signal of each embryo.
2222
On a few occasions, mostly due to very abrupt motion, the ROI is underestimated and the hatching point is determined earlier.
2323
In these cases, you can drag the line that indicates the hatching to a more accurate position or remove that embryo.
2424

docs/source/Data_analysis/Peak_Detection.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ Since the leftmost peak can have an amplitude very different than the local maxi
3939
3. Filter peaks by local threshold
4040
----------------------------------
4141

42+
This step is **not enabled** by default.
43+
To enable it the ``dff_peak_indices`` in ``trace.calculate_peaks`` must be passed to ``trace.filter_peaks_by_local_threshold``.
44+
4245
As the embryos develop, there is a global trend of peak amplitude to rise and then stabilize before hatching.
4346
We use this fact to perform an extra validation step for the calculated peaks.
4447
Each peak is compared against its neighboring peaks, and peaks that are too high or too low are discarted.

docs/source/Data_processing/ROI_length.rst renamed to docs/source/Data_processing/Neurodevelopmental_progression.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
Neurodevelopmental Time
2-
----------------
3-
Together the ROI length and the full embryo size are used as a proxy to measure the embryonic neurodevelopmental progression:
4-
5-
developmental_progression = embryo_length / ROI_length
6-
7-
ROI length
8-
==========
1+
Neurodevelopmental Progression
2+
==============================
93

104
The ROI length is calculated by center line estimation.
115
The general approach is to measure the line that will pass through the center of the ROI; this will correspond to the ventral nerve cord length.
126

7+
Together the ROI length and the full embryo size are used as a proxy to measure the embryonic neurodevelopmental progression:
8+
9+
.. math::
10+
neurodevelopmental\ progression = \frac{embryo\ length}{ROI\ length}
11+
1312
To determine the ROI length, the following steps are used:
1413

1514
1. Binarize the image
@@ -26,6 +25,7 @@ Embryo Full size
2625
The full specimen size is calculated by approximating the entire sample shape as an ellipse, and measuring this ellipse's diameter.
2726

2827
The steps to calculate the embryo's size are:
28+
2929
1. Equalize the image histogram
3030
2. Automatic threshold (Triangle method)
3131
3. Binarize the image

docs/source/Data_processing/Overview.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Refer to the other documentation pages for a description of the pipeline steps:
3434

3535
* `Process raw data <Process_raw_data.html>`__
3636
* `ROI and signal intensity <ROIs_and_signal_intensity.html>`__
37-
* `ROI length <ROI_length.html>`__
37+
* `Neurodevelopmental_progression <Neurodevelopmental_progression.html>`__

docs/source/Data_processing/ROIs_and_signal_intensity.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ To display it, ``cd`` into the ``snazzy_processing`` directory, and run the file
3636
3737
python3 scripts/plot_contours.py
3838
39-
It will look for any experiment directories you have inside the ``./data`` directory and present the available options in the terminal.
39+
It will look for any dataset directories you have inside the ``./data`` directory and present the available options in the terminal.
4040
Animations can be paused by pressing any key.

docs/source/Data_processing/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Data Processing
88
Overview
99
Process_raw_data
1010
ROIs_and_signal_intensity
11-
ROI_length
11+
Neurodevelopmental_progression

0 commit comments

Comments
 (0)