plot_gr_microplate: Function to plot growth rates over microplate frame.

View source: R/plot_gr_microplate.R

plot_gr_microplateR Documentation

Function to plot growth rates over microplate frame.

Description

This function takes a dataframe with the raw data and the information from the layout file. Calculate growth rate and plot this growth rates over a microplate frame.

Usage

plot_gr_microplate(
  df_data,
  var_gr,
  exp_title = NULL,
  ws,
  cond_to_col,
  plate_file = NULL,
  output_filename
)

Arguments

df_data

Is a dataframe that combines data files with layout files

var_gr

This the attribute to be used to calculate growth rates

exp_title

optional, add the title.

ws

is the windowsize in hours

cond_to_col

The condition from the layout to color

plate_file

plate file to be use to compute growth rates in case of multiple files.

output_filename

The name of the output file followed by proper extension, ie. .png

Value

Returns the background plot which is the microplate frame and over this the plot of growth rates in each well. The background plot shows in the x-axis the number of columns and in the y-axis the letter to identified the row.

Warning

Note that the time should be a time series, if the time series is broken the growth rates are not calculated and the process stop.

Examples

## Not run: 
# Get the data file path
file_path_sp <- system.file(
 "extdata",
 "test_gr_spectramax.txt",
 package = "mpxtractor"
)

# Extract the data stored in the files into a df using proper wrangling function
df_sp <- mpxtractor::read_spectramax_data(
 file = file_path_sp
 )
 # get the path to layout file
file_path_layout <- system.file(
 "extdata", "test_layout_file.csv",
 package = "mpxtractor"
)
# combine raw data with layout scheme
df_data_combine <- mpxtractor::combine_data_with_layout(
 df_data = df_sp,
 reader_type = "spectramax",
 layout_files = file_path_layout
)

microplateplot <- mpxtractor::plot_gr_microplate(
 df_data = df_data_combine,
 var_gr = "Measurement",
 exp_title = "Spectramax experiment",
 ws = "2hs",
 cond_to_col = "condition",
 output_filename = "growth_rates_test.png")

## End(Not run)
#Check vignette **plotting_functions()** for more information.


MartinBanchero/mpxtractor documentation built on March 30, 2022, 10:56 p.m.