//-------------------------------------------------------------------------------- // This macro was designed to analyze the FAP-DOR and GFP-C2A expressing cells // for Golgi vs Total cell Fluorescence of DOR // Created by Dan Shiwarski May 2015 // // Opening and Duplicating the original Image and preparing it for analysis // //-------------------------------------------------------------------------------- macro "Analyze FAP-DOR Golgi Retention [F5]" { open(); rename("DOR Retention Analysis"); run("Enhance Contrast", "saturated=0.35"); run("Duplicate...", "title=[DOR Retention Analysis Thresholded]"); run("Threshold..."); setAutoThreshold("Default dark Over/Under"); run("Tile"); //--------------------------------------------------------------------------------- // Pause to select the ROIs to be analyzed // The easiest way to do this is to select the Total followed by Golgi // region of a cell and the paste accordingly in Excel. // // For a two channel image that contains GFP-C2A expression the measurements from // channel 2 will be for the Total and Golgi region of C2A expression. //--------------------------------------------------------------------------------- selectWindow("DOR Retention Analysis"); setTool("freehand"); waitForUser("Select ROIs") //--------------------------------------------------------------------------------- // Selection of all the ROIs to measure and copy the measurments to the clipboard // Make the selction of the ROIs on the Original image for accuracy // The macro will measure from the thresholded image // Always check to make sure measurments are limited to threshold // // Once completed, the Results can be pasted directly into Excel or other software //--------------------------------------------------------------------------------- run("Set Measurements...", "area mean integrated limit redirect=None decimal=2"); selectWindow("DOR Retention Analysis Thresholded"); roiManager("Select All"); roiManager("Measure"); String.copyResults waitForUser("Paste the results into Excel \n then click OK to clear") //--------------------------------------------------------------------------------- // Clear all of the windows, results, and ROIs // Clicking OK will Clear everything and prepare for the next analysis //--------------------------------------------------------------------------------- roiManager("Select All"); roiManager("Delete"); run("Clear Results"); run("Close All"); }