Skip to content

cmanzo/DECO

Repository files navigation

DECO

Matlab GUI to fit the probability distribution function (pdf) of data obtained from localization microscopy (STORM/PALM) data. The data are DEcomposed into a weighted sum of functions fn obtained through iterative COnvolutions of a calibration function f1. The functional form of f1 and its parameter(s) must be obtained via an independent calibration. Fitting is performed according to a linear combination of the pdfs fn with weights wn.

Reference

Please cite the publication below in all your documents and manuscripts that made use of the software included in this repository.

A DNA origami platform for quantifying protein copy number in super-resolution

Cella Zanacchi, F., Manzo, C., Alvarez, A. S., Derr, N. D., Garcia-Parajo, M. F., Lakadamyali, M.

Nature Methods 2017, 14(8):789--792

doi: 10.1038/nmeth.4342

BibTeX

@article{cella-zanacchi2017natmeth,
  title={A {DNA} origami platform for quantifying protein copy number in super-resolution},
  author={Cella Zanacchi, F. and Manzo, C. and Alvarez, A.~S. and Derr, N.~D. and Garcia-Parajo, M.~F. and Lakadamyali, M.},
  journal={Nature Methods},
  volume={14},
  number={8},
  pages={789--792},
  year={2017},
  doi={10.1038/nmeth.4342}
  publisher={}
} 

Getting Started

These instructions will allow you to run the fit on experimental data, or to generate a simulated dataset and then fit it.

Prerequisites

Matlab 2013a (The Mathworks Inc., www.mathworks,com) or later.

Running the code

Run deco.m in Matlab. The initialized GUI will open.

"The DECO GUI"

Simulate data

Set the "Type of pdf" (LogNormal or Exponential) you want to use. Set the function parameters ("param1" and "param2" for LogNormal, only "param1" for Exponential). Set N, the "number of pdfs" fn that compose your final distribution. If "only even components" is checked, only the even functions (i.e. with n=2*k, with k=1, 2,..., floor(N/2)) will be considered. The calibration functions will be displayed in the plot on the bottom-left corner of the GUI. By clicking the "Simulate" button, a window will pop up, asking for the "Number of samples" to simulate and to input the values of the relative weights (wn) for the n pdfs to be simulated. By clicking OK, another window will pop up to choose the name and the path of the file to be saved. The file will be saved as *.txt, composed by a column of integers.

Load data

By clicking the "Load data" button, a window will pop up asking to choose the name and the path of the file to be loaded. The file must be a *.txt, composed by a column of integers. A dataset (DNAorigami_3motors.txt) is provided for testing.

Data representation

Simulated and loaded data will be plotted in the histogram in top-right corner of the GUI. The bar width can be varied by changing the value of "Number of bins". Small data can be filtered by increasing the "Cutoff" value. The cutoff is initially set to the value corresponding to the minimum of the data.

Perform the fit

By clicking the "Fit" button, the fit routine will execute. Fittings are performed by a two-step numerical minimization of the objective function, obtained as a weighted sum of the negative log-likelihood plus the entropy. The first optimization is performed varying the number Nmax of pdfs composing the overall distribution from 1 to a maximum value that can be changed by the user. The objective functions obtained for different values of Nmax are plotted in the middle-top panel. The value of Nmax corresponding to the minimum of the objective function is considered as the maximum number of pdfs necessary to satisfactorily fit the data. The fit is further refined by a second optimization step in which the parameters of the calibration function can be allowed to vary constrained to a user-defined "tolerance". The data histogram in the top-right panel will be overlaid with a red curve (corresponding to the pdf obtained from the fit) and a green curve (corresponding to the expectation value of the pdf over each bin).
In the bottom-right panel, the weights wn obtained from the fit are represented as a bar plot. Errors are calculated based on the Fisher Information matrix and represent a lower bound to the standard error.

Save output

Clicking the "Save output" button generates a *.txt file containing informations on the parameters used and the results of the fitting.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages