Skip to main content
PLOS ONE logoLink to PLOS ONE
. 2022 May 26;17(5):e0266647. doi: 10.1371/journal.pone.0266647

Cardio PyMEA: A user-friendly, open-source Python application for cardiomyocyte microelectrode array analysis

Christopher S Dunham 1,*, Madelynn E Mackenzie 2, Haruko Nakano 3, Alexis R Kim 1, Atsushi Nakano 3,4,5,6,7, Adam Z Stieg 8,9,*, James K Gimzewski 1,8,9,*
Editor: Rafael Sachetto Oliveira10
PMCID: PMC9135279  PMID: 35617323

Abstract

Open source analytical software for the analysis of electrophysiological cardiomyocyte data offers a variety of new functionalities to complement closed-source, proprietary tools. Here, we present the Cardio PyMEA application, a free, modifiable, and open source program for the analysis of microelectrode array (MEA) data obtained from cardiomyocyte cultures. Major software capabilities include: beat detection; pacemaker origin estimation; beat amplitude and interval; local activation time, upstroke velocity, and conduction velocity; analysis of cardiomyocyte property-distance relationships; and robust power law analysis of pacemaker spatiotemporal instability. Cardio PyMEA was written entirely in Python 3 to provide an accessible, integrated workflow that possesses a user-friendly graphical user interface (GUI) written in PyQt5 to allow for performant, cross-platform utilization. This application makes use of object-oriented programming (OOP) principles to facilitate the relatively straightforward incorporation of custom functionalities, e.g. power law analysis, that suit the needs of the user. Cardio PyMEA is available as an open source application under the terms of the GNU General Public License (GPL). The source code for Cardio PyMEA can be downloaded from Github at the following repository: https://github.com/csdunhamUC/cardio_pymea.

Introduction

Cardiomyocyte cell cultures, particularly human embryonic and induced pluripotent stem cell-derived cardiomyocytes (hESC-CM and hiPSC-CM, respectively), are of significant interest for their potential to serve as model systems for studying a wide range of phenomena [1, 2]. Potential applications of hESC-CMs and hiPSC-CMs in scientific and industrial environments include: pharmacological drug screening, disease modeling, cardiac development and maturation, and regenerative medicine [311]. However, the utility of these cultures is often limited by their immature nature [12]. Currently, insufficient knowledge exists to enable these cells to fully achieve adult phenotype maturity in vitro [8, 10, 13]. This maturity deficiency limits our capacity to study disease states, including cardiomyopathy and late myocardial dysfunction, which may be linked to defective cardiomyocyte development in humans [9, 1416]. The inability to induce maturation of stem cell-derived cardiomyocytes beyond the late fetal stage imposes limitations to their applications to disease modeling, drug screening, and regenerative medicine initiatives [4, 710].

In recent years, microelectrode arrays (MEAs) became a popular tool for use in the study of cardiomyocyte cultures [13, 17, 18]. Microelectrode arrays enable spatiotemporal analysis of cardiomyocyte field potentials, which are extracellular electrical potentials generated by the cells in the culture. Microelectrode arrays also confer the ability to perform controlled stimulation and pacing experiments of cardiomyocyte cultures using a variety of input waveforms [19, 20]. Concurrent with the increase in MEA-oriented cardiomyocyte analysis was the academic development of purpose-built MEA software with graphical user interfaces (GUIs) [17, 18, 21, 22]. These software applications enabled a wider audience to analyze electrophysiological cardiomyocyte data with open-access tools offering enhanced functionality beyond that offered by proprietary software released by the MEA system manufacturers. Each program offers a unique feature that provides value to electrophysiological cardiomyocyte analysis, e.g. new methods for determining the T-wave endpoints and for calculating conduction velocity.

Although powerful and incredibly helpful for cardiomyocyte analysis, there is one significant hurdle that merits consideration. Most, if not all, previously released open source cardiomyocyte analysis tools were written in MATLAB, a licensed programming language developed by MathWorks (Natick, MA) for engineers and scientists [23]. Despite its relative maturity, MATLAB’s licensing can impose both financial barriers and accessibility constraints on continued application development. Such costs and constraints can pose significant challenges to research communities [24]. The Python programming language overcomes these hindrances thanks to its free and open source nature. Thus, the financial barrier inherent to developing MATLAB-based cardiomyocyte tools can be overcome by developing Python-based tools instead. This perspective motivated the development of a new MEA analysis application: Cardio PyMEA.

Cardio PyMEA is a free and open source software application (FOSS) written in Python for the analysis of MEA recordings of cardiomyocyte cell cultures. It was designed with a user-friendly GUI to allow scientific programmers and non-programmers alike to engage in robust electrophysiological analysis of MEA data. Because Cardio PyMEA allows the end user to readily adjust analysis parameters, the software is capable of analyzing noisy data sets that demonstrate incompatibility with automated algorithms and applications. In addition to calculating common cardiomyocyte parameters (e.g. pacemaker origin, local activation time, conduction velocity, etc.), Cardio PyMEA offers unique features such as property-distance relationship analysis and power law analysis. The latter is particularly useful for its applications in understanding cardiomyocyte culture system dynamics [25].

Unlike most commercial systems, which are fixed in capabilities, Cardio PyMEA was developed to facilitate relatively easy extensibility thanks to its utilization of object oriented programming principles. This makes the addition of new GUI elements (e.g. additional plotting windows) and new calculations (e.g. machine learning techniques) comparatively straightforward to achieve. Here, Cardio PyMEA is presented using real data acquired from MEA recordings of hESC-CM and hIPSC-CM cell cultures to demonstrate its utility in cardiomyocyte characterization and analysis, and its potential for continued development.

Materials and methods

Cell cultures and microelectrode array measurements

Human ESCs were grown and differentiated in a chemically defined condition as previously described [13, 26, 27]. Usage of all human embryonic stem cell lines is approved by the UCLA Embryonic Stem Cell Research Oversight (ESCRO) Committee and the Institutional Review Boards (IRB) (approval #2009-006-04). After differentiation, cardiomyocytes were plated as two-dimensional monolayers on matrigel-coated (Corning #354277), commercially available microelectrode arrays (MEAs) containing 120 integrated TiN electrodes. These electrodes were 30 μm in diameter and were manufactured with an interelectrode spacing of 200 μm (Multichannel Systems, Reutlingen, Germany). Following plating, the MEAs were placed in an incubator set to 37°C with a gas flow of 5% CO2. The cell cultures were given no less than 24 hours to ensure the cardiomyocytes adhered well to each MEA.

Software requirements

Cardio PyMEA is written for Python 3.8 or above and utilizes several freely available, actively maintained Python libraries. These libraries include NumPy, SciPy, Pandas, Matplotlib, Seaborn, and Numba, among others. The GUI was constructed using PyQt5. The complete source code and the dependency (pip) requirements file (“requirements.txt”) for Cardio PyMEA are available on Github at the following link: https://github.com/csdunhamUC/cardio_pymea.

Using Cardio PyMEA

The preferred way to launch Cardio PyMEA is through the terminal of your chosen operating system. The central file used to run and operate Cardio PyMEA is ‘analysisGUI.py’. This file contains the code for the various graphical windows, import function, MEA dictionary, and other functions. Alternatively, for users less inclined toward operating Cardio PyMEA from a terminal, executable files (made using PyInstaller) for Linux, MacOS, and Windows 10 can be accessed from the DataDryad repository.

The main window of Cardio PyMEA, shown in Fig 1, consists of a traditional menu navigation system anchored around the central plotting window that, after calculations, will display heatmaps of the time lag (pacemaker), local activation time (LAT), upstroke velocity (dV/dt), and conduction velocity (CV). To import MEA data, the user can click on ‘File’ → ‘Import Data’ and select an appropriate MC_Data-derived *.txt file. The expected format of MEA data is discussed in the next section. Once the data is imported, the user can run the beat detection by selecting ‘Calculations’ → ‘Find Beats’, choosing whether to apply any smoothing filters, and then clicking the button to execute. After this step, the user can choose among the various calculations of interest, including ‘All’ to perform the calculations for pacemaker, LAT, maximal upstroke velocity (dV/dtmax), CV, beat amplitude, and beat interval properties. This workflow is summarized by the flowchart in Fig 2.

Fig 1. Main window of Cardio PyMEA graphical user interface.

Fig 1

All of the user’s interactions with Cardio PyMEA stem from this window. The user can utilize the various drop-down menu options to import data, perform calculations, and perform statistical analysis.

Fig 2. Operational flowchart for using Cardio PyMEA.

Fig 2

This flowchart illustrates how Cardio PyMEA can be operated in order to analyze cardiomyocyte MEA data.

Input data format and geometric configuration of MEAs

Cardio PyMEA was designed to utilize data obtained from Multichannel Systems’ MC_Rack MEA recording software and the MC_Data conversion tool. The *.mcd files produced by MC_Rack must be converted to ASCII (*.txt) files using MC_Data. Cardio PyMEA expects that the resulting *.txt file should be organized column-wise, beginning with the time, t, in milliseconds (or fractions of milliseconds for sample frequencies > 1 KHz), followed by electrode names with their measured voltages (in microvolts, μV). For example, when using a 120 electrode MEA recording with a sample frequency of 1000 Hz, the first column of the *.txt data file is expected to correspond to the time, t, in milliseconds. The second column is expected to correspond to the electrode F7. This electrode is designated as channel 1 (electrode 1) in the manufacturer’s MEA channel schematic. Each subsequent electrode is expected to adhere to this schematic. As a result, Cardio PyMEA expects that the *.mcd to *.txt conversion proceeds with ‘All’ electrodes selected in the conversion wizard window.

Cardio PyMEA’s design allows for the relatively easy expansion of other MEA geometries due to its object-oriented nature. The ElectrodeConfig class (a template for creating an object; in this case, an electrode configuration variable) houses information for the MEA configurations that a researcher may choose to employ. Currently, Cardio PyMEA recognizes both 60 and 120 electrode MEAs from Multichannel Systems with 30 μm diameters and 200 μm interelectrode spacings. Other configurations can be added in a straightforward manner by creating new class attributes (a variable that belongs to the class) for the other systems in the ElectrodeConfig class. Additionally, a tutorial for supplementing Cardio PyMEA with additional MEA geometries is provided in S1 File.

All MEA data used in Cardio PyMEA requires geometric coordinates and labeling for the electrodes in the array. The schematic used in Cardio PyMEA arbitrarily positions the coordinate map origin (i.e. the coordinate (0, 0)) in the top-left corner of the array. A schematic illustrating the expected geometries is shown in Fig 3. Electrode coordinates are assigned manually to each electrode and are housed in a Python dictionary for each respective MEA configuration (i.e. each ElectrodeConfig attribute).

Fig 3. Representative schematic of the geometric configuration used for a 120 electrode MEA.

Fig 3

This coordinate system shown here was devised using an interelectrode spacing of 200 μm and electrode diameter of 30 μm.

Cardio PyMEA calculation methods and functions

One of the strengths of Cardio PyMEA is that it houses a wide variety of calculations used in the analysis of cardiomyocyte MEA data. These functions and calculations include: automated electrode exclusion algorithm, manual electrode silencing, pacemaker, LAT, dV/dtmax, CV, field potential duration (FPD), beat amplitude, beat interval, and pacemaker translocations (instances in which the spatial configuration of the pacemaker region becomes unstable and translocates, or moves, to another area of the MEA over time) [25]. A complete description and representative example of each calculation output follows.

Beat detection

Cardiomyocyte beats, identified in MEAs as the most prominent peak of the field potential, are calculated by Cardio PyMEA using the findpeaks function contained in the SciPy library. First, users enter their designed peak height (minimum signal amplitude, in microvolts) and peak distance (minimum separation between peaks, in milliseconds) into the appropriate fields in the GUI. Alternatively, users may proceed using the default parameters. Next, beat detection can be performed by selecting ‘Calculations’ from Cardio PyMEA’s menu bar and choosing ‘Find Beats’. This action opens the ‘Find Beats Results’ window, shown in Fig 4. The user can next choose whether to filter the signal using low-pass, high-pass, or bandpass Butterworth filters, or use the raw (unfiltered) signal. Finally, the user clicks the ‘Find Beats’ button, which begins the calculation using the given parameters. Two plots are subsequently generated to show the MEA’s signal trace of voltage (μV) vs time (ms). The left-side plot shows a single beat for a single electrode. This view can be adjusted by using sliders marked with ‘Beat’ and ‘Electrode’, respectively. The right-side plot shows a condensed view of field potentials for all electrodes at the selected beat. These plots can be further manipulated using the provided navigation toolbar. Finally, these plots can be saved as *.png files by clicking the ‘Save’ (disk) icon in the navigation toolbar.

Fig 4. ‘Find Beats Results’ window.

Fig 4

The left plot shows an individual beat for the electrode specified by the window slider. The sliders below the plot control which beat and/or electrode is plotted. The right plot shows the full MEA for a specified beat and is controlled by the same ‘Beat’ slider as the left plot.

Automated electrode exclusion

Electrodes with an atypical beat count, as measured in comparison to other electrodes, may negatively affect the calculations performed by Cardio PyMEA (e.g. by producing vectors and matrices of different dimensions, requiring interpolation or other data pre-processing to resolve). To rectify this, Cardio PyMEA utilizes an automated electrode exclusion process. After determining the number of beats in a data set using the beat detection algorithm described previously, Cardio PyMEA calculates the beat count mode across the data set for each electrode. Following this calculation, Cardio PyMEA automatically excludes those electrodes whose beat counts vary from the beat count mode.

Manual electrode silencing

It is possible for electrodes to pass the automated electrode exclusion process yet still exhibit unusual signal characteristics, e.g. inverted field potential peaks. These problematic electrodes can be seen qualitatively in either the ‘Find Beats Results’ plots or in property heatmaps, where they contradict the behavior of their neighbors during certain beats. Electrodes demonstrating atypical or erratic behavior (e.g. abnormally high time lag values) can be manually silenced by selecting the check-box labeled ‘Silence Electrodes’ in the top right corner of the main window. Once checked, the user can choose which electrode(s) to silence from the drop-down menu. After choosing which electrodes to silence, ‘Find Beats’ must be executed again to complete the exclusion. Once this operation is performed, data from the manually excluded electrodes will no longer be included for analysis. Electrode exclusion can be reversed by simply de-selecting the silenced electrode(s) and executing ‘Find Beats’ again.

Time lag (pacemaker) calculation and origin estimation

For each electrode in the MEA, Cardio PyMEA records the time at which the field potential peak of an individual beat is detected. Cardio PyMEA then compares these values to determine the point of origin of the pacemaker signal. The lowest time value (i.e. earliest electrode to detect a signal during a beat) is determined to correspond to the pacemaker region. To normalize the data, Cardio PyMEA subtracts the field potential peak time recorded across all other electrodes from the earliest time recorded at the pacemaker, as shown in Fig 5A. This means that the pacemaker electrode is the one with the lowest time lag value, and in the normalized data, corresponds to the electrode with a time lag value of 0 ms. This method is repeated for each beat and yields the time lag (pacemaker) value: the time elapsed between the earliest signal detected and the time signal is detected at another electrode in the array. Cardio PyMEA uses the normalized time lags to render a color-coded heat map which is spatially defined by the geometry of the MEA. Electrodes colored dark blue indicate the location of the pacemaker (minimum time lag), while dark red indicates electrodes with the highest time lag farthest from the pacemaker (maximum time lag).

Fig 5. Diagram of cardiomyocyte field potential property calculations.

Fig 5

A) Time lag (tlag, pacemaker) calculation. The field potential peak for each electrode is calculated, then the peak with the minimum time is normalized to 0 ms. This process is applied to all electrodes to yield normalized time lag values for the given beat. B) Amplitude (gray vertical line), dV/dtmax, and LAT can be calculated from the field potential signal. Black arrows indicate derivative calculations along points prior to or after the field potential peak (red x). The maximum positive (dV/dtmax, magenta circle) and negative (LAT, orange circle) derivatives are identified and used in calculating dV/dtmax and LAT, respectively. C) Beat intervals are calculated by determining the time between field potential peaks.

