This repository contains a GUI application for tracking single-molecule FRET signals arising from receptor–ligand iteractions (see Schrangl et al. 2024 for details) and evaluating resulting tracking data using survival analysis.
If you use this software in a project resulting in a scientific publication, please cite the software itself or the corresponding article.
-
Install
uvaccording to the official instructions or using e.g. your Linux distribution's package manager. -
Create a folder for your project. Inside this folder, run
uv init
in a console prompt to create a new project. See the official guide for more information.
-
Add
smfret-bondtimeand the dependencies for the GUI by excecutinguv add 'smfret-bondtime[gui]'
Execute uv run smfret-bondtime or uv run python -m smfret_bondtime.
This will open a window as shown below.
The top bar contains the following buttons:
- Load previously analyzed data.
Data consists of a
.yamlfile and a.h5files which are otherwise named identically. - Save data.
- Save data under a different name.
- Buttons to select analysis step. These steps are described in the following sections.
- Enter the excitation sequence.
dfor donor excitation, all other letters may specify different excitation types but are not used in analysis. In the screenshot, we have one acceptor excitation, followed by a variable number of repeated empty (e) and donor excitation (d) frames. The last frame of the sequence is again acceptor excitation. Due to the mark?,edis repeated as many times as the number of frames in the microscopy videos allow. Note that the given sequence is repeated as needed. E.g., if only donor excitation frames are present in the video files, it is sufficient to specifydas the excitation sequence. - If donor and acceptor emission were recorded to separate files, enable this option to configure.
- If donor and acceptor emission were recorded side by side in the same files, either use the
+button in the dropdown menu to add an example file or drag and drop it from the file manager. - The image can be split horizontally or vertically with the leftmost buttons. Channels can be swapped with the third button or drawn by selecting the channel from the dropdown menu, pressing the button next to it, and drawing on the loaded image below.
- These buttons permit zooming the image
- Black and white point of the image can be set for better visibility of channel boundaries.
- Channels can be adjusted by dragging the handles.
- Select the data folder. This should contain all of the data (fiducial markers for image registration if desired, microscopy videos for all recording intervals).
- Click the
+button to add a dataset. Enter the recording interval. - Add files either via a selection dialog (press the leftmost button) or by dragging and dropping from a file manager.
Repeat steps 2 and 3 for all recording intervals.
If bleed-through correction is to be performed, add fiducial markers to the predefined registration dataset.
This is a prerequisite for optional bleed-through correction. If not desired, kip this step.
- Selection of emission channel. Localization options need to be set for both channels individually.
- File and frame selection allow for browsing through frames to check whether selected options are appropriate.
- Algorithm selection. We recommend Crocker-Grier.
- Options for the localization algorithm. Adjust as needed.
- Toggle display of localization results on and off.
- Once localization algorithm and options have been set both for donor and acceptor channels, press this button to perform image registration. The result will be shown once the calculation is finished.
This is not required, but can improve localization of single-molecule FRET signals.
- Set camera baseline/background. Set bleed-through factor.
- Donor emission intensity times this factor is subtracted from the acceptor emission image.
- Sigma of Gaussian filter for smoothing the donor emission image before subtraction.
- Choose which emission image to display.
- Dataset, file and frame selection allow for browsing through frames to check whether selected options are appropriate.
- Algorithm selection. We recommend Crocker-Grier.
- Dataset, file and frame selection allow for browsing through frames to check whether selected options are appropriate.
- Options for the localization algorithm. Adjust as needed.
- Toggle display of localization results on and off.
- Once localization algorithm and options have been set, press this button to perform single-molecule localization in all donor excitation frames of all datasets. This can take a while. Progress is indicated in a pop-up dialog.
- Extend and analyze each single-molecule track by this number of frames. This is necessary if changepoint detection is desired.
- Maximum number of pixels a signal can move from one frame to the next and still be tracked.
- Number of consecutive frames a signal may be missing and still be tracked.
- Once tracking options have been set, press this button to perform single-molecule tracking in all datasets. This can take a while. Progress is indicated in a pop-up dialog.
Changepoint detection can be used to define additional filter criteria for the next step, but is not used for lifetime determination.
- Whether to lay localization markers and/or tracks over the image on the right.
- The higher the penalty, the fewer changepoints are detected. First, find the right order of magnitude by adding or removing trailing zeros, then fine-tune.
- If enabled, go to the track's first after choosing with the control (4) below.
- Choose single-molecule track. The selected track is marked in purple on the image and its intensity time trace is displayed below.
- Display the current track's first or last frame.
- Display the previous or next frame.
- If enabled, use left/right keys to go to previous/next frame, up/down keys to go to first/last frame, and page down/page up keys to go to previous/next track.
- Intensity time trace of current track. First frame in which the signal was detected is indicated by the green vertical line, last frame by the red line. Changepoints are found wherever the background changes color (from blue to pink or pink to blue).
- Once an appropriate penalty has been selected, use this button to perform changepoint detection for all tracks.
- Whether to show localization markers in the image to the right (15).
- Whether to show track markers in the image to the right (15).
- Whether to show tracks reject by one of the parametric filters (5, 6).
- Select which tracks are shown according to their manual filter status.
- Set parametric filters.
Tracks for which the mean background value is above
max. background, for which the mean intensity is belowmin. intensity, whose length is less thanmin. lengthand which have fewer changepoints thanmin. changepointsor more thanmax. changepointsare rejected. - If selected, the fact that a track is present at the start and/or end of the observation window also counts as a changepoint. This compensates for the fact that the actual changepoint happened outside the observation window.
- If enabled, go to the track's first after choosing with the control (8) below.
- Choose single-molecule track. The selected track is marked in purple on the image and its intensity time trace is displayed below.
- Display the current track's first or last frame.
- Display the previous or next frame.
- Mark the current track as accepted.
- Mark the current track as rejected.
- Some average quantities of the current track.
- If enabled, use left/right keys to go to previous/next frame, up/down keys to go to first/last frame, page down/page up keys to go to previous/next track, the enter key to accept, and delete/backspace to reject the current track.
- Current frame with localization markers indicating accepted (green), rejected (red), undecided (yellow), and the current track (purple).
- Intensity time trace of current track. First frame in which the signal was detected is indicated by the green vertical line, last frame by the red line. Changepoints are found wherever the background changes color (from blue to pink or pink to blue).
- Recording intervals with fewer tracks than this are excluded from analysis
- How many runs of bootstrapping to perform. If set to 1, errors are calculated from covariances returned by fit routines instead.
- Seed for the pseudo random number generator to allow for reproducible results with bootstrapping. A new seed can be randomly generated by pushing the button to the right.
- Calculate lifetime and draw plots to the right. Note that only tracks that have not been rejected by a parametric filter and have been manually accepted are fed into the lifetime analysis.
- Export numerical results to an Excel or Open Document spreadsheet.
For the former, the
openpyxlPython package needs to be installed, for the latterodfpy. - Save the plot to disk.
- Plot of fit results.
- Plot of track counts, indicating whether the are fully within the observation window, present already at the start of the window, still present at the end, or both.