Skip to main content

Thank you for visiting You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

µSpikeHunter: An advanced computational tool for the analysis of neuronal communication and action potential propagation in microfluidic platforms


Understanding neuronal communication is fundamental in neuroscience, but there are few methodologies offering detailed analysis for well-controlled conditions. By interfacing microElectrode arrays with microFluidics (μEF devices), it is possible to compartmentalize neuronal cultures with a specified alignment of axons and microelectrodes. This setup allows the extracellular recording of spike propagation with a high signal-to-noise ratio over the course of several weeks. Addressing these μEF devices, we developed an advanced yet easy-to-use publically available computational tool, μSpikeHunter, which provides a detailed quantification of several communication-related properties such as propagation velocity, conduction failure, spike timings, and coding mechanisms. The combination of μEF devices and μSpikeHunter can be used in the context of standard neuronal cultures or with co-culture configurations where, for example, communication between sensory neurons and other cell types is monitored and assessed. The ability to analyze axonal signals (in a user-friendly, time-efficient, high-throughput manner) opens the door to new approaches in studies of peripheral innervation, neural coding, and neuroregeneration, among many others. We demonstrate the use of μSpikeHunter in dorsal root ganglion neurons where we analyze the presence of both anterograde and retrograde signals in μEF devices. A fully functional version of µSpikeHunter is publically available for download from


Electrical signaling is recognized as the principal modality of communication in neurons, where it is used to encode and transmit information via action potentials (APs). Electrophysiology recordings therefore play a fundamental role in understanding neuronal circuits in physiological and pathological conditions. Microelectrode arrays (MEAs) stand out among the different methodologies with the appropriate spatial and temporal scales to assess neuronal circuits in well-controlled in vitro settings1,2. However, it is difficult to detect and characterize AP propagation (e.g., direction and velocity) in neuronal cultures using conventional MEAs: it is virtually impossible to ensure that electrodes are well placed for AP detection, source–target information is inaccessible, and the amplitudes of the APs recorded from axons are typically very low and impossible to discriminate. To improve the signal-to-noise ratio (SNR) of electrophysiological recordings and the localization of neuronal processes on recording electrodes, devices combining microElectrodes and microFluidics (µEF devices) have been developed for neuroscience applications3,4,5,6. A µEF device is composed of a microfluidic device mounted on a MEA to form an enclosed culture chamber composed of two (or more) isolated compartments connected by microchannels. The reduced dimensions of the microchannels ensure that somata are excluded from these channels whereas axons are able to grow through. Among other applications, this type of device allows for spatially compartmentalized but functionally connected cultures of separate populations of cells. With the microfluidic device aligned such that the microchannels are positioned above multiple microelectrodes, signal propagation along the axons can be observed and analyzed. The small dimensions of the microchannels provide the added benefit of increasing the SNR of recorded axonal APs7.

A number of studies have been conducted using µEF devices to assess (i) the directionality of communication and the origin of bursting behavior in networks of distinct populations of neurons3,6,8,9,10,11,12; (ii) changes to the propagation velocity with culture age13,14; and (iii) the effects of pharmacological, biochemical, or electrical stimulation13,15,16.

Compartmentalized microfluidic devices have also been used to investigate the interaction between neurons and other cells co-cultured in the separate compartments. However, although studies on neuronal circuit dynamics and signal communication are intimately related with electrophysiology, the vast majority of these microfluidic studies on neuronal co-cultures with other types of cells have lacked an electrophysiological facet, which would serve to complement the fundamental biochemical results and further elucidate the interaction between the cell types. For example, past studies have assessed various factors affecting myelination in the central nervous system17,18,19. Additionally, the biochemical and morphological facets of the interaction between neurons and cells from other organ systems, including osteoblasts20, dental pulp21, and myocytes22,23 have been investigated.

In both single- and co-culture configurations, more than the technical difficulty of combining microelectrodes and microfluidics, the challenge for most labs lies in the sheer volume and complexity of the recorded electrophysiological data. The electrophysiological data obtained from neurons cultured in µEF devices is unquestionably highly informative, allowing, for example, for the detection of propagating APs, the calculation of their propagation direction and velocity, as well as their spike times or inter-spike intervals (relevant for neuronal coding/decoding analysis). However, although the necessary experimental protocols and tools for combining MEAs and microfluidics are readily available24, there is a lack of user-friendly tools available to analyze recordings obtained using µEF devices (but see)25,26,27. In particular, analysis of axonal propagation velocities in µEF devices has been addressed in recent publications11,13,28,29, but, typically, (i) the calculations are performed using simple custom-made MATLAB scripts for estimating the signal delay between pairs of electrodes; (ii) the analytical tools generally do not provide spike sorting tools nor automatic selection constraints for identifying travelling waves (depending on the noise, not all spikes in individual microelectrodes are associated to a propagating action potential); and, importantly, (iii) the scripts are not made available in public repositories, nor are they easy to use (“out-of-the-shelf”) by other research groups.

In this study, an advanced yet user-friendly data analysis program called µSpikeHunter was developed for the detection and characterization of APs propagating along axons confined to the microchannels of a µEF device. With this free, publically available software, traveling waves (APs) in electrophysiological recordings can be readily detected, visualized, and characterized. Spike sorting can also be performed in µSpikeHunter based on the waveforms of recorded APs. In this study, µSpikeHunter was validated in data analysis of electrophysiology experiments using cortical neurons and dorsal root ganglion (DRG) explants and was used to uncover the otherwise elusive presence of APs traveling towards the somal compartment in common microfluidic devices.

The µSpikeHunter software, together with a detailed user-manual and sample data, is publically available for download from


µSpikeHunter graphical user interfaces

The computational tool µSpikeHunter runs on both Microsoft Windows and Apple’s macOS operating systems, and is composed of two graphical user interfaces (GUIs): the main GUI, in which the data are imported and analyzed at the single-spike level, and the spike sorting GUI, in which the user can sort spikes into source clusters associated to different neurites. µSpikeHunter was developed to be compatible with recordings obtained using custom setups or commercial recording systems (MEA2100 from MultiChannel Systems MCS GmbH, Germany) for 60-, 120-, and 252-electrode MEAs. The data files can be in the Comma-Separated Values format (CSV), for custom setups, or in Hierarchical Data Format 5 (HDF5) for MultiChannel Systems devices. Analysis can be performed for signals recorded by a series of up to 16 electrodes with a uniform inter-electrode spacing. Details on how to use µSpikeHunter can be found in the user manual in the Supplementary Materials [LINK TO USER MANUAL].

Two key distinctive features of µSpikeHunter are the ability to (i) automatically detect and characterize propagating action potentials (Fig. 1a), and (ii) perform spike sorting on the electrodes signals giving the possibility to monitor more than one axon per microchannel (Fig. 1b). The main GUI (Fig. 1c) allows the user to select a file for analysis and, if a commercial MultiChannel Systems setup was used for the recording, the electrodes and time range for analysis. Once the desired data have been selected and the parameters set for event detection, the user is presented with a list of detected propagation sequences. These sequences are series of events detected along the electrodes which satisfy specific criteria (see Materials and Methods) to be considered as an AP traveling along an axon passing through the microchannel containing the analyzed electrodes. The propagation sequences can be analyzed and the results exported to a data file.

Figure 1
figure 1

The µSpikeHunter computational tool. (a) Schematic illustration of the recorded signals associated with a propagating action potential. Different microelectrodes along the axon capture the extracellular signal at different time delays, allowing, for example, the calculation of the propagation velocity. (b) The morphology and location of an axon relative to the microelectrode affect the recorded extracellular spike profile. Distinct profiles can therefore be associated with different sources (spike sorting), allowing a single microelectrode to track the signals from more than one axon. (c) Main graphical user interface (GUI) of µSpikeHunter.

The spike sorting GUI (Fig. 2) presents the user with a spike overlay for each of the electrodes, consisting of all the detected propagation sequences, and allows the user to sort the spikes into source clusters, which are collections of propagation sequences that are presumed to have arisen from different axons inside the same microchannel. The spike overlay plots presented to the user are aligned about the peak voltage values for each detected event.

Figure 2
figure 2

Spike sorting graphical user interface (GUI) of µSpikeHunter. Up to five distinct sources can be tracked (four independent selections can be made from a common pool of signals). Spike sorting in µSpikeHunter is based on extracellular spike shape, and up to two regions of interest (ROI) can be defined to select individual sources.

Algorithm performance assessment using synthetic data

The µSpikeHunter algorithms for detection and characterization of propagating APs were validated using synthetic data simulating electrophysiological recordings of microelectrodes along a microchannel with different SNR levels.

Propagation sequence detection

The propagating wave detector was evaluated based on two performance indices: the precision rate and the detection rate. The precision is defined as


where \(TP\) is the number of true positives, i.e., the number of detected sequences that correspond to actual traveling waves, and \(FP\) is the number of false positives, i.e., the number of detected sequences that do not correspond to actual traveling waves. The detection rate is defined as


where NS is the total number of actual sequences in the recording dataset. Both of these performance indices range from 0 to 1.

A high precision indicates that the propagation sequence detector rarely yields temporally linked events that do not correspond to actual traveling waves (APs). A high detection rate indicates that the propagation sequence detector is able to recognize a high percentage of the actual traveling waves in the data. It should be noted that in spike characterization, a high precision is more important than a high detection rate. That is, it is more desirable to be certain that the analyzed spikes are actually traveling APs than to detect the majority of spikes in a recording (due to noise and detection constrains, the same spike may not be observed in all microelectrodes along a microchannel).

The precision and detection rate results are presented in Fig. 3 for different SNRs. Examples of generated propagation sequences with no added noise and with added noise at SNRs of 0.7 and 0.3 are shown in Fig. 3a. The plotted values for precision and detection rates (Fig. 3b) are the averages of the values obtained for multiple simulations using the same SNR. These results demonstrate that the propagation sequence detector shows very high precision up to an SNR of 0.3 (significantly below typical values for standard good quality MEA recordings), where it is still very close to 1 (0.96).

Figure 3
figure 3

Validation results. (a) Examples of synthetic propagation sequences detected by the sequence detector in the case of no noise and SNRs of 0.7 and 0.3. (b) Precision and detection rate of propagation sequence detector at different SNRs. The dashed line indicates the target value of 1.0. (c) Ratios of different propagation velocity estimates to the true propagation velocity at different SNRs. Estimates were obtained for three recording datasets with approximately 40–70 sequences each at each SNR and averaged over the three datasets. Error bars represent the standard deviations.

The detection rate drops steadily as the noise increases from an SNR of 0.7 to 0.2. Whereas the propagation sequence detector is able to detect 83% of all actual propagation sequences at a SNR of 0.7, for a SNR of 0.4 less than 10% of all propagation sequences are detected.

Propagation velocity estimation

The performance of the propagation velocity estimation of µSpikeHunter was assessed using three measures (see Materials and Methods):

  • cluster propagation velocity (CPV), calculated from the relative timing and shape of the voltage waveforms, measured between the two most distant electrodes;

  • single-sequence propagation velocity (SPV), calculated directly from the cross-correlation between the voltage waveforms in a particular pair of electrodes;

  • mean SPV, calculated using the average SPV for all electrode pairs.

A comparison of the methods is shown in Fig. 3c. These results indicate the average propagation velocity estimates over all detected propagation sequences in the synthetic datasets. All methods show a good performance at high SNRs, with the SPV between specific pairs of electrodes offering a versatile tool. At low SNRs however, the CPV outperforms the other methods and shows good performance up to an SNR of 0.4, with an average error of 2.2%. Beyond an SNR of 0.3, the performance of the CPV deteriorates.

Detailed characterization of axonal signal propagation in controlled in vitro settings

Two sets of experiments, using microfluidic platforms with a somal and an axonal compartment separated by microchannels, were used to demonstrate the data analysis capabilities of µSpikeHunter.

Spike sorting