To access this operation, select ‘Calculations’ → ‘Pacemaker’ from the main window menu bar. A new window will open that displays the pacemaker heat map for the first beat detected in the data set. The x and y axes provide the 2D coordinates of each electrode. The slider at the bottom of the window is used to toggle between heat maps for all beats detected in the given data set.

The coordinates of the pacemaker origin can also be estimated by Cardio PyMEA. First, the estimation employs a contour plot to determine the wave front of the pacemaker data. The process is designed to favor the contour line that contains the most data points for model fitting. Next, Cardio PyMEA uses nonlinear least squares to estimate the coordinates of the center (h, k) and the radius (r) for a circle defined by the equation

r=(xh)2+(yk)2

The radius parameter, r, is bound within the geometry of the MEA during the fitting process. This measure is taken to ensure that the center of the circle, (h, k), does not reside outside of the culture region of the MEA. Ultimately, the calculated coordinate (h, k) represents the estimated location of the pacemaker origin.

To access this operation, select ‘Other Plots’ → ‘Estimated Pacemaker Origin’ from the main window menu bar. A new window will open that depicts a contour map. This contour map indicates the estimated origin of the pacemaker for a single beat. The slider at the bottom of the window can be used to change which beat is displayed. The orange dot at the center of the rendered circle denotes the estimated origin of the pacemaker signal, while the blue dots at the edge of the circle represent the values from the wave front that were used during fitting.

Local activation time calculation

The LAT is calculated by finding the maximal negative intrinsicoid deflection (the maximum negative derivative (-dV/dt) to the right of the field potential peak in a given beat). For every electrode, Cardio PyMEA calculates the derivative (slope) of the field potential signal, beginning from the peak and moving to the right, for each beat in the data set, as shown in Fig 5B. The time (x) associated with the maximum negative derivative represents the LAT. These calculated LAT values are normalized in a similar manner to the time lag values for the pacemaker calculations. Using the calculated LATs, Cardio PyMEA renders a heatmap for qualitative data analysis.

To access this operation, select ‘Calculations’ → ‘Local Activation Time’ from the main window menu bar. A new window will open that displays the LAT heatmap. This heat map uses a color scheme that is identical to the pacemaker heat map: dark blue indicates the minimum, normalized LAT, while dark red indicates the maximum, normalized LAT in the full recording. The x and y coordinates represent the position of the specified electrode in the MEA system. The slider at the bottom of the window can be used to change which beat is displayed.

Maximum upstroke velocity calculation

The maximum upstroke velocity (dV/dtmax) refers to the maximum slope to the left of the field potential peak, as shown in Fig 5B. Cardio PyMEA calculates the derivative, using a backward finite difference method, of the time series data to the left of the field potential peak (i.e. preceding the peak) for each electrode and each beat. Finally, Cardio PyMEA normalizes the heatmap color gradient to the observed global minimum and maximum dV/dtmax values.

To access this operation, select ‘Calculations’ → ‘Upstroke Velocity’ from the main window menu bar. A new window will open that displays a heat map for the dV/dtmax data of each electrode for the specified beat. The legend to the right describes the color coding: dark blue corresponds to the observed minimum, while dark red corresponds to the observed maximum. The slider along the bottom enables users to toggle between data for each individual beat.

Beat amplitude and beat interval calculations

Beat amplitude refers to the voltage magnitude of the primary peak (R-wave-like peak) of the field potential for a detected beat. Because these potentials encompass both positive and negative peaks, the beat amplitude calculation in Cardio PyMEA identifies both the positive and negative field potential signals at the location of the R-wave-like peak when determining the overall magnitude of the beat [19]. This is indicated in Fig 5B. The beat interval is calculated by identifying the time that Beat A occurred and subtracting that value from the time that Beat B occurred. This difference reflects the interval between the beats and is shown in Fig 5C. Beat intervals are calculated this way for all beats in the recording. Cardio PyMEA uses data from the LAT calculation to compute these differences and generate beat intervals.

Conduction velocity calculation

Conduction velocity is defined as the speed and direction of the propagation of an electrochemical signal or impulse along a pathway in a network of cells. Conduction velocity is calculated in a straightforward manner by determining the distance between any two electrodes and dividing this distance by the change in local activation time (ΔLAT) recorded at the electrodes, i.e.: (electrode distance)/ΔLAT. This is Cardio PyMEA’s default CV calculation method for 2 reasons: 1) it is a simple, computationally efficient calculation and 2) the precise geometry of the MEAs provides a uniform map that ensures consistent, reasonable results across cultures. This method is similar to one used in a previous study [13].

Field potential duration calculation

Cardio PyMEA uses previously described methods to calculate the FPD [28]. Here, the R-wave is analogous to the field potential peak and the T-wave endpoint is determined using the method from Vázquez-Seisdedos et al. [28]. A brief summary of this method follows. First, the T-wave is identified using a peak finding algorithm akin to the R-wave. Second, the maximum first derivative of the field potential signal between the T-wave peak and baseline is identified. Using the location (i.e. time or x-value) of the maximum derivative as a fixed point, along with an arbitrary location 50–200 ms past the T-wave peak, the algorithm fits a trapezoid with a mobile point to the two fixed points. Optimizing the maximum area of the trapezoid yields the T-wave endpoint [28]. The length of time (in milliseconds) between the R-wave and T-wave endpoint constitutes the FPD. In addition to calculating the FPD, Cardio PyMEA will generate a plot that can be cycled through each beat and each electrode using the slider at the bottom of the window. This window also facilitates visual confirmation of the T-wave endpoint in the user’s data.

Pacemaker translocation detection algorithm

Pacemaker translocations were identified through monitoring the movement of the pacemaker region across subsequent beats. Provided that this movement (translocation) exceeds a distance threshold (500 μm), a timer is engaged to count the number of beats, along with the time interval, that the pacemaker region is stable in the new location. This period of stability is referred to as a “quiescent period” (i.e. the pacemaker is stable, or tranquil, and does not move during this time). If the location of the pacemaker region changes again in a manner that exceeds the distance threshold, the timer is stopped, the quiescent period (in beats and recording time) is stored in a list, and the timer is reset for the new position. The process repeats for each detected pacemaker region of each beat over the full MEA recording. Once the calculation concludes, the first recorded quiescent period is excluded from the list. This is done to remove potential artifacts induced by the uncertainty surrounding the true duration of the quiescent period of the pacemaker region. Similarly, the end of the recording does not contribute to a translocation (“event”) designation or quiescent period. The algorithm was verified manually through visual inspection and computationally in Python in order to ensure agreement of results.

