FRAPfit : A program to analyze a FRAP experiment.
Written by Peter Nagy (peter.v.nagy@gmail.com, peternagyweb.hu)
Main features
Load images
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.
Register images
The stack imported into MATLAB in the "Load images" panel should be corrected for shift, or at least it should be checked whether the cell shifted in the X-Y plane. 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. An n x 2 matrix showhing the X and Y shift (in pixels) for every individual image (n - number of images) can also be saved in a variable specified in the "Shift vector" field. 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 equations below use the following designations:
- No normalization: the intensity in the bleached ROI, B(t), will be plotted as a function of time.
- Background subtraction:
The intensity in the background ROI, Bg(t), is subtracted from the intensity in the bleached ROI.- Normalization to the prebleach intensity:
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:
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:
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, pixels corresponding to the bleached ROI are deleted from the unbleached ROI.
Once the fitting results are available in the yellow fields of the panel (fitting is performed after you press the "Plot" button), the results can be exported to a Matlab variable, a MAT file or a text file by pressing the "Export results" button. The fitted parameters along with the 95% confidence intervals are saved. The lower and upper bounds of the 95% confidence intervals are labeled by CI1 and CI2, respectively.
The plot window
The plot window is displayed when the "Plot" button is pressed.
You can determine which part of the curve is used for fitting:
You can choose to fit a single-exponential or a double-exponential recovery model.
where
Three parameters will be fitted in the single-exponential model (extent of bleaching, recovery time constaint, immobile fraction), whereas five parameters are fitted in the double-exponential model (extent of bleaching, two recovery time constants, f1 and the immobile fraction). If you tick the checkbox "Const." next to the parameter, the parameter will not be fitted, but will be held constant with the value provided in the "Initial value/Constant" field.
For each fitted parameter, 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.
After fitting is performed, the fitted model is shown overlaid on the measurement points, and the residuals are plotted in the bottom graph.
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 following curves are exported: