This project aims to analyze the early infection (LT signal) and late expression (VP1) after infection with HBdMEC BK virus. The goal is to quantify amount of infected cells over time.
The images used in the analysis have three channels:
- Blue: Nuclei (DAPI)
- Green: 1st indicator of infection and viral growth (LT)
- Red: 2nd indicator of infection and viral growth (VP1)
The dataset consists of several biological replicates, each containing the following information:
- Regions of Interest (ROIs): Specific areas of interest in the images.
- Plate: Plate information associated with the ROIs.
- Experiment Repetition: The experiment was repeated 2 times
The project has the following structure:
project
│ | README.md
│ | requirements.txt
│ | run.sh
|
└───core
│ │ generate_graphs.py
│ │ measurements.py
│ │ segment.py
│ │ test_segmentation.py
│
└───data
│ │ experiment_1
│ │ │ image.lif
│
└───masks
│
└───omero
│
└───output
│
└───src
│ │ lif_loader.py
│ │ cellpose_call.py
│
└───tmp
Images are expected in .lif
format and should be placed in the experiment folder inside data folder.
The analysis workflow consists of three main parts:
The lif_loader.py
script is used to load the data from .lif
files and perform image segmentation. Then it uses Cellpose model to segment the nuclei in the blue channel.
Command python segment.py --exp 20230308
runs the script for the experiment 20230308. The script will generate the masks for the nuclei in the blue channel and save them in the masks folder.
The measurements.py script is used to quantify the signal inside the nuclei in the green and red channels.
Command python measurements.py --exp 20230308 --verbose True --channels 'DAPI,LT,VP1'
runs the script for the experiment 20230308. The script will generate the results and save them as csv in the output folder.
The generate_graphs.py script is used to generate the graphs for the data analysis.
To run the analysis, follow these steps:
- Install the required dependencies (listed in requirements.txt).
- Execute the lif_loader.py script to perform image segmentation and generate masks.
- Execute the signal_quantification.py script to quantify the signal inside the nuclei and generate the results.
- The results will be saved as a CSV file (.csv).
Or run the run.sh script to run the whole workflow.
The dependencies are listed in the requirements.txt file. To install the dependencies, run the following command:
pip install -r requirements.txt
For communication with OMERO, required packages are specified in the requirements_omero.txt file. To install the dependencies, run the following command:
pip install -r requirements_omero.txt
Or install both using yml file:
conda env create -f environment.yml
The cellpose library: link to GitHub repository.