image thresholds (with e.g. for Janelia GMR lines)

38 views
Skip to first unread message

Dr Gregory Jefferis

unread,
Jun 29, 2015, 12:33:06 PM6/29/15
to nat-...@googlegroups.com, mjd...@cam.ac.uk
Calculating Thresholds
======================
Calculating thresholds for image expression patterns is tricky, even
when the data do not show any spatial inhomogoneity (typically in Z). I
have some examples here of functions that I have previously used to try
and fit the distribution of background pixel intensities in order to
come up with a sensible threshold estimate:

https://github.com/jefferis/AnalysisSuite/blob/master/R/Code/Image/ImageAnalysisFunctions.R

You can see a full example of using this (on the Janelia GMR lines)
here:

https://github.com/jefferislab/FlyLight/tree/master/src/ImagePostprocessing
https://github.com/jefferislab/FlyLight/blob/master/src/ImagePostprocessing/CalculateBackgroundParams.R
https://github.com/jefferislab/FlyLight/blob/master/src/ImagePostprocessing/CalculateHistograms.R

but more usefully for right now, you can just fetch the background
parameters directly

https://github.com/jefferislab/FlyLight/blob/master/db/jfrc2bparams.rda?raw=true

you can load in R like this:

 # curl add on package required for reading from https url
library(curl) 
load(curl("https://github.com/jefferislab/FlyLight/blob/master/db/jfrc2bparams.rda?raw=true"))
str(jfrc2bparams)
hist(jfrc2bparams$threshold)
# find threshold for line 9A03
jfrc2bparams$threshold[grep('GMR_9A03',jfrc2bparams$filestem)]

Best,

Greg.

--
Gregory Jefferis, PhD                   Tel: +44 1223 267048
Division of Neurobiology
MRC Laboratory of Molecular Biology
Francis Crick Avenue
Cambridge Biomedical Campus
Cambridge, CB2 OQH, UK

http://www2.mrc-lmb.cam.ac.uk/group-leaders/h-to-m/g-jefferis
http://jefferislab.org
http://flybrain.stanford.edu
Reply all
Reply to author
Forward
0 new messages