BOTMpy : spike sorting using Bayes Optimal Template Matching in Python

This package implements spike sorting with the BOTM algorithm in Python. The reference for the algorithm is [2]

It is intended as a tool for neuro-scientists to process time series data. It can be used to detect and classify action potentials of distinct single cells in voltage traces recorded from the brain.

Contents

Download and Installation

BOTMpy can be used as a pure Python package. There are some additional Cython implementations for parts of the code that benefit from it, the Cython part is optional but recommended, BOTMpy will run as a pure Python if desired.

Requirements

For the basic Python version this stack is required:

Please follow the links to the respective websites for instructions on how to install them if they are not present on your computer. For Python, Scipy and Numpy it is advised to use install mechanism appropriate to your operating system, and not use the python packaging mechanism like pip and easy_install.

Download

The easiest way to get BOTMpy is from the Python Package Index (PyPI). If you have pip installed:

$ pip install botmpy

Alternatively, if you have setuptools:

$ easy_install botmpy

Alternatively, you can get the latest version directly from GitHub at https://github.com/pmeier82/BOTMpy.:

$ git clone https://github.com/pmeier82/BOTMpy.git

The master branch (selected by default) always contains the current stable version. All the other branches will be feature branches or integration branches and are not recommended for general usage.

Installation

After you have acquired a copy of the package from GitHub you need to install it on your system by calling:

$ python setup.py install

This is not necessary when you install with either pip or easy_install.

Cython Speedup

To use the Cython implementations you will need a current Cython package (>= 0.15.1) and the sources for Python and Numpy to build the extention modules. The relevant packages for debian are called pythonX.Y-dev and python-numpy-dev.

If the required packages and Cython is present on your system during installation, the cython extensions will be build automatically. There is no change to the interface specific to the cython implementations that the user needs to take care of.

Spike Sorting

Spike sorting is a combined detection and classification task for transient patterns in time series. In neuroscience this task is found when analysing voltage traces recorded from the brain of mammals. This kind of recording yields discrete time series that represent the brain activity of the cortex at the site under consideration.

Single cells in the cortex (neurons) communicate by means of electrical and chemical signals. These signals are called action potential (AP), and arise when a neuron receive enough input signals from other neurons. The AP builds as an ion current inside the cell body (soma) of the neuron. At certain threshold levels the current flows out of the soma and is released into a transmission channel (axon). At terminal points on the axon chemical transmission devices (sysnapses) communicate the AP to other neurons, in turn exciting ot inhibiting their activity. The ion current gives rise to a transmembrane potential as ion are transported from one side of the membrane to the other. This (de-) polarisation is measurable inside the neuron and in the medium surrounding the neuron. The time course of the membrane potential during an AP, as measured in the voltage trace recorded, has a very distinct gestalt, motivating the term spike.

The aim of the spike sorting task is to identify the points in time when an AP has occurred in the signal (spike detection) and to predict which of the neurons present has emitted this spike (spike sorting).

Todo

might need references

Intracellular Recordings

Voltage recordings from the inside of the neuron are called intracellular recordings. This kind of recording can help to understand intracellular current dynamics. In general the detection of the AP from intracellular recordings does not pose a challenge, so that this kind of recording will not be considered in detail here.

Todo

might need references

Extracellular recording

The leading paradigm to record ensembles of neurons from the cortex is that of extracellular recording. An electrode will be placed in the part of the cortex under consideration and record from the local neuronal population.

cartoon of the experimental setup for extracellular recordings

Cartoon of the experimental setup for extracellular recordings.

Literature Introduction

For further information about spike sorting please refer to the following publications [Lewiki99], [ScholarpediaSS] and more recent and recommended [Einevoll11].

Bayes Optimal Template Matching

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi bibendum, neque eu hendrerit scelerisque, orci nisl auctor risus, pulvinar congue augue turpis fermentum odio. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam venenatis lacinia elit, id aliquet dolor ultricies non. Sed quam massa, ullamcorper sit amet scelerisque et, volutpat nec erat. Curabitur tincidunt scelerisque dolor sit amet bibendum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Cras fermentum hendrerit mattis. Nam ullamcorper nisl lacinia tortor suscipit sed iaculis augue dignissim. Integer magna leo, pulvinar a pellentesque in, tincidunt quis lacus. Donec et urna iaculis elit mollis venenatis. Maecenas a enim vitae arcu semper ultrices condimentum eu justo. In hac habitasse platea dictumst. Maecenas in felis quis enim malesuada laoreet.

References

[1] G. T. Einevoll, F. Franke, E. Hagen, C. Pouzat, K. D. Harris. Towards reliable spike-train recordings from thousands of neurons with multielectrodes.. Current opinion in neurobiology, 22:11–7, 2012.
[2] P. V. Sander, J. Snyder, S. J. Gortler, H. Hoppe. Texture Mapping Progressive Meshes. Proc. SIGGRAPH ‘01, 2001.

Playground

This page serves as a plaground to test reST layout elements.

HLIST

  • A list of
  • short items
  • that should be
  • displayed
  • horizontally
Citations

yadda yadda yadda t Einevoll et al. [1] yadda yadda

yadda yadda yadda p [1] yadda yadda

yadda yadda yadda ts Einevoll, Franke, Hagen, Pouzat and Harris [1] yadda yadda

yadda yadda yadda ps [1] yadda yadda

References
[1] G. T. Einevoll, F. Franke, E. Hagen, C. Pouzat, K. D. Harris. Towards reliable spike-train recordings from thousands of neurons with multielectrodes.. Current opinion in neurobiology, 22:11–7, 2012.
[2] P. V. Sander, J. Snyder, S. J. Gortler, H. Hoppe. Texture Mapping Progressive Meshes. Proc. SIGGRAPH ‘01, 2001.

Indices and tables

Todo

might need references

(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/botmpy/checkouts/master/doc/source/spike-sorting.rst, line 28.)

Todo

might need references

(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/botmpy/checkouts/master/doc/source/spike-sorting.rst, line 39.)