Coloc 2 log does not identify the ROI analyzed, when you colocalize all the ROIs of an image. I need the number, name or, al least, location of the ROI analyzed in the log

I am colocalizing all the ROIs of an image simultaneously, using ROI manager and coloc 2. The problem is that the log does not mentioned any id of the ROIs analyzed, except mask id, which is, as far as I understand, an eleatory number. I need the log to include the number, name or localization (x,y) of each ROI analyzed. Otherwise, I can not know to which ROI the information belongs, since the log is a list of data from the many ROIs of the image.
May be this request should be done to the creators of coloc 2, but I don’t know how to communicate with them. I’ll deeply appreciate any help.


So… @chalkie666 will know better than me regarding the options for ROIs. As far as I know - each PDF result can be printed and shows the ROI (via an image) in each PDF - so you can associate the correct ROIs that way - and I believe the Results windows are displayed in order and can therefore be saved as such.

Perhaps you can script this? So just do the processing in Coloc2 per ROI - then you can also control the names of the ROIs and associate them with the PDF file name, etc. Depending on what measures you want/need - you can also use this script: Problem with Li plot using coloc2 to hand-pick which measures you make.

I wrote a quickie script that is a standalone demo. So just run it in the Script Editor (it’s in the IJ1 Macro language):

// open test image, only use two channels
run("Fluorescent Cells");
run("Split Channels");
ch1 = getTitle();
ch2 = getTitle();

// Add 3 example ROIs to ROI Manager
makeRectangle(90, 87, 49, 30);
roiManager("Select", 0);
roiManager("Rename", "ROI-01");
makeRectangle(304, 218, 71, 45);
roiManager("Select", 1);
roiManager("Rename", "ROI-02");
makeRectangle(275, 372, 111, 72);
roiManager("Select", 2);
roiManager("Rename", "ROI-03");

// loop through ROIs in ROI Manager and run Coloc 2 per ROI selection
n = roiManager("count");
for (i=0; i<n; i++) {
	roiManager("select", i);
	run("Coloc 2", "channel_1=" + ch1 + " channel_2=" + ch2 + " roi_or_mask=[ROI(s) in channel 2] threshold_regression=Bisection show_save_pdf_dialog display_images_in_result li_histogram_channel_1 li_histogram_channel_2 li_icq spearman's_rank_correlation manders'_correlation kendall's_tau_rank_correlation 2d_intensity_histogram costes'_significance_test psf=3 costes_randomisations=10");


Unfortunately - there is no way to automatically save the PDF file… but this way - you move through the ROIs in order and can save each PDF file with a name corresponding to the ROI #/name… whatever you choose really.

1 Like