Statistical analyses unique to Cardio PyMEA

Statistical analysis of cardiomyocyte culture data can take a variety of forms. Cardio PyMEA output data can be saved as a spreadsheet file (*.xlsx format) via the save data function (described in an upcoming section) for further analysis by the user. Additionally, Cardio PyMEA provides two types of statistical assessment that are unique to the software in the realm of cardiomyocyte analysis: 1) analysis of property-distance relationships and 2) analysis of power law behavior in pacemaker translocations.

Property-distance relationship analysis

Property-distance relationships (also referred to here as ‘Property vs Distance’) can be evaluated to assess whether pacemaker time lag, LAT, upstroke velocity, and/or CV exhibit correlations with the distance from the estimated pacemaker origin. The user can perform a simple elimination of outliers by designating a number of standard deviations (‘Sigma’) from the mean. Any values outside of the range specified by the (number of standard deviations * Sigma) operation are excluded from the analysis.

To access this operation, select ‘Statistics’ → ‘Property vs Distance’. Using this function, plots for each property versus distance from the pacemaker region are produced. Either linear (pacemaker, LAT, dV/dtmax) or nonlinear (CV) regression is applied to obtain a goodness-of-fit metric, R2. The top 10 R2 values for each property, and their associated beats, are shown in a text box on the right side of the window.

Power law analysis and distribution comparisons

Power laws are heavy-tailed probability distributions of the form P(X) ∝ x. Demonstration of power law relationships between measurable properties in the system of interest, along with the calculated value of the power law exponent, ɑ, can provide unique information regarding the underlying properties of a complex system. These properties may include scale-free dynamics, fractal geometries, and long-range spatiotemporal correlations, among others [2931]. The analysis of power laws is particularly important in the study of cardiac systems because power law exponents could also provide diagnostic value. Previous studies in patients with myocardial infarction, coronary heart disease, and heart transplants showed that the value of ɑ measured for heart rate variability (small variations in the beat interval between heart beats) differed significantly from healthy patients [3236]. Therefore, analysis of power laws in cardiomyocyte cultures could provide unique and invaluable insight into the underlying culture conditions and system dynamics.

Power law analysis in Cardio PyMEA relies upon several functions contained within the powerlaw Python library [37]. Cardio PyMEA uses the distribution_compare method from powerlaw (with the normalized_ratio parameter set to True) to compare how well a given data set adheres to other, similarly heavy-tailed, probability distributions [37]. This method calculates the log-likelihood ratios (LLRs) and p-values in order to compare distributions and determine the significance of the results. If the LLR is positive, then the first distribution (power law) is the best fit; if the LLR is negative, then the second distribution tested is a better fit. This allows users to determine if the data robustly demonstrate power law behavior, or if another, similarly heavy-tailed distribution serves as a superior descriptor of the data.

Cardio PyMEA also provides a qualitative assessment of the data, rendering a histogram superimposed with probability distribution curves fit to the entered data (default: power law, log-normal, stretched exponential). The user can specify the number of bins used in the histogram or rely upon automated methods (e.g. Sturges’ Rule) to determine the number of bins for them [38]. To access these functions, users first must detect any translocations in the data set using ‘Tools’ → ‘Detect Translocations’ and then select ‘Statistics’ → ‘Power Law Distribution Comparison’ from the menu bar. Subsequently, a new window will open that displays qualitative plots and quantitative evaluations for power law, exponential, log-normal, Weibull, and doubly truncated power law probability distributions.

Saving data

Cardio PyMEA allows the user to save their processed data for each calculated parameter set. These data include values for: pacemaker, LAT, dV/dtmax, CV, beat amplitude, beat interval, and property vs distance statistics. The save function writes the data to a single, multi-tab spreadsheet (*.xlsx) file. The file can be opened in FOSS spreadsheet software, e.g. LibreOffice Calc, or through licensed software, e.g. Microsoft Excel. To access this operation, select ‘File’ → ‘Save Processed Data’ from the main window’s menu bar. The file name can be inputted and saved to the user’s chosen directory. An example save file is provided in S2 File.

Batch analysis

Cardio PyMEA affords batch processing of pacemaker translocation data to simplify power law analysis for large numbers of MEA recordings. The user simply needs to add their file information to the batch file spreadsheet (included in the repository). Once the batch file is ready, the user will navigate to ‘File’ → ‘Batch’ and select their spreadsheet (*.xlsx) batch file. At that point, Cardio PyMEA will detect and compile pacemaker translocations for all files in the batch. Power law analysis can then be performed using the batched data, which Cardio PyMEA will recognize and require no additional work on the part of the user. An example batch file is also provided in S3 File.

Results and discussion

Cardio PyMEA grants users flexibility via parameter control during cardiomyocyte analysis

Cardio PyMEA was tested using 30 MEA recordings across 3 distinct differentiations. Cardiomyocytes demonstrated good adhesion to the MEAs (Fig 6A and 6B). The beat detection algorithm was successful in identifying beats from the field potential signals without the need for signal filtering (Fig 6C). The beat detection algorithm was validated manually for each MEA and performed well under varying levels of noise, as shown in Fig 6D–6F. Faulty electrodes, whether due to cell culture conditions (e.g. non-uniform spread of the culture), heterogeneous Matrigel application causing depressed local signal detection, or electrode degradation as a result of prolonged MEA usage, were excluded by the automated electrode exclusion algorithm. The excluded electrodes were deemed appropriate upon manual review, thus validating the algorithmic choices. The remaining electrodes demonstrated sufficient signal for all subsequent analyses. Successful cultures typically had only a few electrodes excluded from the analysis. The average beat rate (beats per minute, bpm) across all datasets was 36.64 bpm with a standard deviation of 14.48 bpm.

Fig 6. Beat detection results for an MEA-plated cardiomyocyte culture.

Fig 6

An individual 120 electrode MEA (A) was plated with cardiomyocytes (B). Field potentials were recorded (C) and analyzed to determine the R-wave-like peak, beat amplitude, T-wave endpoint, and other features. These field potentials showed varying levels of noise, ranging from clean (D) to moderately (E) or significantly (F) noisy, as indicated by the decreasing signal-to-noise (S/N) ratios. Beat detection was performed for all field potentials across all MEAs.

Cardio PyMEA demonstrated effective performance under noisy conditions thanks to its utilization of user-provided parameter inputs. User-defined thresholds of beat amplitude and distance provide flexibility in analyzing noisy datasets, even under low signal-to-noise (S/N) conditions (Fig 6E and 6F). Successful beat detection enables the analysis of a variety of cardiomyocyte culture properties, including: pacemaker time lag, LAT, upstroke velocity, CV, FPD, and beat amplitude and interval. Local activation time, which is associated with the time of maximum sodium conductance in the myocardium, is a requisite property for analyzing cardiac conduction velocity and serves as another metric for assessing pacemaker activity. The maximum decrease in field potential voltage is generally accepted as the activation time for a beat [39]. Maximum upstroke velocity is associated with the peak influx of sodium and calcium ions during the action potential and presents another property useful for evaluating cardiomyocyte maturity [40]. Finally, beat amplitude and interval are widely known to serve as indicators of cardiomyocyte maturity.

Cardio PyMEA provides effective calculation and estimation of pacemaker regions in 2D cardiomyocyte cultures

Cardio PyMEA successfully generated per-beat, spatial heatmaps of time lag (pacemaker) activity across the MEA culture, as shown in Fig 7A–7C. Pacemaker heatmaps were evaluated across dozens of beats and multiple MEAs. Subsequent analysis of the time lag wave front propagation using the pacemaker origin estimation tool revealed the most likely signal origin for the given data (Fig 7D–7F). Identification of the pacemaker region in the culture could have practical implications for MEA stimulation experiments, e.g. by providing information regarding which electrode(s) to use for stimulation of a spatially-constrained system [41]. These results demonstrate Cardio PyMEA’s ability to produce spatially defined heatmaps of pacemaker activity and determine a logical point-of-origin for the active pacemaker region within the culture.

Fig 7. Pacemaker analysis output.

Fig 7

A-C: representative pacemaker heatmap, spatially defined by the MEA coordinate system. D-F: estimated pacemaker location for the given data based on the time lag propagation wavefront. The estimated origin is indicated by an orange dot.

Cardio PyMEA provides unique statistical tools for assessing cardiomyocyte maturation

During natural heart formation in the early embryo, all cardiomyocytes develop autonomic contraction and possess pacemaker characteristics. During the mid-gestational stages, working myocardium diversifies and acquires characteristic phenotypes including decreased automaticity, higher CV, and higher contractility [42]. If the stem cell-derived cardiogenesis recapitulates embryonic heart formation, one could hypothesize that cells distant from the pacemaking cells on an MEA present an increase in CV and field potential magnitude. To investigate this possible distance dependency of cardiomyocyte properties, Cardio PyMEA provides a unique function to analyze changes in property values with distance (i.e. property-distance relationships). Several plots were constructed tracking the correlations between a) pacemaker time lag, b) LAT, c) dV/dtmax, and d) CV and distance from the pacemaker region, both on a per-beat basis and averaged across all beats in the dataset. An example output is provided in Fig 8 and yields a mean R2 = 0.898 for conduction velocity versus distance, suggesting that a relationship exists, based on good fitting between these two properties, for the given cardiomyocyte culture. These data suggest that the electrophysiological activity of in vitro stem cell-derived cardiomyocyte cultures may reflect early events during the lineage diversification and maturation of cardiac conduction system and working myocardium.

Fig 8. ‘Property vs Distance with R2’ window.

Fig 8

Representative plots of each property versus distance from the pacemaker. Statistical quantities, such as average time lag and conduction velocity, as well as top R2 values, are presented in the ‘Statistics Readout’ text box on the right side of the window.

Cardio PyMEA provides unique tools for and simplifies the analysis of pacemaker translocations for power law behavior

A unique feature provided by Cardio PyMEA is the ability to investigate the quiescent period between pacemaker translocations in two-dimensional cardiomyocyte cultures as a potential power law-obeying phenomenon. Here, Cardio PyMEA was used in combination with the powerlaw Python library to evaluate pacemaker translocations [25, 37]. The justifications for these comparisons were based on their conceptual similarity to neuronal avalanche inter-burst (also sometimes referred to as inter-event) intervals, or IBI [43, 44].

Cardio PyMEA simplifies power law analysis of cardiomyocyte cultures by effectively wrapping a graphical user interface over the powerlaw Python library, allowing the user to easily select from several input parameters [37]. Furthermore, the user can choose to evaluate power law behavior at both the individual recording level and in large batches (e.g. 30 or more) of recordings. The software outputs not only graphical representations of the data, as shown in Fig 9, but also a quantitative summary (in a separate text box below the plot) of distribution parameters and log-likelihood ratio (LLR) comparisons between each heavy-tailed distribution considered.

Fig 9. ‘Powerlaw Distribution Comparison’ window.

Fig 9

The results of power law analysis, both qualitative (plots) and quantitative (numerical output, text box below plots) are presented in this window of the application. The user can adjust a variety of parameters, as necessary, and execute their analysis by clicking ‘Plot’. The power law plot was adapted from [25].

