This repository contains the code used for the manuscript: "Multi-day Neuron Tracking in High Density Electrophysiology Recordings using EMD". (doi: https://doi.org/10.1101/2023.08.03.551724)
All features are implemented in MATLAB R2023b.
Function 1 - NT_main.m
Goal: Match units between 2 datasets.
Input: Kilosort cluster label(only include clusters in the region of interest), channel map, mean waveforms (created with C_Waves or other tool, from the KS2.5 drift corrected data)
Output: Unit match assignment
Function 2 - chain_summary.mat
Goal: Find chains using output from all datasets.
Input: Unit assignment from multiple datasets
Output: Summary of chains within distance threshold
Function 3 - chain_stats.mat
Goal: Summarize L2, FR, and locations of all fully tracked chains.
Input: Summary of chains
Output: Plots(waveforms, firing rate, xz locations) of selected chains
Additional Functions:
Documentation:
output.all_results (column code) = [reference(0 for datasets without validation info), d2 clu label, d1 clu label, EMD distance, location distance, waveform distance, vertical distance]
output.results_wth = unit assignment with threshold applied
Function - Example_run.m
Goal: Demonstrate an example with 5 datasets
Input: Animal AL032 shank 1 dataset 1 to 5
Output: