//-------------------------------------------------------------------------------- // 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("Stack to Images"); selectWindow("DOR-0001"); rename("DOR Retention Analysis"); selectWindow("DOR-0002"); rename("GFP-C2A Expression Analysis"); selectWindow("DOR Retention Analysis"); 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 Measure C2A Expression") //--------------------------------------------------------------------------------- // Measuring the GFP-C2A expression for the ROIs measure for the DOR retention // This is using the same ROIs for consistency and measuring from the // thresholded image //--------------------------------------------------------------------------------- run("Clear Results"); //Clear the Results from the DOR fluorescence analysis selectWindow("GFP-C2A Expression Analysis"); run("Enhance Contrast", "saturated=0.35"); run("Duplicate...", "title=[GFP-C2A Expression Analysis Thresholded]"); run("Threshold..."); setAutoThreshold("Default dark Over/Under"); selectWindow("GFP-C2A Expression Analysis Thresholded"); roiManager("Select All"); roiManager("Measure"); String.copyResults waitForUser("Paste the results into Excel \n then click OK to Clear All") //--------------------------------------------------------------------------------- // 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"); }