Using Cardio PyMEA’s power law analysis integration and pacemaker translocation detection tool revealed that, while pacemaker translocations do not necessarily follow a general power law distribution, they do convincingly obey a doubly truncated power law distribution (i.e. a power law with an exponentially-defined maximum, or cutoff, value that captures finite-size effects within the system) with a power law exponent of ɑ = -1.583 [25]. Several known power law-obeying systems demonstrate a similar exponent of with ɑ = -1.5 and many are categorized as critical systems. Some suspected critical systems, e.g. neuronal cultures, exhibit optimal performance (e.g. maximized information exchange between individual units within the system) when the system is operating at or near a critical point [4547]. The value for ɑ calculated from pacemaker translocations suggests that critical dynamics may play a role in maximizing information transfer between cardiomyocytes within the culture and facilitate the identification of an optimal pacemaker region of the culture [25]. Thus, Cardio PyMEA facilitates and greatly simplifies power law analysis of cardiomyocyte cultures in order to help elucidate potential mechanisms governing cardiomyocyte system dynamics. Furthermore, thanks to Cardio PyMEA’s extensible design philosophy, it would be quite feasible to further adapt the software for power law analysis of other observable phenomena in cardiomyocyte networks. Such work could constitute a future development goal.

Cardio PyMEA helps democratize computational tools for cardiomyocyte analysis

A key aim underlying Cardio PyMEA’s development was to provide both a free-to-use and free-to-edit computational tool for cardiomyocyte MEA analysis. Most, if not all, previously released, free-to-use cardiomyocyte MEA analysis applications are written in MATLAB. Although these programs can be distributed freely, any efforts to edit and execute the underlying source code require a MATLAB license. This presents a potentially high barrier-to-entry in the form of operational costs, particularly at the academic tier for smaller institutions, that can be burdensome for researchers [24]. Thus, it became clear that achieving the elimination of these barriers to accessibility and development would require writing Cardio PyMEA in Python.

Python is an established, mature, and robust programming language known for its accessibility to those new to computer programming and its ubiquity in data science and machine learning applications. It provides a minimal barrier to entry, requiring only a computer and an internet connection. Python enjoys widespread community support via online resources which provide abundant resources for fledgling and senior programmers alike [48].

Cardio PyMEA leverages the aforementioned characteristics of Python to provide a cardiomyocyte MEA analysis tool suitable for continued development and refinement. The software’s GUI was written using PyQt5 and adheres to a basic object-oriented programming paradigm that, with a modest background, is simple enough for a novice programmer to grasp and modify. In fact, Cardio PyMEA was designed in such a way that undergraduate students with no or modest programming experience could (and, in fact, did) successfully contribute new functionalities to the software. Therefore, Cardio PyMEA should prove suitable as an ongoing developmental platform and help to further democratize analytical tools for cardiomyocyte MEA data analysis.

Conclusion and outlook

Cardio PyMEA is an open-source software designed to facilitate the analysis of microelectrode array data obtained for cardiomyocyte cultures. It provides an easy-to-use graphical user interface to allow non-programmers to carry out analysis of MEA data and, because of its object oriented nature, can be readily modified to accommodate additional MEA geometries and configurations. Calculations for several cardiomyocyte properties were successfully executed using Cardio PyMEA, including time lag, local activation time, upstroke and conduction velocities, beat amplitude, and beat interval, among others. Cardio PyMEA is readily extensible and provides users with two built-in analytical techniques for the assessment of property-distance correlations and the observance of power laws in pacemaker translocations.

Choosing to write Cardio PyMEA in Python presented clear benefits in the form of open access, extensibility, and ease of use. However, there are some drawbacks inherent to this choice that merit a brief discussion. Among the more significant issues inherent to Python application development is the global interpreter lock (GIL). When executing a Python script or program, the interpreter occupies one–and only one–computational thread on the host machine’s CPU. This causes the GUI’s widgets (e.g. the file dialog box) to temporarily “freeze” during the execution of a function call, such as a calculation or plotting operation, until the operation has completed. As a consequence of this GIL, the user may experience some minor performance issues during the operation of the program in the form of windows freezing, accompanied by a request to wait for the program to complete its task. One way this issue could be remedied is through extensive revisions to the code to enact multithreaded operations–a non-trivial exercise, but one which may take place at a later date.

Another opportunity for improvement, in select cases, is input/output and calculation speed. Python is known to be a relatively slow programming language, particularly compared to C and C++. Loading files is one of the more time-intensive operations performed by Cardio PyMEA, particularly for *.txt files exceeding 500 megabytes in size. For example, on Linux kernel 5.16, the import operation for a file of size 1.9GB (e.g. a 20 minute long, 120 electrode MEA recording) can take ~45 seconds. Although our development was limited to *.txt file inputs as a result of MC_Data file outputs, it may be possible to incorporate a conversion tool into Cardio PyMEA that yields hierarchical data format HDF5 files for subsequent loading operations. Use of HDF5 input files has the potential to further improve data load times and partially alleviate data storage requirements [49].

Additionally, improvements to graphing performance may be possible by exchanging function calls to the Matplotlib and Seaborn plotting libraries for equivalents in PyQtGraph. PyQtGraph can demonstrate superior speed compared to the aforementioned libraries [50]. Many calculations in Cardio PyMEA were optimized through the use of libraries like NumPy and Numba, which utilize C-based operations, to perform similarly to analogous calculations in other, faster programming languages. Further optimization should be possible with additional development.

Beyond performance improvements, we expect to see Cardio PyMEA acquire new features and functionalities over time. One area that may be primed for expanded development is comparative analysis of MEAs. Implementation of comparative methods, in which two separate recording files are loaded and analyzed in parallel, may provide significant workflow improvements over the current paradigm. Ultimately, Cardio PyMEA’s potential is bound only by the imagination of its contributors and evolution of the Python programming language.

Supporting information

S1 File. Tutorial.

User tutorial in PDF (*.pdf) format for adding new MEA geometries to Cardio PyMEA.

(DOCX)

S2 File. Save file.

Example save file in spreadsheet (*.xlsx) format.

(XLSX)

S3 File. Batch file.

Example batch file in spreadsheet (*.xlsx) format.

(XLSX)

Acknowledgments

CSD would like to acknowledge the work of Michelle (Nguyen) Phi, at the time an undergraduate biochemistry student at UCLA, for providing invaluable assistance to MEA software development during the earliest stages of this project. Her contributions to the original codebase were essential in advancing this project.

Data Availability

Software will be available through Github at the link provided in the paper, which is also provided here for convenience: https://github.com/csdunhamUC/cardio_pymea All other data are to be provided through DataDryad and/or Zenodo at the following DOIs: Data: https://doi.org/10.5068/D14H5C Software Snapshot: https://doi.org/10.5281/zenodo.6462799 Software Supplemental (e.g. PIP requirements files): https://doi.org/10.5281/zenodo.6522426.

Funding Statement

This work was funded by grants from the National Institutes of Health (https://www.nih.gov/grants-funding). Grant R21HL124503 was awarded to AZS, JKG, and AN. Grants R01 HL142801 and HL146159 were awarded to AN. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

References

  • 1.Zhang W, Kong CW, Tong MH, Chooi WH, Huang N, Li RA, et al. Maturation of human embryonic stem cell-derived cardiomyocytes (hESC-CMs) in 3D collagen matrix: effects of niche cell supplementation and mechanical stimulation. Acta Biomater. 2017;49: 204–217. doi: 10.1016/j.actbio.2016.11.058 [DOI] [PubMed] [Google Scholar]
  • 2.Cho S, Lee C, Skylar-Scott MA, Heilshorn SC, Wu JC. Reconstructing the heart using iPSCs: engineering strategies and applications. J Mol Cell Cardiol. 2021;157: 56–65. doi: 10.1016/j.yjmcc.2021.04.006 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Cao F, Wagner RA, Wilson KD, Xie X, Fu J, Drukker M, et al. Transcriptional and functional profiling of human embryonic stem cell-derived cardiomyocytes. PLoS ONE. 2008;3(10): e3474. doi: 10.1371/journal.pone.0003474 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Alcon A, Cagavi Bozkulak E, Qyang Y. Regenerating functional heart tissue for myocardial repair. Cell Mol Life Sci. 2012;69: 2635–2656. doi: 10.1007/s00018-012-0942-4 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Wang G, McCain ML, Yang L, He A, Pasqualini FS, Agarwal A, et al. Modeling the mitochondrial cardiomyopathy of Barth syndrome with induced pluripotent stem cell and heart-on-chip technologies. Nat Med. 2014;20: 616–623. doi: 10.1038/nm.3545 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Hinson JT, Chopra A, Lowe A, Sheng CC, Gupta RM, Kuppusamy R, et al. Integrative analysis of PRKAG2 cardiomyopathy iPS and microtissue models identifies AMPK as a regulator of metabolism, survival, and fibrosis. Cell Rep. 2016;17(12): 3292–3304. doi: 10.1016/j.celrep.2016.11.066 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Scuderi GJ, Butcher J. Naturally Engineered Maturation of Cardiomyocytes. Cell Front Cell Dev Biol. 2017;5: 50. doi: 10.3389/fcell.2017.00050 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Karbassi E, Fenix A, Marchiano S, Muraoka N, Nakamura K, Yang X, et al. Cardiomyocyte maturation: advances in knowledge and implications for regenerative medicine. Nat Rev Cardiol. 2020;17: 341–359. doi: 10.1038/s41569-019-0331-x [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Guo Y, Pu WT. Cardiomyocyte maturation: New phase in development. Circ Res. 2020;126: 1086–1106. doi: 10.1161/CIRCRESAHA.119.315862 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Ahmed RE, Anzai T, Chanthra N, Uosaki H. A brief review of current maturation methods for human induced pluripotent stem cells-derived cardiomyocytes. Front Cell Dev Biol. 2020;8: 178. doi: 10.3389/fcell.2020.00178 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Thomas D, Shenoy S, Sayed N. Building multi-dimensional induced pluripotent stem cells-based model platforms to assess cardiotoxicity in cancer therapies. Front Pharmacol. 2021;12: 607364. doi: 10.3389/fphar.2021.607364 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Jonsson MKB, Vos MA, Mirams GR, Duker G, Sartipy P, de Boer TP, et al. Application of human stem cell-derived cardiomyocytes in safety pharmacology requires caution beyond hERG. J Mol Cell Cardiol. 2012;52(5): 998–1008. doi: 10.1016/j.yjmcc.2012.02.002 [DOI] [PubMed] [Google Scholar]
  • 13.Zhu H, Scharnhorst KS, Stieg AZ, Gimzewski JK, Minami I, Nakatsuji N, et al. Two dimensional electrophysiological characterization of human pluripotent stem cell-derived cardiomyocyte system. Sci Rep. 2017;7: 43210, doi: 10.1038/srep43210 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Hinson JT, Chopra A, Nafissi N, Polacheck WJ, Benson CG, Swist S, et al. Titin mutations in iPS cells define sarcomere insufficiency as a cause of dilated cardiomyopathy. Science. 2015;349(6251): 982–986. doi: 10.1126/science.aaa5458 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Lausten PG, Russell SJ, Cui L, Entingh-Pearsall A, Holzenberger M, Liao R, et al. Essential role of insulin and insulin-like growth factor 1 receptor signaling in cardiac development and function. Mol Cell Biol. 2007;27: 1649–1665. doi: 10.1128/MCB.01110-06 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Guo Y, VanDusen NJ, Zhang L, Gu W, Sethi I, Guatimosim S, et al. Analysis of cardiac myocyte maturation using CASAAV, a platform for rapid dissection of cardiac myocyte gene function in vivo. Circ Res. 2017;120: 1874–1888. doi: 10.1161/CIRCRESAHA.116.310283 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17.Pradhapan P, Kuusela J, Viik J, Aalto-Setälä K, Hyttinen J. Cardiomyocyte MEA Data Analysis (CardioMDA)–A Novel Field Potential Data Analysis Software for Pluripotent Stem Cell Derived Cardiomyocytes. PLoS ONE. 2013;8(9): e73637. doi: 10.1371/journal.pone.0073637 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Georgiadis V, Stephanou A, Townsend PA, Jackson TR. MultiElec: A MATLAB Based Application for MEA Data Analysis. PLoS ONE. 2015;10(6): e0129389. doi: 10.1371/journal.pone.0129389 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Hayes HB, Nicolini AM, Arrowood CA, Chvatal SA, Wolfson DW, Cho HC, et al. Novel method for action potential measurements from intact cardiac monolayers with multiwell microelectrode array technology. Sci Rep. 2019;9: 11893. doi: 10.1038/s41598-019-48174-5 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Park JS, Grijalva SI, Jung D, Li S, Junek GV, Chi T, et al. Intracellular cardiomyocytes potential recording by planar electrode array and fibroblasts co-culturing on multi-modal CMOS chip. Biosens Bioelectron. 2019;144: 111626. doi: 10.1016/j.bios.2019.111626 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Tomek J, Burton RAB, Bub G. Ccoffinn: Automated Wave Tracking in Cultured Cardiac Monolayers. Biophys J. 2016; 111(8): 1595–1599. doi: 10.1016/j.bpj.2016.08.049 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.O’Shea C, Holmes AP, Yu TY, Winter J, Wells SP, Correia J, et al. ElectroMap: High-throughput open-source software for analysis and mapping of cardiac electrophysiology. Sci Rep. 2019;9: 1389. doi: 10.1038/s41598-018-38263-2 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.What is MATLAB? [Internet]. Natick (MA): MathWorks (US); [reviewed 2022 Mar 2; cited 2022 Mar 2]. Available from: https://www.mathworks.com/discovery/what-is-matlab.html
  • 24.Research evaluation needs to change with the times. Nature. 2022;601. doi: 10.1038/d41586-022-00056-z [DOI] [PubMed] [Google Scholar]
  • 25.Dunham CS, Mackenzie ME, Nakano H, Kim AR, Juda MB, Nakano A, et al. Pacemaker translocations and power laws in 2D stem cell-derived cardiomyocyte cultures. PLoS ONE. 2022;17(3): e0263976. doi: 10.1371/journal.pone.0263976 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Minami I, Yamada K, Otsuji TG, Yamamoto T, Shen Y, Otsuka S, et al. A small molecule that promotes cardiac differentiation of human pluripotent stem cells under defined, cytokine- and xeno-free conditions. Cell Rep. 2012;2: 1448–1460. doi: 10.1016/j.celrep.2012.09.015 [DOI] [PubMed] [Google Scholar]
  • 27.Nakano H, Minami I, Braas D, Pappoe H, Wu X, Sagadevan A, et al. Glucose inhibits cardiac muscle maturation through nucleotide biosynthesis. eLife. 2017;6: e29330. doi: 10.7554/eLife.29330 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Vázquez-Seisdedos CR, Neto JE, Marañón Reyes EJ, Klautau A, Limão de Oliveira RC. New approach for T-wave end detection on electrocardiogram: performance in noisy conditions. Biomed Eng Online. 2011;10: 77, doi: 10.1186/1475-925X-10-77 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Stanley HE, Buldyrev SV, Goldberger AL, Havlin S, Peng C-K, Simmons M. Long-range power law correlations in condensed matter physics and biophysics. Physica A: Stat Mech Appl. 1993;200: 4–24. doi: 10.1016/0378-4371(93)90500-4 [DOI] [Google Scholar]
  • 30.Stanley HE, Amaral LAN, Gopikrishnan P, Ivanov PC, Keitt TH, Plerou V. Scale invariance and universality: organizing principles in complex systems. Physica A: Stat Mech Appl. 2000;281: 60–68. doi: 10.1016/S0378-4371(00)00195-3 [DOI] [Google Scholar]
  • 31.Gisiger T. Scale invariance in biology: coincidence or footprint of a universal mechanism? Biol Rev. 2001;76: 161–209. doi: 10.1017/s1464793101005607 [DOI] [PubMed] [Google Scholar]
  • 32.Bigger JT, Steinman RC, Rolnitzky LM, Fleiss JL, Albrecht P, Cohen RJ. Powerlaw behavior of RR-interval variability in healthy middle-aged persons, patients with recent acute myocardial infarction, and patients with heart transplants. Circulation. 1996;93: 2142–2151. doi: 10.1161/01.cir.93.12.2142 [DOI] [PubMed] [Google Scholar]
  • 33.Huikuri HV, Mäkikallio TH, Juhani Airaksinen KE, Seppänen T, Puukka P, Räihä IJ, et al. Power-law relationship of heart rate variability as a predictor of mortality in the elderly. Circulation. 1998;97: 2031–2036. doi: 10.1161/01.cir.97.20.2031 [DOI] [PubMed] [Google Scholar]
  • 34.Jokinen V, Syvänne M, Mäkikallio TH, Juhani Airaksinen KE, Huikuri HV. Temporal age-related changes in spectral, fractal and complexity characteristics of heart rate variability. Clin Physiol. 2008;21: 273–281. doi: 10.1046/j.1365-2281.2001.00326.x [DOI] [PubMed] [Google Scholar]
  • 35.Kemuriyama T, Ohta H, Sato Y, Maruyama S, Tandai-Hiruma M, Kato K, et al. A power-law distribution of inter-spike intervals in renal sympathetic nerve activity in salt-sensitive hypertension-induced chronic heart failure. Biosystems. 2010;101: 144–147. doi: 10.1016/j.biosystems.2010.06.002 [DOI] [PubMed] [Google Scholar]
  • 36.Kucera JP. What makes the heart rhythm so intricate? Heart Rhythm. 2014;11: 1220–1221. doi: 10.1016/j.hrthm.2014.04.013 [DOI] [PubMed] [Google Scholar]
  • 37.Alstott J, Bullmore E, Plenz D. powerlaw: A Python package for analysis of heavy-tailed distributions. PLoS ONE. 2014;9: e85777. doi: 10.1371/journal.pone.0085777 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Scott DW. Sturges’ rule. Wiley Interdiscip Rev Comput Stat. 2009;1: 303–306. doi: 10.1002/wics.35 [DOI] [Google Scholar]
  • 39.Cantwell CD, Roney CH, Ng FS, Siggers JH, Sherwin SJ, Peters NS. Techniques for automated local activation time annotation and conduction velocity estimation in cardiac mapping. Comput Biol Med. 2015;65: 229–242. doi: 10.1016/j.compbiomed.2015.04.027 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40.Cohen IS, Datyner NB, Gintant GA, Mulrine NK, Pennefather P. A note on the relation of maximum upstroke velocity to peak inward current recorded by the voltage clamp. Circ Res. 1985: 57(3): 482–484. doi: 10.1161/01.res.57.3.482 [DOI] [PubMed] [Google Scholar]
  • 41.Natarajan A, Stancescu M, Dhir V, Armstrong C, Sommerhage F, Hickman JJ, et al. Patterned cardiomyocytes on microelectrode arrays as a functional, high information content drug screening platform. Biomaterials. 2011;32(18): 4267–4274. doi: 10.1016/j.biomaterials.2010.12.022 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42.Christoffels VM, Burch JBE, Moorman AFM. Architectural plan for the heart: early patterning and delineation of the chambers and the nodes. Trends Cardiovasc Med. 2004;14(8): 301–307. doi: 10.1016/j.tcm.2004.09.002 [DOI] [PubMed] [Google Scholar]
  • 43.Bellay T, Klaus A, Seshadri S, Plenz D. Irregular spiking of pyramidal neurons organizes as scale-invariant neuronal avalanches in the awake state. eLife. 2015;07224. doi: 10.7554/eLife.07224 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44.Lombardi F, Herrmann HJ, Plenz D, de Arcangelis L. Temporal correlations in neuronal avalanche occurrence. Sci Rep. 2016;6: 24690. doi: 10.1038/srep24690 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 45.Beggs J, Plenz D. Neuronal Avalanches in Neocortical Circuits. J Neurosci. 2003;23: 11167–11177. doi: 10.1523/JNEUROSCI.23-35-11167.2003 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46.Dunham CS, Lilak S, Hochstetter J, Loeffler A, Zhu R, Chase C, et al. 2021. Nanoscale neuromorphic networks and criticality: a perspective. J Phys Complex. 2021;2: 042001. [Google Scholar]
  • 47.Meijers M, Ito S, Rein ten Wolde P. Behavior of information flow near criticality. Phys Rev E. 2021;103: L010102. doi: 10.1103/PhysRevE.103.L010102 [DOI] [PubMed] [Google Scholar]
  • 48.Perkel J. Programming: Pick up Python. Nature. 2015; 518: 125–126. doi: 10.1038/518125a [DOI] [PubMed] [Google Scholar]
  • 49.Collette A. Python and HDF5 [Internet]. Sebastopol (CA): O’Reilly Media, Inc (US); [reviewed 2022 Apr 17; cited 2022 Apr 18]. Available from: https://www.oreilly.com/library/view/python-and-hdf5/9781491944981/ch01.html
  • 50.PyQtGraph [Internet]. PyQtGraph; [reviewed 2022 Apr 17; cited 2022 Apr 18]. Available from: https://www.pyqtgraph.org

Decision Letter 0

Rafael Sachetto Oliveira

13 Apr 2022

PONE-D-22-08656Cardio PyMEA: A user-friendly, open-source Python application for cardiomyocyte microelectrode array analysisPLOS ONE

Dear Dr. Dunham,

Thank you for submitting your manuscript to PLOS ONE. After careful consideration, we feel that it has merit but does not fully meet PLOS ONE’s publication criteria as it currently stands. Therefore, we invite you to submit a revised version of the manuscript that addresses the points raised during the review process. Both reviewers indicated that the paper needs minor improvements in order to be accepted by PLOS ONE. Read the comments carefully and address the issues raised by the reviewers.  

Please submit your revised manuscript by May 28 2022 11:59PM. If you will need more time than this to complete your revisions, please reply to this message or contact the journal office at plosone@plos.org. When you're ready to submit your revision, log on to https://www.editorialmanager.com/pone/ and select the 'Submissions Needing Revision' folder to locate your manuscript file.

Please include the following items when submitting your revised manuscript:

  • A rebuttal letter that responds to each point raised by the academic editor and reviewer(s). You should upload this letter as a separate file labeled 'Response to Reviewers'.

  • A marked-up copy of your manuscript that highlights changes made to the original version. You should upload this as a separate file labeled 'Revised Manuscript with Track Changes'.

  • An unmarked version of your revised paper without tracked changes. You should upload this as a separate file labeled 'Manuscript'.

If you would like to make changes to your financial disclosure, please include your updated statement in your cover letter. Guidelines for resubmitting your figure files are available below the reviewer comments at the end of this letter.

If applicable, we recommend that you deposit your laboratory protocols in protocols.io to enhance the reproducibility of your results. Protocols.io assigns your protocol its own identifier (DOI) so that it can be cited independently in the future. For instructions see: https://journals.plos.org/plosone/s/submission-guidelines#loc-laboratory-protocols. Additionally, PLOS ONE offers an option for publishing peer-reviewed Lab Protocol articles, which describe protocols hosted on protocols.io. Read more information on sharing protocols at https://plos.org/protocols?utm_medium=editorial-email&utm_source=authorletters&utm_campaign=protocols.

We look forward to receiving your revised manuscript.

Kind regards,

Rafael Sachetto Oliveira, Ph.D

Academic Editor

PLOS ONE

Journal Requirements:

When submitting your revision, we need you to address these additional requirements.

1. Please ensure that your manuscript meets PLOS ONE's style requirements, including those for file naming. The PLOS ONE style templates can be found at 

https://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf and 

https://journals.plos.org/plosone/s/file?id=ba62/PLOSOne_formatting_sample_title_authors_affiliations.pdf

2. Please note that PLOS ONE has specific guidelines on code sharing for submissions in which author-generated code underpins the findings in the manuscript. In these cases, all author-generated code must be made available without restrictions upon publication of the work. Please review our guidelines at https://journals.plos.org/plosone/s/materials-and-software-sharing#loc-sharing-code and ensure that your code is shared in a way that follows best practice and facilitates reproducibility and reuse.

3. Please review your reference list to ensure that it is complete and correct. If you have cited papers that have been retracted, please include the rationale for doing so in the manuscript text, or remove these references and replace them with relevant current references. Any changes to the reference list should be mentioned in the rebuttal letter that accompanies your revised manuscript. If you need to cite a retracted article, indicate the article’s retracted status in the References list and also include a citation and full reference for the retraction notice.

[Note: HTML markup is below. Please do not edit.]

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #1: Yes

Reviewer #2: Yes

**********

2. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: Yes

Reviewer #2: N/A

**********

3. Have the authors made all data underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: No

Reviewer #2: Yes

**********

4. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: Yes

Reviewer #2: Yes

**********

5. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: This article presents Cardio PyMEA, a new Python-based tool for cardiomyocyte microelectrode array (MEA) postprocessing with advanced statistical analysis functionalities. The software offers a cross-platform, open-source alternative to previous similar options, typically implemented for Matlab, a proprietary software. The authors stress that Cardio PyMEA is extensible to a great degree, easily adaptable to different experimental configurations.

The software functions have been tested and validated using 30 measurements on 3 different cardiomyocyte differentiations. Cardio PyMEA is already available, but the data collection used in the article is not.

The article is well-written, accessible to the audience, and enjoyable to read. However, certain aspects would benefit from an improvement to increase the general quality of the article.

0. The lack of line numbers represents a difficulty when referencing the manuscript.

1. Scientific novelty is questionable in many aspects, which imposes the need of highlighting the unique features offered by Cardio PyMEA. The use of open-source software instead of Matlab is a great feature but does not justify the manuscript by itself.

a) In general, the paper should focus more on the advantages or quality of this tool vs. others.

b) Section title using the word "unique" indicates that other sections may not be that unique. This section is crucial. Consider the expansion of this section and a reference to figures, not only for showing results, but also to complement the description of the user interface.

