Skip to main content

Cell cycle analysis plugin.

Project description

fucciphase

License PyPI Python Version CI codecov pre-commit.ci status

FUCCI cell cycle analysis plugin. Obtain cell cycle information from FUCCI fluorescence intensities.

Installation

The best way to run fucciphase is to install it in a virtual conda environment. Make sure that git is installed and can be called from the command line.

To install from pip:

pip install fucciphase

If you wish to install it from source:

git clone https://github.com/Synthetic-Physiology-Lab/fucciphase
cd fucciphase
pip install -e .

The installation should not take longer than a few seconds (depending on your internet connection).

A minimal environment for running the notebooks can be set up with:

pip install fucciphase jupyter matplotlib pandas

Install Napari + movie reading support (optional)

FUCCIphase does not install Napari by default. For .ome.tif visualisation, install:

pip install napari bioio bioio-ome-tiff bioio-tifffile

or, if installing from source with extras:

pip install -e ".[napari]"

What’s Inside This Repository

This repository is organized to support both analysis workflows and reproducible usage examples of FUCCIphase. If you're new to the tool, this is where to start.

1 — examples/notebooks/ 📁 notebooks

Interactive Jupyter workflows demonstrating how to use FUCCIphase in practical scenarios.

Notebook Purpose
extract_calibration_data.ipynb Convert raw movies + TrackMate XML into FUCCI reference curves
sensor_calibration.ipynb Build a FUCCI sensor model from calibration traces
getting_started.ipynb Minimal end-to-end example of FUCCIphase usage
example_estimated.ipynb Visualize fucciphase output tables
percentage_reconstruction.ipynb Smooth and reconstruct %phase trajectories
example_reconstruction.ipynb Recover incomplete/noisy fluorescence traces
example_simulated.ipynb Generate synthetic FUCCI signals for testing
color-tails-by-percentage.ipynb Visualize population-level phase composition
explanation-dtw-alignment.ipynb How DTW alignment works internally
phaselocking-workflow-lazy.ipynb Scalable phase-locking for large datasets

2 — examples/reproducibility/ 📁 reproducibility

This is a minimal workflow that uses the sample data. Navigate to the reproducibility directory, then run the following command in one step:

fucciphase inputs/merged_linked.ome.xml `
          -ref ../example_data/hacat_fucciphase_reference.csv `
          -dt 0.25 `
          -m MEAN_INTENSITY_CH1 `
          -c MEAN_INTENSITY_CH2 `
          --generate_unique_tracks true `

and to visualize results in napari:

fucciphase-napari outputs/merged_linked.ome_processed.csv inputs/downscaled_hacat.ome.tif -m 0 -c 1 -s 2 --pixel_size 0.544

Below a preview of the output generated by the reproducibility workflow:

Preview of the video


3 — examples/example_data/ 📁 example_data

Reference-style FUCCI datasets used for calibration & sensor building.

Includes:

File Meaning
*_reference.csv FUCCI calibration traces used to learn the sensor
*.json Saved sensor models usable via CLI or notebooks

Use this folder if you want to train your own sensor or understand expected input format.


Basic usage

Fucci phase currently supports loading a TrackMate XML file:

from fucciphase import process_trackmate
from fucciphase.sensor import get_fuccisa_default_sensor

trackmate_xml = "path/to/trackmate.xml"
channel1 = "MEAN_INTENSITY_CH3"
channel2 = "MEAN_INTENSITY_CH4"

sensor = get_fuccisa_default_sensor()

df = process_trackmate(trackmate_xml,
                       channels=[channel1, channel2],
		       sensor=sensor,
                       thresholds=[0.1, 0.1])
print(df)

The TrackMate XML is converted to a Pandas DataFrame. Thus, in general data (e.g., stored in a CSV or XLSX file) that can be parsed into a DataFrame is supported.

The runtime of the scripts depends on your datasize. 2D samples with a few hundred to a few thousand cells can be processed in a few minutes. Visualization in Napari can take a bit longer. Standard processing does not require a powerful computer. Make sure that you have sufficient RAM to load videos for visualization in Napari.

Using your own data

To process your own dataset:

  1. Export tracking from Fiji/TrackMate as .xml

  2. Build a reference CSV (minimum one full cell cycle):

    percentage, time, cyan, magenta
    

    For reference, check the example files available in the example_data folder.

  3. Run:

    fucciphase your_tracks.xml -ref your_reference.csv -dt <your timestep> -m <ch1> -c <ch2>
    
  4. Visualize with:

    fucciphase-napari your_tracks_processed.csv your_video.ome.tif -m <ch1> -c <ch2> -s <mask>
    

Development

To develop fucciphase, clone the repository, install fucciphase in your environment and install the pre-commit hooks:

git clone https://github.com/Synthetic-Physiology-Lab/fucciphase
cd fucciphase
pip install -e ".[test, dev]"
pre-commit install

If you want to build the documentation, replace the abovementioned pip install by:

pip install -e ".[test, dev, doc]"

Cite us

Di Sante, M., Pezzotti, M., Zimmermann, J., Enrico, A., Deschamps, J., Balmas, E., Becca, S., Solito, S., Reali, A., Bertero, A., Jug, F. and Pasqualini, F.S., 2025. CALIPERS: Cell cycle-aware live imaging for phenotyping experiments and regeneration studies. bioRxiv, https://doi.org/10.1101/2024.12.19.629259

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fucciphase-0.0.5.tar.gz (13.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fucciphase-0.0.5-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

Details for the file fucciphase-0.0.5.tar.gz.

File metadata

  • Download URL: fucciphase-0.0.5.tar.gz
  • Upload date:
  • Size: 13.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fucciphase-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2e5687747f7ffee9a9c1bfac3be7d2c4a05df64c179b74550bfdf2abdef4d379
MD5 910dc543fb210c2d4ec5a99c1e2bbcdc
BLAKE2b-256 86b1eb095dd424f271ef77cd9309405fe6179b1148e8bc34eed56bac2938fdd4

See more details on using hashes here.

Provenance

The following attestation bundles were made for fucciphase-0.0.5.tar.gz:

Publisher: ci.yml on Synthetic-Physiology-Lab/fucciphase

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fucciphase-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: fucciphase-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 45.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fucciphase-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a4e5d0d016cc301d8745baf4966addd5b7b354f0ea58c8f79b0e17f276e4e496
MD5 30f8ce215ee1556fe366fea8e3c919d0
BLAKE2b-256 28a4b35f64a165e8a1f3b3924f7c5cd5031a9b49fe125cc806b6b35306dbea67

See more details on using hashes here.

Provenance

The following attestation bundles were made for fucciphase-0.0.5-py3-none-any.whl:

Publisher: ci.yml on Synthetic-Physiology-Lab/fucciphase

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page