fucciphase 0.0.1__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.
Files changed (62) hide show
  1. fucciphase-0.0.1/.copier-answers.yml +18 -0
  2. fucciphase-0.0.1/.github/ISSUE_TEMPLATE.md +15 -0
  3. fucciphase-0.0.1/.github/TEST_FAIL_TEMPLATE.md +12 -0
  4. fucciphase-0.0.1/.github/dependabot.yml +10 -0
  5. fucciphase-0.0.1/.github/workflows/ci.yml +107 -0
  6. fucciphase-0.0.1/.gitignore +123 -0
  7. fucciphase-0.0.1/.pre-commit-config.yaml +37 -0
  8. fucciphase-0.0.1/LICENSE +29 -0
  9. fucciphase-0.0.1/PKG-INFO +137 -0
  10. fucciphase-0.0.1/README.md +95 -0
  11. fucciphase-0.0.1/doc/Makefile +20 -0
  12. fucciphase-0.0.1/doc/api.rst +28 -0
  13. fucciphase-0.0.1/doc/conf.py +31 -0
  14. fucciphase-0.0.1/doc/examples/examples.rst +9 -0
  15. fucciphase-0.0.1/doc/examples/simulator.rst +6 -0
  16. fucciphase-0.0.1/doc/index.rst +23 -0
  17. fucciphase-0.0.1/doc/sensor.rst +22 -0
  18. fucciphase-0.0.1/doc/usage/installation.rst +24 -0
  19. fucciphase-0.0.1/doc/usage/quickstart.rst +18 -0
  20. fucciphase-0.0.1/example/README.md +32 -0
  21. fucciphase-0.0.1/example/color-tails-by-percentage.ipynb +345 -0
  22. fucciphase-0.0.1/example/example_data/example_data_tempophase.csv +51 -0
  23. fucciphase-0.0.1/example/example_data/fuccisa_hacat.json +1 -0
  24. fucciphase-0.0.1/example/example_data/fuccisa_hela_molcel_2017.json +3 -0
  25. fucciphase-0.0.1/example/example_data/fuccisa_tempophase.json +1 -0
  26. fucciphase-0.0.1/example/example_data/hacat_fucciphase_reference.csv +102 -0
  27. fucciphase-0.0.1/example/example_estimated.ipynb +209 -0
  28. fucciphase-0.0.1/example/example_reconstruction.ipynb +835 -0
  29. fucciphase-0.0.1/example/example_simulated.ipynb +193 -0
  30. fucciphase-0.0.1/example/explanation-dtw-alignment.ipynb +144 -0
  31. fucciphase-0.0.1/example/getting_started.ipynb +183 -0
  32. fucciphase-0.0.1/example/reproducibility/README.md +6 -0
  33. fucciphase-0.0.1/example/reproducibility/extract_calibration_data.ipynb +321 -0
  34. fucciphase-0.0.1/example/reproducibility/percentage_reconstruction.ipynb +645 -0
  35. fucciphase-0.0.1/example/reproducibility/phaselocking-workflow-lazy.ipynb +266 -0
  36. fucciphase-0.0.1/example/sensor_calibration.ipynb +403 -0
  37. fucciphase-0.0.1/pyproject.toml +155 -0
  38. fucciphase-0.0.1/src/fucciphase/__init__.py +12 -0
  39. fucciphase-0.0.1/src/fucciphase/fucci_phase.py +178 -0
  40. fucciphase-0.0.1/src/fucciphase/io.py +67 -0
  41. fucciphase-0.0.1/src/fucciphase/napari/__init__.py +5 -0
  42. fucciphase-0.0.1/src/fucciphase/napari/tracks_to_napari.py +117 -0
  43. fucciphase-0.0.1/src/fucciphase/phase.py +501 -0
  44. fucciphase-0.0.1/src/fucciphase/plot.py +548 -0
  45. fucciphase-0.0.1/src/fucciphase/py.typed +5 -0
  46. fucciphase-0.0.1/src/fucciphase/sensor.py +454 -0
  47. fucciphase-0.0.1/src/fucciphase/tracking_utilities.py +81 -0
  48. fucciphase-0.0.1/src/fucciphase/utils/__init__.py +35 -0
  49. fucciphase-0.0.1/src/fucciphase/utils/checks.py +16 -0
  50. fucciphase-0.0.1/src/fucciphase/utils/dtw.py +59 -0
  51. fucciphase-0.0.1/src/fucciphase/utils/normalize.py +202 -0
  52. fucciphase-0.0.1/src/fucciphase/utils/phase_fit.py +47 -0
  53. fucciphase-0.0.1/src/fucciphase/utils/simulator.py +85 -0
  54. fucciphase-0.0.1/src/fucciphase/utils/track_postprocessing.py +454 -0
  55. fucciphase-0.0.1/src/fucciphase/utils/trackmate.py +295 -0
  56. fucciphase-0.0.1/tests/conftest.py +727 -0
  57. fucciphase-0.0.1/tests/test_dtw_utils.py +123 -0
  58. fucciphase-0.0.1/tests/test_fucciphase.py +87 -0
  59. fucciphase-0.0.1/tests/test_io.py +31 -0
  60. fucciphase-0.0.1/tests/test_normalize.py +111 -0
  61. fucciphase-0.0.1/tests/test_simulator.py +37 -0
  62. fucciphase-0.0.1/tests/test_trackmate.py +104 -0
