Information Sharing Agreement. MEA Viewer is licensed under the General Public License version 3, GPLv3, and is available at ▇▇▇▇://▇▇▇▇▇▇.▇▇▇/dbridges/meatools. This research was sponsored by the U.S. Army Research Laboratory and Defense Advanced Research Projects Agency under Cooperative Agreement Number W911NF1520056. The views, opinions, and/or findings contained in this material are those of the authors and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government. Additional support was also provided by the California NanoSystems Institute (CNSI). Multielectrode arrays (MEAs) have been used for many years to measure electrical activity in ensembles of many hundreds of neurons, and are used in research areas as diverse as neuronal connectivity and drug discovery. A high sampling frequency is required to adequately capture action potentials, also known as spikes, the primary electrical event associated with neuronal activity, and the resulting raw data files are large and difficult to visualize with traditional plotting tools. Many common approaches to deal with this issue, such as extracting spikes times and solely performing spike train analysis, significantly reduce data dimensionality. Unbiased data exploration benefits from the use of tools that minimize data transforms and such tools enable the development of heuristic perspective from data prior to any subsequent processing. Here we introduce MEA Viewer, a highperformance interactive application for the direct visualization of multichannel electrophysiological data. MEA Viewer provides many highperformance visualizations of electrophysiological data, including an easily navigable overview of all recorded extracellular signals overlaid with spike timestamp data and an interactive raster plot. Beyond the fundamental data displays, MEA Viewer can signal average and spatially overlay the extent of action potential propagation within single neurons. This view extracts information below the spike detection threshold to directly visualize the propagation of action potentials across the plane of the MEA. This entirely new method of using MEAs opens up new and novel research applications for medium density arrays. MEA Viewer is licensed under the General Public License version 3, GPLv3, and is available at ▇▇▇▇://▇▇▇▇▇▇.▇▇▇/dbridges/meatools. Multielectrode array; electrophysiology; extracellular recording, python, data visualization Multielectrode arrays (MEAs) are commonly used to record extracellular action potentials (eAPs) from in vitro and in vivo neural networks (▇▇▇▇▇ et al. 2014). Because action potential widths can range from about 0.2 to 4 milliseconds, depending on the neuron type (▇▇▇▇ et al., 2007) the sampling frequency required to reliably capture eAPs is commonly in the range of 10 to 25 kHz. Thus when using arrays with 120 electrodes, experiments can generate data at a rate of over 300 MB/min, resulting in large unwieldy files. It is common at this point to extract eAP information by spike detection and subsequent sorting, steps that simplify the task of data handling but also dramatically reduce data dimensionality. However, spike detection and sorting steps themselves are notoriously error prone (▇▇▇ et al., 2015) and information present in the lower frequency domains of analog recordings is not captured by spike detection. Methods and tools that routinely evaluate the performance of spike detection and spike sorting performance in an unbiased way can help avoid systematic errors by quickly identifying detection and sorting failures and reveal features in the raw data that may be difficult to access in sorted data. Here we introduce MEA Viewer, a software package for highperformance visualization of multichannel electrophysiological data recorded by a multielectrode array system. MEA Viewer fills the void for tools to examine unprocessed data and allows direct inspection of the recorded extracellular signals superimposed with the results of spike detection and spike sorting and thus is ideal for examining the results of spike sorting routines. The primary audience for MEA Viewer is for end users of MEA systems who want to explore their data prior to doing heavy statistical analysis. MEA Viewer provides five main visualization interfaces: (i) the grid view displays the complete set of recorded extracellular signals, (ii) the signal comparison view allows users to select and display multiple recorded channels with superimposed spike data, (iii) an interactive raster view displays spike timestamp data for all recorded channels, (iv) the flashing spike view presents a spatialtemporal representation of the spiking behavior of the recorded channels and (v) the propagation signal view overlays aggregated spiking events, revealing an individual neuron’s multielectrode propagation signal, as well as electrophysiological features typically masked by noise. We recently showed that MEAs can be used to monitor action potential propagation in single neurons (▇▇▇▇▇ et al., 2017). Assigning spikes to a particular neuron is not typically possible with extracellular recording. However, by making these propagation signals easy to find, MEA Viewer makes it possible for the first time to unambiguously identify and explore the spiking behavior from single identified neurons. With MEA Viewer these spikes can be signal averaged to reveal electrodes with subthreshold events among all MEA channels. Retaining these previously discarded events enables commonly used mediumdensity arrays (100200 um electrode pitch) to reveal intracellular signal propagation in a highthroughput way, over multiple days. This may be especially useful in monitoring changes due to degeneration and in disease models. MEA Viewer was written in Python 3 and OpenGL Shading Language, making extensive use of the Python scientific stack (numpy, scipy, pandas, and h5py). The high performance of MEA Viewer is achieved by transferring a majority of the data processing to the graphics processing unit (GPU). Most of the interactions with the GPU are done with vispy (Campagnola et al. 2015), a relatively highlevel Python interface to modern graphics hardware through the use of OpenGL. The rest of the user interface was created using PyQt and the Qt GUI library, enabling the application to operate across platforms (currently tested on Windows 7 and Mac OS X 10.10+). MEA Viewer was written to be a generalpurpose electrophysiology display application for large (0.51.5 GB) multistream data files. It accepts input data given in the form of Hierarchical Data Format version 5 (HDF5) files for extracellular signal recordings and commaseparated value (CSV) files for spike timestamps. HDF5 is an open file format stewarded by the HDF Group, and is the file format adopted by the Neuroscience without Borders initiative (▇▇▇▇▇▇▇ et al. 2015). Other projects such as NEO (▇▇▇▇▇▇ 2014), GNode (Sobolev 2014), or NSDF (Ray 2016) seek to provide libraries to read electrophysiological data from a variety of formats, but without there being a clear winner among the three we chose to focus our efforts on supporting only HDF5 files. Spike timestamp data can be generated using tools available with MEA Viewer, or from any other spike detection and sorting program, then converted to a CSV file compatible with MEA Viewer (see supplementary materials). MEA Viewer seeks to remain agnostic to a chosen spike sorting routine, thus due to the vast number of options in spike sorting, and with no clear sorting method or implementation widely adopted, a common file format like CSV was needed to provide for maximum interoperability. MEA Viewer is currently designed to interoperate with Multi Channel Systems’ 120 electrode count MEA data, converted to HDF5 using Multi Channel Systems’ Data Manager conversion utility however other data formats are straightforward to add. A brief overview of the dataconditioning steps required is shown in Fig. 2A. Once input data is properly formatted for reading by MEA Viewer, GPU vertex data is created by the currently active visualization and sent to the GPU for rendering (Fig. 2B). Most visualizations create vertex data for the entirety of the dataset displayed and transfer it once to a vertex buffer object on the GPU. To allow for panning and zooming a transformation matrix is then updated each animation frame, eliminating the massive transfer of vertex data on a framebyframe basis. One notable exception to this methodology is with the grid view which displays the entirety of the originally recorded extracellular signals. Because the grid view often displays overviews of a gigabyte or more of analog data, it is impractical to send all of this to the GPU at one time due to memory limits on consumer grade GPU cards. Instead the analog data is resampled and updated during mouse drag and scroll events to only transfer the selected data. Typically data is downsampled for display as the number of data points encompassing the record is much larger than the number of pixels used to display it. When dealing with longduration recordings of spiking neurons it is important to downsample in a way that preserves an accurate view of these relatively sparse events. Transferring every nth point makes it unlikely for these points to land on spikes—creating a visualization that underestimates the actual spiking behavior. We sidestep this by using a simple method to downsample by calculating the number of pixels used to display each waveform (np), then binning the waveform data into np bins. The minimum and maximum value for each bin are calculated and those points are sent to the GPU as vertex data, which is then displayed as an OpenGL line strip. This technique preserves an accurate view of the spiking behavior and reduces the total amount of data being transferred to manageable levels, preserving a fluid interaction with the data. Many of the visualizations display data in a layout that mimics the geometry of the MEA. Arbitrary layouts can be specified in the software by subclassing the abstract Layout class and implementing the methods coordinates_for_electrode and electrode_for_coordinates,as well as providing rows and columns attributes specifying the number of rows and columns in the layout. These functions are mostly self explanatory, with all coordinate values given in (column, row) tuples and electrode values given as strings. The user interface of MEA Viewer makes it easy to switch between any of the visualizations while maintaining a consistent position in the data record. For instance, after panning to a specific part of the data in the interactive raster view, switching to the flashing spike view will show data from that same time point. This makes it easy to coherently navigate the data record and rapidly switch between views of the original extracellular recordings and views of the spike timestamp data. The entry point for displaying extracellular signals with MEA Viewer is the grid view. From this window, users can view the recorded analog data from all electrodes, easily pan forward and reverse in the time record and zoom in and out at chosen locations in time and signal amplitudes. Specific channels can then be selected and a comparison view can be activated to display recorded signals from a subset of the channels overlaid with spike detection and sorting data (Fig. 3A). Detected spikes are colorcoded by markers indicating sorted spike groups. Spikes detected on multiple electrodes but originating from single neurons are indicated by gray markers. Navigating the data in this way allows for unbiased assessment of spike detection and sorting performance of any data record, and enables the rapid visualization of redundant spike information, which can be underappreciated when analyzing MEA data (▇▇▇▇▇ et al., 2017). The obvious utility of this visualization in MEA Viewer is that common spikedetection and sorting routines can be easily assessed in this view (Fig. 3B). As detection and sorting errors can have large effects on measured spike rates, MEA Viewer can be used to spot cases like these early in the data analysis process. An additional unique feature of MEA Viewer is that it easily allows visualization of instances where the acquisition system captures action potential propagation in single neurons. Recent work with cultured neurons from mouse or human induced pluripotent stem cells (iPSCs) demonstrates that signal propagation within individual neurons can be monitored by detection of nearcoincident spikes among MEA electrodes represent (▇▇▇▇▇ et al. 2017). Because they arise from single neurons, these signals can be aligned and averaged to reveal the extent of signal propagation within one cell within a neural network, immediately giving a display of the spatial extent of signal propagation. The propagation signal view in MEA Viewer overlays these aggregated spike waveforms to visualize a single neuron’s propagation signal across an array, as well as other associated events occurring close in time to spikes in identified cells. We routinely record action potential propagation on multiple electrodes of arrays with interelectrode distances of 100200 um. MEA Viewer signal averages spikes from single neurons by comparing event times of two channels when they show stereotyped coincident spiking (defined by many repeated events within 0.7 ms of each other). The first is the ‘reference’ channel and the second is the ‘test’ channel. The reference channel can alternatively be chosen by extracting spike times from single sorted channels. Once a list of event times is chosen using either method, a 20 ms window of data is extracted from every data channel centered on each spike time in the reference channel (Fig. 4A). The averaged waveform for each data channel are then superimposed with individual waveforms, and the waveforms from all data channels are displayed in a layout mirroring the MEA geometry. Signal averaging hundreds of spikes in this way often reveals electrodes throughout the array with subthreshold events and gives an overview of behavior at all electrodes timelocked to the spike events occurring in the reference channel (Fig. 4C). Each channel showing highly correlated events likely reflects action potential propagation within a single neuron measured at different locations. In this example, the earliest action potential is in the top left and propagates to the bottom right (Fig. 4B). The propagation signal view also reveals additional network features that are timelocked to spiking in the propagation signal. For example, in the example of the propagation signal shown (Figure 4B) there are spikes from other units that occur with timing expected from neurons with direct pre or postsynaptic coupling to the neuron giving rise to the propagation signal. These events are distinguished from propagation signals by their longer time delay, typically between 1 and 10 ms, and their increased jitter with respect to the reference electrode, shown by the cloud of spikes seen in the overlaid waveforms (Figure 4B, blue arrows). In contrast, waveforms attributed to single neurons across multiple electrodes have very little jitter, and superimpose well over multiple instances (▇▇▇▇▇ et al., 2017). Averaging spikes in the reference channel of a propagation signal also unmasks features typically obscured by noise, for instance a signal consistent with the properties expected from excitatory postsynaptic potentials (EPSP; Fig. 4C), something normally not detected in by extracellular recording of cultured neurons. The interactive raster view in MEA Viewer displays spike time data from all unprocessed or spikesorted data channels. Raster plots easily show arraywide activity patterns but are static displays. A static raster plot displays 3 minutes of data at a resolution of ~130 ms/px on a 1400 pixel monitor. This is in comparison to the high temporal resolution provided by MEAs (typically 50 µs or better) and spiking behavior that can exceed 20 Hz during highfrequency bursts. MEA Viewer can display spike dynamics at userchosen time scales, sidestepping the limitations of raster plots. MEA Viewer also offers many channelordering schemes which define a channel’s row position to facilitate explorator
Appears in 2 contracts
Sources: Information Sharing Agreement, Information Sharing Agreement