LTFT_analysis.m
author: Natalia Martin Sabanés
Date: october 2024
Cite as:  Nicolás-García T, Martín Sabanés N, Bocanegra R, Astumian RD, Perez E, Ibarra B. Transition-path times of molecular shuttles under mechanical equilibrium show symmetry. ChemRxiv. 2024; doi:10.26434/chemrxiv-2024-w3twb

1. Inputs: 
 - path and file name of the trace to be analysed (baseline corrected and centered, recovered from baseline_correction.m). 
 - format type of data: .dat and .txt allowed
 - name: name for the legends and titles of figures
 - time_steps: 1/acquisition rate, in s. Time between two consecutive datapoints
 - lowLim and highLim: boundaries a and b, repectively. Note that lowLim>highlim.
 - width: width of histogram bins for the LTFT distributions.
 
2. Outputs: 
- Figure 1: Trace (extension vs time in black) + horizontal dashed lines defining boundaries + transitions a-->b (blue dots) + trasitions b-->a (pink dots)
- Figure 2: Occupancy distribution (histogram of trace in figure 1), inclusing horizontal lines marking boundaries a and b.
- Figure 3: Distribution of a-->b (blue) and b-->a (pink) transit (or LTFT) times. Figure title includes results of Kolmogorov-Smirnov test (K-S) and Mann-Whytney test (M-W), yes means equal distributions, and no means significant differences detected. p-factor values are included in parenthesis.
- Variable 'summary' in workspace contains: [a (lowLim), b (highLim), total a-->b transitions detected, total b-->a transitions detected, mean times a-->b, mean times b-->a, median times a-->b, median times b-->a, standard deviation of times a-->b, standard deviation of times b-->a, standard error a-->b, standard error b-->a,  b-->a, K-S test result (0= equal, 1=different), K-S p value, K-S power estimation, M-W test result (0= equal, 1=different), M-W p value, M-W power estimation]