2) What if the MEA equipment used is from a different manufacturer than Multichannel Systems? Would the simplest option be to replicate the input format described in the text and create a suitable ElectrodeConfig?

3) Performance with a noisy signal is especially relevant. Therefore, the sentence below would benefit from referring to results or examples, instead of just a statement that the reader must believe.

"Cardio PyMEA demonstrated effective performance under noisy conditions (Figs 6E-F) thanks to its permission of user-provided parameter inputs. User-defined adjustments to beat amplitude and distance thresholds provide flexibility in analyzing noisy datasets that could otherwise become intractable under automated beat detection algorithms."

4) The sentence below is confusing, please consider representing F7 in Figure 3.

"The second is expected to correspond to the electrode F7. This electrode is designated as channel 1 (electrode 1) in the manufacturer’s MEA channel schematic."

5) The relevance of power-law analysis in this context should be described in Methods, and at least mentioned in the Introduction. Currently, the Methods section describes the power-law analysis briefly and in a very abstract manner. Why this is relevant here remains unclear. Power law application is explained in Results and Discussion, but further effort is required to inform the reader about any conclusions she/he may or may not obtain from Figure 9.

Given that the power-law analysis is a unique point of this software, a more instructive approach should be taken to allow the reader to understand how she/he can benefit from this functionality.

Thanks for an enjoyable read.

Best wishes.

Reviewer #2: The present work presents an open-source Python graphical application for the study of microelectrode array analysis (MEA) of cardiomyocytes. The application offers a series of fundamental features for loading, analyzing, and exporting the data from MEA recordings. A series of calculations such as beat detection, electrode exclusion, electrode silencing, pacemaker origin detection, local activation time, maximum upstroke velocity, beat amplitude and interval, conduction velocity, pacemaker translocation detection, and statistical analyses are available. The manuscript is very well written, well organized, relevant, and the presented results are encouraging and significant. The reviewer has no major or general comments, since the manuscript and the contribution are already very clear and significant. However a list of suggestions for improving the text of the manuscript and for future upgrades on the software are provided below, together with some specific or minor comments.

Suggestions for improving the manuscript

================================

1. Sample data for immediate usage and test of PyMEA could be made available in the Github repository.

2. The abstract is very focused on the software license and other computational aspects of PyMEA. However, the reviewer believes that providing a compact and general overview of the main capabilities of the software (beat detection, pacemaker origin estimation, and

etc) on the abstract could further gain the attention of researchers working within this field and looking for this kind of solution.

3. The authors could explain the method used to compute the field potential duration (FPD) according to the mentioned reference using a simple and compact approach. All the other details from the features of the software are well explained, with the exception of this

calculation.

Specific comments and minor suggestions

================================

1. No page or line numbering are provided in the manuscript. This makes the process of reviewing a little bit harder.

2. Section "Automated electrode exclusion". Instead of using the term data modification, the reviewer thinks that data treatment or data pre-processing is more adequate.

3. After the equation of the radius r, it is said: These parameters are additionally bound. It seems the authors are referring to imposing bounds on the parameters during the least-squares fitting. Please make it clearer.

4. LAT was defined 2 times or more.

5. Please specify what type of finite difference was applied to approximate the derivatives for the maximum upstroke velocity calculation (forward,backward,central,...).

6. Conduction velocity calculation. Although very simple and easy to infer, the formula "electrode-distance/∆LAT ", lacks the definition of ∆LAT .

7. Property vs distance from pacemaker. Please define multiplier

8. In general the texts describing the name of functions within the code are written with another font style. For LaTeX users this is usually done with the command texttt.

9. Please explain or provide a reference for Sturge’s rule.

10. It seems the concepts of power-law and probability density functions are mixed or entwined. The authors could try to improve and distinguish this a little bit.

11. Should some signal processing tools be used for noisy signals before MEA calculations? Is this a common practice within the field? Perhaps the authors could mention something about this.

12. Cardio PyMEA provides uniques (section). Before the caption of Fig.8 the authors mention "suggesting that there is a strong relationship between these two properties", when refering to the R 2 coefficient of determination. Perhaps using "suggesting a good fitting was achieved", or something similar would be better, to avoid a possible confusion with a positive correlation.

Suggestions for future improvements of the software

=========================================

1. At the final section of the manuscript the authors mention the software may freeze when using large datasets. On the reviewer’s experience this may be related to the usage of the matplotlib as a backend for the plots. Although it is pretty standard forPython code to use matplotlib, for huge datasets it takes significant time to render and plot data with this library. An alternative is to use the PyQtGraph library

