Note: MatLab ≥ r2020a occasionally breaks button positioning on small screens — the branch at GridLayout implements full resizable elements and fixes that issue, however it has undergone limited testing as of Apr 2021
My GUI for the manual stage of spike sorting with UltraMegaSort2000 (UMS).
If you use this software in your work, please cite both the original UMS2000 toolbox (Hill DN, Mehta SB, Kleinfeld D. "Quality metrics to accompany spike sorting of extracellular signals" J Neurosci, 2011) and this software (Merricks EM, "SplitMerge toolbox: a fast GUI for UltraMegaSort2000" DOI:10.5281/zenodo.3951171, 2020)
Download the most recent release and install the app in Matlab by opening "SplitMerge.mlappinstall". The app can now be started by clicking on its button in the "Apps" tab at the top of the Matlab main window.
Alternatively, add the source code directory to your Matlab path, and enter SplitMerge
in the command window. app = SplitMerge();
will enable a handle to interact with the GUI programmatically, and allows for name, value pairs of arguments to be passed to the app from the following options:
Name | Description | Default |
---|---|---|
Directory | Immediately open the specified directory (can be changed in-app) | '' |
DateSort | Sort files by how recently they were modified | false |
SizeSort | Sort files by how large they are | false |
Fullscreen | Start app in fullscreen mode | false |
Height | Start app with this height (pixels) | 900 |
Width | Start app with this width (pixels) | 1440 |
TreeWidth | Set the left column (file list) to this width (pixels) | 200 |
Epoch | Lock time plots to these start and stop times (seconds). If empty, defaults to earliest and latest spikes in selected channel | [] |
ShowTime | Show seconds on time plots | false |
Colorful | Plot units with different colors (can be toggled in-app) | true |
ToScale | Plot units on the same scale (can be toggled in-app) | false |
nFFT | Length to use for FFT calculation in Noise Removal tab | 8192 |
Debugging | Show verbose messages about functioning to command window | false |
UPDATE 2020-09-28: Keyboard shortcuts! And a new figure for quick overview of waveshape similarities between multiple pairs of clusters.
UPDATE 2020-07-14: Major overhaul of the main plot method giving a huge increase in the speed of loading units.
This tool depends on the original UMS toolbox from the Kleinfeld lab
To speed up interactivity, I'm making use of the new UIFigure and UIAxes objects (most importantly the scrollable features) and thus it requires Matlab version >= R2018b. It should be small tweaks to remove native scrolling to work on earlier versions, but channels with large numbers of clusters may become laggy.
It is designed to work on directories containing UMS result structs for each channel in many files, speeding up processing of large numbers of channels, such as in the Utah array.
Inspect/Merge tab:
Split tab:
Outliers tab:
Noise removal tab:
Icons: ⌃ = ctrl key, ⇧ = shift key
Key | Action | Alternate keys |
---|---|---|
s | Save file | |
⌃1 | Activate inspect/merge tab | ⌃i or ⌃m |
⌃2 | Activate split tab | ⌃t |
⌃3 | Activate outliers tab | ⌃o |
⌃4 | Activate details tab (empty at present) | ⌃d |
⌃5 | Activate PCA tab | ⌃p |
⌃6 | Activate de-noise tab | ⌃n |
⌃r | Refresh screen | |
⌃esc | Attempt unhang |
Tab | Key | Action |
---|---|---|
Inspect/Merge | g | Mark selected as good |
b | Un-mark selected as good | |
c | Compare waveforms from selected clusters | |
⇧c | Compare selected pairs with mean ± 2SD shaded plots | |
p | Plot the PCA | |
m | Merge the selected clusters | |
t | Move the selected clusters to the trash | |
Split | ↑ | Move the threshold up one value |
⇧↑ | Move the threshold up by 5% of the range | |
↓ | Move the threshold down one value | |
⇧↓ | Move the threshold down by 5% of the range | |
p | Prune aggregation tree | |
x | Execute split | |
Outliers | ← | Move the threshold in by 1 |
⇧← | Move the threshold in by 5% of the range | |
→ | Move the threshold out by 1 | |
⇧→ | Move the threshold out by 5% of the range | |
c | Cut waveforms |
- Remove or document all necessary alterations to the base UMS toolbox
- Write the more in-depth help documentation!
- Add app.Data.modifylist array for future use (minimizing replots)
- Update the replotting of the Inspect/merge panel to make use of app.Data.modifylist data and avoid full re-plot
- Add in confirmation of file change when alterations have been made (use app.Data.modified array?)
- Occasionally marking a unit as "good" results in multiple entries in the labels structure – update setLabel method to check for these
- Update to use uigridlayout for all panels
- Add "compare pairs" figure for quick overview of waveshape similarities between multiple pairs of clusters
- Add keyboard shortcuts