Title: | Seahtrue revives XF data for structured data analysis |
---|---|
Description: | Seahtrue organizes oxygen consumption and extracellular acidification analysis data from experiments performed on an XF analyzer into structured nested tibbles.This allows for detailed processing of raw data and advanced data visualization and statistics. Seahtrue introduces an open and reproducible way to analyze these XF experiments. It uses file paths to .xlsx files. These .xlsx files are supplied by the userand are generated by the user in the Wave software from Agilent from the assay result files (.asyr). The .xlsx file contains different sheets of important data for the experiment; 1. Assay Information - Details about how the experiment was set up. 2. Rate Data - Information about the OCR and ECAR rates. 3. Raw Data - The original raw data collected during the experiment. 4. Calibration Data - Data related to calibrating the instrument. Seahtrue focuses on getting the specific data needed for analysis. Once this data is extracted, it is prepared for calculations through preprocessing. To make sure everything is accurate, both the initial data and the preprocessed data go through thorough checks. |
Authors: | Vincent de Boer [cre, aut] , Gerwin Smits [aut], Xiang Zhang [aut] |
Maintainer: | Vincent de Boer <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.1.0 |
Built: | 2024-10-31 05:18:52 UTC |
Source: | https://github.com/bioc/seahtrue |
This function takes a folder path and on the available .xlsx files the revive_xfplate() function is run and output in one nested tibble.
glue_xfplates(folderpath_seahorse, arg_is_folder)
glue_xfplates(folderpath_seahorse, arg_is_folder)
folderpath_seahorse |
the path to a folder where the .xlsx files are located or a vector of strings pointing to the path of each individual file |
arg_is_folder |
either TRUE or FALSE. When the input is a vector of path strings use FALSE, is it points to a folder use TRUE |
a nested tibble with all files organized in a row
c( system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ), system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) ) |> glue_xfplates(arg_is_folder = FALSE)
c( system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ), system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) ) |> glue_xfplates(arg_is_folder = FALSE)
A dataset containing output for the "20191219_SciRep_PBMCs_donor_A.xlsx" file. This experiment was part of the study that was published in Janssen et al. (2021) Sci rep 11:1662. This is data from PBMCs that were isolated from buffy coats as described in the material and methods section of Janssen et al. (2021). The .xlsx file is the result of a single XF experiment on one plate. This .xlsx file was used as input for the revive_xfplate() function. The output of that function contains the read, preprocessed, and validated data in the form a a nested tibble. The file '20191219_SciRep_PBMCs_donor_A.xlsx' can be found in the inst/extdata directory.
data(revive_output_donor_A)
data(revive_output_donor_A)
A data frame with 1 row and 7 variables.
Barcode plate id of the well plate containing the samples
Path, and basename to .xlsx file
Date and time when the plate was run
Date and time this output from revive_xfplate() was generated
Meta information from 'Assay Configuration' sheet and 'Calibration' sheet
Dataframe with information from the 'Operation log' sheet
Preprocessed raw dataframe from 'Raw' sheet
Preprocessed rate data from 'Rate' sheet
A list of all validation information, output, and rules that are used
Janssen et al. 2021 Sci Rep 11:1162 <https://doi.org/10.1038/s41598-021-81217-4>
This function takes the Seahorse Wave .xlsx file and computes it through read, validate and preprocess
revive_xfplate(filepath_seahorse)
revive_xfplate(filepath_seahorse)
filepath_seahorse |
Absolute path to the Seahorse Excel file. |
A preprocessed seahorse dataset is returned as an output. This is a nested tibble with the following 7 columns:
* plate_id = Barcode plate id of the well plate containing the samples
* filepath_seahorse = Path, and basename to .xlsx input file
* date_run = Date and time when the plate was run
* date_processed = Date and time this output from revive_xfplate() was generated
* assay_info = Meta information from 'Assay Configuration' sheet and 'Calibration' sheet
* injection_info = Dataframe with information from the 'Operation log' sheet
* raw_data = Preprocessed raw dataframe from 'Raw' sheet
* rate_data = Preprocessed rate data from 'Rate' sheet
# validation_output = Output of the data checks. including rules
revive_xfplate( system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) )
revive_xfplate( system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) )
In this plot the OCR or ECAR is plotted per group for each plate in a faceted gpgplot
sketch_assimilate_rate(my_df, param = "OCR", my_measurements = c(3, 6, 7, 12))
sketch_assimilate_rate(my_df, param = "OCR", my_measurements = c(3, 6, 7, 12))
my_df |
a tibble generated by glue_xfplates() with for each row representing a single xf experiment |
param |
either "OCR" or "ECAR" |
my_measurements |
the measurements that needs to be in the plot. For example, c(3,6,7,12) for a typical mito stress test. |
a ggplot object
suppressMessages( c( system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ), system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) ) |> glue_xfplates(arg_is_folder = FALSE) |> sketch_assimilate_rate( param = "OCR", my_measurements = c(3, 4, 9, 12) ) )
suppressMessages( c( system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ), system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) ) |> glue_xfplates(arg_is_folder = FALSE) |> sketch_assimilate_rate( param = "OCR", my_measurements = c(3, 4, 9, 12) ) )
In this plot the O2, pH, or its emission value at the very first measurement point plotted for all wells from all xfplates that are provided to the function.
sketch_assimilate_raw(my_df, param = "O2_mmHg")
sketch_assimilate_raw(my_df, param = "O2_mmHg")
my_df |
a tibble generated by glue_xfplates() with for each row representing a single xf experiment |
param |
either "O2_mmHg", "pH", "O2_em_corr" or "pH_em_corr |
a ggplot object
suppressMessages( c( system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ), system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) ) |> glue_xfplates(arg_is_folder = FALSE) |> sketch_assimilate_raw(param = "O2_mmHg") )
suppressMessages( c( system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ), system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) ) |> glue_xfplates(arg_is_folder = FALSE) |> sketch_assimilate_raw(param = "O2_mmHg") )
A heatmap style ggplot figure with each well labeled with a color for each group
sketch_plate(xfplate, reorder_legend = FALSE)
sketch_plate(xfplate, reorder_legend = FALSE)
xfplate |
This the 'raw_data' or the 'rate_data' tibble that is generated by the 'revive_xfplate()' function |
reorder_legend |
either 'TRUE' or 'FALSE'. When 'TRUE' the groups are ordered based on the number in the character string of the group. It also adds a "__00" after each character string to make the forcats::refactor(group, parse_number(group)) work. |
a ggplot object of a 96 well plate with the group layout
system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) |> revive_xfplate() |> purrr::pluck("raw_data", 1) |> sketch_plate(reorder_legend = TRUE)
system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) |> revive_xfplate() |> purrr::pluck("raw_data", 1) |> sketch_plate(reorder_legend = TRUE)
The sketch_rate() function uses the rate_data from the generated output from the revive_xfplate() function. The injection info is annotated in the plot, using the information form the injections provided in the original experiment. Several options are available to plot either ECAR/OCR or normalize the data with the values from the normalization cells in the .xlsx file.
A number of validations are performed to check whether the data can be plotted and whether the layout of the plot will not be ruined...
sketch_rate( xf_rate, param = "OCR", normalize = FALSE, normalize_unit = "10000 cells", take_group_mean = TRUE, reorder_legend = FALSE )
sketch_rate( xf_rate, param = "OCR", normalize = FALSE, normalize_unit = "10000 cells", take_group_mean = TRUE, reorder_legend = FALSE )
xf_rate |
The 'rate_data' tibble as generated by 'revive_plate' |
param |
Either "OCR" or "ECAR" |
normalize |
Either TRUE or FALSE |
normalize_unit |
any string that will be pasted in the y-axis label when normalize = TRUE |
take_group_mean |
Either TRUE or FALSE |
reorder_legend |
Either TRUE or FALSE. When 'TRUE' the groups are ordered based on the number in the character string of the group. It also adds a "__00" after each character string to make the forcats::refactor(group, parse_number(group)) work. |
a ggplot object
system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) |> revive_xfplate() |> purrr::pluck("rate_data", 1) |> sketch_rate( param = "OCR", reorder_legend = TRUE ) system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) |> revive_xfplate() |> purrr::pluck("rate_data", 1) |> sketch_rate( param = "OCR", take_group_mean = FALSE, reorder_legend = TRUE ) system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) |> revive_xfplate() |> purrr::pluck("rate_data", 1) |> sketch_rate( param = "ECAR", normalize = TRUE, take_group_mean = TRUE, reorder_legend = TRUE ) system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) |> revive_xfplate() |> purrr::pluck("rate_data", 1) |> sketch_rate( param = "ECAR", normalize = TRUE, take_group_mean = FALSE, reorder_legend = TRUE )
system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) |> revive_xfplate() |> purrr::pluck("rate_data", 1) |> sketch_rate( param = "OCR", reorder_legend = TRUE ) system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) |> revive_xfplate() |> purrr::pluck("rate_data", 1) |> sketch_rate( param = "OCR", take_group_mean = FALSE, reorder_legend = TRUE ) system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) |> revive_xfplate() |> purrr::pluck("rate_data", 1) |> sketch_rate( param = "ECAR", normalize = TRUE, take_group_mean = TRUE, reorder_legend = TRUE ) system.file("extdata", "20191219_SciRep_PBMCs_donor_A.xlsx", package = "seahtrue" ) |> revive_xfplate() |> purrr::pluck("rate_data", 1) |> sketch_rate( param = "ECAR", normalize = TRUE, take_group_mean = FALSE, reorder_legend = TRUE )