This project measures the degree of clustering of individual spots relative to local signal intensity of another channel. explanation of whay macro does specifically (use images to explain): recognize spots - put circles around - count other spots within circle - measure signal intensity in circle
- Organize image data as explained below
- Run Cluster_Quant.ijm and select base data folder
- Run Analyze_ClusterQuant.py on the csv output file from step 2 (filename starting with _PythonInput)
Macro works on any projected microscopy image that can be opened in FiJi.
Create a base directory for data analysis.
Within the base directory, create separate directories for each condition to be analyzed. The names of these folders will be used as indentifier in data output, so ideally give them brief names clearly indicating the condition used. Note that any folder starting with an underscore will be skipped during analysis.
Within these directories, place all images to be analyzed for this condition.
E.g.,
Drag Cluster_Quant.ijm into FiJi and hit Run at the bottom of the script editor. This will open a dialog window with a number of options.
- Choose base directory as explained above
- Name for the output folder
- Identification text that must be present in all filenames to be read; any filename that does not contain. E.g. if folders contain both raw data and projected images, write the identifying part of the filename of the projected images (usually "PRJ"). This can be left empty if all files present in the folders should be analyzed.
- Channels to measure clustering (a) and cross-correlation signal (b) in.
- Channel to use to determine the region within which clustering should be measured. Set to 0 to include full image
- Name of the channels used in data output graphs and sheets
- Radius (in pixels) of circle around each spot
- Fraction of circle that must be part of analysis region (determined by outline channel/manually excluded regions)
- Turn on to pause macro at each image and mannually select regions to exclude from analysis
- Turn on to load previously excluded regions from analysis (ignores setting above). If this is turned on, an additional dialog window will open where an ROI folder created during a previous run can be selected.
- Turn on to run in test mode. The macro will stop a few times during each image to allow for manual tuning of settings. Cancel the test run and use optimal settings in extended settings
- Turn on to change extended settings in additional dialog
At the end of step 2 a csv file is created, which forms the input data for the python code. This file is named _PythonInput_[datetime]_Radius[XX].csv.
Open Analyze_ClusterQuant.py in a python console (Anaconda Spyder works well).
Run the code (F5 in Spyder) and choose the newly created PythonInput file mentioned above.
See below for some optional data output types
add DEFAULT OUTPUTS add EXAMPLE IMAGES OF WHAT OUPUT LOOKS LIKE
At the top of the code a few optional output types that can be turned on or off in addition to the standard ones.
- makeLineplot: An XY graph is created, which shows the correlation between spot number of intensity of secondary signal (single graph with one line per condition).
- makeViolinplots (slow for large datasets): Violinplots are created showing the correlation for individual images (one graph per input image). This is slow for large datasets.
- spotBasedPrism (VERY slow for large datasets): Additional files to create scatterplots for Prism with one point per spot for every spot of every image in the dataset
add EXAMPLE IMAGES OF THESE AS WELL
This project is licensed under the terms of the MIT License