Spike Train Analysis Toolkit

System Requirements

The Spike Train Analysis Toolkit requires:

The Toolkit has been tested on the following platforms (see the complete list of supported platforms):

Download

  1. Download the compressed archive from neuroanalysis.org.
  2. Move the archive to the location where you would like the toolkit files to reside. When the archive is uncompressed, a directory named spike will be created and all of files will reside there. For example, if you want your files to be located in /home/username/spike/, move the archive to /home/username/.
  3. Uncompress the archive.

Setup

Matlab

Configure your MEX environment if you have never done so. This is done by starting Matlab and issuing the following command:

>> mex -setup
More detailed instructions are given at the MathWorks site.

Octave

If you have not already done so, install the gsl, signal, and statistics packages from Octave-Forge. This is done by downloading the named package archive, starting Octave, and issuing the following command:

octave:1> pkg install package-name
where package-name is replaced with the name of the downloaded package file.

GNU Scientific Library (GSL) Setup

Windows

  1. Download Gsl for Windows from http://gnuwin32.sourceforge.net/downlinks/gsl.php. This link will direct you to a local mirror. Note that Gsl for Windows is a pre-compiled 32-bit version of GSL version 1.8 (April 2006). If you're running a 64-bit Windows operating system, however, you will need to download and compile GSL yourself. To help with compilation using Microsoft Visual C++, you may like to use the project files provided by computer expert Brian Gladman, which builds GSL version 1.13 (September 2009). Then continue with step 3 of these instructions.
  2. Run the executable file. Make a note of the folder where Gsl has been installed (e.g., C:\Program Files\GnuWin32). For the remainder of the documentation, we will represent this folder as <gsl_folder>.
  3. Go to Start Menu > Control Panel > System. Click on the Advanced tab. Click the button Environment Variables at the bottom of the tab. Add the following variables:
    Variable Value
    INCLUDE <gsl_folder>\include
    LIB <gsl_folder>\lib
    If these variables already exist, append contents above after the existing contents. Be sure to separate the paths with a semicolon. If you replace the existing contents, some programs on your system may cease to work properly. You may make these modifications in the user or system depending on the desired scope of the installation.
  4. Running the mex -setup command in Matlab will create a file called mexopts.bat in the user account's Matlab folder (e.g., <user>\Application Data\Mathworks\MATLAB\R14\mexopts.bat).
    1. You must find this file and open it using a text editor such as WordPad.
    2. Find the line that begins set LINK_FILE.
    3. At the end of this line, append libgsl.a libgslcblas.a.
    If you run mex -setup after you modify this file, this change will be overwritten and must be repeated.

Mac and Linux

  1. Download the GNU Scientific Library from ftp://ftp.gnu.org/gnu/gsl/, or use your distribution's package management tools to install the GSL development package.
  2. Follow the included installation instructions. You may need root/administrator access in order to install GSL completely. If you do not have these privileges, have your system administrator perform the installation of GSL.
  3. Depending on your environment, you may need to include the directory that contains the files libgsl.so and libgslcblas.so (e.g., /usr/local/lib/) in LD_LIBRARY_PATH.
  4. Depending on the version of GCC that you are using, you may also need to create a symbolic link to the standard C++ library file (e.g., sudo ln -s /usr/lib/libstdc++.so.6.0.10 /usr/lib/libstdc++.so), and link Matlab to this and the shared GCC libraries (e.g., /$MATLABPATH/sys/os/$ARCH/libstdc++.so.6 and /$MATLABPATH/sys/os/$ARCH/libgcc_s.so.1 should point to the libraries on your system with which the MEX files were compiled).

Compilation

  1. Start Matlab or Octave.
  2. Set the working directory to be the toolkit directory. For example,
    >> cd /home/username/spike
  3. Give the command to compile all of the files (see help make for additional options):
    >> make
  4. The spike train analysis toolkit is ready to go.
  5. In the demo/ directory, there is a script called staverify that performs a set of calculations to verify that the installation was successful (you may also run make('check') in Matlab or Octave). (Please note that if using Octave, the ctwmcmc_info test will not check the confidence intervals. This is because of minor differences between the functions prctile and random, as implemented in Matlab versus Octave, which would otherwise cause the test to fail. While this does not constitute a critical failure, Octave's prctile function, as implemented in the statistics package up to version 1.0.9, is known to have a bug.)
  6. Assuming that all tests pass when you run staverify, please take the time to add your system configuration to the list of our supported platforms.

Troubleshooting

If you have difficulty with compilation of the toolkit, please first take a look at our troubleshooting guide. If you still need help, please contact us.