This folder contains MATLAB codes for peak detection and particle tracking used in Ozbaykal et al., 2020.
For peak detection and tracking we make use of the Crocker-Grier package [1].
The codes are separated based on the fluorescent-protein fusion. For every fusion (msfGFP-PBP2 and PAmCherry-PBP2) we provide two sets of codes, for high-frequency imaging ("fast") and slow-frequency imaging ("slow") because of the slight differences in the scripts. See Methods section 7 for more information.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
For PAmCherry-PBP2 tracking:

Raw images must be provided according to the sample dataset "samplemovie" provided.

The code is organized into three executable scripts:

Segmentation:   for differentiating foreground from background (code: Main_step0_GenerateMask.m)
Peak detection: used to detect PBP2 peaks in the foreground (code: Main_step1_PeakDetection.m)
Tracking: 	    connect peaks from step1 to generate trajectories (code: Main_step2_GenerateTracks)

The final output is a set of arrays (one per movie) named 'paths' containing x, y , frame, pathID
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

For msfGFP-PBP2 tracking:

Raw images must be provided in the following directory format:
dataset_name/experiment_name/movie_name,
where each dataset can include several experiments, which can include several movies each.
No additional folders should be added to this path.
Each movie folder must contain a folder Pos0/ of individual tif files for every fluorescence image and a folder Pos1/ of single tifs from bright-field images.

The code is organized into three executable scripts:

Peak detection: PeakDetectionRoutine.m
Tracking: TrackingRoutine.m 

The final output is a set of arrays (one per movie) named 'paths' containing x, y , frame, pathID

[1] Crocker, J.C., and Grier, D.G. (1996). Methods of Digital Video Microscopy for Colloidal Studies. Journal of Colloid and Interface Science 179, 298–310.

Contact: gizemozbaykal@gmail.com
