Version: 0.1.0
Title: Analyse and Visualise Multi Electrode Array Burst Data
Maintainer: Emily Gordon <emily.gordon@wadham.ox.ac.uk>
Description: Analyse and visualise multi electrode array data at the single electrode and whole well level, downstream of 'AxIS Navigator 3.6.2 Software' processing. Compare bursting parameters between time intervals and recordings using the bar chart visualisation functions. Compatible with 12- and 24- well plates.
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
Imports: data.table (≥ 1.15.4), dplyr (≥ 1.1.4), ggplot2 (≥ 3.5.0), janitor (≥ 2.2.0), kableExtra (≥ 1.4.0), knitr (≥ 1.46), readr (≥ 2.1.5), readxl (≥ 1.4.3), reshape2 (≥ 1.4.4), stringr (≥ 1.5.1), tidyr (≥ 1.3.1), tidyverse (≥ 2.0.0)
Depends: R (≥ 4.3.0)
Encoding: UTF-8
RoxygenNote: 7.3.1
LazyData: true
Suggests: rmarkdown (≥ 2.26), testthat (≥ 3.2.1)
VignetteBuilder: knitr
Config/testthat/edition: 3
URL: https://egordon2.github.io/MEA-analysis-package/
BugReports: https://github.com/egordon2/MEA-analysis-package/issues
NeedsCompilation: no
Packaged: 2025-05-02 14:34:24 UTC; Emily Gordon
Author: Emily Gordon [aut, cre]
Repository: CRAN
Date/Publication: 2025-05-06 08:30:06 UTC

MEA_heatmap

Description

Function creates a heatmap of the synchrony index for each well grouped by heatmap condition.

Usage

MEA_heatmap(
  data,
  x_axis_title = "Experimental Condition",
  well_filter = "A1|A2|A3|A4|A5|A6|B1|B2|B3|B4|B5|B6|C1|C2|C3|C4|C5|C6|D1|D2|D3|D4|D5|D6"
)

Arguments

data

Dataset containing well average synchrony index data.

x_axis_title

Include title for heatmap x axis. Default is "Experimental Condition"

well_filter

Argument can be used to filter for specific MEA wells to include in the heatmap.

Value

A heatmap of the synchrony index for each well grouped by heatmap condition.

Examples

p <- MEA_heatmap(data = input_heatmap_data,
            x_axis_title = "Experimental Condition",
            well_filter = "A1|A2|A3|A4|A5|A6|B1|B2|B3|B4|B5|B6|C1|C2|C3|C4|C5|C6|D1|D2|D3|D4|D5|D6")

Create Electrode Data Set

Description

This function reads in, filters, and reformats electrode burst csv files produced by the axis navigator tool (Axion Biosystems) for use in analysis. This function filters the data to only contain information relating to single electrodes and burst characteristics. It also adds a 'Recording_identifier' column to enable other MEAanalysis functions to calculate burst parameters for a specific recording, as well as a column to identify the well a burst was recorded in.

Usage

create_electrode_dataset(data_path, recording_identifier)

Arguments

data_path

Include path to electrode burst dataset csv or excel file produced by the axis navigator tool. This path should be written within quotation marks and with respect to the current working directory.

recording_identifier

Include a unique identifier for the MEA recording being loaded. This identifier will be added to the 'Recording_identifier' column and be used by other MEAanalysis functions to filter the data and calculate burst parameters.

Value

A reformatted and filtered electrode burst list for use in analysis.

Examples

output_electrode_burst <- create_electrode_dataset(
                                    data_path = system.file("extdata", "input_electrode_burst.csv",
                                                            package = "MEAanalysis"),
                                    recording_identifier = "burst_recording_1")

Create Synchrony Data Set

Description

This function reads in, filters, and reformats neural metric csv files produced by the axis navigator neural metric tool (Axion Biosystems) for use in synchrony index analysis.

Usage

create_synchrony_dataset(data_path, heatmap_condition)

Arguments

data_path

Include path to neural metric dataset csv or excel file produced by the axis navigator neural metric tool. This path should be written within quotation marks and with respect to the current working directory.

heatmap_condition

Include a unique identifier for this neuralMetric dataset's experimental condition, this argument will be used by the MEA_heatmap function to group data.

Value

A reformatted and filtered neural metric dataset for use in synchrony index analysis.

Examples

output_neuralMetric <- create_synchrony_dataset(
                                 data_path = system.file("extdata", "input_neuralMetric.csv",
                                                          package = "MEAanalysis"),
                                 heatmap_condition = "SI_condition_1")

