Fwd: Running coloc2 in a script? (fwd)

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

Fwd: Running coloc2 in a script? (fwd)

Daniel James White
Hi Kurt,


Begin forwarded message:

> ---------- Forwarded message ----------
> Date: Fri, 29 Jul 2011 15:58:36 -0700
> From: Kurt Thorn <[hidden email]>
> Reply-To: ImageJ Interest Group <[hidden email]>
> To: [hidden email]
> Subject: Running coloc2 in a script?
>
> Hi All -
>
> I'm trying to analyze the colocalization present of a large number of images so


Make sure you read, absorb, re read and grow to understand the many technical points described at
http://fiji.sc/wiki/index.php/Colocalization
(i really need to tidy that up a bit....)

Coloc analysis is a minefield, and you need to be super careful,
esp. if its gonna be a medium/high through put job.

Background subtraction and selection of appropriate biological ROIs
is always challenging.


> I'm trying to figure out how to call the coloc2 plugin in a script in such a way
> that I can get access to the returned Manders coefficients in my script.

Coloc2 is a a working prototype, and I'm not sure if we can use it from the imageJ macro language yet.
A proper plugin could probably automate it.

For the methods we are using the Manders coefficients only make sense with background subtracted
images where the background is at 0 (as per Manders original paper)

The thresholded Manders coefficients, as per Costes 2004 are better for technical reasons
BUT, we seem to have a nasty bug in that calculation right now
and tese are being over estimated.

We need to fix that right away.

>
> I have a couple hundred images, so what I'd like to do is loop over all of them,
> determining appropriate ROIs,

How?
Manual? Automated?

> calling coloc2 for each two channel image for the
> current ROI, and then record the returned Manders coefficients associated with
> that image and ROI.  

THresholded Manders are what you probably want.

> Any help would be most appreciated.  I'm still pretty new
> to ImageJ scripting, so it's quite likely I'm overlooking something.


Not sure if Coloc2 can be run correctly from imageJ macro lang...
you could try recording a macro to see what happens.
But, presently I'm not sure what the best approach is to do what you want...
but its something we should certainly make possible.

you input is very welcome.

cheers

Dan

>
> Thanks,
> Kurt

Dr. Daniel James White BSc. (Hons.) PhD
Senior Microscopist / Image Processing and Analysis
Light Microscopy Facility
Max Planck Institute of Molecular Cell Biology and Genetics
Pfotenhauerstrasse 108
01307 DRESDEN
Germany

+49 (0)15114966933 (German Mobile)
+49  (0)351 210 2627 (Work phone at MPI-CBG)
+49  (0)351 210 1078 (Fax MPI-CBG LMF)

http://www.bioimagexd.net                BioImageXD
http://pacific.mpi-cbg.de                Fiji (is just ImageJ - batteries included)
http://www.chalkie.org.uk
[hidden email]
( [hidden email] )
Reply | Threaded
Open this post in threaded view
|

Re: Running coloc2 in a script? (fwd)

Daniel James White
Hi Kurt,

On Aug 2, 2011, at 1:01 AM, Kurt Thorn wrote:

> Hi Dan -
>
> Thanks for the detailed reply.
>
> On 8/1/2011 11:23 AM, Dan White wrote:
>
>
> I'm trying to analyze the colocalization present of a large number of images so
>
>>
>> Make sure you read, absorb, re read and grow to understand the many technical points described at
>> http://fiji.sc/wiki/index.php/Colocalization
>> (i really need to tidy that up a bit....)
>>
>> Coloc analysis is a minefield, and you need to be super careful,
>> esp. if its gonna be a medium/high through put job.
>>
>> Background subtraction and selection of appropriate biological ROIs
>> is always challenging.
> Yeah, I've read through the Costes paper.  I think what saves us here is that we're just using colocalization to measure the recruitment of a protein from the cytoplasm to the mitochondria, and the change in localization is really obvious by eye.  We're not looking for small effects.
>>> I'm trying to figure out how to call the coloc2 plugin in a script in such a way
>>> that I can get access to the returned Manders coefficients in my script.
>> Coloc2 is a a working prototype, and I'm not sure if we can use it from the imageJ macro language yet.
>> A proper plugin could probably automate it.
>>
>> For the methods we are using the Manders coefficients only make sense with background subtracted
>> images where the background is at 0 (as per Manders original paper)
>>
>> The thresholded Manders coefficients, as per Costes 2004 are better for technical reasons
>> BUT, we seem to have a nasty bug in that calculation right now
>> and tese are being over estimated.
>>
>> We need to fix that right away.
> I agree that the thresholded Manders coefficients are the right thing to use, and coloc2 gave numbers that made sense on two cells I tested it on.