The spike sorting performance of µSpikeHunter was evaluated using recordings obtained from rat cortical neurons at day in vitro (DIV) 15 using an MEA with 252 microelectrodes and a sampling rate of 20 kHz. Propagation sequences were detected with a threshold of 5 standard deviations of the noise and negative phase detection. The presence of distinct spike waveforms in the spike sorting GUI is a strong indication that multiple sources of activity are present in the microchannels. The sorting results for two microchannels (B and M; see Fig. 1 for a schematic example of this labeling system) of one of the experiments are shown in Fig. 4a1,b1. The characteristics of the sorted clusters are summarized in Fig. 4a2,b2. µSpikeHunter’s spike sorting GUI provides the number (and timings) of the spikes in each cluster and their propagation velocities.

Figure 4
figure 4

Examples of µSpikeHunter spike sorting results for spikes recorded from cortical neurons at DIV 15 using the MEA2100-256-System with a sampling rate of 20 kHz and an analysis period of 100 s. (a1) Microchannel B with three source clusters. The boxes on the B9 plot are the ROIs used for sorting. (a2) Intra-cluster averages of the CPV and confidence index for channel B events and the number of events in each cluster. (b1) Microchannel M with two source clusters. The boxes on the M11 plot are the ROIs used for sorting. (b2) Intra-cluster averages of the CPV and confidence index for channel M events and the numbers of events in each cluster.

Interestingly, in addition to the distinct appearance of the waveforms, the propagation velocities of the sorted clusters can provide further confirmation that the spikes arise from different sources. For example, in Fig. 4a2,b2, clusters 1 and 2 in channel B show significantly different CPVs with low standard deviations corresponding to errors of approximately 5% and high confidence indices owing to the highly consistent waveforms in each cluster. The same high reliability can also be observed in the CPV estimate for cluster 1 in channel M, which has an error of approximately 8% at one standard deviation. However, the standard deviation of the CPV estimates was higher for cluster 0 in both channels B and M; in these cases, the error exceeded 20%. This is likely because the SNRs of the spikes in these clusters were lower and the propagation velocity estimates were therefore more affected by noise. Alternatively, it may also be the case that these clusters actually represent more than one source but the waveforms are indistinguishable, again because of the SNR.

Observation of reverse propagation in standard microfluidics with somal/axonal compartments

In microfluidic experiments where neurons are placed only in the somal compartment, it is expected that all APs travel from the somal to the axonal compartment (forward propagation). However, taking advantage of µSpikeHunter’s analysis and visualization capabilities, this is not what is observed. In experiments with either cortical or DRG neurons, a significant number of events (~10% in some cases) travel from the axonal to the somal compartment (reverse propagation). Examples of reverse propagation sequences are shown in Fig. 5, presented as voltage traces and kymographs. The kymographs in µSpikeHunter allow the user to readily visually identify the occurrence of propagation (either forward or reverse).

Figure 5
figure 5

Voltage traces and kymographs of reverse propagating APs recorded from (a) cortical and (b) DRG cultures.

Possible causes for the observed reverse propagation include (Fig. 6): distal axo-axonic synapses in the axonal compartment (between axons in a different or the same microchannel), axons growing back towards the somal compartment (through a different or the same microchannel), and the antidromic propagation of an AP generated at the axon terminal.

Figure 6
figure 6

Schematic of possible causes of reverse propagation. Left two channels: signal transmission via an excitatory axo-axonal synapse. Middle two channels: an axon growing back through a microchannel to the somal compartment. Rightmost channel: signal generation from the axon terminal (spontaneous or induced) followed by antidromic conduction.

To analyze the possible causes, the timings and velocities of the detected reverse propagation sequences in each source cluster were compared against those of the forward sequences in all other source clusters. In particular, the time at which a reverse AP was detected on the most distal electrode (with respect to the somal compartment) was compared with the times at which forward APs were detected in all other source clusters. Strong correlation, short time delays, and low variability in the time delays are good indicators that an axon grew back from another microchannel or, alternatively, formed an excitatory axo-axonal synapse with a source in another microchannel, indicating a potential causal relation between APs from different axons.

In the cortical culture, it was possible to observe reverse APs correlated with forward APs from different sources. In some cases, more than 90% of all detected reverse APs in a cluster were preceded by forward APs in a single different cluster, with delays between the AP arrival times (on distal electrodes) on the order of 1.8 ms ± 0.07 ms (mean ± std). In other cases, it was not possible to relate detected reverse APs with any recorded APs from different sources; however, the µEF device used in this study has 20 microchannels, and so it may be possible that an axon from one of the four silent microchannels may have been the source of the reverse propagation. Nevertheless, sources showing reverse APs were never exclusive to reverse propagation: a source could show only forward APs or have a fraction of reverse APs. While not excluding the possibility of indistinct sources on the same microchannel, given that the observed velocities for forward and reverse propagation were the same in these cases, this result raises the possibility of both orthodromic and antidromic conduction in the same axon in this experimental setup.

The DRG culture showed reverse propagation without the same regularity as the cortical culture. Few reverse propagating events were observed, and they were often isolated events in different microchannels and on different DIVs. This indicates, with increased confidence, that these events likely represent antidromic propagation in line with physiological conditions in which DRGs integrate afferent signals.

Monitoring culture activity over multiple days in vitro

As a final benchmark for the analysis capabilities µSpikeHunter, a DRG explant culture was monitored in a µEF device as it aged, using 10 min recordings at DIVs 4, 6, and 8. Propagation sequences were detected using a threshold of 3.5 standard deviations of the noise with negative phase detection. The activity was monitored by determining the number of APs in each 10 min recording, the SNR, and the CPV estimate. The results are shown in Fig. 7, focusing on the evolution of two microchannels (K and H) that consistently showed high levels of activity from a single source. Figure 7a shows the propagation velocity and number of events at the three measurement time-points for the two considered activity sources. From DIV 4 to DIV 8, the number of events in channel K increased steadily, in contrast with channel H. Furthermore, in channel K, the propagation velocity, which is related to axon caliber and ion channel density, was observed to increase from 0.57 to 0.77 m/s between DIVs 4 and 6 and then remain constant between DIVs 6 and 8, whereas in channel H, the propagation velocity initially remained roughly constant at approximately 0.65 m/s and then decreased to 0.46 m/s at DIV 8. Figure 7b shows the SNRs on each of the electrodes in channels K and H at the three measurement points. The SNR was highest on DIV 6 across all electrodes in both channels K and H. It was also possible to observe that a higher SNR was achieved closer to the center of the microchannels, as has been described previously7.

