This is a Python script developed to facilitate analysis and graphical visualization of fluorescence reader output files of biological experiments in Multi-well Plate setup. The script has been developed keeping in mind the analysis and visualization of high-throughput cell-free transcription and translation (TX-TL) experiments, however, its usage can further be expanded to the analysis of fluorescence reporter assays, generating heatmaps to visualize the effect of titrating reagents in a reaction setup.
Conducting parallel experiments in research essentially saves a lot of time, as well as generates huge amounts of data to enhance the statistical significance of experimental results. Methods to increase the throughput of biological experiments have been widely accepted. However, a major problem with high throughput experiments is the lack of software tools for analysis of the huge amount of data generated.
Here, we have developed a software tool to automate analysis and graphical visualization of fluorescence reader output files. Our open-source python script facilitates generation of kinetic traces from the fluorescence readings and computation of features like the maxima, minima, endpoint, and slope of the kinetic traces. This package is particularly useful for the analysis of fluorescence reporter assays, generating heatmaps to visualize the effect of titrating up to two reagents in the reaction setup. The PyFluor package can be utilized in conjunction with our previously developed PyEcho package for application in Cell-free synthetic biology experiments. These tools will be useful for the analysis of high-throughput fluorescence output biological experiments and beneficial for researchers without programming experience.
Python functions from the two scripts in this module can be used for the following purposes:
| Description | Script Name | Function Called |
|---|---|---|
| Generates heatmaps in the microplate format for visual representation of the maxima, minima, endpoint, and slope of the fluorescence kinetic traces | visualization.py | output_plots(total_rows, total_columns, [*fluor_labels], sheet_name, fluor_file) |
| Generates fluorescence kinetic traces within the microplate interactive grid format for visualization of the experiment | visualization.py | kinetic_trace(total_rows, total_columns, [*fluor_labels], sheet_name, fluor_file) |
| Generates two interactive plots in a matrix format based on the reaction setup. The first grid shows selected kinetic traces and the second is a maximum fluorescence value heatmap | fluor_analysis.py | expt_plots(total_rows, total_columns, [*fluor_labels], [*expt_tags], sheet_name, design_file, fluor_file, answer_tag) |
One can directly call the desired functions on the terminal from their corresponding Python scripts. However, more information regarding the arguments has been included within the scripts, and these scripts have been designed to be modulated as per the user's requirements.
To create a design table for the analysis please refer to the documentation of generate_blank_design_table.py from the PyEcho module. A description on how to fill up the Design table spreadsheet is also given in the same documentation.
If you open this script on an IDLE, immediately after the import statements, you will see an assignment section in the Script (see Figure 1). Variables in this section can be assigned by the user before running the script as per requirements of the experiment.
![]() |
|---|
| Figure 1: visualization.py opened on PyCharm |
After completing the assignment, the user can directly run the script. If you scroll to the end of the python script, you can see two functions, namely "output_plots" and "kinetic_trace", being called with the appropriate arguments.
| Figure 2: Last three lines of visualization.py |
If you want to call only one of the functions, you can do so by commenting the other function (adding a "#" in front of the function you don't want to call). The desired plots will be generated by running this Python script.
Calling the "output_plots" function will generate heatmaps in the microplate format displaying features such as maxima, minima, endpoint, and slope of the fluorescence kinetic traces. Calling the "kinetic_trace" function will generate fluorescence kinetic traces within the microplate interactive grid format. These grids will be useful for visualization of experiments with very high throughput. Both the graphical representations can be used to describe the experiment design and results to peers and colleagues.
If you open this script on an IDLE, immediately after the import statements, you will see an assignment section in the Script (see Figure 3). Variables in this section shall be assigned before running the script.
![]() |
|---|
| Figure 3: fluor_analysis.py opened on PyCharm |
In the end of the script, the function "expt_plots" has been called with the appropriate arguments. The desired plots will be generated by running this Python script.
| Figure 4: last two lines of fluor_analysis.py |
Calling "expt_plots" will generate 2 kinds of interactive grids for each of the fluorescence labels with the X-axis and Y-axis representing the two reagents being titrated (tags assigned to the "expt" variable) in the reaction setup. The first grid shows selected kinetic traces and the second grid is a heatmap showing the maximum fluorescence value.
Most of the variables are quite straightforward, however, some important points must be kept in mind while assigning values.
- Please double-check the name of the file before assigning it to the variable " fluor_file", " file_in" or " file_out". Also make sure that the input files are in the same directory as the script, else assign the proper path of the file.
- " file_in" in the script fluor_analysis.py refers to the design table of the experiment. For more information on how to generate the design table, please refer to the PyEcho package.
- The fluorescence tags used in the experiment and detected by the fluorescence reader must be assigned to the variable " labels". Make sure that the tags are exactly the same as mentioned in the input fluorescence file. Please note that if there are multiple fluorescence tags, please mention them in a python list format*.
- The fluor_analysis.py script generates grids with X-axis and Y-axis representing the two reagents being titrated. For proper functioning of this script, it is important to assign the " expt" and " answer" variables.
- For the " expt" variable, exactly two experiment tags must be assigned in a python list format*. These tags would represent the X-axis and Y-axis respectively on the output grid and these tags must be the exact same as the reagent tags mentioned in the input design table.
- Generally, there are more than two reagents in the reaction setup. If the reagents other than the experiment tags are also being titrated, "yes" must be assigned to the " answer" variable. Else, if all the other reagents are constant throughout the reaction setup, "no" must be assigned to the " answer" variable.
*Python list format:
variable = ["label1", "label2", …. , "labelN"]
If you wish to run the script on your PC or Desktop, make sure you have the latest version of Python installed on your system (https://www.python.org/downloads/). The script has been developed using Python 3.8 (32-bit). Also, you might have to install openpyxl, pandas, XlsxWriter, seaborn, etc. in your environment or using the command line terminal. You can refer to the following links if you need help on installing packages/modules: https://packaging.python.org/tutorials/installing-packages/; https://docs.python.org/3/installing/index.html
If you are comfortable using the Command line you can directly call the desired functions on the terminal from their corresponding Python scripts with the respective arguments (follow the previous section for details regarding the arguments).
However, if you are more comfortable visualizing the code on a Python IDLE, you can use PyCharm (https://www.jetbrains.com/pycharm/download/), Spyder (https://www.spyder-ide.org/) or even the official IDLE that is automatically installed with Python. Using an IDLE will help the user to customize the script as required.