the nunbers might make sense, but they are probably wrong compared to coloc threshold plugin...

We need to lok at this carefully... as we definately have a bug Coloc2


>>> I have a couple hundred images, so what I'd like to do is loop over all of them,
>>> determining appropriate ROIs,
>> How?
>> Manual? Automated?
> Automated, probably.  I'm still testing things, but what I have are a number of time courses.  What I'd like to do is to automatically determine ROIs for each cell in the time course, and then measure the thresholded Manders coefficient for each ROI in each time point.  I'd then like to average those coefficients for all cells at a given time point so that we can measure the time course of recruitment for each condition (we have treatments that both accelerate and slow down this recruitment, and this is what we ultimately want to compare).

this sounds very good.

>>
>>> calling coloc2 for each two channel image for the
>>> current ROI, and then record the returned Manders coefficients associated with
>>> that image and ROI.
>> THresholded Manders are what you probably want.
>>
>>> Any help would be most appreciated.  I'm still pretty new
>>> to ImageJ scripting, so it's quite likely I'm overlooking something.
>>
>> Not sure if Coloc2 can be run correctly from imageJ macro lang...
>> you could try recording a macro to see what happens.
>> But, presently I'm not sure what the best approach is to do what you want...
>> but its something we should certainly make possible.
>>
>> you input is very welcome.
> Basically what I'd like is a function I can call like [M1, M2] = coloc (image1, image2) so that I can embed this in a script that handles the rest of the image processing (cell extraction, background subtraction, etc.)  My fallback plan is to write my own code in Matlab to implement the Costes et al algorithm, but I hate reinventing the wheel and I also wanted to try using ImageJ to see if it could be a faster way to tackle these kinds of image analysis problems.
>

right now, I'm not so sure how that is best approached... you can see the source code (it s a bit over designed perhaps)
but since I am only a beginner at programming myself, I'm not sure what the rigght way to do it is.

Does the macro recorder do anything sensible?

Actually we have a matlab implementation of Costes 2004 kicking around somewhere...
Jean-Yves Tinevez made it a while back for testing. He might let you have it.

But using imageJ would be nicer right!?

D


> Best,
> Kurt
>>
>> cheers
>>
>> Dan
>>
>>> Thanks,
>>> Kurt
>> Dr. Daniel James White BSc. (Hons.) PhD
>> Senior Microscopist / Image Processing and Analysis
>> Light Microscopy Facility
>> Max Planck Institute of Molecular Cell Biology and Genetics
>> Pfotenhauerstrasse 108
>> 01307 DRESDEN
>> Germany
>>
>> +49 (0)15114966933 (German Mobile)
>> +49  (0)351 210 2627 (Work phone at MPI-CBG)
>> +49  (0)351 210 1078 (Fax MPI-CBG LMF)
>>
>> http://www.bioimagexd.net                BioImageXD
>> http://pacific.mpi-cbg.de                Fiji (is just ImageJ - batteries included)
>> http://www.chalkie.org.uk
>> [hidden email]
>> ( [hidden email] )
>>
>>
>>
>>
>>
>>
>

Dr. Daniel James White BSc. (Hons.) PhD
Senior Microscopist / Image Processing and Analysis
Light Microscopy Facility
Max Planck Institute of Molecular Cell Biology and Genetics
Pfotenhauerstrasse 108
01307 DRESDEN
Germany

+49 (0)15114966933 (German Mobile)
+49  (0)351 210 2627 (Work phone at MPI-CBG)
+49  (0)351 210 1078 (Fax MPI-CBG LMF)

http://www.bioimagexd.net                BioImageXD
http://pacific.mpi-cbg.de                Fiji (is just ImageJ - batteries included)
http://www.chalkie.org.uk
[hidden email]
( [hidden email] )