Electrode Burst Duration

Description

Function reads in electrode burst list data and creates new columns with the mean, SD, and SEM burst duration recorded by single electrodes (within the specified time interval and recording).

Usage

electrode_burst_duration(
  data = output_table,
  time_lower_bound = 0,
  time_upper_bound = Inf,
  recording_identifier
)

Arguments

data

Electrode burst list dataset preprocessed using the create_electrode_dataset function.

time_lower_bound

Define lower bound of time interval for which to calculate the MEA parameter (seconds).

time_upper_bound

Define upper bound of time interval for which to calculate the MEA parameter (seconds).

recording_identifier

Define recording for which to calculate the MEA parameter. Use recording_identifier defined in create_electrode_dataset function.

Value

An electrode burst list table with three additional columns (mean, SD and SEM burst duration for single electrodes within the specified time interval and recording).

Examples

output_MEA_data <- electrode_burst_duration(data = input_MEA_data,
                                            time_lower_bound = 0,
                                            time_upper_bound = 30,
                                            recording_identifier = "burst_recording_1")

Electrode Mean Burst ISI

Description

Function reads in electrode burst list data and creates new columns with the mean, SD, and SEM mean ISI within a burst (sec) recorded by single electrodes (within the specified time interval and recording).

Usage

electrode_mean_burst_ISI(
  data = output_table,
  time_lower_bound = 0,
  time_upper_bound = Inf,
  recording_identifier
)

Arguments

data

Electrode burst list dataset preprocessed using the create_electrode_dataset function.

time_lower_bound

Define lower bound of time interval for which to calculate the MEA parameter (seconds).

time_upper_bound

Define upper bound of time interval for which to calculate the MEA parameter (seconds).

recording_identifier

Define recording for which to calculate the MEA parameter. Use recording_identifier defined in create_electrode_dataset function.

Value

An electrode burst list dataset with three additional columns (mean, SD and SEM mean ISI within a burst (sec) for single electrodes within the specified time interval and recording)

Examples

output_MEA_data <- electrode_mean_burst_ISI(data = input_MEA_data,
                                            time_lower_bound = 0,
                                            time_upper_bound = 30,
                                            recording_identifier = "burst_recording_1")

Electrode Number of Bursts

Description

Function reads in electrode burst list data and creates new columns with the mean, SD, and SEM number of bursts recorded by single electrodes (within the specified time interval and recording).

Usage

electrode_number_of_bursts(
  data = output_table,
  time_lower_bound = 0,
  time_upper_bound = Inf,
  recording_identifier
)

Arguments

data

Electrode burst list dataset preprocessed using the create_electrode_dataset function.

time_lower_bound

Define lower bound of time interval for which to calculate the MEA parameter (seconds).

time_upper_bound

Define upper bound of time interval for which to calculate the MEA parameter (seconds).

recording_identifier

Define recording for which to calculate the MEA parameter. Use recording_identifier defined in create_electrode_dataset function.

Value

An electrode burst list table with three additional columns (mean, SD and SEM number of bursts for single electrodes within the specified time interval and recording).

Examples

output_MEA_data <- electrode_number_of_bursts(data = input_MEA_data,
                                              time_lower_bound = 0,
                                              time_upper_bound = 30,
                                              recording_identifier = "burst_recording_1")

Electrode Spikes per Burst

Description

Function reads in electrode burst list data and creates new columns with the mean, SD, and SEM number of spikes per burst recorded by single electrodes (within the specified time interval and recording).

Usage

electrode_spikes_per_burst(
  data = output_table,
  time_lower_bound = 0,
  time_upper_bound = Inf,
  recording_identifier
)

Arguments

data

Electrode burst list dataset preprocessed using the create_electrode_dataset function.

time_lower_bound

Define lower bound of time interval for which to calculate the MEA parameter (seconds).

time_upper_bound

Define upper bound of time interval for which to calculate the MEA parameter (seconds).

recording_identifier

Define recording for which to calculate the MEA parameter. Use recording_identifier defined in create_electrode_dataset function.

Value

An electrode burst list table with three additional columns (mean, SD and SEM number of spikes per burst for single electrodes within the specified time interval and recording).

Examples

output_MEA_data <- electrode_spikes_per_burst(data = input_MEA_data,
                                              time_lower_bound = 0,
                                              time_upper_bound = 30,
                                              recording_identifier = "burst_recording_1")

Input dataset for electrode and well MEA parameter functions.

Description

A data set containing electrode burst list data filtered and reformated for use in analysis.

