Analyzing particles in batch (proximity ligation assay)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Analyzing particles in batch (proximity ligation assay)

FloP
Dear all,

I am unfortunately unexperienced in macro programming, this is why I would ask for help for a probably easy problem.
The goal is to count particles from microscope pictures with two stacks ('blue' and 'red') and summarize them into a .csv output file. The pictures were taken in .lif format, they're cells with a nucleus DAPI signal ('blue') and dotted signals ('red'). So far I am working manually with the LOCI plugin. First the red signal is thresholded and analyzed:


-Plugins-LOCI-Bio-Formats importer
        choose file (split channels: on, autoscale: off)
- open

for red channel
- Image-Adjust-threshold
        (Li, dark background)
- analyze-analyze particles
        (0-Infinity, show outlines, display results, clear results) 'ok'

here I note the number of particles and close the window. Then I count the number of nuclei:


for blue channel
- Image-Adjust-threshold
        (Li, dark background)
- analyze-analyze particles
        (10-Infinity, show outlines, display results, clear results) 'ok'


I recorded it with the macrorecorder ('file' and 'folder'are replacements);

run("Bio-Formats Importer", "open='folder''file'.lif color_mode=Default split_channels view=Hyperstack stack_order=XYCZT series_1");
selectWindow("'file'_01 - C=1");
setAutoThreshold("Li dark");
//run("Threshold...");
run("Analyze Particles...", "size=0-Infinity circularity=0.00-1.00 show=Outlines display clear");
selectWindow("'file'_01 - C=0");
//run("Threshold...");
setAutoThreshold("Li dark");
run("Analyze Particles...", "size=10-Infinity circularity=0.00-1.00 show=Outlines display clear");

Is there a way to automate this process? I am handling hundreds of pictures what costs a tremendous amount of time.

Thanks in advance!
FloP
Reply | Threaded
Open this post in threaded view
|

Re: Analyzing particles in batch (proximity ligation assay)

Thomas Boudier
Hi,

Use some loop over the directory where yout lif files are :

dir=getDirectory("input");
save=getDirectory("Save results");
files=getFileList(dir);

for(f=0;j<files.length;f++) {
run("Bio-Formats Importer", "open="+dir+files[f]+" color_mode=Defaul
split_channels view=Hyperstack stack_order=XYCZT series_1");
...
// saves your results
saveAs("Results", save+files[f]+"_results.txt");
...
}

that should be a good start

best

Thomas


Le 08/08/2013 15:35, FloP a écrit :

> Dear all,
>
> I am unfortunately unexperienced in macro programming, this is why I would
> ask for help for a probably easy problem.
> The goal is to count particles from microscope pictures with two stacks
> ('blue' and 'red') and summarize them into a .csv output file. The pictures
> were taken in .lif format, they're cells with a nucleus DAPI signal ('blue')
> and dotted signals ('red'). So far I am working manually with the LOCI
> plugin. First the red signal is thresholded and analyzed:
>
>
> -Plugins-LOCI-Bio-Formats importer
> choose file (split channels: on, autoscale: off)
> - open
>
> for red channel
> - Image-Adjust-threshold
> (Li, dark background)
> - analyze-analyze particles
> (0-Infinity, show outlines, display results, clear results) 'ok'
>
> here I note the number of particles and close the window. Then I count the
> number of nuclei:
>
>
> for blue channel
> - Image-Adjust-threshold
> (Li, dark background)
> - analyze-analyze particles
> (10-Infinity, show outlines, display results, clear results) 'ok'
>
>
> I recorded it with the macrorecorder ('file' and 'folder'are replacements);
>
> run("Bio-Formats Importer", "open='folder''file'.lif color_mode=Default
> split_channels view=Hyperstack stack_order=XYCZT series_1");
> selectWindow("'file'_01 - C=1");
> setAutoThreshold("Li dark");
> //run("Threshold...");
> run("Analyze Particles...", "size=0-Infinity circularity=0.00-1.00
> show=Outlines display clear");
> selectWindow("'file'_01 - C=0");
> //run("Threshold...");
> setAutoThreshold("Li dark");
> run("Analyze Particles...", "size=10-Infinity circularity=0.00-1.00
> show=Outlines display clear");
>
> Is there a way to automate this process? I am handling hundreds of pictures
> what costs a tremendous amount of time.
>
> Thanks in advance!
> FloP
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Analyzing-particles-in-batch-proximity-ligation-assay-tp5004353.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
   /**********************************************************/
      Thomas Boudier, MCU Université Pierre et Marie Curie,
      Modélisation Cellulaire et Imagerie Biologique (EE1),
      IFR 83, Bat B 7ème étage, porte 723, Campus Jussieu.
      Tel : 01 44 27 46 92   Fax : 01 44 27 22 91
/*******************************************************/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html