Spike sorting Tutorial Rodrigo Quian Quiroga. Problem: detect and separate spikes corresponding to different neurons.

Slides:



Advertisements
Similar presentations
Machine Learning Homework
Advertisements

Grade Cam Dustin Foster 2/4/13 Please open Chrome & Login to Skyward.
SL-10 Laboratory Hot Tack / Seal Tester TMI Group of Companies TMI Group of Companies.
Using…. EasyCBM Reasons to use EasyCBM
Creating Rout Paths Using CAMMaster. Step 1 Import Gerber File. Import Gerber File. User Ctrl+W to window around data. User Ctrl+W to window around data.
Unsupervised spike sorting with wavelets and super-paramagnetic clustering Rodrigo Quian Quiroga Div. of Biology Caltech.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2006 Microsoft Corporation.
Start the slide show by clicking on the "Slide Show" option in the above menu and choose "View Show”. or – hit the F5 Key.
1 of 4 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Visual Documentation v User Interface Active class (for selection and some processes)
Pet Fish and High Cholesterol in the WHI OS: An Analysis Example Joe Larson 5 / 6 / 09.
Microsoft ® Office Word 2007 Training Mail Merge II: Use the Ribbon and perform a complex mail merge [Your company name] presents:
Microsoft Office Word 2013 Expert Microsoft Office Word 2013 Expert Courseware # 3251 Lesson 4: Working with Forms.
Advantages of using R.PC.R Software Now that you know some of the advantage let’s take a look at the software … Reliable and Comprehensive Reporting Recording.
WS2-1 ADM740, Workshop 2, June 2007 Copyright  2007 MSC.Software Corporation WORKSHOP 2 TEMPLATES VERSUS SUBSYSTEMS.
Start the slide show by clicking on the "Slide Show" option in the above menu and choose "View Show”. or – hit the F5 Key.
Start the slide show by clicking on the "Slide Show" option in the above menu and choose "View Show”. or – hit the F5 Key.
Chapter Seven Advanced Shell Programming. 2 Lesson A Developing a Fully Featured Program.
Microsoft Excel How to make a SPREADSHEET. Microsoft Excel IT is recommended that you have EXCEL running at the same time. You can try what you are reading.
Start the slide show by clicking on the "Slide Show" option in the above menu and choose "View Show”. or – hit the F5 Key.
If you are very familiar with SOAR, try these quick links: Principal’s SOAR checklist here here Term 1 tasks – new features in 2010 here here Term 1 tasks.
Microsoft Word 2000: Mail Merge Basics Peggy Serfazo Marple Molly Calvello Support Professionals Business Applications - Desktop Microsoft Corporation.
Lecture 4 MATLAB Windows Arithmetic Operators Maintenance Functions
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
DTIAtlasBuilder Adrien Kaiser Neuro Image Research and Analysis Laboratories University of North Carolina at Chapel Hill A tool to create an atlas from.
Ranjeet Department of Physics & Astrophysics University of Delhi Working with Origin.
Online Training for TEXAS TECH UNIVERSITY and TEXAS TECH HSC Hiring Managers Employment Office April 2003.
Mail merge I: Use mail merge for mass mailings Perform a complete mail merge Now you’ll walk through the process of performing a mail merge by using the.
StAR web server tutorial for ROC Analysis. ROC Analysis ROC Analysis: This module allows the user to input data for several classifiers to be tested.
Start the slide show by clicking on the "Slide Show" option in the above menu and choose "View Show”. or – hit the F5 Key.
Assistant. The CHIP Assistant control panel pops up immediately upon opening the CHIP Assistant program. Use this control panel to navigate through the.
Virtual Interaction Manager
Add sound effects to a presentation Play a sound file In this lesson, you’ll learn how to insert a sound file of your own or a sound effect from the clip.
The set of files includes : Tcl source of the POLYGON program The database (file obtained initially by P.Afonine from using phenix.model_vs_data.
1 Lab 2 and Merging Data (with SQL) HRP223 – 2009 October 19, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning:
Diagnostic Pathfinder for Instructors. Diagnostic Pathfinder Local File vs. Database Normal operations Expert operations Admin operations.
Change in your CAD Project File - it happens all the time in robotics.
FIX Eye FIX Eye Getting started: The guide EPAM Systems B2BITS.
Chapter 3 MATLAB Fundamentals Introduction to MATLAB Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 Data Manipulation (with SQL) HRP223 – 2010 October 13, 2010 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
Making Python Pretty!. How to Use This Presentation… Download a copy of this presentation to your ‘Computing’ folder. Follow the code examples, and put.
Introduction to Matlab & Data Analysis 2015 In this tutorial we will: Build a practical application using GUIDE Learn more about graphical user interface.
6 th Annual Focus Users’ Conference 6 th Annual Focus Users’ Conference Import Testing Data Presented by: Adrian Ruiz Presented by: Adrian Ruiz.
11/25/2015Slide 1 Scripts are short programs that repeat sequences of SPSS commands. SPSS includes a computer language called Sax Basic for the creation.
Network for Computational Nanotechnology (NCN) MEEPPV User Guide Xin Tze Tee Electrical and Computer Engineering Purdue University West Lafayette, IN
SPSS- Tutorial The following power-point slides show you how to use some of the features in SPSS. A survey of 20 randomly selected companies asked them.
The Report Generator Viewing Student Outcomes. Install the Report Generator In a browser, go to Click.
Animal Shelter Activity 2.
HRP Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation is protected by copyright law and.
Spike sorting Tutorial
Math 252: Math Modeling Eli Goldwyn Introduction to MATLAB.
Executive Summary - Human Factors Heuristic Evaluation 04/18/2014.
Info Read SEGY Wavelet estimation New Project Correlate near offset far offset Display Well Tie Elog Strata Geoview Hampson-Russell References Create New.
1 Data Manipulation (with SQL) HRP223 – 2009 October 12, 2009 Copyright © Leland Stanford Junior University. All rights reserved. Warning: This.
HRP Copyright © Leland Stanford Junior University. All rights reserved. Warning: This presentation is protected by copyright law and.
1 Berger Jean-Baptiste
Online Recruiting System Hiring Manager Presentation This presentation will take about 15 minutes. Click on your mouse to go to the next slide OR click.
Desktop Publishing Lesson 1 — Working with Documents.
Perform a complete mail merge Lesson 14 By the end of this lesson you will be able to complete the following: Use the Mail Merge Wizard to perform a basic.
Emdeon Office Batch Management Services This document provides detailed information on Batch Import Services and other Batch features.
T3/Tutorials: Data Submission Uploading genotype experiments
Getting Started with R.
Adding Assignments and Learning Units to Your TSS Course
Microsoft Office 2013 Coming to a PC near you!.
Test Information Distribution Engine (TIDE)
Collaboration with Google Docs
Learning about Taxes with Intuit ProFile
Code is on the Website Outline Comparison of Excel and R
Learning about Taxes with Intuit ProFile
Lab 2 and Merging Data (with SQL)
Presentation transcript:

Spike sorting Tutorial Rodrigo Quian Quiroga

Problem: detect and separate spikes corresponding to different neurons

Goals: Algorithm for automatic detection and sorting of spikes. Suitable for on-line analysis. Improve both detection and sorting in comparison with previous approaches. Outline of the method: I - Spike detection: amplitude threshold. II - Feature extraction: wavelets. III - Sorting: Superparamagnetic clustering.

This tutorial will show you how to do spike sorting using: The wave_clus graphic user interface. The batch files Get_spikes and Do_clustering.

Getting started… Add the directory wave_clus with subfolders in your matlab path (using the matlab File/Set Path menu) Type wave_clus in matlab to call the GUI. Choose DataType simulator and load the file C_Easy1_noise01_short (in the subdir wave_clus/Sample_data/Simulator) using the Load button.

It should look like this…

Now you are ready to start playing with wave_clus … This is a 10 sec. segment of simulated data. First, choose the option plot_average to plot the average spike shapes (+/- 1 std). Then choose to plot the spike features. There may be some spikes unassigned in cluster 0. Go back to plot_all and use the Force button to assign them to any of the clusters. Better? Now change the temperature. At t=0 you will get a single cluster, for large t’s you may get many clusters (if the parameter min_clus allows it). Save the results using the Save clusters button. Load the output file times_C_Easy1_noise01.mat. Cluster membership is saved in the first column of the variable cluster_class. The second column gives the spike times. You can also change the isi histogram plots using the max and step options. Finally check the parameters used in the Set_parameters_simulation file in the wave_clus/Parametes_files (just type ‘open set_parameters_simulation’ in matlab).

Playing with the spike features… Load the file C_Difficult1_noise015 using again the DataType: Simulator. Use the Spike features option

You should get something like this…

Seeing the clusters… You may, however, get something different cause SPC is a stochastic clustering method. If you don’t get the 3 clusters, you may have to change the temperature. The are 3 different spike shapes, but you don’t see three clear clusters. That’s because wave_clus plots in the main window the first 2 wavelet coefficients. You can see the rest of the projections by clicking the Plot all projections button

It would look like this… Clusters separate clearly in some projections

Using Principal ComponentAnalysis Now do the same using PCA. Open set_parameters_simulation and select features = ‘pca’ instead of features = ‘wav’ (don’t forget to set it back to ‘wav’ when you are done!). Load again the data C_Difficult1_noise015.

You should get something like this…

Why PCA does so bad here? As you see, there’s now only one single cluster (and for no temperature you can split it into 3!). You have just replicated the results of Fig. 8 of the Neural Computation paper (see reference at the end). In this dataset the spike shapes are very similar, and their differences are localized in time. Do to its excellent time-frequency resolution, wavelets does much better. Also, don’t forget that PCA looks for directions of maximum variance, which are not necessarily the ones offering the best separation between the clusters. Wavelets combined with the KS test (see paper) looks for the coefficients with multimodal distribution, which are very likely the ones offering the best separation between the clusters. As a summary, in the Neural Computation paper it is shown for several different examples of simulated data a better performance of wavelets in comparison to PCA.

You are now ready for real data! You will now load a ~30’ multiunit recording from a human epilepsy patient. The data was collected at Itzhak Fried’s lab at UCLA. Intracranial recordings in these patients (refractory to medication) are done for clinical reasons in order to evaluate the feasibility of epilepsy surgery. Load the file CSC4 using the DataType: CSC (pre-clustered). Using the (pre-clustered) option you will load data that has already been clustered using the batch file Do_clustering_CSC. If you want to start from scratch use the CSC option. Check the settings in the Set_parameters_CSC file. If you have a Neuralynx system you can already use the CSC and Sc options for your own data. BTW, there should be a few cool publications coming up using these human data. If you’re interested check in the near future or me.

It should look like this (if you use the Force button)…

Playing with it… Again, you can change the temperature, force the clustering, see the spike features, etc. Remember that everything is much faster is you use Plot_average instead of Plot_all. You can also zoom into the data using the Tools menu. You may also want to fix a given cluster by using the fix button. This option is useful for choosing clusters at different temperatures or for not forcing all the clusters together.

One further example: Sometimes clusters appear at different temperatures In the following example we give a step- by-step example of a clustering procedure using the fix button

Step 1: Fix cluster 2 at low T Step 2: Change to T2 Step 3: Check features Step 4: Fix clusters 2 and 3

Step 5: Change to T3 Step 6: Re-check features Step 7: Push the Force button This is how the final clustering looks like! Note that after forcing the green cluster is not as clean as before.

Clustering your own data… Most likely you’ll end up using the ASCII DataType option for your data. If you have continuous data, it should be stored as a single vector in a variable data, which is saved in a.mat file. Look for the file test.mat for an example. This data should be loaded using the ASCII option or the ASCII (pre-clustered) if you have already clustered it with the Do_clustering batch file. If you have spikes that have already been detected, you should use the ASCII spikes option. The spikes should be stored in a matrix named spikes in a.mat file. The file test1_spikes.mat gives an example of the format. You can set the optimal parameters for you data in the corresponding Set_parameters_ascii (or ascii_spikes) file. Most important, don’t forget to set the sampling rate sr! Important note: To save computational time, if you have more than spikes in your dataset, by default these will be assigned by template matching with the batch clustering code (this can be changed in the set_parameters file). With the GUI, they will stay in cluster 0 and they should be assigned to the other clusters using the Force button. Note that if you don’t do this you will be just processing the first spikes.

Using the batch files… There are two main batch files: Get_spikes (for spike detection) and Do_clustering (for spike sorting). Parameters are set in the first lines.They both go through all the files set in Files.txt. Unsupervised results will be saved and printed (either in the printer or in a file), but can be later changed with the GUI. For changing results, you have to load the file with the (pre- clustered) option. The nice thing is that results for all temperatures are stored, so changing things with the GUI mainly implies storing a different set of results rather than doing the clustering again. Note that using the GUI for clustering (e.g. with the ASCII option) does not store the clustering results for future uses.

You are now a clustering expert! If you want further details on the method, check: Unsupervised spike sorting with wavelets and superparamagnetic clustering R. Quian Quiroga, Z. Nadasdy and Y. Ben-Shaul. Neural Computation 16, ; If you want to keep updated on new versions, give me some comments or feedback on how wave_clus works with your data (I would love to hear about it), etc. please me at: Good luck and hope it’s useful!

Spike sorting gallery…