Usage

input_MEA_data

Format

A data frame with 8886 rows and 36variables:

Electrode
Time_s
Size_spikes
Duration_s
Recording_identifier
well

Source

<https://www.github.com/egordon2/MEAanalysis>


Input dataset for single_electrode_barchart function

Description

A data set containing electrode burst data with additional columns calculated for various MEA parameters.

Usage

input_electrode_barchart

Format

A data frame with 8886 rows and 58 variables

Source

<https://www.github.com/egordon2/MEAanalysis>


Input dataset for MEA_heatmap function

Description

A data set with well average synchrony index data for a baseline and comparison experimental condition.

Usage

input_heatmap_data

Format

A data frame with 24 rows and 3 variables

Well
synchrony_index: Baseline
synchrony_index: Agonist Challenge

Source

<https://www.github.com/egordon2/MEAanalysis>


Input dataset for well_barchart function

Description

A data set containing electrode burst data with additional columns calculated for various MEA parameters.

Usage

input_well_barchart

Format

A data frame with 8886 rows and 70 variables

Source

<https://www.github.com/egordon2/MEAanalysis>


Single Electrode Bar chart

Description

Function creates a bar chart of calculated MEA parameters by single electrode for a given time interval and recording.

Usage

single_electrode_barchart(
  data = output_table,
  electrode_parameter,
  electrode_filter =
    "A1|A2|A3|A4|A5|A6|B1|B2|B3|B4|B5|B6|C1|C2|C3|C4|C5|C6|D1|D2|D3|D4|D5|D6",
  statistic = se
)

Arguments

data

Dataset containing electrode burst data and calculated MEA parameter. Use create_electrode_dataset and electrode parameter functions to preprocess data before use in this function (i.e., electrode_burst_duration, electrode_mean_burst_ISI, electrode_number_of_bursts, electrode_spikes_per_burst).

electrode_parameter

Include "number_of_bursts"/ "burst_duration"/ "spikes_per_burst"/ "mean_burst_ISI" to determine the parameter visualised in the barchart.

electrode_filter

Argument can be used to filter for single electrodes to include in the barchart.

statistic

Include "se" or "sd" to determine whether bar chart error bars represent the standard error or standard deviation of the mean.

Value

A bar chart of calculated MEA parameters by single electrode for a given time interval and recording.

Examples

p <- single_electrode_barchart(data = input_electrode_barchart,
                          electrode_parameter = "burst_duration",
                          electrode_filter = "A1_",
                          statistic = se)

p <- single_electrode_barchart(data = input_electrode_barchart,
                          electrode_parameter = "spikes_per_burst",
                          electrode_filter = "A1_",
                          statistic = se)

p <- single_electrode_barchart(data = input_electrode_barchart,
                          electrode_parameter = "mean_burst_ISI",
                          electrode_filter = "A1_",
                          statistic = se)

p <- single_electrode_barchart(data = input_electrode_barchart,
                          electrode_parameter = "number_of_bursts",
                          electrode_filter = "A1_")

Well Bar chart

Description

Function creates a bar chart of calculated MEA parameters by well for a given time interval and recording.

Usage

well_barchart(
  data = output_table,
  well_parameter,
  well_filter = "A1|A2|A3|A4|A5|A6|B1|B2|B3|B4|B5|B6|C1|C2|C3|C4|C5|C6|D1|D2|D3|D4|D5|D6",
  statistic = se
)

Arguments

data

Dataset containing electrode burst data and calculated MEA parameter. Use create_electrode_dataset and well parameter functions to preprocess data before use in this function (i.e., well_burst_duration, well_mean_burst_ISI, well_number_of_bursts, well_spikes_per_burst).

well_parameter

Include "number_of_bursts"/ "burst_duration"/ "spikes_per_burst"/ "mean_burst_ISI" to determine the parameter visualised in the barchart.

well_filter

Argument can be used to filter for specific MEA wells to include in the barchart.

statistic

Include "se" or "sd" to determine whether bar chart error bars represent the standard error or standard deviation of the mean.

Value

A bar chart of calculated MEA parameters by single electrode for a given time interval and recording.

Examples

p <- well_barchart(data = input_well_barchart,
              well_parameter = "burst_duration",
              well_filter = "A1|A2|A3|A4",
              statistic = se)

p <- well_barchart(data = input_well_barchart,
              well_parameter = "spikes_per_burst",
              well_filter = "A1|A2|A3|A4",
              statistic = se)

