FRAPfit : A program to analyze a FRAP experiment.
Written by Peter Nagy (firstname.lastname@example.org)
There are two ways of reading the images:
Read bleaching ROI
If ROI information has not been imported with the images in the "Load images" panel, the program can also read Olympus-format ROI files. Specify the name of the variable in which the ROI information will be stored and then press the "Select ROI file" button.. The coordinates of the ROI will be stored in a Matlab structure variable.
The stack stored in the variable in the "Load images" panel must usually be corrected for shift. Specify the variable storing the stack to be corrected for shift in the "Source image" field. The result image will be stored in a Matlab variable given in the "Result image" box. Image registration is performed when pressing the "Register" button.
Smooth and export
The image stack can be smoothed using a Gaussian filter whose SD must be given in the "SD of Gaussian" field. When pressing the "Start viewing" button, the image specified in the "Source image" box is displayed smoothed with a Gaussian filter. The slice shown can be selected by the "Slice selector" slider. The slice number is shown in the yellow "Current slice" box. Upon pressing the "Export" button either the slice selected or the whole stack will be exported to the Matlab variable specified in the "Result image" box. The exported stack or slice is smoothed by the Gaussian filter. If you want to export an unsmoothed slice or stack, leave the "SD of Gaussian" field empty or enter "0" into the box.
Set bleaching ROI / Set unbleached ROI / Set background ROI
Three ROIs must be defined:
There are six ways to define a ROI:
"Draw" button: Enabled for options 2-6. When pressing this button the image specified in the "Image to draw on" box will be shown and you can edit the ROI.
"Set" button : The ROIs are actually defined when pressing this button.
Image to draw on: The image in which the ROIs will be defined must be specified. This image can be the stack to be analyzed or a slice exported in the "Smooth and export" panel. The image must always be specified since a mask image will be generated when pressing the "Set" button and the size of this mask image must match the X-Y size of the stack to be analyzed.
Result image: the ROI can optionally be stored as a mask image in which 1s and 0s correspond to the ROI and the background, respectively.
Variable for ROI info: The ROI information can be optionally stored in a Matlab structure variable specified in the "Variable for ROI info" box. The exported variable will contain two fields: roiType and roiData. If the ROI was defined by a 3D image, the Boundaries field in the roiData field will contain as many cells as the number of slices in the 3D image.
Overlay ROIs on image
The three ROIs (bleach, unbleached, background displayed in red, blue and green, respectively) are overlaid on a slice or the stack to be analyzed when pressing the "Show current ROIs" button. You can select whether the ROIs are displayed as empty or filled objects. If filled is selected, you can adjust the transparency of the displayed ROI objects. If the image on which the ROIs are overlaid is a stack, you can select which slice is shown. This option may be useful if you would like to observe how the intensities change as a function of time.
Save stack to movie file: The animated stack with the three ROIs overlaid can be saved to an uncompressed AVI file with the given frame rate (frame/sec).
Get curve and fit
Source of the FRAP curve to be fitted can be
You have to specify in which variable the stack to be analyzed is stored followed by selecting how the intensities are normalized. The intensities, B(t), Bg(t) and T(t), are mean intensities in the corresponding ROIs. Intensities with a 0 index correspond to the prebleach intensities:
- No normalization: B(t), i.e. the intensity in the bleached ROI, B(t), will be plotted as a function of time.
- Background subtraction: N1(t) = B(t) - Bg(t), i.e. the intensity in the background ROI, Bg(t), is subtracted from the intensity in the bleached ROI.
- Normalization to the prebleach intensity: N2(t) = N1(t) / N1(0) = ( B(t) - Bg(t) ) / ( B(0) - Bg(0) ), i.e. the background corrected intensity in the bleached ROI is divided by the background corrected intensity in the bleached ROI before the bleaching pulse. This kind of normalization results in a curve starting from 1.
- Double normalization: N3(t) = N2(t) * ( T(0) - Bg(0) ) / ( T(t) - Bg(t) ) = ( B(t) - Bg(t) ) / ( B(0) - Bg(0) ) * ( T(0) - Bg(0) ) / ( T(t) - Bg(t) ), i.e. the intensity in the bleached ROI is normalized to the total intensity in the unbleached ROI. This normalization corrects for bleaching taking place during the imaging period.
- Triple normalization: N4(t) = 1 - ( 1 - N3(t) ) / ( 1 - N3(0) ). This normalization ensures that the intensity of the bleached ROI is 1 before the bleaching and it starts from 0 during the recovery period.
If the bleached ROI overlaps with the unbleached ROI, the bleached ROI is subtracted from the unbleached ROI.
The results can be exported to a Matlab variable, a MAT file or a text file by pressing the "Export results" button. The exported variables are the following:
The plot window
The plot window is displayed when the "Plot" button is pressed. Three parameters will be fitted:
For each parameter, you have to specify whether to fit it. If the 'Const' checkbox is ticked, the number in the 'Initial value' box will be used as a constant. If a paramter is to be fitted, the initial value, and the smallest and largest acceptable values (lower and upper bounds) must be specified. The program comes up with reasonable guesses for these parameters, which can be modified by the user.
The top graph shows the intensity of the bleached ROI normalized as described above. When the "Fit" button is pressed, fitting to the following function is carried out:
I0 - a + a * ( 1 - ImmobileFraction ) * (1 - Exp[ - t / τ ] )
After fitting is performed, the residuals are plotted in the bottom graph.
The red lines designate the prebleach interval, while the two blue markers specify the recovery period to be fitted. The red and blue markers can be moved with the mouse.
The curves can be exported to a Matlab variable, a MAT or a text file by pressing the "Export curves" button in the plot window. The curves are exported in the following order: