Spike sorting - theunissenlab/lab-documentation GitHub Wiki
Connect to a workstation on the lab network. If using ssh, use ssh -Y when connecting to be able to open the GUI on your local computer (SLOW).
Check the spike sorting google sheet to see what files have not been run yet. Verify this by looking at the progress of that site on the data pipeline progress page which runs on goats (for now).
Find the directory of the data you want to sort. Most likely it will look something like this (although the first part of the path up to birds might be different):
/auto/tdrive/kevin/intan\ data/birds/GreYel3594M/sites/GreYel3594M___170915_082724/
Where GreYel3594M is the bird name and GreYel3594M___170915_082724 is the identifier for the site. Check that this directory contains a sort_results directory with 16 files. This is where the files you will be sorting are saved.
1. Make sure you have the latest code
-
Change to the solid-garbanzo directory
-
Get the latest code:
git pull origin master
2. Set configuration
If you are running a site for the first time, it is convenient to set the path to where the app will look for files automatically. From inside the solid-garbanzo directory, open suss/gui/config.py in a text editor and paste the data file path (described above) as the BASE_DIRECTORY variable. Double check that DEFAULT_SAVE_LOCATION = "../manually_curated".
If your name isn't in the USERS list, add it.
3. Run the spike sorter
-
Activate the virtual environment from inside the solid-garbanzo directory:
source bin/activate -
Run the GUI:
python -m suss.gui.app -
Sort the data using merging, splitting, and deletion of clusters.
- Check the notes for which channels we expect units on
4. Finished sorting
-
When satisfied, right click the clusters in the left panel to label them with any number of tags describing the unit
-
Go to File->Save. If you set the configuration paths correctly (Step 2), it should automatically ask you to save the file with the correct name in the right folder.
Rinse and repeat
TROUBLESHOOTING
If you are on Python 3.5.2, PyQt5 versions 5.11 and above will not work. (Check this by running python --version and pip freeze | grep PyQt5 in the terminal).
If this is the case, install an earlier of PyQt5 with this command: pip install "PyQt5<5.11"