Figure 7
figure 7

Monitoring DRG culture activity over DIVs 4, 6, and 8, using the MEA2100-120-System with a sampling rate of 20 kHz and a recording duration of 10 min. Sample results for microchannels channels K and H. (a) Propagation velocity and number of spikes (events). (b) SNR for each electrode in the two presented microchannels.

Altogether, these results give an indication of how informative and useful µSpikeHunter is, and how it can allow researchers to easily monitor (co-)culture development, activity, and communication over multiple DIVs.


µSpikeHunter is a powerful yet user-friendly program for the identification and characterization of propagating APs in neuronal (co-)cultures with a controlled compartmentalization. This work stands out among other publications11,13,28,29 addressing AP propagation by contributing with a publically available computational tool, with advanced analysis and distinctive features. The developed algorithms in this computational tool allow the user to determine automatically if there are APs propagating along axons confined to microchannels of µEF devices and characterize these APs based on the direction of propagation, the propagation velocity, firing rate, spike timings, the SNR, and the source. The AP detection and propagation velocity estimation algorithms of µSpikeHunter were assessed and validated using synthetic APs generated with different levels of noise. It was found that the precision of the spike detection and the CPV estimate show good performance up to an SNR of 0.3, way below the typical values in good electrophysiological recordings. The program is robust and versatile and can be used with different neuronal cultures, such as cortical neurons or DRG explants, including co-culture configurations. It should be noted, however, that in situations of high bursting activity, the algorithms for automatic detection of propagating action potentials might fail, as it becomes difficult to label and relate individual spikes recorded in different microelectrodes.

Altogether, the methods presented here combining µEF devices and µSpikeHunter provide very interesting conditions to study (in an easy, time-efficient, high-throughput manner) neurodevelopment, neuronal circuits, information coding, neurodegeneration, and neuroregeneration, among others. The use of µEF devices also allows the same neurites to be monitored over multiple DIVs, and µSpikeHunter simplifies the analysis of the evolution of spike features in this type of analysis.

µSpikeHunter was used to uncover the otherwise elusive presence of APs traveling towards the somal compartment in common microfluidic devices. The observation of reverse propagation on the microchannels also provides insight into how µSpikeHunter can be used to assess the afferent response of neurons to changes in the culture conditions in the axonal compartment, or the communication between neurons and other cells in co-cultures.

The software, as well as a detailed user manual and a sample test dataset, is available for download from

Materials and Methods

Preparation of microelectrode–microfluidic devices

The µEF devices were prepared by placing standard microfluidic devices with an appropriate microgrooves spacing against a pre-coated MEA (MultiChannel Systems MCS GmbH, Germany) with 120 or 252 electrodes of 30 µm in diameter with a center-to-center inter-electrode spacing of 100 µm. Microscope images of prepared µEF devices are shown in Fig. S1. Briefly, the MEAs were coated with 0.01 mg/ml of poly(D-lysine) (PDL, Corning) overnight at 37 °C, washed with sterile water, and completely air-dried under sterile conditions. Microfluidic devices were sterilized with 70% ethanol and were gently attached to PDL-coated MEAs, creating a µEF chamber composed of two separate compartments connected by 450 μm length × 9.6 μm height ×14 μm width microchannels. The medium reservoirs were loaded with 150 μl of 5 μg/ml laminin isolated from mouse Engelbreth-Holm-Swarm sarcoma (Sigma-Aldrich Co.) and incubated overnight at 37 °C. The unbound laminin-1 was removed, and chambers were refilled with Neurobasal medium and left to equilibrate for at least 2 h at 37 °C prior to cell seeding.

Cell culture experiments

Experimental procedures involving animals were carried out in accordance with current Portuguese laws on Animal Care (DL 113/2013) and with the European Union Directive (2010/63/EU) on the protection of animals used for experimental and other scientific purposes. The experimental protocol (reference 0421/000/000/2017) was approved by the ethics committee of the Portuguese official authority on animal welfare and experimentation (Direção-Geral de Alimentação e Veterinária). All possible efforts were made to minimize the number of animals and their suffering. Unless otherwise stated, all reagents listed below are from Gibco, ThermoFisher Scientific.

Primary embryonic rat cortical neurons were isolated from prefrontal cortices of Wistar rat embryos (E18). The embryo cortices were dissected in Hank’s Balanced Salt Solution (HBSS) and enzymatically digested in 0.6% (w/v) trypsin (1:250) in HBSS for 15 min at 37 °C. Subsequently, tissue fragments were washed once with 10% (v/v) heat-inactivated fetal bovine serum (hiFBS, Biowest) in HBSS to inactivate trypsin and twice with HBSS to remove FBS from the solution. Tissue fragments were then mechanically dissociated with a 5 ml plastic pipette and subsequently with 1 ml pipette tips. Viable cells were counted using the trypan blue (0.4% (w/v), Sigma-Aldrich Co.) exclusion assay, and the cell density was adjusted to 2 × 107 viable cells/ml. Thereafter, 5 μl of the cell suspension was seeded in the somal compartment of a µEF device, previously treated with 0.01 mg/ml PDL as described above. Cells were cultured in Neurobasal medium supplemented with 0.5 mM glutamine, 2% (v/v) B27, and 1% (v/v) penicillin/streptomycin (P/S, 10,000 units/ml penicillin and 10,000 μg/ml streptomycin) and kept in a humidified incubator at 37 °C supplied with 5% CO2. A typical cortical neurons culture (DIV 5) on a µEF device is shown in Fig. S1a.

