You are on page 1of 9

Journal of Neuroscience Methods 178 (2009) 188196

Contents lists available at ScienceDirect

Journal of Neuroscience Methods


journal homepage: www.elsevier.com/locate/jneumeth

sigTOOL: A MATLAB-based environment for sharing laboratory-developed software to analyze biological signals
Malcolm Lidierth
Kings College London, Wolfson Centre for Age-Related Diseases, Hodgkin Building, Guys Hospital Campus, London SE1 1UL, United Kingdom

a r t i c l e

i n f o

a b s t r a c t
This paper describes a software package, named sigTOOL, for processing biological signals. The package runs in the MATLAB programming environment and has been designed to promote the sharing of laboratory-developed software across the worldwide web. As proof-of-concept of the design of the system, sigTOOL has been used to build an analysis application for dealing with neuroscience data complete with a user-friendly graphical user interface which implements a range of waveform and spike-train analysis functions. The interface allows many commonly used neuroscience data le formats to be loaded (including those of Alpha Omega, Cambridge Electronic Design, Cyberkinetics Inc., Molecular Devices, Nex Technologies and Plexon Instruments). Waveform analysis functions selectable from the interface support waveform averaging (mean and median), auto- and cross-correlation, power spectral analysis, coherence estimation, digital ltering (feedback and feedforward) and resampling. Spike-train analyses include interspike interval distributions, Poincar plots, event auto- and cross-correlations, spike-triggered averaging, stimulus driven and phase-related peri-event time histograms and rasters as well as frequencygrams. User-developed additions to sigTOOL that are archived and distributed electronically will be added to the sigTOOL interface on-the-y, without the need to modify the core sigTOOL code. Full sigTOOL functionality will be provided to support the user-developed code, including the ability to record a user action history for batch processing of les and support for exporting the results of analyses to external graphics editing software and spreadsheet-based data processing packages. 2008 Elsevier B.V. All rights reserved.

Article history: Received 3 October 2008 Received in revised form 3 November 2008 Accepted 5 November 2008 Keywords: Software Action potential Spike-train analysis Correlation Averaging Waveform Spectral analysis

1. Introduction The sharing of experimental data across the web is common in many elds of biology. There would be benets also in having a mechanism to share laboratory-developed code for analyzing data. This was recognized in the Report of the Working Group on Biomedical Computing (1999) of the United States National Institutes of Health which states that: often . . . software is cobbled together by graduate students with little programming knowledge, for use by those whose expectations are bound by the immediate problem. The application may be used once, then abandoned when the problem is solved, the graduate student moves on, or the technology changes. The publication goes out, but the tools remain in the laboratory. This paper describes a software package for processing biological signals that has been designed to overcome this by assisting and promoting the sharing of laboratory-developed software. The package, called sigTOOL, has two components: [1] a software development environment designed to facilitate further programming by the end-user and [2]

Tel.: +44 20 7848 6175; fax: +44 20 7848 6569. E-mail address: malcolm.lidierth@kcl.ac.uk. 0165-0270/$ see front matter 2008 Elsevier B.V. All rights reserved. doi:10.1016/j.jneumeth.2008.11.004

