Meta | |||
Testing | |||
PyPi | |||
Anaconda |
FlowCyPy is a cutting-edge Python library designed to simulate flow cytometer experiments. By generating realistic Forward Scatter (FSC) and Side Scatter (SSC) signals, FlowCyPy enables detailed modeling of flow cytometry setups, making it ideal for researchers and engineers working with extracellular vesicles (EVs) or other scatterers.
- Particle Event Simulation: Create detailed FSC/SSC signals with customizable particle size and refractive index distributions.
- Noise and Signal Modeling: Incorporate realistic noise sources (thermal, shot, dark current) and baseline shifts.
- Detector Configurations: Simulate real-world detector behaviors, including saturation and responsivity.
- Fluorescence Modeling: Simulate fluorescence signals for labeled particles (e.g., EV surface markers).
- Visualization Tools: Generate advanced plots, including density maps and signal traces.
For full documentation and examples, visit the FlowCyPy Documentation.
Install FlowCyPy via pip or conda`:
pip install FlowCyPy
conda install FlowCyPy --channels MartinPdeS
Requirements: Python 3.10 or higher with dependencies: numpy, scipy, pint, tabulate, seaborn, MPSPlots, PyMieSim, pydantic>=2.6.3
Simulate a simple flow cytometer experiment:
from FlowCyPy import FlowCytometer, ScattererCollection, FlowCell
from FlowCyPy.units import particle, liter, nanometer, RIU
# Define the flow cell
flow_cell = FlowCell(
flow_speed=1.0, flow_area=10e-6, run_time=0.01
)
# Define scatterer properties
scatterer = ScattererCollection(medium_refractive_index=1.33 * RIU)
scatterer.add_population(
name='EVs',
concentration=1e9 * particle / liter,
size=distribution.Normal(mean=100 * nanometer, std_dev=20 * nanometer),
refractive_index=distribution.Normal(mean=1.45 * RIU, std_dev=0.01 * RIU)
)
flow_cell.initialize(scatterer=scatterer)
# Simulate the cytometer signals
cytometer = FlowCytometer(
flow_cell=flow_cell,
source=source,
detectors=[detector_fsc, detector_ssc]
)
cytometer.simulate_pulse()
cytometer.plot()
Explore more examples in the FlowCyPy Examples.
git clone https://github.com/MartinPdeS/FlowCyPy.git
cd FlowCyPy
Install in editable mode with testing and documentation dependencies:
pip install -e .[testing,documentation]
Use pytest to validate functionality:
pytest
Build the documentation locally:
cd docs
make html
Find the documentation in docs/_build/html.
- Documentation: Full guide and API reference at FlowCyPy Documentation
- Examples: Explore use cases in the Examples Section
Contributions are welcome! If you have suggestions, issues, or would like to collaborate, visit the GitHub repository.
For inquiries or collaboration, contact Martin Poinsinet de Sivry-Houle.