Primary embryonic mouse dorsal root ganglion (DRG) explants were isolated from wild-type C57BL/6 mice embryos (E16.5). Lumbar DRG explants were removed and placed in HBSS until use. Upon use, one DRG explant was seeded in the somal compartment of a µEF device, previously treated with 0.01 mg/ml PDL plus laminin as described above. Cells were cultured in Neurobasal medium supplemented with 0.5 mM glutamine, 2% (v/v) B27, 50 ng/ml of NGF 7S (Calbiochem®, Millipore), and 1% (v/v) P/S, and kept in a humidified incubator at 37 °C supplied with 5% CO2. A DRG explant (DIV 4) seeded on a µEF device is shown in Fig. S1b.

Electrophysiology recordings

Cortical neurons at DIV 15 and DRG explants at DIVs 4, 6, and 8, were used in the electrophysiology experiments. The cortical and DRG recordings were respectively obtained with 252- and 120-electrode MEAs using MEA2100 recording systems (MultiChannel Systems MCS GmbH, Germany). The µEF devices prepared with these MEAs had 16 and 12 microchannels with four microelectrodes positioned along each microchannel, respectively. The electrodes are referred to using the electrode labels defined by MultiChannel Systems, with a number representing the row and a letter representing the column, and the microchannels are referred to using the letter representing the electrode column over which they are aligned (see Fig. 1c, low left corner of the GUI, for a schematic example of this labeling system). Recordings were obtained at a sampling rate of 20 kHz, and all recorded activity was spontaneous activity.

Computational algorithms

µSpikeHunter was developed in MATLAB R2016b (The MathWorks Inc., USA). The graphical user interfaces were developed using MATLAB’s GUI development environment (GUIDE). With the GUIDE Layout Editor, GUI layouts were developed for compatibility with both Windows and Macintosh operating systems.

Propagation sequence detection

Propagation sequences are detected by first applying event detection to the ith electrode closest to the center of the microchannel and using a set of three criteria to determine whether each detected event is part of a propagation sequence. The user defines the number of standard deviations to use for the event detection threshold and whether the positive or negative phase of the spikes is being detected. The event detector first eliminates outliers and then calculates the median and standard deviation of the noise. Outliers are eliminated by excluding any data points that are more than three scaled median absolute deviations (MADs) from the median of the signal. The scaled MAD is calculated as


where S is the discrete recorded signal and \(C=-1/[\sqrt{2}\,{{\rm{erfc}}}^{-1}(3/2)]\) is a scaling constant. With the outliers excluded, the median Mn and standard deviation σn of the remaining data are obtained; these are considered to be the median and standard deviation of the noise. The detection threshold VD is calculated as the user-defined number nσ of standard deviations above or below the median, as

$${V}_{D}={M}_{n}\pm {n}_{\sigma }{\sigma }_{n}.$$

Events are obtained as regions of the signal that exceed the detection threshold. The time of the pth event on the ith electrode is denoted tp,i.

For an event detected on the central ith electrode to be considered part of a propagation sequence, all of the following three conditions must be met.

  1. (1)

    Temporally linked events are detected on all other electrodes.

  2. (2)

    The times of the linked events on the first and last electrodes correspond to a propagation velocity of less than 100 m/s.

  3. (3)

    The absolute value of the Kendall rank coefficient τb between the electrode indices and the times of the linked events is greater than 0.8.

For condition (1), a search window \([{T}_{s,{\rm{\min }}},{T}_{s,{\rm{\max }}}]\) is defined for each electrode based on the distance to the first electrode as

$${T}_{s,{\rm{\min }}}={t}_{p,1}-{C}_{s}{D}_{1,i}\,{T}_{s,{\rm{\max }}}={t}_{p,1}+{C}_{s}{D}_{1,i}$$

where D1,i is the distance from the ith electrode to the first electrode and Cs is a search window coefficient defined to correspond to a minimum propagation velocity of 0.1 m/s. The event detection thresholds are also obtained for all of the electrodes using the two-step procedure described previously. A collection of temporally linked events is considered to exist only if an event is detected on each electrode within each corresponding search window. The times of the pth propagation sequence are given by the vector \({{\bf{t}}}_{p}=[{t}_{p,1}\,{t}_{p,2}\ldots {t}_{p,{n}_{E}}]\), where nE is the number of electrodes.

For condition (2), the times of the events are defined as the times at which the peak voltages are recorded. A sequence is rejected if the following condition is not met:

$$\frac{{D}_{1,{n}_{E}}}{|{t}_{p,{n}_{E}}-{t}_{p,1}|} < 100\,{\rm{m}}/{\rm{s}}.$$

In condition (3), the Kendall rank coefficient τb is an index of the ordinal association between two sets of numbers. For this condition, τb is obtained for the correlation between a vector of the electrode indices, given by \({\bf{E}}=[1\,2\ldots {n}_{E}]\), and the pth propagation sequence time vector \({{\bf{t}}}_{p}=[{t}_{p,1}\,{t}_{p,2}\ldots {t}_{p,{n}_{E}}]\), as

$${\tau }_{b}=\frac{2{\sum }_{i=1}^{{n}_{E}-1}{\sum }_{j=i+1}^{{n}_{E}}{{\xi }}^{\ast }({E}_{i},{E}_{j},{t}_{p,i},{t}_{p,j})}{{n}_{E}({n}_{E}-1)},$$