an application implemented through that environment to make the software available through a user-friendly graphical user interface (GUI). This interface is self-modifying so that end-user developed code will be made available automatically through it. The software has been developed to run in MATLAB, a general-purpose development environment that is already widely used in physiological research (for a list of neuroscience tools for MATLAB, for example, see http://www.neuromax.org/NeuroMap/MatlabTools.htm). At the outset, a number of key objectives were identied. First, it should be possible to share code through the existing web infrastructure: there should be no need for specialized hardware or to set up and maintain dedicated sites for sharing code. The core sigTOOL code has been made available through the SourceForge software repository (Lidierth, 2008) and end-user developed additions can be archived and posted to this site. The SourceForge site also provides facilities for end-users to provide criticism, to make suggestions and to subscribe to a package thereby automatically receiving an email each time the package is updated. Second, as noted above, end-user developed code should be incorporated into sigTOOL dynamically without the need to edit the sigTOOL core code. Third, sigTOOL should provide mechanisms for importing data and for exporting the results of analyses. It should also provide mechanisms for recording user actions and batch-processing les.

M. Lidierth / Journal of Neuroscience Methods 178 (2009) 188196

189

All of these mechanisms should automatically support end-user developed code. This has been achieved by using object-oriented programming methods as described below. Fourth, data should be organized within sigTOOL to provide efcient use of memory but also to take full advantage of the highly speed-optimized matrix algebra functions built into MATLAB. Fifth, the analysis functions, including those written by end-users, should be made available through an intuitively simple GUI and this should provide online help facilities to the end-user. 2. The sigTOOL development environment The sigTOOL development environment provides tools for importing neuroscience data from many commonly used le types (including those of Alpha Omega, Cambridge Electronic Design, Cyberkinetics Inc., Molecular Devices, Nex Technologies and Plexon Instruments as listed in Supplementary Table 1). Data are initially imported to the standard MATLAB data le format and these les are subsequently memory-mapped into the MATLAB data space through the host operating systems virtual memory management. This allows very large data sets to be represented in sigTOOL: up to 2 Gb total on 32 bit systems, 2 Gb per channel on 64-bit systems. Routines are included to release virtual memory that is no longer required (and from the sigTOOL GUI this is done automatically). 2.1. File import functions The le import functions provided in sigTOOL are easy to use and require no knowledge of the underlying le format on the part of the end-user. Import functions take the form: outputname = ImportXXX(inputname); where XXX identies the le format, inputname is the name of the le to import and outputname is the fully qualied name of the

generated sigTOOL data le (Supplementary Table 1). This will be a standard MATLAB MAT-le but will be given the le extension kcl to distinguish it from other MAT-les. Internally it is a version 6 MATLAB le which may be modied or loaded using the builtin MATLAB save and load commands. A full specication of the le format is available (Mathworks, 2008). The batch import of multiple les is also supported. Users should note that custom data can readily be added to the data les. Each channel has a header and custom elds can be added to these without affecting the operation of sigTOOL. In addition custom variables, perhaps containing metadata for use in search engines, can be appended to the data les using the standard MATLAB save function. 2.2. Organization of data channels sigTOOL supports the import of a wide range of different formats and data types but a common data structure for representing these formats within sigTOOL has been developed. Data has been organized on disc, and in PC memory, to maximize speed and to take full advantage of MATLABs fast matrix manipulation routines. The organization also increases the likelihood that computations will be performed in CPU cache memory, offering a further speed improvement of up to ten-fold (McGarrity, 2007). The simplest data type is an event channel where the timestamps of discrete events are stored. These might be stimulus markers for example. The channel type can be Rising Edge, Falling Edge or just Edge (Fig. 1A). Each event may also be associated with some data. If the events are synch pulses from a CCD camera, the RGB data for each video frame can be associated with the events. A marker value can also be associated with each event. In the case of video data, the markers might be the video frame numbers (as in Fig. 1B). In other circumstances the markers might be a code representing, for example, test and control stimuli where

Fig. 1. Summary of the main channel types available in sigTOOL. (A) The simplest data type is an event channel where the timestamps of discrete events are stored. (B) Each event may also be associated with some data. If the events are synch pulses from a CCD camera, for example, the RGB data for each video frame can be associated with the events. A marker value can also be associated with each event; in this case they are the video frame numbers. (C) The system can be extended by allowing more than one timestamp to be associated with each event. This allows periods of time to be represented rather than discrete moments. In the simplest case both the rising and the falling edges of the event are recorded but there is no additional data. (D) Data can be associated with the period that the timestamps dene, e.g. waveform data from a single oscilloscope sweep. (E) As before, markers can be associated with each epoch, for example to classify the spikes of single neurones in multi-unit recordings. (F) Data that are sampled continuously throughout the period of recording are treated in the same way but as a single epoch with one timestamp at the start of sampling and another at its end. Note that sigTOOL also provides support for multiplexed waveform channels and for storing a trigger time as well as the start and stop times for data sampling.

190

M. Lidierth / Journal of Neuroscience Methods 178 (2009) 188196

these were alternated during an experiment. Markers may also be more complex structures containing metadata. The description above has identied the three components of a sigTOOL data channel: [1] timestamps associated with events [2] data associated with those events and [3] marker data used to classify the events. This system can be extended by allowing more than one timestamp to be associated with each event which allows periods of time to be represented rather than discrete moments. In the simplest case both the rising and the falling edges of the event are recorded but there is no additional data: this channel type is labelled as Pulse in sigTOOL (Fig. 1C). However, data can be associated with the period that the pulse denes, e.g. waveform data from a single oscilloscope sweep (Fig. 1D). If the waveform data are multiplexed, the subchannels will simply be interlaced within the data array. In sigTOOL, channels of this type are labelled Episodic waveforms. As before, markers can be associated with each episode, for example to classify the spikes of single neurones in multi-unit recordings (Fig. 1E). Data that are sampled continuously throughout the period of recording are treated in the same way but as a single epoch with one timestamp at the start of sampling and another at its end (Fig. 1F). Finally a specic trigger time can be associated with each event. In this case, three timestamps will be recorded: the rst marks the start of sampling for each epoch, the second marks the trigger and last marks the end of sampling. These channels are of two types. For the rst type, there is no xed temporal relationship between the three timestamps in different epochs: the epochs may vary in length and the length of sample before and after the trigger can also vary. These are labelled Episodic waveforms as before. For the second type the temporal relationship is constant: all epochs are of the same length and there is a constant pre- and post-stimulus sample length. In this case, the channel is labelled as a Framed waveform. The very simple channel organization described above has proved versatile enough for all le formats that are presently supported. To customize the treatment of non-waveform data, including, e.g. the video data of Fig. 1, the Custom keyword is included in the channel type description and the ImportXXX function associates a MATLAB m-le function with the channel to handle the data. For a video channel, this function displays the video image when the markers are clicked upon in the sigTOOL data view. Other functions could be dened to process any other type of data. For example, to embed electronic notes in a le, they could be associated with a timestamp placed at some appropriate point in the le. Text associated with the note could be placed in the data eld and a custom function would then be dened to display the text in an editor when the marker is clicked. If the text was in a markup language, it could be opened in the system web browser and include graphics or hyperlinks to web sites or other documents, e.g. PDF les. 2.3. Object-oriented design MATLAB is an object-oriented programming environment and allows the denition of user-specied custom classes together with their associated methods. sigTOOL makes extensive use of custom classes to represent both imported channel data and the results of analysis functions. Methods associated with the classes provide easy access to the underlying data for program development and insulate the developer from the need to know full details of the organization of those data within the objects. In sigTOOL, the methods have been proled to identify bottle-necks in the code and to optimize them for memory and speed efciency. 2.3.1. The scchannel class sigTOOL data les created through a call to an ImportXXX function are loaded into sigTOOL by calling the scOpen function. This

returns a cell array in which each element contains a data channel represented as a custom-dened class: the scchannel class. The methods of the scchannel class include a plot function which generates a sigTOOL data view together with its associated GUI. To load an imported data le into sigTOOL and display it then requires just two lines of code: channels = scOpen(lename); plot(channels{:}); Other methods for the scchannel class provide access to the data contained in the channel. For example, to extract waveform data in relation to a trigger simply call: [data, tb] = extractPhysicalFrames(channel, trig, duration, pretime); Here the rst input, channel, is the scchannel object containing waveform data. It might be a continuous waveform, episodic or frame-based. The second input, trig, is a vector of trigger times while the 3rd and 4th inputs specify the duration and pre-trigger time for the returned frames. The output is a matrix of waveform values in data and the time-base relative to the triggers as a vector in tb. To average the frames and plot them in a standard MATLAB gure would require simply: plot(tb, mean(data)); In practice, sigTOOL analysis function place results in another sigTOOL-dened class: the sigTOOLResultData class. The methods for this class include an overloaded plot method that will generate a standard sigTOOL result view with its associated GUI rather than a standard MATLAB gure. Further details are given below. 2.4. Event ltering and subchannel selection As outlined above, sigTOOL allows the representation of discrete events as timestamps and associates waveform data with a set of timestamps that dene the beginning and end of each data epoch together with an optional trigger time. A property associated with the scchannel class allows specic events or data epochs to be labelled as valid or invalid. This allows these events or epochs to be selected for analysis. sigTOOL distinguishes between the events/epochs that are physically present on a channel and those that are agged as valid through the scchannel methods. For the example given above, extractPhysicalFrames was called which returned data from all epochs in the target channel. If data were required only from valid data epochs a similar call would have been made to extractValidFrames. In general in two-channel analyses, selection of data epochs would be done on a single channel and in the case of data averaging this would normally be the trigger channel. In the example above, the call to extractPhysicalFrames would have been preceded by a call to the getValidTriggers method which would have returned only those trigger times that were marked as valid on the trigger channel, e.g. trig = getValidTriggers(channel, 0, Inf); Here again, channel is a scchannel object and the subsequent arguments dene the period over which to return triggers: in this case time zero to innity (in effect, the end-of-sampling). The returned trigger times would then be used as input to a subsequent call to extractPhysicalFrames. Every event or data epoch in a scchannel object has an associated logical ag which determines whether it is valid. Entirely arbitrary sets of valid events may therefore be dened. However, the ags will often be set according to the value of the marker data associated with them or to select, for example, only odd- or even-numbered events. The sigTOOL GUI includes menus for doing this interactively.

M. Lidierth / Journal of Neuroscience Methods 178 (2009) 188196

191

The scchannel objects also contain a current subchannel property that directs some sigTOOL functions to the appropriate subchannel on multiplexed channels. For simplicity, relatively few functions honour this setting: these are those for copying channels, digital ltering and downsampling. These functions can be used to extract the relevant subchannel to a new channel where all remaining sigTOOL functions can then be applied to the extracted data in isolation. 2.5. sigTOOL result objects As noted above, analysis functions in sigTOOL also return a custom-dened object class: the sigTOOLResultData object. Typically this will be constructed by rst building a standard MATLAB structure (this is computationally faster than assigning data to an object when large data sets are involved). As before, the plot method has been overloaded for sigTOOLResultData objects so that, when plotted, a standard sigTOOL result view is displayed together with its GUI. A further custom object, a sigTOOLResultView object, will be placed in the application data area of the associated MATLAB gure (the application data area is a standard property of all MATLAB gure objects which allows user-specied data to be associated with the gure, see Hanselman and Littleeld, 2001). The methods of the sigTOOLResultView class provide access to the export functions that can be used to send data to external graphical packages (e.g. Adobe Illustrator) or, in numerical format, to spreadsheet-based packages (such as Microsoft Excel) as described below. 3. The sigTOOL GUI 3.1. Adding functions to the GUI The sigTOOL GUI is dynamic. New functions are made available on-the-y, without the need for the end-user to modify any of the sigTOOL core code. sigTOOL selectively replicates its own folder structure to create the GUI menus of a data view. This process is recursive and allows nesting of folders, and therefore of generated menus, to any level. To add a new suite of functions, the end-user would typically create a new subfolder in the sigTOOL\program folder. The name of this folder should have the prex menu . Any subfolders within this folder that are similarly prexed will be added as submenus of the parent menu. In addition the group prex can be used to add multiple les without creating a new level in the menu hierarchy. Each branch of the folder, and therefore menu tree, needs to terminate with one or more executable les (typically a MATLAB m-le) whose name is also prexed with menu . These les will be executed as standard MATLAB callback routines (see Hanselman and Littleeld, 2001) when the menu item is selected by the user. While the menu is being generated onthe-y, each function will be called by sigTOOL with a single input argument of zero. The functions should respond by passing back the text to display in the menu and a logical ag that indicates whether to activate the menu item or not, thus allowing the menu to be disabled if it cannot be used on the current computer (e.g. if an absent MATLAB toolbox is needed). Using the facilities described above, end-users can add functions to the sigTOOL GUI and distribute them across the web as archives, e.g. in zip compressed format. When extracted from the archive to a sigTOOL subfolder, the appropriate menus will automatically be generated the next time sigTOOL is run. Further details are supplied in the Programming Guide. 3.2. Designing GUIs Typically, a user-written menu function will display a GUI prompting the user to select data and analysis options. MATLAB

includes a set of user interface tools and a GUI development environment that can be used to create these GUIs. However, sigTOOL contains a number of custom-developed tools that make the design of sigTOOL-based GUIs simple. At the lowest level, these include a custom-written jcontrol class that allows a wide range of Java Swing components to be incorporated directly into sigTOOL graphical windows. Medium- and high-level routines are also provided; these require less knowledge of both Java and MATLAB on the part of the end-user and will generally be used in preference to the low-level routines. Fig. 2A illustrates a typical sigTOOL GUI. In this case the main panel allows the selection of trigger and source channels and allows selection of the time range for the data to be analyzed. This panel also allows the user to elect to analyze all open data les and to view the online help as described further below. The right-side panel provides specic options for the chosen analysis. In the case of waveform averaging, this allows the duration and pre-stimulus period to be set, the number of sweeps per average and whether to analyze data in overlapping blocks. Further options allow retriggering of the averaging process during a sweep, removal of any DC component from the result and a choice of mean or median averaging. When the OK button is selected, a structure containing the user selections will be placed in the source gure application data area and can be retrieved by the calling code. The medium and higher level sigTOOL GUI functions include automatic support for providing online help. The programmer needs to supply help as a hypertext markup language (HTML) le. The name of this le is made available from the users GUI. Typically, the le should be placed in a \private\help folder contained in the parent folder of the calling function. This will ensure that the le will be found regardless of the absolute location across different computers/operating systems. Fig. 2B shows the help le for waveform averaging GUI displayed in the MATLAB web browser. 3.3. Accreditation A key goal of sigTOOL is to encourage its use by other laboratories in developing specialized shared code libraries. This requires that the efforts of those laboratories be clearly acknowledged particularly within the sigTOOL GUI. The GUI tools provided in the development environment allow acknowledgement text to be displayed in the user interfaces (as in Fig. 2A) and to be added to sigTOOLResultData objects. This text will be included in print-outs of the results. In addition, the sigTOOL progress bar allows users to display their own graphical logo instead of the standard sigTOOL logo during calculations. 3.4. Generating a history log The standard sigTOOL menus allow users to elect to apply an analysis to all open sigTOOL data les in any instance of MATLAB. The data view le menu also allows a history log to be recorded for use in subsequent batch processing of multiple les. Both of these functions are coordinated by the scExecute function. This serves as a gateway between the sigTOOL GUI and the analysis routines. Importantly, end-users who use this gateway from their own menu functions will nd that the ability to process all open les is automatically available and, within certain constraints, that the history m-le will automatically call the end-users functions when batch-processing multiple les. The history log is an m-le which can be saved, edited and run like any other MATLAB m-le. The text of this m-le is initially built in the MATLAB gure application data area of the sigTOOL data view (see above) by the scExecute function. When the history log is saved, the text saved in this area is simply written to an m-le.

192

M. Lidierth / Journal of Neuroscience Methods 178 (2009) 188196

Fig. 2. (A) shows a typical sigTOOL analysis GUI. The example shown is for waveform averaging and the associated help le is shown in (B) displayed in the MATLAB web browser.

4. Features of the sigTOOL data and result views There are two standard views in sigTOOL: the data view which displays the le channel data and the result view that displays the results of analyses. The data view provides a channel manager that can be used to select the channels to display as well as those to use for analysis. Channel selections can be drag-and-dropped from the channel manager into analysis GUIs. As noted above, the data view also provides menus for selecting analysis functions and these will include any user-supplied menu functions that have been added on-the-y. The recording of a history log is also implemented through the data view. The result view similarly includes a result manager that allows the type of graphical display to be selected and for selection of features such as line colour and thickness and to allow rotation, zoom, etc. for three-dimensional graphics. The result view also provides automatic access to the data export functions allowing results to

be exported to external graphical or numerical analysis packages. If user-written functions return a sigTOOLResultData object, all of these features will automatically be available without further programming simply by calling plot(object); The versatility of the system is best illustrated with an example. In Fig. 3, a series of waveforms averages are shown superimposed. Two channels of data were recorded, one showing the potential recorded at depth in the supercial dorsal horn of the spinal cord and another of the dorsal root potential (see Lidierth, 2006). These were averaged over 320 presentations of a stimulus to a neighbouring dorsal root with each average being calculated over twenty sweeps. The 16 resulting averages are shown superimposed for each channel in Fig. 3A. By selecting Single Frames from the Result Manager, the individual averages together with their standard deviations will be displayed (Fig. 3B). Choosing Waterfall displays all

M. Lidierth / Journal of Neuroscience Methods 178 (2009) 188196

193

Fig. 3. (AC) show a set of waveform averages collected over time in a single experiment. The waveforms may be shown superimposed as in (A), as single sweeps complete with standard deviations as in (B), or in a waterfall display as in (C). (DF) also show waveform averages but for a different data set. In (D), a surface has been tted to the data while (E) and (F) show the data as an isopotential contour map and bitmapped image respectively. The display types are interchangeable and selected from the Result Manager panel shown to the left in each gure.

of the averages in a three-dimensional plot (Fig. 3C) and a surface can be tted if chosen from the channel manager. Such a surface plot is shown in Fig. 3D for a different data set. Here the antidromic compound action potential has been recorded from the L4 spinal

root in response to a stimulus delivered at different depths in the spinal cord with depth being represented on the y-axis. The same data are represented as an isopotential contour map in Fig. 3E and as a bitmapped image in Fig. 3F. The ability to swap between these

194

M. Lidierth / Journal of Neuroscience Methods 178 (2009) 188196

Fig. 4. Result data displayed in sigTOOL is readily ported to other applications. (A) shows a Poincar plot formed from a neural spike-train while (B) shows a waveform cross-correlation based on two, simultaneously recorded dorsal root potentials. In each plot, a section of data has been selected using the mouse and these data are displayed numerically in a table from where they may be copied and pasted to other applications. Automatic export is also supported. In (C), the Poincar plot has been saved and opened in Adobe Illustrator format. The plot was also converted to a surface in sigTOOL illustrating the density of points and this was exported in PDF format and imported to the Illustrator software. (D) shows the data of B exported to Systat SigmaPlot and redrawn in that package. (E) illustrates distribution tting in sigTOOL: a normal distribution based on maximum-likelihood parameter estimates is shown tted to a selected range of bins in an interspike interval distribution. In (F), the declining phase of the 2nd peak in the interval distribution has been selected and an exponential curve has been tted to the selected data using the EzyFit package (Moisy, 2006) as illustrated in the inset.

M. Lidierth / Journal of Neuroscience Methods 178 (2009) 188196

195

display types, and others, is made available automatically from the sigTOOL result view as long as data for all three axes has been dened when constructing the result object. Typically this simply means supplying a vector of values for the third dimension, with one entry for each sweep in the result. Graphical results from sigTOOL can easily be exported to other formats as summarized in Fig. 4. The File-Save As menu can be used to export graphics as BMP and TIF formats for bitmapped images and PDF, EPS and Adobe Illustrator formats for vector images. The exported data will be displayed automatically in the appropriate editing software (e.g. Adobe Illustrator in Fig. 4C). On Windows platforms, numerical data from the result view can also be exported directly to spreadsheet-based packages using ActiveX. Support is included for Microsoft Excel, Systat SigmaPlot and OriginLabs Origin software (SigmaPlot shown in Fig. 4D). When multiple graphs are shown in a sigTOOL result view, the user can elect to export one or all of them. With multiple plots, a separate worksheet will be opened for each graph. In addition, and on all operating systems, users can select data in a result view and open a MATLAB-based spreadsheet to display it numerically (Fig. 4A and B). These data can then be cut-and-pasted into external packages manually. sigTOOL result views also provide a context-sensitive menu that can be used to modify the gure or to add new components. The standard context-menu can be supplemented with menu items that are specic to a particular analysis. This is achieved simply by adding a uicontextmenu object (which is a standard object in MATLAB) to the sigTOOLResultData object when it is constructed. Fig. 4E and F illustrate distribution and curve tting implemented through these context-menus. 5. Proof-of-concept The development environment described above has been used to implement a set of analytical tools for processing waveform data and neural spike trains. These tools have been added using the onthe-y mechanisms described above in Adding functions to the GUI and thus provide a proof-of-concept for the underlying design of the system. Waveform processing functions include those for averaging (mean and median), auto- and cross-correlation (Fig. 4B), power spectral analysis, coherence estimation, digital ltering (feedback and feedforward) and resampling. Spike-train analyses include interspike interval distributions (Fig. 4E and F), Poincar plots (Fig. 4A), event auto- and cross-correlations, spike-triggered averaging, stimulus driven and phase-related peri-event time histograms and rasters as well as frequencygrams (Trker and Powers, 2005). Automatic spike recognition is supported through an interface to the Wave clus spike sorting package (Quiroga et al., 2004). In addition, spike trains can be transformed to rate histograms allowing any of the waveform analysis routines above to be applied to them. Further analysis functions will be added in the future. 6. Discussion The MATLAB environment provides a number of advantages for code development in the laboratory. The high-level functions it supplies for analyzing data and for visualizing results allow rapid program development. They are also usually highly optimized for execution speed on the target platform and will, therefore, generally out-perform code written by the end-user using languages such as C++ and FORTRAN. Recent versions of MATLAB also include just-in-time compilation which further enhances execution speed. It was found necessary to write code in the C++ language to improve

performance for only two analysis functions in sigTOOL: those for event correlation and rasters. Some manufacturers have recognized the benets of MATLAB and provide facilities to export data to MATLAB from their applications. With sigTOOL, a further step has been taken: sigTOOL effectively provides a fully featured neurophysiological analysis application running entirely within the MATLAB environment. A similar innovation features in the FIND software package (Meier et al., 2008) and in the NeuroMAX project of RC Electronics Inc. (see http://www.neuromax.org). Both of these build on the Neuroshare data representation for single and multiple unit activity. FIND also includes data import from some network simulation environments. NeuroMAX is a commercial project and, unlike FIND and sigTOOL, its code will not be entirely open-source. A further advantage of MATLAB lies in its widespread use across many different disciplines. A large volume of end-user written MATLAB code is freely available on the worldwide web and may be adapted to the needs of the neuroscientist. Use of such code has already been made in sigTOOL: thus support for importing multimedia les has been implemented using code written by Richert (2005) and curve tting has been implemented using the EzyFit package of Moisy (2006). In addition, an interface has been included to the Wave clus spike recognition package described by Quiroga et al. (2004). The current implementation of sigTOOL provides a highly versatile environment for analyzing neuroscientic data. Features available through the GUI provide an application that compares favourably in functionality with many commercial spike-train analysis packages and in some respects provides enhancements; notably, for example, in the ease with which data can be exported to external spreadsheet-based analysis software and to graphics editing packages. Further development of sigTOOL is planned and this will, in part, be user-led: users are encouraged to post comments and suggestions on the sigTOOL download site or to email sigtool@users.sourceforge.net. However, the primary objective in developing sigTOOL was to assist code development by other laboratories and to promote the sharing of that code between laboratories. To make full use of the facilities of sigTOOL requires the programmer to use the custom-dened classes that have been created as part of the sigTOOL environment. It is hoped that the programming effort required in constructing these objects will be more than compensated for by the accessibility and usability that the class methods provide to the end-user/programmer. Nonetheless, every effort has been made to keep the construction of these objects as simple as possible. Full User and Programming Guides are included in the sigTOOL download (Lidierth, 2008).

Appendix A. Supplementary data Supplementary data associated with this article can be found, in the online version, at doi:10.1016/j.jneumeth.2008.11.004.

References
Hanselman DC, Littleeld B. Mastering MATLAB 6. New Jersey: Prentice-Hall; 2001. p. 486. Lidierth M. Local and diffuse mechanisms of primary afferent depolarization and presynaptic inhibition in the rat spinal cord. J Physiol 2006;576:30927. Lidierth, M. sigTOOL, http://sigtool.sourceforge.net; 2008. Mathworks. MATLAB 7 MAT-le format, http://www.mathworks.com/access/ helpdesk/help/pdf doc/matlab/matle format.pdf; 2008. McGarrity, S. Programming patterns: maximizing code performance by optimizing memory access, http://www.mathworks.com/company/newsletters/ news notes/june07/patterns.html; 2007. Meier R, Egert U, Aertsen A, Nawrot MP. FINDa unied framework for neural data analysis. Neural Network 2008;21:108593. Moisy, F., EzyFit 2.20, http://www.mathworks.com/matlabcentral/leexchange/ loadFile.do?objectId=10176&objectType=le; 2006.

196

M. Lidierth / Journal of Neuroscience Methods 178 (2009) 188196 Trker KS, Powers RK. Black box revisited: a technique for estimating postsynaptic potentials in neurons. Trends Neurosci 2005;28:37986. Working Group on Biomedical Computing. Biomedical Information Science and Technology Initiative (BISTI), http://www.nih.gov/about/director/060399.htm; 1999.

Quiroga R, Nadasdy Z, Ben-Shaul Y. Unsupervised spike detection and sorting with wavelets and superparamagnetic clustering. Neural Comput 2004;16: 166187. Richert, M. Mmread, http://www.mathworks.com/matlabcentral/leexchange/ loadFile.do?objectId=8028&objectType=le; 2005.

You might also like