(https://www.pyqtgraph.org/), which is faster and can easily handle large datasets. It can also deliver high-quality plots.

2. Currently PyMEA only supports input data in the format of a specific MEA recording software. For a broader use, this could be extended to other input formats which might be also in use within the MEA community.

3. Also with respect to input/output, the authors could consider in the future using data in the HDF5 file format. It can significantly reduce storage of large datasets, and may provide a faster interface for reading and writing data, which could also impact on the performance

of the software when loading large datasets.

4. Please check the OpenCARP suite for cardiac electrophysiology, which provides the limpetgui, a tool for visualization of large datasets of cardiac action potential models. It uses both PyQtGraph and HDF5. Link: https://opencarp.org/documentation/examples/visualization/limpetgui

5. Another interesting feature for the future, would be the possibility of loading two datasets for comparisons and computation of quantitive metrics about their differences, in case this could be useful for MEA studies.

**********

6. PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: No

Reviewer #2: No

[NOTE: If reviewer comments were submitted as an attachment file, they will be attached to this email and accessible via the submission site. Please log into your account, locate the manuscript record, and check for the action link "View Attachments". If this link does not appear, there are no attachment files.]

While revising your submission, please upload your figure files to the Preflight Analysis and Conversion Engine (PACE) digital diagnostic tool, https://pacev2.apexcovantage.com/. PACE helps ensure that figures meet PLOS requirements. To use PACE, you must first register as a user. Registration is free. Then, login and navigate to the UPLOAD tab, where you will find detailed instructions on how to use the tool. If you encounter any issues or have any questions when using PACE, please email PLOS at figures@plos.org. Please note that Supporting Information files do not need this step.

Attachment

Submitted filename: review_PONE-D-22-08656.pdf

PLoS One. 2022 May 26;17(5):e0266647. doi: 10.1371/journal.pone.0266647.r002

Author response to Decision Letter 0


7 May 2022

The authors would like to thank the reviewers and the editorial staff for their commentary and recommendations regarding this manuscript. We are grateful that this manuscript was received positively. We have carefully reviewed the editorial and reviewer responses and agree with many of the recommended modifications. We have since refined the manuscript in accordance with the editorial and reviewer suggestions and believe it has been greatly enhanced relative to the original submission.

Please see below for our responses to each comment. Thank you again for your consideration and generous feedback on our manuscript. Additionally, please refer to the attached Response to Reviewers document for easier reading (responses are color-coded in blue text in the attached document).

Editor:

When submitting your revision, we need you to address these additional requirements.

1. Please ensure that your manuscript meets PLOS ONE's style requirements, including those for file naming. The PLOS ONE style templates can be found at

https://journals.plos.org/plosone/s/file?id=wjVg/PLOSOne_formatting_sample_main_body.pdf

and

https://journals.plos.org/plosone/s/file?id=ba62/PLOSOne_formatting_sample_title_authors_affiliations.pdf

Response: We apologize for the omission of line and page numbers, and have since corrected the manuscript submission to include them. We believe the manuscript now adheres to all stated formatting requirements.

2. Please note that PLOS ONE has specific guidelines on code sharing for submissions in which author-generated code underpins the findings in the manuscript. In these cases, all author-generated code must be made available without restrictions upon publication of the work. Please review our guidelines at https://journals.plos.org/plosone/s/materials-and-software-sharing#loc-sharing-code and ensure that your code is shared in a way that follows best practice and facilitates reproducibility and reuse.

Response: Thank you for this comment regarding code sharing practices. In addition to the Github repository provided in the manuscript (https://github.com/csdunhamUC/cardio_pymea), a full snapshot of the code (*.py files) was uploaded to Data Dryad/Zenodo at the following DOI: https://doi.org/10.5281/zenodo.6462799.

The data submitted to Data Dryad will be available at the following DOI: https://doi.org/10.5068/D14H5C. These code and data submissions, respectively, remain under review at the time of this response, but should complete curation and go live in the coming days.

3. Please review your reference list to ensure that it is complete and correct. If you have cited papers that have been retracted, please include the rationale for doing so in the manuscript text, or remove these references and replace them with relevant current references. Any changes to the reference list should be mentioned in the rebuttal letter that accompanies your revised manuscript. If you need to cite a retracted article, indicate the article’s retracted status in the References list and also include a citation and full reference for the retraction notice.

Response: No references were removed from the manuscript. Several references were added to the manuscript in light of reviewer feedback.

The following references were added to the manuscript:

Bigger JT, Steinman RC, Rolnitzky LM, Fleiss JL, Albrecht P, Cohen RJ. Powerlaw behavior of RR-interval variability in healthy middle-aged persons, patients with recent acute myocardial infarction, and patients with heart transplants. Circulation. 1996;93: 2142–2151. pmid:8925583

Scott DW. Sturges' rule. Wiley Interdiscip Rev Comput Stat. 2009;1: 303-306. doi: 10.1002/wics.35

Beggs J, Plenz D. Neuronal Avalanches in Neocortical Circuits. J Neurosci. 2003;23: 11167–11177. pmid:14657176

Dunham CS, Lilak S, Hochstetter J, Loeffler A, Zhu R, Chase C, et al. 2021. Nanoscale neuromorphic networks and criticality: a perspective. J Phys Complex. 2021;2: 042001.

Meijers M, Ito S, Rein ten Wolde P. Behavior of information flow near criticality. Phys Rev E. 2021;103: L010102. pmid:33601642

Collette A. Python and HDF5 [Internet]. Sebastopol (CA): O'Reilly Media, Inc (US); [reviewed 2022 Apr 17; cited 2022 Apr 18]. Available from: https://www.oreilly.com/library/view/python-and-hdf5/9781491944981/ch01.html

PyQtGraph [Internet]. PyQtGraph; [reviewed 2022 Apr 17; cited 2022 Apr 18]. Available from: https://www.pyqtgraph.org

We confirm that the reference list is complete and accurate.

Reviewer #1:

This article presents Cardio PyMEA, a new Python-based tool for cardiomyocyte microelectrode array (MEA) postprocessing with advanced statistical analysis functionalities. The software offers a cross-platform, open-source alternative to previous similar options, typically implemented for Matlab, a proprietary software. The authors stress that Cardio PyMEA is extensible to a great degree, easily adaptable to different experimental configurations.

The software functions have been tested and validated using 30 measurements on 3 different cardiomyocyte differentiations. Cardio PyMEA is already available, but the data collection used in the article is not.

The article is well-written, accessible to the audience, and enjoyable to read. However, certain aspects would benefit from an improvement to increase the general quality of the article.

0. The lack of line numbers represents a difficulty when referencing the manuscript.

Response: We apologize for this omission and have fixed the issue for the revision.

1. Scientific novelty is questionable in many aspects, which imposes the need of highlighting the unique features offered by Cardio PyMEA. The use of open-source software instead of Matlab is a great feature but does not justify the manuscript by itself.

a) In general, the paper should focus more on the advantages or quality of this tool vs. others.

Response: Thank you for this suggestion. We’ve added language throughout the manuscript to better emphasize the advantages of this tool against others and unique properties. These include expansion and highlighting of power law analysis workflow and property-distance relationships, as well as extensibility of the software relative to commercial solutions

b) Section title using the word "unique" indicates that other sections may not be that unique. This section is crucial. Consider the expansion of this section and a reference to figures, not only for showing results, but also to complement the description of the user interface.

Response: We significantly expanded content related to the power law analysis features in Cardio PyMEA and added language to further emphasize the features that are unique to this software.

2) What if the MEA equipment used is from a different manufacturer than Multichannel Systems? Would the simplest option be to replicate the input format described in the text and create a suitable ElectrodeConfig?

Response: Thank you for this question. You are correct, that would be the simplest option. We are also interested in adding data acquired from multi-well plate-based systems and welcome the sharing of data that would facilitate its implementation.

3) Performance with a noisy signal is especially relevant. Therefore, the sentence below would benefit from referring to results or examples, instead of just a statement that the reader must believe.

"Cardio PyMEA demonstrated effective performance under noisy conditions (Figs 6E-F) thanks to its permission of user-provided parameter inputs. User-defined adjustments to beat amplitude and distance thresholds provide flexibility in analyzing noisy datasets that could otherwise become intractable under automated beat detection algorithms."

Response: Thank you for this comment. We have rephrased the sentences in question to highlight user-defined inputs as they relate to the detection of beats under low signal-to-noise conditions. We also struck the language making a different comparison to automated beat detection algorithms. Finally, we added approximate S/N ratios to Fig 6D-F to better illustrate the comparison. The new wording is as follows:

“Cardio PyMEA demonstrated effective performance under noisy conditions thanks to its utilization of user-provided parameter inputs. User-defined thresholds of beat amplitude and distance provide flexibility in analyzing noisy datasets, even under low signal-to-noise (S/N) conditions (Figs 6E-F).”

4) The sentence below is confusing, please consider representing F7 in Figure 3.

"The second is expected to correspond to the electrode F7. This electrode is designated as channel 1 (electrode 1) in the manufacturer’s MEA channel schematic."

Response: Thank you for raising this concern. Figure 3 has since been updated to include all the electrode designations for ease of understanding.

5) The relevance of power-law analysis in this context should be described in Methods, and at least mentioned in the Introduction. Currently, the Methods section describes the power-law analysis briefly and in a very abstract manner. Why this is relevant here remains unclear. Power law application is explained in Results and Discussion, but further effort is required to inform the reader about any conclusions she/he may or may not obtain from Figure 9.

Given that the power-law analysis is a unique point of this software, a more instructive approach should be taken to allow the reader to understand how she/he can benefit from this functionality.

Response: Thank you for these suggestions. We’ve added a brief line to the Introduction that highlights one area of importance concerning power law analysis and moved a citation to better orient the reader to this concept. We moved select content from the Results and Discussion, and added further context, to help the reader understand the importance of power laws as they relate to cardiomyocyte cultures to the Methods section. Finally, we revised the Results and Discussion sub-section concerning power law analysis to further elaborate on both the new Methods content and the benefits of the analysis. We believe this area is significantly improved over the previous iteration.

Reviewer #2:

The present work presents an open-source Python graphical application for the study of microelectrode array analysis (MEA) of cardiomyocytes. The application offers a series of fundamental features for loading, analyzing, and exporting the data from MEA recordings. A series of calculations such as beat detection, electrode exclusion, electrode silencing, pacemaker origin detection, local activation time, maximum upstroke velocity, beat amplitude and interval, conduction velocity, pacemaker translocation detection, and statistical analyses are available. The manuscript is very well written, well organized, relevant, and the presented results are encouraging and significant. The reviewer has no major or general comments, since the manuscript and the contribution are already very clear and significant. However a list of suggestions for improving the text of the manuscript and for future upgrades on the software are provided below, together with some specific or minor comments.

Suggestions for improving the manuscript

================================

1. Sample data for immediate usage and test of PyMEA could be made available in the Github repository.

Response: Thank you for this suggestion. We have formatted and uploaded to Github a small sample file for this purpose. The file name is “Dummy Data 12 Beats.txt”. Additionally, the data used in this manuscript will be made available via Data Dryad at the following DOI: https://doi.org/10.5068/D14H5C. This URL will also be included in the Github README once it is active.

2. The abstract is very focused on the software license and other computational aspects of PyMEA. However, the reviewer believes that providing a compact and general overview of the main capabilities of the software (beat detection, pacemaker origin estimation, and

etc) on the abstract could further gain the attention of researchers working within this field and looking for this kind of solution.

Response: Thank you for this comment. We have amended the abstract to better highlight the primary functions and uses of the Cardio PyMEA system with respect to cardiomyocyte culture analysis.

3. The authors could explain the method used to compute the field potential duration (FPD) according to the mentioned reference using a simple and compact approach. All the other details from the features of the software are well explained, with the exception of this

calculation.

Response: Thank you for this recommendation. We have since expanded upon the paragraph for the FPD calculation to provide a brief summary of the methods from the reference. The new sentences are as follows and begin immediately following the mention of Vázquez-Seisdedos et al.:

“A brief summary of this method follows. First, the T-wave is identified using a peak finding algorithm akin to the R-wave. Second, the maximum first derivative of the field potential signal between the T-wave peak and baseline is identified. Using the location (i.e. time or x-value) of the maximum derivative as a fixed point, along with an arbitrary location 50-200 ms past the T-wave peak, the algorithm fits a trapezoid with a mobile point to the two fixed points. Optimizing the maximum area of the trapezoid yields the T-wave endpoint”

Specific comments and minor suggestions

================================

1. No page or line numbering are provided in the manuscript. This makes the process of reviewing a little bit harder.

Response: We apologize for this omission and have fixed the issue for the revision.

2. Section "Automated electrode exclusion". Instead of using the term data modification, the reviewer thinks that data treatment or data pre-processing is more adequate.

Response: This is a great suggestion and we have updated the phrasing to “data pre-processing”.

3. After the equation of the radius r, it is said: These parameters are additionally bound. It seems the authors are referring to imposing bounds on the parameters during the least-squares fitting. Please make it clearer.

Response: Thank you for noting this. We have improved upon this sentence by changing it to the following:

“The radius parameter, r, is bound within the geometry of the MEA during the fitting process. This measure is taken to ensure that the center of the circle, (h, k), does not reside outside of the culture region of the MEA.”

4. LAT was defined 2 times or more.

Response: Thank you for spotting this repetition. We have removed the redundant definition.

5. Please specify what type of finite difference was applied to approximate the derivatives for the maximum upstroke velocity calculation (forward,backward,central,...).

Response: Thank you for this suggestion. We have revised the sentence in question to clearly state that we are using a backward finite difference method.

6. Conduction velocity calculation. Although very simple and easy to infer, the formula "electrode-distance/∆LAT ", lacks the definition of ∆LAT .

Response: Thank you for noting this. We have added the definition for ∆LAT in the sentence in question, just prior to stating the formula. The sentence now reads:

“Conduction velocity is calculated in a straightforward manner by determining the distance between any two electrodes and dividing this distance by the change in local activation time (ΔLAT) recorded at the electrodes, i.e.: (electrode distance)/ΔLAT.”

7. Property vs distance from pacemaker. Please define multiplier

Response: Thank you for raising this concern. We agree this term was confusing and changed the phrasing of the sentence to make it clear that we are referring to the number of standard deviations. The sentence now reads as:

“Any values outside of the range specified by the (number of standard deviations * Sigma) operation are excluded from the analysis.”

8. In general the texts describing the name of functions within the code are written with another font style. For LaTeX users this is usually done with the command texttt.

