FRAPfit : A program to analyze a FRAP experiment.

Written by Peter Nagy (peter.v.nagy@gmail.com)

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 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:

  1. The bleaching ROI corresponding to the area where the fluorescence was bleached.
  2. The unbleached ROI corresponding to pixels where the fluorescence label was present, but bleaching was not carried out. The unbleached ROI will be used for correcting the fluorescence intensity of the bleached ROI for gradual photobleaching during imaging.
  3. The background ROI corresponding to pixels without fluorescence label. This ROI will be used for background correction.

There are six ways to define a ROI:

  1. Image: A mask image, in which 1s correspond to the pixels to be evaluated, can be defined as the ROI. This mask image stored in the Matlab workspace must be specified in the "Source image" field. If the mask image is 2D, the same ROI will be used for each time point. If, on the other hand, the mask image is 3D, different ROIs will be used for each time point (slice in the stack to be analyzed). In this case the number of slices in the ROI mask image must be the same as that in the stack to be analyed. This option is useful if the cell moved during the image acquisition.
  2. Imported ROI: A Matlab structure variable storing ROI information in the required format can be used here. The structure variable must contain two fields: roiType and roiData. Such variables are generated by the "Load images" panel (if ROI information was retrived from a CZI file), by the "Read bleaching ROI" panel, or by the openpicture program. The variable storing the the ROI information must be specified in the "Source ROI" box. If the structure variable contains more than one ROI, the ROIs will be displayed and the user must select which one to use. If the "Draw" button is pressed, the ROI is shown in green overlaid on the image specified in the "Image to draw on" field. If it is a polygon ROI, click on a vertex to move it. CTRL-click on a vertex to retain rectangular shape if the original ROI is rectangular. SHIFT-click on a vertex to maintain aspect ratio if the original ROI is rectangular. Click inside the ROI to move the whole object. If it is a circular ROI, click on the circumfence to change the radius, or click inside the object to move the whole ROI. The "Set" button must be pressed to assign the ROI to the bleached/unbleached/bacground area.
  3. Draw polygon: When pressing the "Draw" button you can draw a polygon ROI on the image. Click where you would like to define a vertex of the polygon. Click on the first vertex to close the contour. You can move the vertices by dragging them around. Click inside the ROI to move the whole object.
  4. Draw rectangle: After pressing the "Draw" button you can draw a rectangle on the image by clicking and moving the mouse. Click on a vertex to move it. SHIFT-click on a vertex to maintain aspect ratio. Click inside the ROI to move the whole object.
  5. Draw square: After pressing the "Draw" button you can draw a square ROI on the image by clicking and moving the mouse. Click on a vertex to move it. Click inside the ROI to move the whole object.
  6. Draw circle: After pressing the "Draw" button you can draw a circular ROI on the image by clicking and moving the mouse. Click on the origin and drag the mouse to adjust the size. Click inside the ROI to move the whole object, or click on the circumference to change the radius.

"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:

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 / τ ] )

where

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:

  1. FRAP curve (normalized as described above)
  2. mean intensity in the bleach ROI
  3. mean intensity in the unbleached ROI
  4. mean intensity in the background ROI
  5. the fitted curve (if available)
  6. the residuals (if available)