Welcome to the SpikeOMatic Home Page

SpikeOMatic is a free software running on both Linux and Windows. It performs spike-sorting using two data generation models, a simple Gaussian Mixture Model (GMM) and a more sophisticated Dynamic Hidden Markov Model (DHMM). When working with a GMM the Expectation-Maximization (EM) algorithm is used to perform statistical inference. A DHMM requires the sophisticated Markov Chain Monte Carlo (MCMC) machinery to be used. In addition this latter kind of model gives rise to MCMC algorithms exhibiting slow relaxations. We are therefore implementing Extended Ensemble techniques known as Replica Exchange Method (REM), Parallel Tempering Method or Metropolis-Coupled MCMC method… depending on your field (Physics, Statistics, Phylogeny).

What's in this page?


November 19 2010

The MCMC based SpikeOMatic version available from this web page is now broken, that is, some work is needed to make it installable on the last R versions. I therefore urge you guys to use the one located at: newSOMtutorial. I'm planing to start working on the package again at the begining of next year.

March 23 2006

The new SpikeOMatic version is now usable and can be found at the following address: newSOMtutorial.

October 2005

I've started working on the new SpikeOMatic version. It will be more tightly linked to R and it won't use the GSL anymore (it is NOT because the GSL is bad, it's just that it makes life hard for Windows users of SpikeOMatic). I have already a parallel version working (the stage where models with different numbers of neurons are fitted and compared is distributed on several CPUs). In order to use it you will need to have the LAM/MPI implementation of the Message Passing Interface (MPI) installed on a bunch of PCs (running Linux) or Macs (running OS X). Then you will need 2 R packages: Rmpi and Snow. You can get info about them at the two following sites: about snow and about R and // applications on Macs. If you're really impatient to try the // version out, send me an email and I'll send you a script implementing it.

September 2005

There are problems running the mcmc code of SpikeOMatic on 64 bits machines (AMD opterons). Thanks to Robert Stewart for making me know and courageously trying out. Pascal Viot and I will try to fix that as soon as possible. 

February 28 2005

Sorry guys we have by mistake put a sub-optimal Makefile in our last update of the library (early February 2005). You could therefore not compile it on Windows without modifying this file yourself (and you could also not compile it on Linux without plotutils installed). That's now fixed...

November 30 2004

SpikeOMatic R (version 2.0) package for windows is now available. It should be simpler to install than the previous one, check the new Windows installation instructions.
There was a tiny mistake in the vignette of the second tutorial which made the regenerated pdf file look much worse than the one we give on this web site. The mistake has been corrected.

November 17 2004

A new release of R came out (2.0 instead of 1.9). We have not tested it yet but we will do it next week. If anyone gets problems trying to run SpikeOMatic with this new R version, do not hesitate to let us know.
For the Windows users, don't get too bothered by the wrong check sum "insult" you get while installing the package. That's not a problem… But we will fix that soon (thanks to Clément Léna for letting us know).

September 23 2004

The SpikeOMatic Library is available for Windows. You can download the source and compile it in Cygwin. If you have any question, request or suggestion, please address it to Matthieu Delescluse in priority until October 20.

September 17 2004

SpikeOMatic goes MCMC! We are releasing today the SpikeOMatic Library, a bunch of C routines used to do spike-sorting with a Markov Chain Monte Carlo method. The R SpikeOMatic package is updated accordingly with new functions and a new tutorial. That's for Linux only. It even seems to work on Windows.

August 27 2004

Finally we made it! The new (beta) version of SpikeOMatic is ready for release... And it even runs on Windows!

SpikeOMatic Environment and input data format

SpikeOMatic is not a stand alone program but a combination of C codes and routines for R, a free general purpose data analysis environment. There are three main reasons for that: SpikeOMatic can now read data in float or double format. The data can moreover be zipped with gzip. The data from each recording channel should be stored in a separate file containing only the sampled amplitudes, like the data we provide. You can work with data from a single recording site.

Why R?

We have recently decided to change our analysis environment and switched from Scilab (a very nice free clone of MatLab) to R (a free analysis environment ‘not unlike S’). We hope that the few former users of SpikeOMatic won't get too pissed off for we had very good reasons to do that:

Some more advertisement for R

OK, if you've read until this point that probably means you have at least a minor interest in statistical data analysis. Although you do not need to be an R expert to use SpikeOMatic via R we strongly encourage you to stop at this point, run to your favorite bookstore and get yourself a copy of Venables and Ripley's book: Modern Applied Statistics with S (MASS). Then you can take one or two months off and go through it. You will almost surely learn a whole lot and very likely look at published spike sorting methods (including ours) with a fresher and more informed eye (in particular from chapters 11 & 12).

SpikeOMatic screen shots

As a spike-sorting expert (or soon to become expert) you are probably used to nice colored plots instead of dry numbers coming out of a command line environment. Luckily, R and SpikeOMatic can deliver that as well, as illustrated by the following screen shots:

SpikeOMatic Library

The Markov Chain Monte Carlo algorithm we described in a recent paper, Pouzat et al (2004), and a book chapter, Pouzat (2004), is now implemented in a C library written by Christophe Pouzat and Matthieu Delescluse. This library runs on top of the Gnu Scientific Library (GSL). An almost complete API documentation is available. We are preparing an hopefully nice description of this library, for now if you want to use it directly in your own codes, take a look at the files in the test folder of the source package.

Our R package makes use of the library by calling a stand alone C binary, som_mcmc. In order to perform a complete analysis with R and the MCMC extension of SpikeOMatic you will need to have GSL installed and this binary somewhere on your PATH.

The organization of the library is very similar to the one of GSL. The main difference is that we have carried the "object oriented" approach a bit further, following the recommendation of J P Braquelaire's book: Méthodologie de la programmation en C (Dunod, Paris, 2000). That means that the structures used by the library or always accessed through pointers. That the user cannot manipulate directly the components (fields) of the structures directly but has to use specific functions (methods). We are essentially using objects like in object oriented programming, the big difference is that we do not have inheritance.

SpikeOMatic License

SpikeOMatic is released under the GNU Public License (GPL).

Use SpikeOMatic for publications

You are (of course) free and welcome to use SpikeOMatic for your published work. Don't worry we won't ask to sign your papers, we just ask you to be cool and acknowledge us and/or cite the relevant papers.



Source code documentation

A nice R feature and a SpikeOMatic installation test

R allows you to process some peculiar files (files with a .Rnw suffix) where documentation in LaTeX or HTML format and R code are mixed. Using function Sweave R executes the so called code chunks of these files and outputs a LaTeX or an HTML file where the LaTeX (or HTML) parts of the previous file have been directly copied and where the code chunks have been replaced by the result of their execution (including figures if figures have been generated). In short it allows you to dynamically re-generate an analysis, thanks to Friedrich Leisch and his Sweave R function. The idea is tightly linked to the reproducible research approach advocated by Robert Gentleman and Duncan Temple Lang in their Statistical Analyses and Reproducible Research paper.

All that seems probably a bit abstract to most of you so let's see these ideas and tools in action by re-generating the first SpikeOMatic tutorial. After starting R, get the HTML help with command:

Select the Packages menu and then the SpikeOMatic menu. You should see the SpikeOMatic help menu. Select the directory menu to get the content of the doc folder of SpikeOMatic. Locust_1.fl.gz, Locust_2.fl.gz, Locust_3.fl.gz, Locust_4.fl.gz are example data files and SpikeOMaticTutorial1.Rnw is what you need to re-generate the tutorial (it's called a vignette in the R jargon). At the R prompt type now the following instructions: A lot will happen, figures will start to pop up and after roughly 2 minutes (on a 3GHz, PC running Linux with everything compiled with the intel compilers) to 5 minutes (on a 1.6 GHz, PC running Windows) the analysis will be over. If you then look at the folder where you started R, you will see a lot of .eps and .pdf files. They contain the figures you just generated. You will find as well a SpikeOMaticTutorial1.tex file. If LaTeX is installed on your machine you just have to type: The result will be a brand new SpikeOMaticTutorial1.pdf file. You have just re-generated the tutorial and performed your first spike-sorting session with SpikeOMatic. Congratulations!

You can of course do the same with the second tutorial. The last R command should be:

instead of: Then it will take longer to run than the vignette of Tutorial 1. On my computer it takes 21 to 22 minutes if I use som_mcmc compiled with the Intel C compiler, icc, it takes 28 to 29 minutes if I use the version compiled with gcc (it is much longer on Windows with a similar machine, count 2h30 or switch to Linux).

Coming soon

A parallel version of the MCMC code. An automatic evaluation of the number of neurons in the MCMC framework.

Help, questions, suggestions and bug reports

If you need help, have questions or suggestions or want to report a bug, please drop an e-mail to: or If you are very happy (or unhappy) with SpikeOMatic you can also let us know.


The first part of SpikeOMatic, the one using a Gaussian mixture model and the Expectation Maximization (EM) algorithm was developed while C Pouzat was in the lab of Gilles Laurent in Caltech. This work was done in collaboration with Ofer Mazor.

The Markov Chain Monte Carlo extension is a collaborative work between Christophe Pouzat, Matthieu Delescluse Pascal Viot and Jean Diebolt. The salaries of Christophe, Pascal and Jean come from the CNRS, the one of Matthieu comes from a fellowship of the Ministère délégué à la Recherche. It was supported as well by a "pre-projet of ACI Neurosciences intégratives et computationnelles" and a "bourse BioInformatique".

This work would not have been possible without Linux and the GNU project, especially emacs, gcc, gdb and ddd. Thanks as well to Intel for giving free C and Fortran compilers for Linux. When I compare the "work" of some guys who got a Nobel price in Biology and the work of the guys who developed compilers and debuggers I can only conclude that the world is definitely unfair.

Back to C Pouzat Home Page Retour à la page titre de C Pouzat