@@ -0,0 +1,18 @@
1
+ # Do not edit - changes here will be overwritten by Copier
2
+ _commit: v1.0
3
+ _src_path: gh:pydev-guide/pyrepo-copier
4
+ author_email: first.last@example.com
5
+ author_name: Joran Deschamps
6
+ git_versioning: true
7
+ github_username: jdeschamps
8
+ mode: tooling
9
+ module_name: fucciphase
10
+ project_license: BSD-3-Clause
11
+ project_name: fucciphase
12
+ project_short_description: Cell cycle analysis plugin.
13
+ test_pre_release: true
14
+ use_black: true
15
+ use_mypy: true
16
+ use_pre_commit: true
17
+ use_ruff: true
18
+
@@ -0,0 +1,15 @@
1
+ * fucciphase version:
2
+ * Python version:
3
+ * Operating System:
4
+
5
+ ### Description
6
+
7
+ Describe what you were trying to get done.
8
+ Tell us what happened, what went wrong, and what you expected to happen.
9
+
10
+ ### What I Did
11
+
12
+ ```
13
+ Paste the command(s) you ran and the output.
14
+ If there was a crash, please include the traceback here.
15
+ ```
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: "{{ env.TITLE }}"
3
+ labels: [bug]
4
+ ---
5
+ The {{ workflow }} workflow failed on {{ date | date("YYYY-MM-DD HH:mm") }} UTC
6
+
7
+ The most recent failing test was on {{ env.PLATFORM }} py{{ env.PYTHON }}
8
+ with commit: {{ sha }}
9
+
10
+ Full run: https://github.com/{{ repo }}/actions/runs/{{ env.RUN_ID }}
11
+
12
+ (This post will be updated if another test fails, as long as this issue remains open.)
@@ -0,0 +1,10 @@
1
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2
+
3
+ version: 2
4
+ updates:
5
+ - package-ecosystem: "github-actions"
6
+ directory: "/"
7
+ schedule:
8
+ interval: "weekly"
9
+ commit-message:
10
+ prefix: "ci(dependabot):"
@@ -0,0 +1,107 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - "v*"
9
+ pull_request:
10
+ workflow_dispatch:
11
+ schedule:
12
+ # run every week (for --pre release tests)
13
+ - cron: "0 0 * * 0"
14
+
15
+ jobs:
16
+ check-manifest:
17
+ # check-manifest is a tool that checks that all files in version control are
18
+ # included in the sdist (unless explicitly excluded)
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v5
22
+ - run: pipx run check-manifest
23
+
24
+ test:
25
+ name: ${{ matrix.platform }} (${{ matrix.python-version }})
26
+ runs-on: ${{ matrix.platform }}
27
+ strategy:
28
+ fail-fast: false
29
+ matrix:
30
+ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
31
+ platform: [ubuntu-latest, macos-latest, windows-latest]
32
+
33
+ steps:
34
+ - name: 🛑 Cancel Previous Runs
35
+ uses: styfle/cancel-workflow-action@0.12.1
36
+ with:
37
+ access_token: ${{ github.token }}
38
+
39
+ - uses: actions/checkout@v5
40
+
41
+ - name: 🐍 Set up Python ${{ matrix.python-version }}
42
+ uses: actions/setup-python@v6
43
+ with:
44
+ python-version: ${{ matrix.python-version }}
45
+ cache-dependency-path: "pyproject.toml"
46
+ cache: "pip"
47
+
48
+ - name: Install Dependencies
49
+ run: |
50
+ python -m pip install -U pip
51
+ # if running a cron job, we add the --pre flag to test against pre-releases
52
+ python -m pip install .[test] ${{ github.event_name == 'schedule' && '--pre' || '' }}
53
+
54
+ - name: 🧪 Run Tests
55
+ run: pytest --color=yes --cov --cov-report=xml --cov-report=term-missing
56
+
57
+ # If something goes wrong with --pre tests, we can open an issue in the repo
58
+ - name: 📝 Report --pre Failures
59
+ if: failure() && github.event_name == 'schedule'
60
+ uses: JasonEtco/create-an-issue@v2
61
+ env:
62
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63
+ PLATFORM: ${{ matrix.platform }}
64
+ PYTHON: ${{ matrix.python-version }}
65
+ RUN_ID: ${{ github.run_id }}
66
+ TITLE: "[test-bot] pip install --pre is failing"
67
+ with:
68
+ filename: .github/TEST_FAIL_TEMPLATE.md
69
+ update_existing: true
70
+
71
+ - name: Coverage
72
+ uses: codecov/codecov-action@v5
73
+
74
+ deploy:
75
+ name: Release
76
+ needs: test
77
+ if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule'
78
+ runs-on: ubuntu-latest
79
+
80
+ permissions:
81
+ # IMPORTANT: this permission is mandatory for trusted publishing
82
+ id-token: write
83
+
84
+ # This permission allows writing releases
85
+ contents: write
86
+
87
+ steps:
88
+ - uses: actions/checkout@v5
89
+ with:
90
+ fetch-depth: 0
91
+
92
+ - name: Set up Python
93
+ uses: actions/setup-python@v6
94
+ with:
95
+ python-version: "3.10"
96
+
97
+ - name: Build
98
+ run: |
99
+ python -m pip install build
100
+ python -m build
101
+
102
+ - name: Publish to PyPI
103
+ uses: pypa/gh-action-pypi-publish@release/v1
104
+
105
+ - uses: softprops/action-gh-release@v2
106
+ with:
107
+ generate_release_notes: true
@@ -0,0 +1,123 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+
28
+ .DS_Store
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ .hypothesis/
50
+ .pytest_cache/
51
+
52
+ # Translations
53
+ *.mo
54
+ *.pot
55
+
56
+ # Django stuff:
57
+ *.log
58
+ local_settings.py
59
+
60
+ # Flask stuff:
61
+ instance/
62
+ .webassets-cache
63
+
64
+ # Scrapy stuff:
65
+ .scrapy
66
+
67
+ # Sphinx documentation
68
+ docs/_build/
69
+
70
+ # PyBuilder
71
+ target/
72
+
73
+ # Jupyter Notebook
74
+ .ipynb_checkpoints
75
+
76
+ # pyenv
77
+ .python-version
78
+
79
+ # celery beat schedule file
80
+ celerybeat-schedule
81
+
82
+ # SageMath parsed files
83
+ *.sage.py
84
+
85
+ # dotenv
86
+ .env
87
+
88
+ # virtualenv
89
+ .venv
90
+ venv/
91
+ ENV/
92
+
93
+ # Spyder project settings
94
+ .spyderproject
95
+ .spyproject
96
+
97
+ # Rope project settings
98
+ .ropeproject
99
+
100
+ # mkdocs documentation
101
+ /site
102
+
103
+ # mypy
104
+ .mypy_cache/
105
+
106
+ # ruff
107
+ .ruff_cache/
108
+
109
+ # IDE settings
110
+ .vscode/
111
+ .idea/
112
+
113
+ # images generated by examples
114
+ example/*.pdf
115
+ example/*.svg
116
+ example/*.png
117
+
118
+ # vim files
119
+ *.swp
120
+
121
+ # Sphinx files
122
+ make.bat
123
+ _build/
@@ -0,0 +1,37 @@
1
+ # enable pre-commit.ci at https://pre-commit.ci/
2
+ # it adds:
3
+ # 1. auto fixing pull requests
4
+ # 2. auto updating the pre-commit configuration
5
+ ci:
6
+ autoupdate_schedule: monthly
7
+ autofix_commit_msg: "style(pre-commit.ci): auto fixes [...]"
8
+ autoupdate_commit_msg: "ci(pre-commit.ci): autoupdate"
9
+
10
+ repos:
11
+ - repo: https://github.com/abravalheri/validate-pyproject
12
+ rev: v0.24.1
13
+ hooks:
14
+ - id: validate-pyproject
15
+
16
+ - repo: https://github.com/astral-sh/ruff-pre-commit
17
+ rev: v0.12.11
18
+ hooks:
19
+ - id: ruff
20
+ types_or: [python, pyi, jupyter]
21
+ args: [--fix]
22
+ - id: ruff-format
23
+
24
+ - repo: https://github.com/pre-commit/mirrors-mypy
25
+ rev: v1.17.1
26
+ hooks:
27
+ - id: mypy
28
+ files: "^src/"
29
+ additional_dependencies:
30
+ - numpy
31
+ - pandas
32
+
33
+ # strip out jupyter notebooks
34
+ - repo: https://github.com/kynan/nbstripout
35
+ rev: 0.8.1
36
+ hooks:
37
+ - id: nbstripout
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2023, Joran Deschamps
4
+ Copyright (c) 2023, Julius Zimmermann (contributor)
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.4
2
+ Name: fucciphase
3
+ Version: 0.0.1
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.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Requires-Python: >=3.8
18
+ Requires-Dist: dtaidistance
19
+ Requires-Dist: lineagetree<1.5.0
20
+ Requires-Dist: matplotlib
21
+ Requires-Dist: monotonic-derivative
22
+ Requires-Dist: numpy
23
+ Requires-Dist: openpyxl
24
+ Requires-Dist: pandas
25
+ Requires-Dist: scipy
26
+ Requires-Dist: svgwrite
27
+ Provides-Extra: dev
28
+ Requires-Dist: ipython; extra == 'dev'
29
+ Requires-Dist: mypy; extra == 'dev'
30
+ Requires-Dist: pdbpp; extra == 'dev'
31
+ Requires-Dist: pre-commit; extra == 'dev'
32
+ Requires-Dist: rich; extra == 'dev'
33
+ Requires-Dist: ruff; extra == 'dev'
34
+ Provides-Extra: doc
35
+ Requires-Dist: sphinx; extra == 'doc'
36
+ Provides-Extra: jupyter
37
+ Requires-Dist: jupyter; extra == 'jupyter'
38
+ Provides-Extra: test
39
+ Requires-Dist: pytest; extra == 'test'
40
+ Requires-Dist: pytest-cov; extra == 'test'
41
+ Description-Content-Type: text/markdown
42
+
43
+ # fucciphase
44
+
45
+ [![License](https://img.shields.io/pypi/l/fucciphase.svg?color=green)](https://github.com/Synthetic-Physiology-Lab/fucciphase/raw/main/LICENSE)
46
+ [![PyPI](https://img.shields.io/pypi/v/fucciphase.svg?color=green)](https://pypi.org/project/fucciphase)
47
+ [![Python Version](https://img.shields.io/pypi/pyversions/fucciphase.svg?color=green)](https://python.org)
48
+ [![CI](https://github.com/Synthetic-Physiology-Lab/fucciphase/actions/workflows/ci.yml/badge.svg)](https://github.com/Synthetic-Physiology-Lab/fucciphase/actions/workflows/ci.yml)
49
+ [![codecov](https://codecov.io/gh/Synthetic-Physiology-Lab/fucciphase/branch/main/graph/badge.svg)](https://codecov.io/gh/Synthetic-Physiology-Lab/fucciphase)
50
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Synthetic-Physiology-Lab/fucciphase/main.svg)](https://results.pre-commit.ci/latest/github/Synthetic-Physiology-Lab/fucciphase/main)
51
+
52
+ FUCCI cell cycle analysis plugin.
53
+ Obtain cell cycle information from FUCCI fluorescence intensities.
54
+
55
+ ## Installation
56
+
57
+ The best way to run fucciphase is to install it in a virtual conda environment.
58
+ Make sure that git is installed and can be called from the command line.
59
+
60
+ (SOON) To install from pip:
61
+
62
+ ```bash
63
+ pip install fucciphase
64
+ ```
65
+
66
+ If you wish to install it from source:
67
+
68
+ ```bash
69
+ git clone https://github.com/Synthetic-Physiology-Lab/fucciphase
70
+ cd fucciphase
71
+ pip install -e .
72
+ ```
73
+
74
+ The installation should not take longer than a few seconds (depending on your internet connection).
75
+
76
+ To use the notebooks, also install jupyter:
77
+
78
+ ```bash
79
+ pip install jupyter
80
+ ```
81
+
82
+ ## Usage
83
+
84
+ Fucci phase currently supports loading a
85
+ [TrackMate](https://imagej.net/plugins/trackmate/) XML file:
86
+
87
+ ```python
88
+ from fucciphase import process_trackmate
89
+ from fucciphase.sensor import get_fuccisa_default_sensor
90
+
91
+ trackmate_xml = "path/to/trackmate.xml"
92
+ channel1 = "MEAN_INTENSITY_CH3"
93
+ channel2 = "MEAN_INTENSITY_CH4"
94
+
95
+ sensor = get_fuccisa_default_sensor()
96
+
97
+ df = process_trackmate(trackmate_xml,
98
+ channels=[channel1, channel2],
99
+ sensor=sensor,
100
+ thresholds=[0.1, 0.1])
101
+ print(df)
102
+ ```
103
+
104
+ The TrackMate XML is converted to a [Pandas](https://pandas.pydata.org/) DataFrame.
105
+ Thus, in general data (e.g., stored in a CSV or XLSX file) that can be parsed into
106
+ a DataFrame is supported.
107
+
108
+ Have a look at the examples in the `example` folder to get more information!
109
+
110
+ The runtime of the scripts depends on your datasize. 2D samples with a few hundred to a few thousand cells
111
+ can be processed in a few minutes. Visualization in Napari can take a bit longer.
112
+ Standard processing does not require a powerful computer.
113
+ Make sure that you have sufficient RAM to load videos for visualization in Napari.
114
+
115
+ ## Development
116
+
117
+ To develop fucciphase, clone the repository, install fucciphase in your environment
118
+ and install the pre-commit hooks:
119
+
120
+ ```bash
121
+ git clone https://github.com/Synthetic-Physiology-Lab/fucciphase
122
+ cd fucciphase
123
+ pip install -e ".[test, dev]"
124
+ pre-commit install
125
+ ```
126
+
127
+ If you want to build the documentation, replace the abovementioned pip install by:
128
+ ```bash
129
+ pip install -e ".[test, dev, doc]"
130
+ ```
131
+
132
+ ## Cite us
133
+
134
+ Di Sante, M., Pezzotti, M., Zimmermann, J., Enrico, A., Deschamps, J., Balmas, E.,
135
+ Becca, S., Solito, S., Reali, A., Bertero, A., Jug, F. and Pasqualini, F.S., 2025.
136
+ CALIPERS: Cell cycle-aware live imaging for phenotyping experiments and regeneration studies.
137
+ bioRxiv, https://doi.org/10.1101/2024.12.19.629259
@@ -0,0 +1,95 @@
1
+ # fucciphase
2
+
3
+ [![License](https://img.shields.io/pypi/l/fucciphase.svg?color=green)](https://github.com/Synthetic-Physiology-Lab/fucciphase/raw/main/LICENSE)
4
+ [![PyPI](https://img.shields.io/pypi/v/fucciphase.svg?color=green)](https://pypi.org/project/fucciphase)
5
+ [![Python Version](https://img.shields.io/pypi/pyversions/fucciphase.svg?color=green)](https://python.org)
6
+ [![CI](https://github.com/Synthetic-Physiology-Lab/fucciphase/actions/workflows/ci.yml/badge.svg)](https://github.com/Synthetic-Physiology-Lab/fucciphase/actions/workflows/ci.yml)
7
+ [![codecov](https://codecov.io/gh/Synthetic-Physiology-Lab/fucciphase/branch/main/graph/badge.svg)](https://codecov.io/gh/Synthetic-Physiology-Lab/fucciphase)
8
+ [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Synthetic-Physiology-Lab/fucciphase/main.svg)](https://results.pre-commit.ci/latest/github/Synthetic-Physiology-Lab/fucciphase/main)
9
+
10
+ FUCCI cell cycle analysis plugin.
11
+ Obtain cell cycle information from FUCCI fluorescence intensities.
12
+
13
+ ## Installation
14
+
15
+ The best way to run fucciphase is to install it in a virtual conda environment.
16
+ Make sure that git is installed and can be called from the command line.
17
+
18
+ (SOON) To install from pip:
19
+
20
+ ```bash
21
+ pip install fucciphase
22
+ ```
23
+
24
+ If you wish to install it from source:
25
+
26
+ ```bash
27
+ git clone https://github.com/Synthetic-Physiology-Lab/fucciphase
28
+ cd fucciphase
29
+ pip install -e .
30
+ ```
31
+
32
+ The installation should not take longer than a few seconds (depending on your internet connection).
33
+
34
+ To use the notebooks, also install jupyter:
35
+
36
+ ```bash
37
+ pip install jupyter
38
+ ```
39
+
40
+ ## Usage
41
+
42
+ Fucci phase currently supports loading a
43
+ [TrackMate](https://imagej.net/plugins/trackmate/) XML file:
44
+
45
+ ```python
46
+ from fucciphase import process_trackmate
47
+ from fucciphase.sensor import get_fuccisa_default_sensor
48
+
49
+ trackmate_xml = "path/to/trackmate.xml"
50
+ channel1 = "MEAN_INTENSITY_CH3"
51
+ channel2 = "MEAN_INTENSITY_CH4"
52
+
53
+ sensor = get_fuccisa_default_sensor()
54
+
55
+ df = process_trackmate(trackmate_xml,
56
+ channels=[channel1, channel2],
57
+ sensor=sensor,
58
+ thresholds=[0.1, 0.1])
59
+ print(df)
60
+ ```
61
+
62
+ The TrackMate XML is converted to a [Pandas](https://pandas.pydata.org/) DataFrame.
63
+ Thus, in general data (e.g., stored in a CSV or XLSX file) that can be parsed into
64
+ a DataFrame is supported.
65
+
66
+ Have a look at the examples in the `example` folder to get more information!
67
+
68
+ The runtime of the scripts depends on your datasize. 2D samples with a few hundred to a few thousand cells
69
+ can be processed in a few minutes. Visualization in Napari can take a bit longer.
70
+ Standard processing does not require a powerful computer.
71
+ Make sure that you have sufficient RAM to load videos for visualization in Napari.
72
+
73
+ ## Development
74
+
75
+ To develop fucciphase, clone the repository, install fucciphase in your environment
76
+ and install the pre-commit hooks:
77
+
78
+ ```bash
79
+ git clone https://github.com/Synthetic-Physiology-Lab/fucciphase
80
+ cd fucciphase
81
+ pip install -e ".[test, dev]"
82
+ pre-commit install
83
+ ```
84
+
85
+ If you want to build the documentation, replace the abovementioned pip install by:
86
+ ```bash
87
+ pip install -e ".[test, dev, doc]"
88
+ ```
89
+
90
+ ## Cite us
91
+
92
+ Di Sante, M., Pezzotti, M., Zimmermann, J., Enrico, A., Deschamps, J., Balmas, E.,
93
+ Becca, S., Solito, S., Reali, A., Bertero, A., Jug, F. and Pasqualini, F.S., 2025.
94
+ CALIPERS: Cell cycle-aware live imaging for phenotyping experiments and regeneration studies.
95
+ bioRxiv, https://doi.org/10.1101/2024.12.19.629259
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,28 @@
1
+ .. _API:
2
+
3
+ API reference
4
+ =============
5
+
6
+ High-level API
7
+ --------------
8
+
9
+ .. automodule:: fucciphase.fucci_phase
10
+ :members:
11
+
12
+ Compute phases
13
+ --------------
14
+
15
+ .. automodule:: fucciphase.phase
16
+ :members:
17
+
18
+ Plots
19
+ -----
20
+
21
+ .. automodule:: fucciphase.plot
22
+ :members:
23
+
24
+ Input/Output
25
+ ------------
26
+
27
+ .. automodule:: fucciphase.io
28
+ :members:
@@ -0,0 +1,31 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ # -- Project information -----------------------------------------------------
7
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
+
9
+ project = "fucciphase"
10
+ project_copyright = "2023, Joran Deschamps, Julius Zimmermann (contributor)"
11
+ author = "Joran Deschamps"
12
+
13
+ # -- General configuration ---------------------------------------------------
14
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
15
+
16
+ extensions = []
17
+
18
+ templates_path = ["_templates"]
19
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
20
+
21
+
22
+ # -- Options for HTML output -------------------------------------------------
23
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
24
+
25
+ html_theme = "alabaster"
26
+ html_static_path = ["_static"]
27
+
28
+ extensions = [
29
+ "sphinx.ext.autodoc",
30
+ "sphinx.ext.napoleon",
31
+ ] # support for NumPy and Google style docstrings
@@ -0,0 +1,9 @@
1
+ .. _examples:
2
+
3
+ Examples
4
+ ========
5
+
6
+ .. toctree::
7
+ :maxdepth: 1
8
+
9
+ simulator
@@ -0,0 +1,6 @@
1
+ .. _Simulator:
2
+
3
+ Simulator
4
+ =========
5
+
6
+ TODO