fucciphase 0.0.2__tar.gz → 0.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fucciphase-0.0.2 → fucciphase-0.0.3}/.copier-answers.yml +1 -1
- {fucciphase-0.0.2 → fucciphase-0.0.3}/.github/workflows/ci.yml +4 -4
- {fucciphase-0.0.2 → fucciphase-0.0.3}/.pre-commit-config.yaml +3 -3
- fucciphase-0.0.3/PKG-INFO +238 -0
- fucciphase-0.0.3/README.md +190 -0
- fucciphase-0.0.3/examples/README.md +140 -0
- fucciphase-0.0.3/examples/notebooks/Hacat_percentages_white_similarity_dtw_fucciphase_all_tracks.mov +0 -0
- fucciphase-0.0.3/examples/notebooks/README.md +34 -0
- {fucciphase-0.0.2/example → fucciphase-0.0.3/examples/notebooks}/color-tails-by-percentage.ipynb +49 -37
- {fucciphase-0.0.2/example → fucciphase-0.0.3/examples/notebooks}/example_estimated.ipynb +28 -16
- {fucciphase-0.0.2/example → fucciphase-0.0.3/examples/notebooks}/example_reconstruction.ipynb +51 -31
- {fucciphase-0.0.2/example → fucciphase-0.0.3/examples/notebooks}/example_simulated.ipynb +35 -15
- {fucciphase-0.0.2/example → fucciphase-0.0.3/examples/notebooks}/explanation-dtw-alignment.ipynb +30 -16
- {fucciphase-0.0.2/example/reproducibility → fucciphase-0.0.3/examples/notebooks}/extract_calibration_data.ipynb +65 -18
- {fucciphase-0.0.2/example → fucciphase-0.0.3/examples/notebooks}/getting_started.ipynb +21 -23
- fucciphase-0.0.3/examples/notebooks/movie_tails_percentages.mp4 +0 -0
- {fucciphase-0.0.2/example/reproducibility → fucciphase-0.0.3/examples/notebooks}/percentage_reconstruction.ipynb +59 -31
- {fucciphase-0.0.2/example/reproducibility → fucciphase-0.0.3/examples/notebooks}/phaselocking-workflow-lazy.ipynb +72 -25
- {fucciphase-0.0.2/example → fucciphase-0.0.3/examples/notebooks}/sensor_calibration.ipynb +48 -34
- fucciphase-0.0.3/examples/reproducibility/README.md +144 -0
- fucciphase-0.0.3/examples/reproducibility/inputs/hacat_fucciphase_reference.csv +102 -0
- fucciphase-0.0.3/examples/reproducibility/inputs/labels.tif +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/pyproject.toml +6 -3
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/__init__.py +7 -1
- fucciphase-0.0.3/src/fucciphase/__main__.py +12 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/fucci_phase.py +97 -51
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/io.py +16 -12
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/main_cli.py +72 -9
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/napari/tracks_to_napari.py +14 -16
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/phase.py +77 -74
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/plot.py +236 -87
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/sensor.py +31 -31
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/tracking_utilities.py +63 -8
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/utils/__init__.py +14 -1
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/utils/checks.py +2 -5
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/utils/dtw.py +2 -4
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/utils/normalize.py +6 -8
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/utils/simulator.py +1 -1
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/utils/track_postprocessing.py +6 -8
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/utils/trackmate.py +12 -12
- fucciphase-0.0.2/PKG-INFO +0 -137
- fucciphase-0.0.2/README.md +0 -95
- fucciphase-0.0.2/example/README.md +0 -32
- fucciphase-0.0.2/example/reproducibility/PaperVideo/README.md +0 -25
- fucciphase-0.0.2/example/reproducibility/README.md +0 -6
- {fucciphase-0.0.2 → fucciphase-0.0.3}/.github/ISSUE_TEMPLATE.md +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/.github/TEST_FAIL_TEMPLATE.md +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/.github/dependabot.yml +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/.gitignore +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/LICENSE +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/doc/Makefile +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/doc/api.rst +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/doc/conf.py +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/doc/examples/examples.rst +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/doc/examples/simulator.rst +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/doc/index.rst +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/doc/sensor.rst +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/doc/usage/installation.rst +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/doc/usage/quickstart.rst +0 -0
- {fucciphase-0.0.2/example → fucciphase-0.0.3/examples}/example_data/example_data_tempophase.csv +0 -0
- {fucciphase-0.0.2/example → fucciphase-0.0.3/examples}/example_data/fuccisa_hacat.json +0 -0
- {fucciphase-0.0.2/example → fucciphase-0.0.3/examples}/example_data/fuccisa_hela_molcel_2017.json +0 -0
- {fucciphase-0.0.2/example → fucciphase-0.0.3/examples}/example_data/fuccisa_tempophase.json +0 -0
- {fucciphase-0.0.2/example → fucciphase-0.0.3/examples}/example_data/hacat_fucciphase_reference.csv +0 -0
- {fucciphase-0.0.2/example/reproducibility/PaperVideo → fucciphase-0.0.3/examples/reproducibility/inputs}/downscaled_hacat.ome.tif +0 -0
- {fucciphase-0.0.2/example/reproducibility/PaperVideo → fucciphase-0.0.3/examples/reproducibility/inputs}/merged_linked.ome.xml +0 -0
- {fucciphase-0.0.2/example/reproducibility/PaperVideo → fucciphase-0.0.3/examples/reproducibility/outputs}/thumbnail.png +0 -0
- {fucciphase-0.0.2/example/reproducibility/PaperVideo → fucciphase-0.0.3/examples/reproducibility/outputs}/video_downscaled_hacat.mp4 +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/napari/__init__.py +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/py.typed +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/src/fucciphase/utils/phase_fit.py +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/tests/conftest.py +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/tests/test_dtw_utils.py +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/tests/test_fucciphase.py +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/tests/test_io.py +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/tests/test_normalize.py +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/tests/test_simulator.py +0 -0
- {fucciphase-0.0.2 → fucciphase-0.0.3}/tests/test_trackmate.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Do not edit - changes here will be overwritten by Copier
|
|
2
2
|
_commit: v1.0
|
|
3
3
|
_src_path: gh:pydev-guide/pyrepo-copier
|
|
4
|
-
author_email: first.last@
|
|
4
|
+
author_email: first.last@examples.com
|
|
5
5
|
author_name: Joran Deschamps
|
|
6
6
|
git_versioning: true
|
|
7
7
|
github_username: jdeschamps
|
|
@@ -18,7 +18,7 @@ jobs:
|
|
|
18
18
|
# included in the sdist (unless explicitly excluded)
|
|
19
19
|
runs-on: ubuntu-latest
|
|
20
20
|
steps:
|
|
21
|
-
- uses: actions/checkout@
|
|
21
|
+
- uses: actions/checkout@v6
|
|
22
22
|
- run: pipx run check-manifest
|
|
23
23
|
|
|
24
24
|
test:
|
|
@@ -27,7 +27,7 @@ jobs:
|
|
|
27
27
|
strategy:
|
|
28
28
|
fail-fast: false
|
|
29
29
|
matrix:
|
|
30
|
-
python-version: ["3.
|
|
30
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
31
31
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
32
32
|
|
|
33
33
|
steps:
|
|
@@ -36,7 +36,7 @@ jobs:
|
|
|
36
36
|
with:
|
|
37
37
|
access_token: ${{ github.token }}
|
|
38
38
|
|
|
39
|
-
- uses: actions/checkout@
|
|
39
|
+
- uses: actions/checkout@v6
|
|
40
40
|
|
|
41
41
|
- name: 🐍 Set up Python ${{ matrix.python-version }}
|
|
42
42
|
uses: actions/setup-python@v6
|
|
@@ -85,7 +85,7 @@ jobs:
|
|
|
85
85
|
contents: write
|
|
86
86
|
|
|
87
87
|
steps:
|
|
88
|
-
- uses: actions/checkout@
|
|
88
|
+
- uses: actions/checkout@v6
|
|
89
89
|
with:
|
|
90
90
|
fetch-depth: 0
|
|
91
91
|
|
|
@@ -14,7 +14,7 @@ repos:
|
|
|
14
14
|
- id: validate-pyproject
|
|
15
15
|
|
|
16
16
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
17
|
-
rev: v0.
|
|
17
|
+
rev: v0.14.7
|
|
18
18
|
hooks:
|
|
19
19
|
- id: ruff
|
|
20
20
|
types_or: [python, pyi, jupyter]
|
|
@@ -22,7 +22,7 @@ repos:
|
|
|
22
22
|
- id: ruff-format
|
|
23
23
|
|
|
24
24
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
25
|
-
rev: v1.
|
|
25
|
+
rev: v1.19.0
|
|
26
26
|
hooks:
|
|
27
27
|
- id: mypy
|
|
28
28
|
files: "^src/"
|
|
@@ -32,6 +32,6 @@ repos:
|
|
|
32
32
|
|
|
33
33
|
# strip out jupyter notebooks
|
|
34
34
|
- repo: https://github.com/kynan/nbstripout
|
|
35
|
-
rev: 0.8.
|
|
35
|
+
rev: 0.8.2
|
|
36
36
|
hooks:
|
|
37
37
|
- id: nbstripout
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fucciphase
|
|
3
|
+
Version: 0.0.3
|
|
4
|
+
Summary: Cell cycle analysis plugin.
|
|
5
|
+
Project-URL: homepage, https://github.com/nobias-ht/fucciphase
|
|
6
|
+
Project-URL: repository, https://github.com/nobias-ht/fucciphase
|
|
7
|
+
Author-email: Joran Deschamps <joran.deschamps@fht.org>
|
|
8
|
+
License: BSD-3-Clause
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Requires-Python: >=3.8
|
|
19
|
+
Requires-Dist: dtaidistance
|
|
20
|
+
Requires-Dist: lineagetree<1.5.0
|
|
21
|
+
Requires-Dist: matplotlib
|
|
22
|
+
Requires-Dist: monotonic-derivative
|
|
23
|
+
Requires-Dist: numpy
|
|
24
|
+
Requires-Dist: openpyxl
|
|
25
|
+
Requires-Dist: pandas
|
|
26
|
+
Requires-Dist: scipy
|
|
27
|
+
Requires-Dist: svgwrite
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: ipython; extra == 'dev'
|
|
30
|
+
Requires-Dist: mypy; extra == 'dev'
|
|
31
|
+
Requires-Dist: pdbpp; extra == 'dev'
|
|
32
|
+
Requires-Dist: pre-commit; extra == 'dev'
|
|
33
|
+
Requires-Dist: rich; extra == 'dev'
|
|
34
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
35
|
+
Provides-Extra: doc
|
|
36
|
+
Requires-Dist: sphinx; extra == 'doc'
|
|
37
|
+
Provides-Extra: jupyter
|
|
38
|
+
Requires-Dist: jupyter; extra == 'jupyter'
|
|
39
|
+
Provides-Extra: napari
|
|
40
|
+
Requires-Dist: bioio; extra == 'napari'
|
|
41
|
+
Requires-Dist: bioio-ome-tiff; extra == 'napari'
|
|
42
|
+
Requires-Dist: bioio-tifffile; extra == 'napari'
|
|
43
|
+
Requires-Dist: napari; extra == 'napari'
|
|
44
|
+
Provides-Extra: test
|
|
45
|
+
Requires-Dist: pytest; extra == 'test'
|
|
46
|
+
Requires-Dist: pytest-cov; extra == 'test'
|
|
47
|
+
Description-Content-Type: text/markdown
|
|
48
|
+
|
|
49
|
+
# fucciphase
|
|
50
|
+
|
|
51
|
+
[](https://github.com/Synthetic-Physiology-Lab/fucciphase/raw/main/LICENSE)
|
|
52
|
+
[](https://pypi.org/project/fucciphase)
|
|
53
|
+
[](https://python.org)
|
|
54
|
+
[](https://github.com/Synthetic-Physiology-Lab/fucciphase/actions/workflows/ci.yml)
|
|
55
|
+
[](https://codecov.io/gh/Synthetic-Physiology-Lab/fucciphase)
|
|
56
|
+
[](https://results.pre-commit.ci/latest/github/Synthetic-Physiology-Lab/fucciphase/main)
|
|
57
|
+
|
|
58
|
+
FUCCI cell cycle analysis plugin. Obtain cell cycle information from FUCCI fluorescence intensities.
|
|
59
|
+
|
|
60
|
+
## Installation
|
|
61
|
+
The best way to run fucciphase is to install it in a virtual conda environment.
|
|
62
|
+
Make sure that git is installed and can be called from the command line.
|
|
63
|
+
|
|
64
|
+
To install from pip:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pip install fucciphase
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If you wish to install it from source:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
git clone https://github.com/Synthetic-Physiology-Lab/fucciphase
|
|
74
|
+
cd fucciphase
|
|
75
|
+
pip install -e .
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The installation should not take longer than a few seconds (depending on your internet connection).
|
|
79
|
+
|
|
80
|
+
A minimal environment for running the [notebooks](examples/notebooks) can be set up with:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pip install fucciphase jupyter matplotlib pandas
|
|
84
|
+
````
|
|
85
|
+
|
|
86
|
+
### Install Napari + movie reading support (optional)
|
|
87
|
+
|
|
88
|
+
FUCCIphase does not install Napari by default. For .ome.tif visualisation, install:
|
|
89
|
+
```bash
|
|
90
|
+
pip install napari bioio bioio-ome-tiff bioio-tifffile
|
|
91
|
+
```
|
|
92
|
+
or, if installing from source with extras:
|
|
93
|
+
```bash
|
|
94
|
+
pip install -e ".[napari]"
|
|
95
|
+
```
|
|
96
|
+
---
|
|
97
|
+
## What’s Inside This Repository
|
|
98
|
+
|
|
99
|
+
This repository is organized to support both **analysis workflows** and **reproducible usage examples** of FUCCIphase.
|
|
100
|
+
If you're new to the tool, this is where to start.
|
|
101
|
+
|
|
102
|
+
### 1 — `examples/notebooks/` [📁 notebooks](examples/notebooks)
|
|
103
|
+
|
|
104
|
+
Interactive Jupyter workflows demonstrating how to use FUCCIphase in practical scenarios.
|
|
105
|
+
|
|
106
|
+
| Notebook | Purpose |
|
|
107
|
+
| ---------------------------------- |----------------------------------------------------------------|
|
|
108
|
+
| `extract_calibration_data.ipynb` | Convert raw movies + TrackMate XML into FUCCI reference curves |
|
|
109
|
+
| `sensor_calibration.ipynb` | Build a FUCCI sensor model from calibration traces |
|
|
110
|
+
| `getting_started.ipynb` | Minimal end-to-end example of FUCCIphase usage |
|
|
111
|
+
| `example_estimated.ipynb` | Visualize fucciphase output tables |
|
|
112
|
+
| `percentage_reconstruction.ipynb` | Smooth and reconstruct %phase trajectories |
|
|
113
|
+
| `example_reconstruction.ipynb` | Recover incomplete/noisy fluorescence traces |
|
|
114
|
+
| `example_simulated.ipynb` | Generate synthetic FUCCI signals for testing |
|
|
115
|
+
| `color-tails-by-percentage.ipynb` | Visualize population-level phase composition |
|
|
116
|
+
| `explanation-dtw-alignment.ipynb` | How DTW alignment works internally |
|
|
117
|
+
| `phaselocking-workflow-lazy.ipynb` | Scalable phase-locking for large datasets |
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
### 2 — `examples/reproducibility/` [📁 reproducibility](examples/reproducibility)
|
|
121
|
+
|
|
122
|
+
This is a minimal workflow that uses the sample data. Navigate to the reproducibility directory, then run the following command in one step:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
fucciphase inputs/merged_linked.ome.xml `
|
|
126
|
+
-ref ../example_data/hacat_fucciphase_reference.csv `
|
|
127
|
+
-dt 0.25 `
|
|
128
|
+
-m MEAN_INTENSITY_CH1 `
|
|
129
|
+
-c MEAN_INTENSITY_CH2 `
|
|
130
|
+
--generate_unique_tracks true `
|
|
131
|
+
```
|
|
132
|
+
and to visualize results in napari:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
fucciphase-napari outputs/merged_linked.ome_processed.csv inputs/downscaled_hacat.ome.tif -m 0 -c 1 -s 2 --pixel_size 0.544
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Below a preview of the output generated by the reproducibility workflow:
|
|
139
|
+
|
|
140
|
+
[](outputs/video_downscaled_hacat.mp4)
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
### 3 — `examples/example_data/` [📁 example_data](examples/example_data)
|
|
145
|
+
|
|
146
|
+
Reference-style FUCCI datasets used for **calibration & sensor building**.
|
|
147
|
+
|
|
148
|
+
Includes:
|
|
149
|
+
|
|
150
|
+
| File | Meaning |
|
|
151
|
+
| ------------------ | ------------------------------------------------- |
|
|
152
|
+
| `*_reference.csv` | FUCCI calibration traces used to learn the sensor |
|
|
153
|
+
| `*.json` | Saved sensor models usable via CLI or notebooks |
|
|
154
|
+
|
|
155
|
+
Use this folder if you want to train your own sensor or understand expected input format.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
## Basic usage
|
|
159
|
+
|
|
160
|
+
Fucci phase currently supports loading a
|
|
161
|
+
[TrackMate](https://imagej.net/plugins/trackmate/) XML file:
|
|
162
|
+
|
|
163
|
+
```python
|
|
164
|
+
from fucciphase import process_trackmate
|
|
165
|
+
from fucciphase.sensor import get_fuccisa_default_sensor
|
|
166
|
+
|
|
167
|
+
trackmate_xml = "path/to/trackmate.xml"
|
|
168
|
+
channel1 = "MEAN_INTENSITY_CH3"
|
|
169
|
+
channel2 = "MEAN_INTENSITY_CH4"
|
|
170
|
+
|
|
171
|
+
sensor = get_fuccisa_default_sensor()
|
|
172
|
+
|
|
173
|
+
df = process_trackmate(trackmate_xml,
|
|
174
|
+
channels=[channel1, channel2],
|
|
175
|
+
sensor=sensor,
|
|
176
|
+
thresholds=[0.1, 0.1])
|
|
177
|
+
print(df)
|
|
178
|
+
```
|
|
179
|
+
The TrackMate XML is converted to a [Pandas](https://pandas.pydata.org/) DataFrame.
|
|
180
|
+
Thus, in general data (e.g., stored in a CSV or XLSX file) that can be parsed into
|
|
181
|
+
a DataFrame is supported.
|
|
182
|
+
|
|
183
|
+
The runtime of the scripts depends on your datasize. 2D samples with a few hundred to a few thousand cells
|
|
184
|
+
can be processed in a few minutes. Visualization in Napari can take a bit longer.
|
|
185
|
+
Standard processing does not require a powerful computer.
|
|
186
|
+
Make sure that you have sufficient RAM to load videos for visualization in Napari.
|
|
187
|
+
|
|
188
|
+
### Using your own data
|
|
189
|
+
|
|
190
|
+
To process your own dataset:
|
|
191
|
+
|
|
192
|
+
1. Export tracking from Fiji/TrackMate as `.xml`
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
2. Build a reference CSV (minimum one full cell cycle):
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
percentage, time, cyan, magenta
|
|
199
|
+
```
|
|
200
|
+
For reference, check the example files available in the `example_data` folder.
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
3. Run:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
fucciphase your_tracks.xml -ref your_reference.csv -dt <your timestep> -m <ch1> -c <ch2>
|
|
207
|
+
```
|
|
208
|
+
4. Visualize with:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
fucciphase-napari your_tracks_processed.csv your_video.ome.tif -m <ch1> -c <ch2> -s <mask>
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
## Development
|
|
216
|
+
|
|
217
|
+
To develop fucciphase, clone the repository, install fucciphase in your environment
|
|
218
|
+
and install the pre-commit hooks:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
git clone https://github.com/Synthetic-Physiology-Lab/fucciphase
|
|
222
|
+
cd fucciphase
|
|
223
|
+
pip install -e ".[test, dev]"
|
|
224
|
+
pre-commit install
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
If you want to build the documentation, replace the abovementioned pip install by:
|
|
228
|
+
```bash
|
|
229
|
+
pip install -e ".[test, dev, doc]"
|
|
230
|
+
```
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Cite us
|
|
234
|
+
|
|
235
|
+
Di Sante, M., Pezzotti, M., Zimmermann, J., Enrico, A., Deschamps, J., Balmas, E.,
|
|
236
|
+
Becca, S., Solito, S., Reali, A., Bertero, A., Jug, F. and Pasqualini, F.S., 2025.
|
|
237
|
+
CALIPERS: Cell cycle-aware live imaging for phenotyping experiments and regeneration studies.
|
|
238
|
+
bioRxiv, https://doi.org/10.1101/2024.12.19.629259
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# fucciphase
|
|
2
|
+
|
|
3
|
+
[](https://github.com/Synthetic-Physiology-Lab/fucciphase/raw/main/LICENSE)
|
|
4
|
+
[](https://pypi.org/project/fucciphase)
|
|
5
|
+
[](https://python.org)
|
|
6
|
+
[](https://github.com/Synthetic-Physiology-Lab/fucciphase/actions/workflows/ci.yml)
|
|
7
|
+
[](https://codecov.io/gh/Synthetic-Physiology-Lab/fucciphase)
|
|
8
|
+
[](https://results.pre-commit.ci/latest/github/Synthetic-Physiology-Lab/fucciphase/main)
|
|
9
|
+
|
|
10
|
+
FUCCI cell cycle analysis plugin. Obtain cell cycle information from FUCCI fluorescence intensities.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
The best way to run fucciphase is to install it in a virtual conda environment.
|
|
14
|
+
Make sure that git is installed and can be called from the command line.
|
|
15
|
+
|
|
16
|
+
To install from pip:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install fucciphase
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If you wish to install it from source:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
git clone https://github.com/Synthetic-Physiology-Lab/fucciphase
|
|
26
|
+
cd fucciphase
|
|
27
|
+
pip install -e .
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The installation should not take longer than a few seconds (depending on your internet connection).
|
|
31
|
+
|
|
32
|
+
A minimal environment for running the [notebooks](examples/notebooks) can be set up with:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install fucciphase jupyter matplotlib pandas
|
|
36
|
+
````
|
|
37
|
+
|
|
38
|
+
### Install Napari + movie reading support (optional)
|
|
39
|
+
|
|
40
|
+
FUCCIphase does not install Napari by default. For .ome.tif visualisation, install:
|
|
41
|
+
```bash
|
|
42
|
+
pip install napari bioio bioio-ome-tiff bioio-tifffile
|
|
43
|
+
```
|
|
44
|
+
or, if installing from source with extras:
|
|
45
|
+
```bash
|
|
46
|
+
pip install -e ".[napari]"
|
|
47
|
+
```
|
|
48
|
+
---
|
|
49
|
+
## What’s Inside This Repository
|
|
50
|
+
|
|
51
|
+
This repository is organized to support both **analysis workflows** and **reproducible usage examples** of FUCCIphase.
|
|
52
|
+
If you're new to the tool, this is where to start.
|
|
53
|
+
|
|
54
|
+
### 1 — `examples/notebooks/` [📁 notebooks](examples/notebooks)
|
|
55
|
+
|
|
56
|
+
Interactive Jupyter workflows demonstrating how to use FUCCIphase in practical scenarios.
|
|
57
|
+
|
|
58
|
+
| Notebook | Purpose |
|
|
59
|
+
| ---------------------------------- |----------------------------------------------------------------|
|
|
60
|
+
| `extract_calibration_data.ipynb` | Convert raw movies + TrackMate XML into FUCCI reference curves |
|
|
61
|
+
| `sensor_calibration.ipynb` | Build a FUCCI sensor model from calibration traces |
|
|
62
|
+
| `getting_started.ipynb` | Minimal end-to-end example of FUCCIphase usage |
|
|
63
|
+
| `example_estimated.ipynb` | Visualize fucciphase output tables |
|
|
64
|
+
| `percentage_reconstruction.ipynb` | Smooth and reconstruct %phase trajectories |
|
|
65
|
+
| `example_reconstruction.ipynb` | Recover incomplete/noisy fluorescence traces |
|
|
66
|
+
| `example_simulated.ipynb` | Generate synthetic FUCCI signals for testing |
|
|
67
|
+
| `color-tails-by-percentage.ipynb` | Visualize population-level phase composition |
|
|
68
|
+
| `explanation-dtw-alignment.ipynb` | How DTW alignment works internally |
|
|
69
|
+
| `phaselocking-workflow-lazy.ipynb` | Scalable phase-locking for large datasets |
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### 2 — `examples/reproducibility/` [📁 reproducibility](examples/reproducibility)
|
|
73
|
+
|
|
74
|
+
This is a minimal workflow that uses the sample data. Navigate to the reproducibility directory, then run the following command in one step:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
fucciphase inputs/merged_linked.ome.xml `
|
|
78
|
+
-ref ../example_data/hacat_fucciphase_reference.csv `
|
|
79
|
+
-dt 0.25 `
|
|
80
|
+
-m MEAN_INTENSITY_CH1 `
|
|
81
|
+
-c MEAN_INTENSITY_CH2 `
|
|
82
|
+
--generate_unique_tracks true `
|
|
83
|
+
```
|
|
84
|
+
and to visualize results in napari:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
fucciphase-napari outputs/merged_linked.ome_processed.csv inputs/downscaled_hacat.ome.tif -m 0 -c 1 -s 2 --pixel_size 0.544
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Below a preview of the output generated by the reproducibility workflow:
|
|
91
|
+
|
|
92
|
+
[](outputs/video_downscaled_hacat.mp4)
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
### 3 — `examples/example_data/` [📁 example_data](examples/example_data)
|
|
97
|
+
|
|
98
|
+
Reference-style FUCCI datasets used for **calibration & sensor building**.
|
|
99
|
+
|
|
100
|
+
Includes:
|
|
101
|
+
|
|
102
|
+
| File | Meaning |
|
|
103
|
+
| ------------------ | ------------------------------------------------- |
|
|
104
|
+
| `*_reference.csv` | FUCCI calibration traces used to learn the sensor |
|
|
105
|
+
| `*.json` | Saved sensor models usable via CLI or notebooks |
|
|
106
|
+
|
|
107
|
+
Use this folder if you want to train your own sensor or understand expected input format.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
## Basic usage
|
|
111
|
+
|
|
112
|
+
Fucci phase currently supports loading a
|
|
113
|
+
[TrackMate](https://imagej.net/plugins/trackmate/) XML file:
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
from fucciphase import process_trackmate
|
|
117
|
+
from fucciphase.sensor import get_fuccisa_default_sensor
|
|
118
|
+
|
|
119
|
+
trackmate_xml = "path/to/trackmate.xml"
|
|
120
|
+
channel1 = "MEAN_INTENSITY_CH3"
|
|
121
|
+
channel2 = "MEAN_INTENSITY_CH4"
|
|
122
|
+
|
|
123
|
+
sensor = get_fuccisa_default_sensor()
|
|
124
|
+
|
|
125
|
+
df = process_trackmate(trackmate_xml,
|
|
126
|
+
channels=[channel1, channel2],
|
|
127
|
+
sensor=sensor,
|
|
128
|
+
thresholds=[0.1, 0.1])
|
|
129
|
+
print(df)
|
|
130
|
+
```
|
|
131
|
+
The TrackMate XML is converted to a [Pandas](https://pandas.pydata.org/) DataFrame.
|
|
132
|
+
Thus, in general data (e.g., stored in a CSV or XLSX file) that can be parsed into
|
|
133
|
+
a DataFrame is supported.
|
|
134
|
+
|
|
135
|
+
The runtime of the scripts depends on your datasize. 2D samples with a few hundred to a few thousand cells
|
|
136
|
+
can be processed in a few minutes. Visualization in Napari can take a bit longer.
|
|
137
|
+
Standard processing does not require a powerful computer.
|
|
138
|
+
Make sure that you have sufficient RAM to load videos for visualization in Napari.
|
|
139
|
+
|
|
140
|
+
### Using your own data
|
|
141
|
+
|
|
142
|
+
To process your own dataset:
|
|
143
|
+
|
|
144
|
+
1. Export tracking from Fiji/TrackMate as `.xml`
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
2. Build a reference CSV (minimum one full cell cycle):
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
percentage, time, cyan, magenta
|
|
151
|
+
```
|
|
152
|
+
For reference, check the example files available in the `example_data` folder.
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
3. Run:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
fucciphase your_tracks.xml -ref your_reference.csv -dt <your timestep> -m <ch1> -c <ch2>
|
|
159
|
+
```
|
|
160
|
+
4. Visualize with:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
fucciphase-napari your_tracks_processed.csv your_video.ome.tif -m <ch1> -c <ch2> -s <mask>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
## Development
|
|
168
|
+
|
|
169
|
+
To develop fucciphase, clone the repository, install fucciphase in your environment
|
|
170
|
+
and install the pre-commit hooks:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
git clone https://github.com/Synthetic-Physiology-Lab/fucciphase
|
|
174
|
+
cd fucciphase
|
|
175
|
+
pip install -e ".[test, dev]"
|
|
176
|
+
pre-commit install
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
If you want to build the documentation, replace the abovementioned pip install by:
|
|
180
|
+
```bash
|
|
181
|
+
pip install -e ".[test, dev, doc]"
|
|
182
|
+
```
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Cite us
|
|
186
|
+
|
|
187
|
+
Di Sante, M., Pezzotti, M., Zimmermann, J., Enrico, A., Deschamps, J., Balmas, E.,
|
|
188
|
+
Becca, S., Solito, S., Reali, A., Bertero, A., Jug, F. and Pasqualini, F.S., 2025.
|
|
189
|
+
CALIPERS: Cell cycle-aware live imaging for phenotyping experiments and regeneration studies.
|
|
190
|
+
bioRxiv, https://doi.org/10.1101/2024.12.19.629259
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# FUCCIphase – Examples and Tutorials
|
|
2
|
+
|
|
3
|
+
This folder contains practical examples showing how to use FUCCIphase for:
|
|
4
|
+
|
|
5
|
+
- processing TrackMate XML files
|
|
6
|
+
- estimating cell-cycle phases and percentages
|
|
7
|
+
- visualizing results with Napari
|
|
8
|
+
- reproducing analysis pipelines using Jupyter notebooks
|
|
9
|
+
|
|
10
|
+
The folder is organized into two main sections:
|
|
11
|
+
````
|
|
12
|
+
examples/
|
|
13
|
+
│
|
|
14
|
+
├── README.md
|
|
15
|
+
│
|
|
16
|
+
├── example_data/
|
|
17
|
+
│ ├── example_data_tempophase.csv
|
|
18
|
+
│ ├── fuccisa_hacat.json
|
|
19
|
+
│ ├── fuccisa_hela_molcel_2017.json
|
|
20
|
+
│ ├── fuccisa_tempophase.json
|
|
21
|
+
│ └── hacat_fucciphase_reference.csv
|
|
22
|
+
│
|
|
23
|
+
├── notebooks/
|
|
24
|
+
│ ├── color-tails-by-percentage.ipynb
|
|
25
|
+
│ ├── example_estimated.ipynb
|
|
26
|
+
│ ├── example_reconstruction.ipynb
|
|
27
|
+
│ ├── example_simulated.ipynb
|
|
28
|
+
│ ├── explanation-dtw-alignment.ipynb
|
|
29
|
+
│ ├── extract_calibration_data.ipynb
|
|
30
|
+
│ ├── getting_started.ipynb
|
|
31
|
+
│ ├── movie_tails_percentages.mp4
|
|
32
|
+
│ ├── percentage_reconstruction.ipynb
|
|
33
|
+
│ ├── phaselocking-workflow-lazy.ipynb
|
|
34
|
+
│ ├── sensor_calibration.ipynb
|
|
35
|
+
│ └── README.md
|
|
36
|
+
│
|
|
37
|
+
└── reproducibility/
|
|
38
|
+
├── README.md
|
|
39
|
+
│
|
|
40
|
+
├── inputs/
|
|
41
|
+
│ ├── downscaled_hacat.ome.tif
|
|
42
|
+
│ ├── hacat_fucciphase_reference.csv
|
|
43
|
+
│ └── merged_linked.ome.xml
|
|
44
|
+
│
|
|
45
|
+
└── outputs/
|
|
46
|
+
├── thumbnail.png
|
|
47
|
+
└── video_downscaled_hacat.mp4
|
|
48
|
+
````
|
|
49
|
+
---
|
|
50
|
+
# 1. Quickstart: run FUCCIphase on your data
|
|
51
|
+
|
|
52
|
+
If you already have:
|
|
53
|
+
|
|
54
|
+
- a TrackMate XML file
|
|
55
|
+
- a FUCCI reference CSV
|
|
56
|
+
- your imaging timestep
|
|
57
|
+
|
|
58
|
+
you can run FUCCIphase from the command line:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
fucciphase path/to/your_tracks.xml -ref path/to/your_reference.csv -dt 0.25 -m MEAN_INTENSITY_CH1 -c MEAN_INTENSITY_CH2 --generate_unique_tracks true
|
|
62
|
+
````
|
|
63
|
+
|
|
64
|
+
This produces a processed CSV:
|
|
65
|
+
```
|
|
66
|
+
your_tracks.xml_processed.csv
|
|
67
|
+
```
|
|
68
|
+
containing:
|
|
69
|
+
* normalized intensities
|
|
70
|
+
* discrete phases
|
|
71
|
+
* DTW-based cell-cycle percentages
|
|
72
|
+
* per-track metadata
|
|
73
|
+
|
|
74
|
+
For more details:
|
|
75
|
+
```bash
|
|
76
|
+
fucciphase -h
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
# 2. Visualize your results in Napari
|
|
82
|
+
|
|
83
|
+
You can launch the Napari viewer with:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
fucciphase-napari your_tracks_processed.csv your_video.ome.tif -m 0 -c 1 -s 2 --pixel_size <pixel size>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
This opens:
|
|
90
|
+
|
|
91
|
+
* raw channels
|
|
92
|
+
* segmentation masks
|
|
93
|
+
* track overlays
|
|
94
|
+
* estimated percentages as floating labels
|
|
95
|
+
|
|
96
|
+
Useful for:
|
|
97
|
+
|
|
98
|
+
* debugging
|
|
99
|
+
* figure creation
|
|
100
|
+
* validating results visually
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
# 3. Example Jupyter notebooks
|
|
105
|
+
|
|
106
|
+
The `notebooks/` folder contains lightweight notebooks demonstrating:
|
|
107
|
+
|
|
108
|
+
| Notebook | Description |
|
|
109
|
+
| ------------------------------- | ----------------------------------------------- |
|
|
110
|
+
| getting_started.ipynb | Minimal example for new users |
|
|
111
|
+
| example_simulated.ipynb | Simulated two-channel FUCCI traces |
|
|
112
|
+
| example_estimated.ipynb | Percentage estimation walkthrough |
|
|
113
|
+
| example_reconstruction.ipynb | Reconstruct intensity profiles from percentages |
|
|
114
|
+
| explanation-dtw-alignment.ipynb | How DTW subsequence alignment works |
|
|
115
|
+
| color-tails-by-percentage.ipynb | Example trajectory coloring |
|
|
116
|
+
| sensor_calibration.ipynb | Building reference traces |
|
|
117
|
+
|
|
118
|
+
These notebooks are intended as **mini-tutorials** for common tasks.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
# 4. Full reproducibility tutorial
|
|
123
|
+
|
|
124
|
+
A complete, end-to-end workflow with real data is located in:
|
|
125
|
+
|
|
126
|
+
[reproducibility folder](./reproducibility/)
|
|
127
|
+
|
|
128
|
+
It includes:
|
|
129
|
+
|
|
130
|
+
* **inputs**: TrackMate XML, reference CSV, example video
|
|
131
|
+
* **outputs**: processed CSV files, thumbnails, exported XML
|
|
132
|
+
|
|
133
|
+
This is the recommended starting point for reproducing the figures shown in the repository.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
# 5. Troubleshooting & Support
|
|
137
|
+
|
|
138
|
+
If you find bugs, unexpected behavior, or want new features, open an issue:
|
|
139
|
+
|
|
140
|
+
🔗 [https://github.com/Synthetic-Physiology-Lab/fucciphase/issues](https://github.com/Synthetic-Physiology-Lab/fucciphase/issues)
|
fucciphase-0.0.3/examples/notebooks/Hacat_percentages_white_similarity_dtw_fucciphase_all_tracks.mov
ADDED
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# FUCCIphase example notebooks
|
|
2
|
+
|
|
3
|
+
This folder contains a set of Jupyter notebooks that demonstrate how to use
|
|
4
|
+
**FUCCIphase** in different scenarios, from basic usage to more advanced
|
|
5
|
+
workflows such as calibration, simulation and reconstruction.
|
|
6
|
+
|
|
7
|
+
All notebooks assume that:
|
|
8
|
+
|
|
9
|
+
- `fucciphase` is installed in your environment (e.g. `pip install -e .` from the repo root)
|
|
10
|
+
- `jupyter` is installed (e.g. `pip install jupyter`)
|
|
11
|
+
- You run the notebooks from the **repository root** or from within
|
|
12
|
+
the `examples` folder so that relative paths to data files work.
|
|
13
|
+
|
|
14
|
+
> 💡 Tip: start Jupyter from the repo root:
|
|
15
|
+
> ```bash
|
|
16
|
+
> cd path/to/fucciphase
|
|
17
|
+
> jupyter notebook
|
|
18
|
+
> ```
|
|
19
|
+
> then navigate to `examples/notebooks/`.
|
|
20
|
+
|
|
21
|
+
## Notebook overview
|
|
22
|
+
|
|
23
|
+
| Notebook file | Purpose |
|
|
24
|
+
|----------------------------------------|------------------------------------------------------------------------------------------------------|
|
|
25
|
+
| `getting_started.ipynb` | Minimal end-to-end example: load TrackMate output, apply a FUCCI sensor, inspect results. |
|
|
26
|
+
| `extract_calibration_data.ipynb` | Extract FUCCI calibration time-courses from raw movies (TrackMate XML + images) to build references. |
|
|
27
|
+
| `sensor_calibration.ipynb` | Build or inspect a FUCCI sensor from calibration data (e.g. HaCaT reference traces). |
|
|
28
|
+
| `explanation-dtw-alignment.ipynb` | Explain and demonstrate the DTW-based alignment used for phase estimation and CALIPERS workflows. |
|
|
29
|
+
| `example_simulated.ipynb` | Simulate synthetic FUCCI trajectories and test FUCCIphase on controlled, ground-truth data. |
|
|
30
|
+
| `example_reconstruction.ipynb` | Reconstruct FUCCI signals or phase trajectories from partial / noisy data and compare to originals. |
|
|
31
|
+
| `percentage_reconstruction.ipynb` | Reconstruct and smooth phase-percentage trajectories and compare raw vs reconstructed dynamics. |
|
|
32
|
+
| `phaselocking-workflow-lazy.ipynb` | Phase-lock and align many trajectories to a common reference using a lightweight, scalable workflow. |
|
|
33
|
+
| `example_estimated.ipynb` | Explore and visualise FUCCIphase output tables with per-cell phase estimates over time. |
|
|
34
|
+
| `color-tails-by-percentage.ipynb` | Visualise phase distributions over time or conditions as “colour tail” plots for figures. |
|