From b48b8add2e1a88b8e8e32d84ab22312244a377e1 Mon Sep 17 00:00:00 2001 From: GeneDocAl Date: Fri, 20 Dec 2024 15:14:45 -0500 Subject: [PATCH 1/3] Added well# variable to allow for 2+ per condition --- R/ElectrodeBurstsClass.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/ElectrodeBurstsClass.R b/R/ElectrodeBurstsClass.R index 5f51923..93b8ab4 100644 --- a/R/ElectrodeBurstsClass.R +++ b/R/ElectrodeBurstsClass.R @@ -202,7 +202,7 @@ ElectrodeBursts <- R6Class( #' @param plot_title The title of the plot. #' @return A ggpubr object representing the combined raster plots. #' - create_comparison_raster_plot = function(control_group, treatments_array, plot_title) { + create_comparison_raster_plot = function(control_group, treatments_array, plot_title, well.num) { create_raster <- function(well, x_lim) { plot_data <- self$data %>% dplyr::mutate( @@ -296,7 +296,7 @@ ElectrodeBursts <- R6Class( # Combine the two well plots side by side combined_plot <- ggpubr::ggarrange( plotlist = well_plots, - ncol = 2, + ncol = well.num, nrow = 1, common.legend = TRUE, legend = "none" From b6f1136b0a039a92a62c37aeb5d28b0e82f38dd6 Mon Sep 17 00:00:00 2001 From: GeneDocAl Date: Fri, 20 Dec 2024 15:19:33 -0500 Subject: [PATCH 2/3] readme clarification Made the inputs clearer, and updated electrode burst for new well.num option --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cc3d96f..d8a6595 100644 --- a/README.md +++ b/README.md @@ -86,12 +86,14 @@ To use this package, start by initializing the appropriate class with your data ```R # For single file analysis +# file is the average value .csv, the one with no subtitles mea_analysis <- MEAnalysis$new("path/to/your/file.csv") # For batch analysis batch_analysis <- BatchMEAnalysis$new(list_of_file_paths) # For electrode burst analysis +# file is the electrode_burst_list electrode_bursts <- ElectrodeBursts$new("path/to/your/file.csv") ``` @@ -104,7 +106,7 @@ Then, you can use the various methods provided by each class to analyze your dat # Create a treatment averages t-test plot plot <- mea_analysis$treatment_averages_t_test_plot( "Control", - c("Treatment1", "Treatment2"), + c("Control", "Treatment1", "Treatment2"), "Treatment Averages T-Test Plot" ) # plot is a ggplot object @@ -126,7 +128,7 @@ plot <- batch_analysis$run_mea_analysis( # Generate significance overview overview <- batch_analysis$generate_significance_overview( "Control", - c("Treatment1", "Treatment2"), + c("Control", "Treatment1", "Treatment2"), c("MeanFiringRate", "BurstFrequency"), "Significance Overview" ) @@ -139,8 +141,9 @@ overview <- batch_analysis$generate_significance_overview( # Create a comparison raster plot plot <- electrode_bursts$create_comparison_raster_plot( "Control", - c("Treatment1", "Treatment2"), - "Comparison Raster Plot" + c("Control", "Treatment1", "Treatment2"), + "Comparison Raster Plot", + 3 ) # plot is a ggpubr object ``` From 5b437ca68505e4acf737d9b9ca9f2bd41e3ac01e Mon Sep 17 00:00:00 2001 From: GeneDocAl Date: Fri, 20 Dec 2024 15:20:58 -0500 Subject: [PATCH 3/3] further update --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d8a6595..139a9f3 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ Key methods: - `control_group`: character - The control group to be included in the comparison - `treatments_array`: character vector - An array of treatment names to compare - `plot_title`: character - The title of the plot + - `num.well`: number - Highest number of well replicates amongst chosen conditions - Returns: ggpubr object - A combined raster plot comparing multiple treatments ## Usage