p <- well_barchart(data = input_well_barchart,
              well_parameter = "mean_burst_ISI",
              well_filter = "A1|A2|A3|A4",
              statistic = se)

p <- well_barchart(data = input_well_barchart,
              well_parameter = "number_of_bursts",
              well_filter = "A1|A2|A3|A4",
              statistic = se)

Well Burst Duration

Description

Function reads in electrode burst list data and creates new columns with the mean, SD, and SEM burst duration recorded for each well (within the specified time interval and recording).

Usage

well_burst_duration(
  data = output_table,
  time_lower_bound = 0,
  time_upper_bound = Inf,
  recording_identifier
)

Arguments

data

Electrode burst list dataset preprocessed using the create_electrode_dataset function.

time_lower_bound

Define lower bound of time interval for which to calculate the MEA parameter (seconds).

time_upper_bound

Define upper bound of time interval for which to calculate the MEA parameter (seconds).

recording_identifier

Define recording for which to calculate the MEA parameter. Use recording_identifier defined in create_electrode_dataset function.

Value

An electrode burst list table with three additional columns (mean, SD and SEM burst duration recorded for each well within the specified time interval and recording).

Examples

output_MEA_data <- well_burst_duration(data = input_MEA_data,
                                       time_lower_bound = 0,
                                       time_upper_bound = 30,
                                       recording_identifier = "burst_recording_1")

Well Mean Burst ISI

Description

Function reads in electrode burst list data and creates new columns with the mean, SD, and SEM mean ISI within a burst (sec) recorded for each well (within the specified time interval and recording).

Usage

well_mean_burst_ISI(
  data = output_table,
  time_lower_bound = 0,
  time_upper_bound = Inf,
  recording_identifier
)

Arguments

data

Electrode burst list dataset preprocessed using the create_electrode_dataset function.

time_lower_bound

Define lower bound of time interval for which to calculate the MEA parameter (seconds).

time_upper_bound

Define upper bound of time interval for which to calculate the MEA parameter (seconds).

recording_identifier

Define recording for which to calculate the MEA parameter. Use recording_identifier defined in create_electrode_dataset function.

Value

An electrode burst list table with three additional columns (mean, SD and SEM mean ISI within a burst (sec) recorded for each well within the specified time interval and recording).

Examples

output_MEA_data <- well_mean_burst_ISI(data = input_MEA_data,
                                       time_lower_bound = 0,
                                       time_upper_bound = 30,
                                       recording_identifier = "burst_recording_1")

Well Number of Bursts

Description

Function reads in electrode burst list data and creates new columns with the mean, SD, and SEM number of bursts recorded for each well (within the specified time interval and recording).

Usage

well_number_of_bursts(
  data = output_table,
  time_lower_bound = 0,
  time_upper_bound = Inf,
  recording_identifier
)

Arguments

data

Electrode burst list dataset preprocessed using the create_electrode_dataset function.

time_lower_bound

Define lower bound of time interval for which to calculate the MEA parameter (seconds).

time_upper_bound

Define upper bound of time interval for which to calculate the MEA parameter (seconds).

recording_identifier

Define recording for which to calculate the MEA parameter. Use recording_identifier defined in create_electrode_dataset function.

Value

An electrode burst list table with three additional columns (mean, SD and SEM number of bursts recorded for each well within the specified time interval and recording).

Examples

output_MEA_data <- well_number_of_bursts(data = input_MEA_data,
                                         time_lower_bound = 0,
                                         time_upper_bound = 30,
                                         recording_identifier = "burst_recording_1")

Well Spikes per Burst

Description

Function reads in electrode burst list data and creates new columns with the mean, SD, and SEM number of spikes per burst recorded for each well (within the specified time interval and recording).

Usage

well_spikes_per_burst(
  data = output_table,
  time_lower_bound = 0,
  time_upper_bound = Inf,
  recording_identifier
)

Arguments

data

Electrode burst list dataset preprocessed using the create_electrode_dataset function.

time_lower_bound

Define lower bound of time interval for which to calculate the MEA parameter (seconds).

time_upper_bound

Define upper bound of time interval for which to calculate the MEA parameter (seconds).

recording_identifier

Define recording for which to calculate the MEA parameter. Use recording_identifier defined in create_electrode_dataset function.

Value

An electrode burst list table with three additional columns (mean, SD and SEM number of spikes per burst recorded for each well within the specified time interval and recording).

Examples

output_MEA_data <- well_spikes_per_burst(data = input_MEA_data,
                                         time_lower_bound = 0,
                                         time_upper_bound = 30,
                                         recording_identifier = "burst_recording_1")