Response: Thank you for highlighting this detail. All descriptions of function names from within the code have since been changed to the font Courier New.

9. Please explain or provide a reference for Sturge’s rule.

Response: Thank you for this suggestion. We’ve added a reference for Sturges’ rule and fixed the misspelling. The reference is: Scott DW. Sturges' rule. Wiley Interdiscip Rev Comput Stat. 2009;1: 303-306. doi: 10.1002/wics.35

10. It seems the concepts of power-law and probability density functions are mixed or entwined. The authors could try to improve and distinguish this a little bit.

Response: Thank you for this suggestion. We have improved the language in the section “Cardio PyMEA simplifies the analysis of pacemaker stability for power law behavior” to clearly identify power laws as probability distributions and necessitate appropriate considerations during their analysis. This section was also expanded upon following comments from Reviewer 1. We believe the section now does a better job of not only communicating what power laws are, but also why we care about them in regard to cardiac systems.

11. Should some signal processing tools be used for noisy signals before MEA calculations? Is this a common practice within the field? Perhaps the authors could mention something about this.

Response: Thank you for this question. Signal processing is often done within the field during MEA analysis, depending on how noisy the original recording/signals are. The analysis presented in this work did not utilize any signal processing steps as many of the MEA recordings presented fairly clean signals overall.

However, Cardio PyMEA does offer the option to perform signal processing during the beat detection stage. As noted in the “Beat Detection” sub-section of the Methods section, users can choose from low-pass, high-pass, and bandpass filters. The underlying function calls made by Cardio PyMEA rely on signal processing tools from the SciPy library.

We amended a short phrase to an early sentence in the results and discussion that emphasizes that the results presented within were not subject to signal filters.

“The beat detection algorithm was successful in identifying beats from the field potential signals without the need for signal filtering tools”

12. Cardio PyMEA provides uniques (section). Before the caption of Fig.8 the authors mention "suggesting that there is a strong relationship between these two properties", when refering to the R 2 coefficient of determination. Perhaps using "suggesting a good fitting was achieved", or something similar would be better, to avoid a possible confusion with a positive correlation.

Response: Thank you for this recommendation. We have adjusted the language to read: “suggesting that a relationship exists, based on good fitting between these two properties, for the given cardiomyocyte network.”

Suggestions for future improvements of the software

=========================================

1. At the final section of the manuscript the authors mention the software may freeze when using large datasets. On the reviewer’s experience this may be related to the usage of the matplotlib as a backend for the plots. Although it is pretty standard forPython code to use matplotlib, for huge datasets it takes significant time to render and plot data with this library. An alternative is to use the PyQtGraph library

(https://www.pyqtgraph.org/), which is faster and can easily handle large datasets. It can also deliver high-quality plots.

Response: This is a very welcome and helpful suggestion. We agree that some performance improvements could be obtained by migrating away from Matplotlib to PyQtGraph. Under typical analysis workflows, the most common performance issue we see is in file loading, which can take some time for large files (exceeding e.g. 500mb; most of our files were in the ~2gb range). We agree that your other suggestions about different file types would almost certainly help address this performance bottleneck, although there are other factors affecting that particular area (discussed below). Nevertheless, this is certainly a welcome development suggestion that we will consider pursuing. We added a note regarding Matplotlib -> PyQtGraph migration to a new paragraph in the Outlook section.

2. Currently PyMEA only supports input data in the format of a specific MEA recording software. For a broader use, this could be extended to other input formats which might be also in use within the MEA community.

Response: We agree whole-heartedly with this sentiment. It is our hope that groups with access to other types of MEA systems will collaborate with us to implement other formats, e.g. multi-well plate systems.

3. Also with respect to input/output, the authors could consider in the future using data in the HDF5 file format. It can significantly reduce storage of large datasets, and may provide a faster interface for reading and writing data, which could also impact on the performance of the software when loading large datasets.

Response: We are highly amenable to this suggestion. The primary reason for utilizing CSV/text files at this stage is due to the output of the MC Data conversion tool from Multichannel Systems. This tool most conveniently produces ASCII files (in the form of CSV/text files) and does not have support for file types such as HDF5. Implementing a converter tool into Cardio PyMEA to generate HDF5 files is a great suggestion for future development. We have included a paragraph about these suggestions in the Outlook section.

4. Please check the OpenCARP suite for cardiac electrophysiology, which provides the limpetgui, a tool for visualization of large datasets of cardiac action potential models. It uses both PyQtGraph and HDF5. Link: https://opencarp.org/documentation/examples/visualization/limpetgui

Response: This is great! Thanks for informing us about this fantastic simulation software. We will dig into this further and see what inspiration we can draw for future development.

5. Another interesting feature for the future, would be the possibility of loading two datasets for comparisons and computation of quantitive metrics about their differences, in case this could be useful for MEA studies.

Response: This is a great idea! This is something that we will absolutely keep in mind for ongoing development and we added commentary about this in the form of a short paragraph at the end of the Outlook section. We whole-heartedly welcome collaboration with any groups interested in contributing toward this implementation.

Attachment

Submitted filename: Response to Reviewers PONE-D-22-08656.pdf

Decision Letter 1

Rafael Sachetto Oliveira

17 May 2022

Cardio PyMEA: A user-friendly, open-source Python application for cardiomyocyte microelectrode array analysis

PONE-D-22-08656R1

Dear Dr. Dunham,

We’re pleased to inform you that your manuscript has been judged scientifically suitable for publication and will be formally accepted for publication once it meets all outstanding technical requirements.

Within one week, you’ll receive an e-mail detailing the required amendments. When these have been addressed, you’ll receive a formal acceptance letter and your manuscript will be scheduled for publication.

An invoice for payment will follow shortly after the formal acceptance. To ensure an efficient process, please log into Editorial Manager at http://www.editorialmanager.com/pone/, click the 'Update My Information' link at the top of the page, and double check that your user information is up-to-date. If you have any billing related questions, please contact our Author Billing department directly at authorbilling@plos.org.

If your institution or institutions have a press office, please notify them about your upcoming paper to help maximize its impact. If they’ll be preparing press materials, please inform our press team as soon as possible -- no later than 48 hours after receiving the formal acceptance. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information, please contact onepress@plos.org.

Kind regards,

Rafael Sachetto Oliveira, Ph.D

Academic Editor

PLOS ONE

Additional Editor Comments (optional):

Reviewers' comments:

Reviewer's Responses to Questions

Comments to the Author

1. If the authors have adequately addressed your comments raised in a previous round of review and you feel that this manuscript is now acceptable for publication, you may indicate that here to bypass the “Comments to the Author” section, enter your conflict of interest statement in the “Confidential to Editor” section, and submit your "Accept" recommendation.

Reviewer #1: All comments have been addressed

Reviewer #2: All comments have been addressed

**********

2. Is the manuscript technically sound, and do the data support the conclusions?

The manuscript must describe a technically sound piece of scientific research with data that supports the conclusions. Experiments must have been conducted rigorously, with appropriate controls, replication, and sample sizes. The conclusions must be drawn appropriately based on the data presented.

Reviewer #1: Yes

Reviewer #2: Yes

**********

3. Has the statistical analysis been performed appropriately and rigorously?

Reviewer #1: N/A

Reviewer #2: N/A

**********

4. Have the authors made all data underlying the findings in their manuscript fully available?

The PLOS Data policy requires authors to make all data underlying the findings described in their manuscript fully available without restriction, with rare exception (please refer to the Data Availability Statement in the manuscript PDF file). The data should be provided as part of the manuscript or its supporting information, or deposited to a public repository. For example, in addition to summary statistics, the data points behind means, medians and variance measures should be available. If there are restrictions on publicly sharing data—e.g. participant privacy or use of data from a third party—those must be specified.

Reviewer #1: Yes

Reviewer #2: Yes

**********

5. Is the manuscript presented in an intelligible fashion and written in standard English?

PLOS ONE does not copyedit accepted manuscripts, so the language in submitted articles must be clear, correct, and unambiguous. Any typographical or grammatical errors should be corrected at revision, so please note any specific errors here.

Reviewer #1: Yes

Reviewer #2: Yes

**********

6. Review Comments to the Author

Please use the space provided to explain your answers to the questions above. You may also include additional comments for the author, including concerns about dual publication, research ethics, or publication ethics. (Please upload your review as an attachment if it exceeds 20,000 characters)

Reviewer #1: Thanks for the extensive work conducted to incorporate the feedback offered by the editor and reviewers.

One last issue for me was the availability of a data sample to test the software, but I see that this has been solved too.

I hope that you consider that this revision process has strengthened your manuscript.

Best wishes.

Reviewer #2: All the issues and suggestions raised by the reviewer were fully addressed.

This improved the quality and readability of the manuscript.

**********

7. PLOS authors have the option to publish the peer review history of their article (what does this mean?). If published, this will include your full peer review and any attached files.

If you choose “no”, your identity will remain anonymous but your review may still be made public.

Do you want your identity to be public for this peer review? For information about this choice, including consent withdrawal, please see our Privacy Policy.

Reviewer #1: Yes: Hector Martinez-Navarro

Reviewer #2: Yes: Bernardo Martins Rocha, Universidade Federal de Juiz de Fora

Acceptance letter

Rafael Sachetto Oliveira

18 May 2022

PONE-D-22-08656R1

Cardio PyMEA: A user-friendly, open-source Python application for cardiomyocyte microelectrode array analysis

Dear Dr. Dunham:

I'm pleased to inform you that your manuscript has been deemed suitable for publication in PLOS ONE. Congratulations! Your manuscript is now with our production department.

If your institution or institutions have a press office, please let them know about your upcoming paper now to help maximize its impact. If they'll be preparing press materials, please inform our press team within the next 48 hours. Your manuscript will remain under strict press embargo until 2 pm Eastern Time on the date of publication. For more information please contact onepress@plos.org.

If we can help with anything else, please email us at plosone@plos.org.

Thank you for submitting your work to PLOS ONE and supporting open access.

Kind regards,

PLOS ONE Editorial Office Staff

on behalf of

Dr. Rafael Sachetto Oliveira

Academic Editor

PLOS ONE

Associated Data

    This section collects any data citations, data availability statements, or supplementary materials included in this article.

    Supplementary Materials

    S1 File. Tutorial.

    User tutorial in PDF (*.pdf) format for adding new MEA geometries to Cardio PyMEA.

    (DOCX)

    S2 File. Save file.

    Example save file in spreadsheet (*.xlsx) format.

    (XLSX)

    S3 File. Batch file.

    Example batch file in spreadsheet (*.xlsx) format.

    (XLSX)

    Attachment

    Submitted filename: review_PONE-D-22-08656.pdf

    Attachment

    Submitted filename: Response to Reviewers PONE-D-22-08656.pdf

    Data Availability Statement

    Software will be available through Github at the link provided in the paper, which is also provided here for convenience: https://github.com/csdunhamUC/cardio_pymea All other data are to be provided through DataDryad and/or Zenodo at the following DOIs: Data: https://doi.org/10.5068/D14H5C Software Snapshot: https://doi.org/10.5281/zenodo.6462799 Software Supplemental (e.g. PIP requirements files): https://doi.org/10.5281/zenodo.6522426.


    Articles from PLoS ONE are provided here courtesy of PLOS

    RESOURCES