Skip to main content

RIA: Ratio Imaging Analyzer for biological quantification

Project description

Logo

Ratio Imaging Analyzer (RIA / 莉丫)

PyPI Status DOI Python License

Tests Open Source Size LOC Visitors


Meet RIA (or as we affectionately call her, "Li Ya / 莉丫").

RIA is an open-source tool built to solve a simple but annoying problem: Ratiometric analysis shouldn't be stuck on the microscope computer.

Ratiometric imaging (like FRET or sensors for Tryptophan/pH/Ca²⁺) is amazing for normalizing data, but analyzing it usually requires expensive commercial software (like MetaMorph or NIS-Elements) that is locked to a specific workstation with a dongle.

We built RIA so you can take your TIFF stacks, go to a coffee shop (or just your desk), and run rigorous analysis on your own laptop—no coding required.

RIA Interface showing trace analysis

[Image of fluorescence ratiometric imaging process diagram]

💡 Why use RIA?

  • Analysis Unchained: Stop queuing for the lab workstation. RIA is a standalone executable that runs on standard PCs.
  • Math Done Right: Calculating ratios isn't just A / B. Biological images have edges and noise. We implemented a normalized convolution algorithm that handles NaN (Not a Number) values correctly. This means your data doesn't get eroded or corrupted at cell boundaries—a common issue in simple script-based analysis.
  • Zero Coding Needed: We know not everyone loves Python. RIA has a full GUI for background subtraction, thresholding, and dragging-and-dropping ROIs.
  • Trust Your Data: We don't hide the numbers. You get the visual stacks, but you also get the raw float32 ratio data and time-series CSVs. You can take these straight to Prism, Origin, or Excel.

📁 Project Structure

RatioImagingAnalyzer/
├── data/               # Sample TIFFs so you can try it out immediately
├── paper/              # JOSS submission files
├── src/ria_gui         # The actual code
│   ├── main.py         # Start here
│   ├── gui.py          # The frontend logic
│   ├── processing.py   # The math/algorithm heavy lifting
│   └── components.py   # UI Widgets
├── tests/              # Automated tests to keep bugs away
└── requirements.txt    # Dependencies

🚀 Installation

Option 1: Install via PyPI (Recommended for Pythoners)

RIA is available on the Python Package Index. Open your terminal and run:

pip install ria-gui

Once installed, simply type the following command to launch the software:

ria

Option 2: Running from Source (Recommended for Developers/Reviewers)

  1. Clone the repository:

    git clone https://github.com/Epivitae/RatioImagingAnalyzer.git
    cd RatioImagingAnalyzer
    
  2. Install dependencies: It is recommended to use a virtual environment.

    pip install -r requirements.txt
    
  3. Run the application: The source code is located in the src directory:

    python src/ria_gui/main.py
    

Option 3: Standalone Executable (For End Users)

Check the Releases page to download the latest compiled .exe file for Windows. No Python installation is required.

📖 Usage Example

To test the software, you can use the sample data provided in the data/ directory.

  1. Launch RIA :

    • pip: ria,
    • git clone: python src/ria_gui/main.py
    • exe: doble click only!
  2. Load Files:

    1. Separate Files model:
    • Click 📂 Ch1 and select data/C1.tif.
    • Click 📂 Ch2 and select data/C2.tif.
    • Click 🚀 Load & Analyze.
    1. Single File with Dual Channels:
    • Select Dual-Ch File.
    • Click 🚀 Load & Analyze.
    • Confirm the channels arrangement.
  3. Run Motion Correction if needed.

  4. Adjust Parameters:

    • Set BG % (Background Subtraction) to ~5-10%.
    • Adjust Int. Min (Intensity Threshold) to remove background noise.
    • (Optional) Enable Log Scale if the dynamic range is large.
  5. Analyze:

    • Click ✏️ New or use Ctrl + T as a short-cut in the "ROI & Measurement" panel.
    • Draw a ROI on the cell of interest.
    • Cilck Plot Curve and Live Monitor, a curve window will pop up showing the ratio/intensity change over time.

🧪 Testing

This project uses pytest to ensure algorithm accuracy. The tests are located in the tests/ directory.

To run the automated tests:

python -m pytest tests/

🤝 Contributing

Contributions are welcome! If you encounter any bugs or have feature requests, please check the Issue Tracker or submit a Pull Request.

📄 License

Distributed under the MIT License. See LICENSE for more information.

📚 References & Dependencies

This software relies on the following open-source libraries and methods:

  • Methodology: Tao, R., Wang, K., et al. (2023). A genetically encoded ratiometric indicator for tryptophan. Cell Discovery, 9, 106. DOI: 10.1038/s41421-023-00608-1
  • NumPy: Harris, C. R., et al. (2020). Array programming with NumPy. Nature, 585(7825), 357–362. DOI: 10.1038/s41586-020-2649-2
  • SciPy: Virtanen, P., et al. (2020). SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nature Methods, 17, 261–272. DOI: 10.1038/s41592-019-0686-2
  • Matplotlib: Hunter, J. D. (2007). Matplotlib: A 2D graphics environment. Computing in Science & Engineering, 9(3), 90–95. DOI: 10.1109/MCSE.2007.55
  • Tifffile: Gohlke, C. (2023). tifffile. PyPI. URL
  • Fiji (Inspiration): Schindelin, J., et al. (2012). Fiji: an open-source platform for biological-image analysis. Nature Methods, 9(7), 676–682.

Citation

If you use RIA in your research, please cite it as:

Wang, K. (2025). Ratio Imaging Analyzer (RIA): A Lightweight, Standalone Python Tool for Portable Ratiometric Fluorescence Analysis (v1.7.10.1). Zenodo. https://doi.org/10.5281/zenodo.18107966

Or use the BibTeX entry:

@software{Wang_RIA_2025,
  author = {Wang, Kui},
  title = {{Ratio Imaging Analyzer (RIA): A Lightweight, Standalone Python Tool for Portable Ratiometric Fluorescence Analysis}},
  month = dec,
  year = {2025},
  publisher = {Zenodo},
  version = {v1.7.10.1},
  doi = {10.5281/zenodo.18107966},
  url = {[https://doi.org/10.5281/zenodo.18107966](https://doi.org/10.5281/zenodo.18107966)}
}

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

ria_gui-1.7.10.2.tar.gz (8.1 MB view details)

Uploaded Source

Built Distribution

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

ria_gui-1.7.10.2-py3-none-any.whl (8.1 MB view details)

Uploaded Python 3

File details

Details for the file ria_gui-1.7.10.2.tar.gz.

File metadata

  • Download URL: ria_gui-1.7.10.2.tar.gz
  • Upload date:
  • Size: 8.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for ria_gui-1.7.10.2.tar.gz
Algorithm Hash digest
SHA256 33b58c94e7001d47bed8956fb656261e56b45f98b94de88f306d60e65fe332ab
MD5 6ce2666289ccb236019d0899339c2ceb
BLAKE2b-256 6e72589f15b5b75fdfd0d35b95a6e03c84aa3b2f24c3499b03caa4e1b18b38b8

See more details on using hashes here.

File details

Details for the file ria_gui-1.7.10.2-py3-none-any.whl.

File metadata

  • Download URL: ria_gui-1.7.10.2-py3-none-any.whl
  • Upload date:
  • Size: 8.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for ria_gui-1.7.10.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fe9b6b745fabfe7da706d7485932596eaa2551b6ec455e8bf59348e3856afab2
MD5 576fe747b335e9d25ef6eee30ad394ca
BLAKE2b-256 39592f58685079008152463dea0b71411c7c0b592fe609a39142747dd28640aa

See more details on using hashes here.

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