File Exchange

image thumbnail

Plot 2D heat map of FRET efficiency values

version 1.0.0 (560 KB) by Digvijay Singh
Plot 2D heat map of FRET efficiency values as a function of time with Gaussian blur.


Updated 09 Jan 2021

View License

% Example of Usage
% FRETStatesDistribution_withTime_ByGaussian(0,1,50,1*10^-2,6.5,4,'hot')
% where
% [**] 0,1 is the range of Y-axis (Range of FRET efficiency values in
% Y-axis). If you want to plot with Y-axis range of 0,1 then use 0,1. If
% you want to plot the Y-axis with the range of 0.5-0.8 (to show narrower
% FRET range), then use 0.5,0.8.

% [**] 50 is the number of frames that you want to show in the X-axis. If you
% want to show first 50 data points in your .dat files (described below).Then use 50.

% [**] 1*10^-2. Each point in the 2D heat map is gaussian blurred across the Y-axis only. 1*10^-3 is the
% FRET variance of this gaussian blur (variance across Y axis)

% [**] 6.5 is the width of the heat map. You can input any value.
% [**] 4 is the height of the heat map. You can input any value.

% [**] hot is type of heat map. MATLAB has a bunch of styles. User can choose from any of the following
% gray
% summer
% hot
% winter
% parula

% *.dat trajectory files are required which have time-point or frame number in one column.
% The donor and acceptor values in another column.
% Please ensure that the only .dat files present in the folder are your trajectories.
% Any other .dat file present in the folder and the program won't work.

% This program generates a heat map in MATLAB. It also generates a file
% called Simple_FRETDistribution_with_Time.datx. This is another text file.
% You can copy paste the values in this .datx file into OriginPro or other
% plotting software to make the heat map. IMO, the heatmap from Matlab
% should suffice. You can also change the dimensions of the heatmap in
% MATLAB as has been noted above.

% The range of 2D population is normalized between 0-1. 1 indicates the
% highest population in a particular pixel. 0 indicates the lowest
% population.

% This code is not efficiently written. The lines 82-89 can be much better
% handled by vectorization. I got lazy there, please vectorize it the speed
% is too slow ,but the speed should be fine even for large datasets.

Cite As

Digvijay Singh (2021). Plot 2D heat map of FRET efficiency values (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

2D HeatMap_WithGaussianBlur_FRET efficiency