//This is designed for analyzing the colocalized points for GFP-LC3 and mCherry on confocal images //Creator: Dan Shiwarski, Duvvuri Lab 101410 Co-author: Ruben K. Dagda, Ph.D., University of Pittsburgh macro "Background subtraction [F5]" { print(" RFP-GFP-LC3 Colocalization macro, Dan Shiwarski and Ruben Dagda 10/19/10"); wait(100); open(); run("Split Channels"); run("Window/Level..."); run("Enhance Contrast", "saturated=0.35"); setMinAndMax(25, 96); saveAs("Tiff", "C:\\Blue.tif"); close(); run("Window/Level..."); run("Enhance Contrast", "saturated=0.35"); setMinAndMax(25, 96); saveAs("Tiff", "C:\\Green.tif"); close(); run("Enhance Contrast", "saturated=0.35"); setMinAndMax(25, 96); saveAs("Tiff", "C:\\Red.tif"); close(); open(); open(); selectWindow("Red.tif"); run("Subtract Background...", "rolling=14"); selectWindow("Green.tif") run("Subtract Background...", "rolling=14"); selectWindow("Red.tif"); //run("Threshold..."); setAutoThreshold("RenyiEntropy"); setAutoThreshold("RenyiEntropy dark"); run("Convert to Mask"); selectWindow("Green.tif"); setAutoThreshold("RenyiEntropy"); //run("Threshold..."); setAutoThreshold("RenyiEntropy dark"); run("Convert to Mask"); run("Merge Channels...", "red=Red.tif green=Green.tif blue=*None* gray=*None* create"); run("Stack to RGB"); run("Split Channels"); selectWindow("Composite (RGB) (blue)"); close(); run("Colocalization ", "channel_1=[Composite (RGB) (red)] channel_2=[Composite (RGB) (green)] ratio=30 threshold_channel_1=15 threshold_channel_2=15 display=255 colocalizated"); selectWindow("Colocalizated points (8-bit) "); run("Make Binary"); run("Analyze Particles...", "size=3-1000 circularity=0.00-1.00 show=Outlines display summarize"); selectWindow("Composite (RGB) (green)"); run("Make Binary"); run("Analyze Particles...", "size=3-1000 pixel circularity=0.00-1.00 show=Outlines display summarize"); selectWindow("Composite (RGB) (red)"); run("Make Binary"); run("Analyze Particles...", "size=3-1000 pixel circularity=0.00-1.00 show=Outlines display summarize"); s = getString("Do you want to analyze and count nuclei? [y/n+comment]","n"); if (fromCharCode(charCodeAt(s,0)) == "n") exit; // end of program, updated on May 15-2010 else { open(); selectWindow("Blue.tif"); //run("Threshold..."); macro "Count Nuclei [F10]"{ run("Make Binary"); run("Analyze Particles...", "size=15-1000000 pixel circularity=0.00-1.00 show=Outlines display summarize"); } macro "Close All Windows [F4]" { while (nImages>0) { selectImage(nImages); close(); }