calc_burst_distributions: calculate and plot burst featues distributions

Description Usage Arguments Details Note Author(s) Examples

View source: R/burstDistributions_functions.R

Description

The function calculates normalized distributions of selected bursting features and plots distribution graphs of all treatments in a recording. The function also prints csv output in the /Analysis directory for downstream stats such as permutation test of treatment labels

Usage

1
2
3
calc_burst_distributions(s, min_vals = 1, xlimit = 25, bins_in_sec = 5, 
feature = "non", filter_values_by_min = 0, min_values = 0, per_well = 0, 
outputdir = tempdir(), min_electrodes = 4, time_stamp = "DATE_TIME")

Arguments

s

MEA data structure

min_vals

minimum values number per electrode, electrodes with a smaller number of values than that are discarded

xlimit

max limit of values, for example: xlimit = 25 for IBI analysis means that IBIs longer than 25 seconds will not be part of distribution calculations

bins_in_sec

how many bins to cut each of the segments. For example: IBI analysis has 25 seconds as xlimit, to analyse in a 0.1 sec resolution bins_in_sec should be set to 10, for 1 sec resolution set bins_in_sec to 1

feature

what feature to analyze, options are "ibi", "isi, "nspikes_in_burst", "duration", "spikes_density_in_burst"

filter_values_by_min

should analysis disregard values with lower then filter_values_by_min number of values ? (0/1, default is 0). For example, if set to 1 for duration analysis, should analysis consider also bursts shorter than filter_values_by_min ?

min_values

disregards values with lower then filter_values_by_min , only if filter_values_by_min set to 1

per_well

should distribution analysis be performed by testing treatment differences on well level means (1) or electrode level means(0)

outputdir

output directory

min_electrodes

minimum electrodes for an active well

time_stamp

time stamp for the output files

Details

Plot distributions calculates normalized distributions of bursting features. 'Normalized distribution' are a way to handle biases caused by noisy electrodes/wells. The function will calculate a normalized histogram (values 0-1) of each feature for each electrode. Next, it will average histogram values either per well and then average all wells per treatment, or directly per treatment. All comparisons between treatments will be then made by plotting the normalized histograms of each treatment and running a K-S test between them.

Note

Output is a made of: 1) Plots of all selected burst features distributions. 2) CSV files ending with _distributions.csv that harbor all electrodes per treatment for all the recordings loaded in the meaRtools pipeline for a specific MEA plate

Author(s)

Sahar Gelfman

Examples

1
2
3
4
5
6
# Load exapmple of recording Robject (MEA data structure)
data("S")  
feature="ibi"; 

   calc_burst_distributions(S, min_vals = 15, xlimit = 20, bins_in_sec = 5, 
           feature = feature, per_well = 0, outputdir = "/Analysis")

meaRtools documentation built on May 1, 2019, 7:32 p.m.