$${{\xi }}^{\ast }({E}_{i},{E}_{j},{t}_{p,i},{t}_{p,j})=\{\begin{array}{c}1,\,({E}_{i}-{E}_{j})({t}_{p,i}-{t}_{p,j}) > 0\\ 0,\,({E}_{i}-{E}_{j})({t}_{p,i}-{t}_{p,j})=0\\ -1,\,({E}_{i}-{E}_{j})({t}_{p,i}-{t}_{p,j}) < 0.\end{array}$$

A sequence is rejected if the following condition is not met:

$$|{\tau }_{b}| > \mathrm{0.8.}$$

All as-detected propagation sequences are presented to the user in a list, and the user may view the voltage traces for each propagation sequence in a plot in the main GUI.

Single-sequence propagation velocity

The cross-correlations of the voltage traces for each possible pair of electrodes are calculated and plotted in the main GUI. The plotted cross-correlations \({{\bf{X}}}_{i,j}\) are normalized such that all autocorrelations take a unit value at zero lag, as

$${{\bf{X}}}_{i,j}(\tau )=\frac{{{\bf{V}}}_{p,j}\otimes {{\bf{V}}}_{p,i}(\tau )}{{{\bf{V}}}_{p,i}\otimes {{\bf{V}}}_{p,i}(\tau )}\,{\rm{where}}\,j > i.$$

Here, Vp,i and Vp,j are the voltage traces of the pth propagation sequence on the ith and jth electrodes, respectively; τ is the lag time between the voltage traces; and represents the cross-correlation, which is calculated as a function of τ. Additionally, the condition j > i is defined so that the propagation velocity estimate described below yields positive and negative velocities for anterograde and retrograde propagation, respectively. The time window for this cross-correlation is defined as \({t}_{p,i}\pm W{D}_{i,j}\), where the time window constant W is 7.5 s/m.

A change of variable is also performed for the lag timescale of each cross-correlation so that the cross-correlation is given as a function of the inverse of the velocity, as

$${v}_{\tau }^{-1}=\frac{\tau }{{D}_{i,j}},$$

where vτ is the velocity a wave would have to travel to have a lag time of τ between the ith and jth electrodes separated by a distance of Di,j. On the basis of this change of variable, the cross-correlation time window corresponds to a minimum speed of 0.067 m/s.

The time between spikes being recorded on two different electrodes can be obtained as the lag τpeak at which the cross-correlation of their voltage traces is maximized, as

$${\tau }_{{\rm{peak}}}=\mathop{\arg \,\max }\limits_{\tau }({{\bf{X}}}_{i,j}(\tau )).$$

From this lag time and the distance between the two electrodes, the single-sequence propagation velocity (SPV) is calculated as \({v}_{{\rm{S}}}={D}_{i,j}/{\tau }_{{\rm{peak}}}={v}_{\tau ,{\rm{peak}}}\). The SPV can be obtained for any pair of electrodes or as the average of the SPV estimates for all pairs.

However, it should be noted that the time resolution affects the accuracy of the SPV estimates in a nonlinear way and this is not taken into consideration when the average is computed. That is, when the lag is smaller, as for more closely located electrodes, small errors in the lag produce larger errors in the SPV. Thus, the SPV is less error prone when a more distant pair of electrodes are selected. Additionally, regardless of the inter-electrode distance, an underestimation of the absolute value of the lag produces a larger error than an overestimation of the same magnitude, though the difference between the errors is larger for closer electrodes as a result of the τ−1 dependence. Because of this, the SPV tends to overestimate the propagation velocity, especially when a closer electrode pair or the average of all pairs is selected for the estimation.

The SPV is paired with a confidence index, which indicates the similarity of the spike shapes recorded on the two electrodes. When a single pair is selected for SPV calculation, the confidence index CIS is the peak value of the normalized cross-correlation:

$$C{I}_{{\rm{S}}}=\mathop{\max }\limits_{\tau }({{\bf{X}}}_{i,j}(\tau )).$$

when the average of all pairs is selected, the confidence index is the peak value that is lowest among the electrode pairs.

Kymograph and audio playback

µSpikeHunter also contains two interactive elements for the detection of traveling signals: a kymograph and an audio playback function. The kymograph is an image representation of the voltage signals recorded on each electrode. The voltages are converted to pixel color map intensities and plotted in time–electrode space (see Fig. 1). This representation allows the user to readily visually assess whether there is propagation, determine the direction and speed of propagation, and observe the relative peak voltage magnitudes on each electrode. The user may draw a line on the kymograph to manually calculate the propagation velocity.

The audio playback function assigns a different tonal frequency (note) to each electrode selected for analysis and converts the voltage signals on each electrode to audio intensities. The time dilation for the playback is 500 times to allow the spikes recorded on the different electrodes to be distinguishable by the human ear. With this playback function, traveling waves are detectable as a sequence of ascending or descending frequencies for anterograde or retrograde propagation, respectively.

Together with the detailed quantitative methods, these two functions allow the users to qualitatively detect traveling waves in two different modalities: visual and auditory.

Spike sorting

Spike sorting is performed based on regions of interest (ROIs) drawn by the user for up to four source clusters (clusters 1–4) with a fifth cluster (cluster 0) comprising any spikes not sorted into clusters 1–4. ROIs are drawn on the plot for the electrode selected in the main GUI prior to the spike sorting process; this electrode is hereafter referred to as the “event electrode.” Up to two ROIs can be drawn for each cluster. Spikes are sorted sequentially from cluster 1 to 4 and are removed from the sorting pool once they have been assigned to a source cluster. This means that ROIs drawn for clusters with higher cluster identification numbers (IDs) may be drawn less selectively than for clusters with lower cluster IDs.

Because the plotted events for each electrode are all part of propagation sequences, each event on the event electrode is tied to corresponding events on all other electrodes. Thus, once the spikes are sorted on the event electrode, the spikes are also sorted on all other electrodes in accordance with the propagation sequence to which they belong. The user may then visually confirm that the intra-cluster spike shapes are consistent not only on the event electrode but also on all other electrodes.

Cluster propagation velocity

The cluster propagation velocity (CPV) estimate is based on the timing of the cluster voltage peaks and is calculated as follows. First, for each cluster, the events on each electrode are realigned based on the cross-correlation with every other event on the same electrode and in the same cluster. The time window of this cross-correlation is from 1.0 ms before to 1.0 ms after the time at which the peak voltage value is reached in each event. This realignment is then tied to a meaningful cluster-based feature by determining the time at which the mean of all the spikes in the cluster reaches a peak value, and the realignment times \({t}_{p,i}^{\ast }\) of each of the spikes are defined to correspond to this peak time. An example of this is shown in Fig. S2. Figure S2a shows a plot of 13 events in the same cluster aligned about their minima, and Fig. S2b shows the events realigned about their realignment times \({t}_{p,i}^{\ast }\).

From these realignment times, the CPV of the pth event is calculated as

$${v}_{Cp}=\frac{{t}_{p,j}^{\ast }-{t}_{p,i}^{\ast }}{{D}_{i,j}}\,{\rm{where}}\,j > i.$$

Here, the condition j > i is defined such that anterograde and retrograde propagation yield positive and negative CPVs, respectively. The user may select any pair of electrodes to calculate the CPV; however, errors in the CPV due to the time resolution tend to be larger and more nonlinear for closer electrodes.

As with the SPV, the CPV is also accompanied by a confidence index, which indicates the similarity of the spike shapes recorded on the two selected electrodes i and j with all other spikes on the same electrode in the same cluster. This is represented by

$$C{I}_{Cp}=\,{\rm{\min }}(C{I}_{Cp,i},C{I}_{Cp,j})$$
$$C{I}_{Cp,i}=\frac{1}{{n}_{ev}-1}\sum _{q=1}^{{n}_{ev}}\mathop{\max }\limits_{\tau }[\frac{{{\bf{V}}}_{p,i}\otimes {{\bf{V}}}_{q,i}(\tau )}{{{\bf{V}}}_{p,i}\otimes {{\bf{V}}}_{p,i}(\tau )}]\,{\rm{for}}\,q\ne p,$$

where the cross-correlation is performed over the same time window as stated previously (from 1.0 ms before to 1.0 ms after the peak voltage in each event).

It should be noted that the SPV and CPV estimates of the propagation velocity are fundamentally different in their approaches. Whereas the SPV estimates the lag for a single propagation sequence by matching the spike waveforms detected on two electrodes, the CPV essentially estimates the delay between the peak voltages on two electrodes based on the timing of the peak voltage of a “master spike” representing the cluster. Therefore, when the waveforms are not consistent across all electrodes, the SPV and CPV can yield different results, as the lag that yields the highest cross-correlation for the SPV may not correspond well to the lag between the peak voltages on the two considered electrodes.

Generation of synthetic data for validation

Synthetic data were generated in MATLAB R2016b to validate the propagation sequence detection and propagation velocity estimation capabilities of µSpikeHunter. Synthetic spikes were generated as one phase of a sinusoidal wave with an amplitude of Vpeak = 60 µV and a duration of ts = 1.5 ms. Four synthetic voltage traces \({V}_{i}(i=1,2,3,4)\) were generated with a sampling rate of f = 20 kHz to represent a series of four electrodes with an inter-electrode spacing of 100 µm. The delays between the spikes comprising a propagation sequence were defined to correspond to a propagation velocity of 0.5 m/s. The inter-spike interval was set to 25 ms, and the duration of each recording dataset was defined based on the added noise to yield approximately 40–70 detectable propagation sequences in each dataset.

Signals were generated with different levels of additive noise, and the effect of the noise on the performance of µSpikeHunter was analyzed. The noise added to the signals was defined to have a “memory” equal to the duration of the spikes (1.5 ms). That is, first, for each voltage trace, a vector R of random values drawn from a normal distribution (µ = 0, σ = 1) was generated. Each element of the additive noise vector was then generated by summing the previous s values of the random value vector and normalizing by s, as

$${V}_{{\rm{noise}},i}=\frac{{V}_{{\rm{peak}}}}{SNR}R\otimes k,$$

where s (= fts) is the number of samples spanning a spike, Vnoise,i is the noise signal to be added to the ith voltage trace Vi, SNR is the signal-to-noise ratio (SNR) defined as the ratio of Vpeak to the maximum possible value of Vnoise,i, and k is a one-dimensional convolution kernel of length s where every element is equal to 1/s.

The considered SNRs ranged from 0.2 to 0.7 in intervals of 0.1, and for each SNR, three recording datasets were created. At each SNR, the propagation sequence detection performance and the accuracy of the different propagation velocity estimates were evaluated. The analysis of the synthetic data in µSpikeHunter presented in the validation results below was conducted with a user-input event detection threshold of 2.2 standard deviations. This threshold was selected to yield sufficiently few detected events when a dataset containing only noise on the four simulated electrodes was loaded into µSpikeHunter. Three noise datasets of 100 s were analyzed, and each yielded fewer than 5 events with an average of 1.3 events per dataset.

Data Availability

The µSpikeHunter software is open-source and freely available under the General Public License version 3.0. The software, as well as a detailed user manual and a sample test dataset, is available for download from


  1. Wheeler, B. C. & Nam, Y. In Vitro Microelectrode Array Technology and Neural Recordings. Crit. Rev. Biomed. Eng. 39, 45–61 (2011).

    Article  PubMed  Google Scholar 

  2. Obien, M. E. J., Deligkaris, K., Bullmann, T., Bakkum, D. J. & Frey, U. Revealing neuronal function through microelectrode array recordings. Front. Neurosci. 9, 423 (2015).

    Google Scholar 

  3. Pan, L., Alagapan, S., Franca, E., Brewer, G. J. & Wheeler, B. C. Propagation of action potential activity in a predefined microtunnel neural network. J. Neural Eng. 8, 046031 (2011).

    ADS  Article  PubMed  PubMed Central  Google Scholar 

  4. Kanagasabapathi, T. Dual-compartment neurofluidic system for electrophysiological measurements in physically segregated and functionally connected neuronal cell culture. Front. Neuroeng. 4 (2011).

  5. Moutaux, E., Charlot, B., Genoux, A., Saudou, F. & Cazorla, M. An integrated microfluidic/microelectrode array for the study of activity-dependent intracellular dynamics in neuronal networks. Lab Chip 18, 3425–3435 (2018).

    CAS  Article  PubMed  Google Scholar 

  6. Forró, C. et al. Modular microstructure design to build neuronal networks of defined functional connectivity. Biosens. Bioelectron. 122, 75–87 (2018).

    Article  PubMed  Google Scholar 

  7. FitzGerald, J. J., Lacour, S. P., McMahon, S. B. & Fawcett, J. W. Microchannels as axonal amplifiers. IEEE Trans. Biomed. Eng. 55, 1136–1146 (2008).

    Article  PubMed  Google Scholar 

  8. Pan, L. et al. An in vitro method to manipulate the direction and functional strength between neural populations. Front. Neural Circuits 9, 1–14 (2015).

    CAS  Article  Google Scholar 

  9. Kanagasabapathi, T. T. et al. Functional connectivity and dynamics of cortical-thalamic networks co-cultured in a dual compartment device. J. Neural Eng. 9 (2012).

  10. Berdichevsky, Y., Staley, K. J. & Yarmush, M. L. Building and manipulating neural pathways with microfluidics. Lab Chip 10, 999–1004 (2010).

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  11. Lewandowska, M. K., Bakkum, D. J., Rompani, S. B. & Hierlemann, A. Recording large extracellular spikes in microchannels along many axonal sites from individual neurons. PLoS One 10, 1–24 (2015).

    Google Scholar 

  12. Poli, D., Wheeler, B. C., Demarse, T. B. & Brewer, G. J. Pattern separation and completion of distinct axonal inputs transmitted via micro-tunnels between co-cultured hippocampal dentate, CA3, CA1 and entorhinal cortex networks. J. Neural Eng. 15 (2018).

  13. Habibey, R. et al. A multielectrode array microchannel platform reveals both transient and slow changes in axonal conduction velocity. Sci. Rep. 7, 1–14 (2017).

    CAS  Article  Google Scholar 

  14. Hong, N., Joo, S. & Nam, Y. Characterization of axonal spikes in cultured neuronal networks using microelectrode arrays and microchannel devices. IEEE Trans. Biomed. Eng. 64, 492–498 (2017).

    Article  PubMed  Google Scholar 

  15. Dworak, B. J. & Wheeler, B. C. Novel MEA platform with PDMS microtunnels enables the detection of action potential propagation from isolated axons in culture. Lab Chip 9, 404–410 (2009).

    CAS  Article  PubMed  Google Scholar 

  16. Biffi, E. et al. A microfluidic platform for controlled biochemical stimulation of twin neuronal networks. Biomicrofluidics 6, 1–10 (2012).

    Article  Google Scholar 

  17. Park, J., Koito, H., Li, J. & Han, A. Multi-compartment neuron–glia co-culture platform for localized CNS axon–glia interaction study. Lab Chip 12, 3296 (2012).

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  18. Kerman, B. E. et al. In vitro myelin formation using embryonic stem cells. Development 142, 2213–2225 (2015).

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  19. Yang, I. H. et al. Axon myelination and electrical stimulation in a microfluidic, compartmentalized cell culture platform. NeuroMolecular Med. 14, 112–118 (2012).

    CAS  Article  PubMed  Google Scholar 

  20. Neto, E. et al. Sensory neurons and osteoblasts: close partners in a microfluidic platform. 6, 586–595 (2014).

    CAS  Google Scholar 

  21. Pagella, P., Neto, E., Jiménez-Rojo, L., Lamghari, M. & Mitsiadis, T. A. Microfluidics co-culture systems for studying tooth innervation. Front. Physiol. 5(AUG), 1–8 (2014).

    Google Scholar 

  22. Southam, K. A., King, A. E., Blizzard, C. A., McCormack, G. H. & Dickson, T. C. Microfluidic primary culture model of the lower motor neuron-neuromuscular junction circuit. J. Neurosci. Methods 218, 164–169 (2013).

    Article  PubMed  Google Scholar 

  23. Zahavi, E. E. et al. A compartmentalized microfluidic neuromuscular co-culture system reveals spatial aspects of GDNF functions. J. Cell Sci. 128, 1241–1252 (2015).

    CAS  Article  PubMed  PubMed Central  Google Scholar 

  24. Lopes, C. D. F., Mateus, J. C. & Aguiar, P. Interfacing Microfluidics with Microelectrode Arrays for Studying Neuronal Communication and Axonal Signal Propagation. J. Vis. Exp. (2018).

  25. Bridges, D. C., Tovar, K. R., Wu, B., Hansma, P. K. & Kosik, K. S. MEA Viewer: A high-performance interactive application for visualizing electrophysiological data. PLoS One 13 (2018).

  26. Yger, P. et al. A spike sorting toolbox for up to thousands of electrodes validated with ground truth recordings in vitro and in vivo. Elife 7 (2018).

  27. Gelfman, S. et al. meaRtools: An R package for the analysis of neuronal networks recorded on microelectrode arrays. PLoS Comput. Biol. 14 (2018).

  28. Bakkum, D. J. et al. Tracking axonal action potential propagation on a high-density microelectrode array across hundreds of sites. Nat. Commun. 4 (2013).

  29. Gribi, S., du Bois de Dunilac, S., Ghezzi, D. & Lacour, S. P. A microfabricated nerve-on-a-chip platform for rapid assessment of neural conduction in explanted peripheral nerve fibers. Nat. Commun. 9 (2018).

Download references


This work was partially financed by FEDER - Fundo Europeu de Desenvolvimento Regional funds through the COMPETE 2020 - Operacional Programme for Competitiveness and Internationalisation (POCI), Portugal 2020, and by Portuguese funds through FCT - Fundação para a Ciência e a Tecnologia/Ministério da Ciência, Tecnologia e Ensino Superior in the framework of the project PTDC/EMD-EMD/31540/2017 (POCI-01-0145-FEDER-031540). Paulo Aguiar was supported by Programa Ciência – Programa Operacional Potencial Humano (POPH) – Promotion of Scientific Employment, ESF. José C Mateus was supported by FCT (PD/BD/135491/2018). The microfluidic chambers used in this study were fabricated at INESC - Microsystems and Nanotechnologies, Portugal, under the supervision of João Pedro Conde and Virginia Chu.

Author information

Authors and Affiliations



P.A. devised the project and main conceptual ideas. K.H. and P.A. developed the algorithms, analyzed the data, and wrote the main manuscript text. K.H. implemented the code in MATLAB. J.M., C.L. and E.N. carried out the neuronal culture experiments. M.L. was responsible for the co-culture application ideas. All authors discussed the results and contributed to the final manuscript.

Corresponding author

Correspondence to Paulo Aguiar.

Ethics declarations

Competing Interests

The authors declare no competing interests.

Additional information

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Heiney, K., Mateus, J.C., Lopes, C.D.F. et al. µSpikeHunter: An advanced computational tool for the analysis of neuronal communication and action potential propagation in microfluidic platforms. Sci Rep 9, 5777 (2019).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI:


By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.


Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing