| Title: | A Transparent Analysis Pipeline for Mammalian Metabolic Phenotype Microarray Data |
|---|---|
| Description: | Provides a transparent, end-to-end workflow for analyzing high-throughput phenotype microarray data in mammalian cell cultures. It begins with automated reading and noise correction, followed by comprehensive quality control via visual diagnostics, i.e. detecting missing wells, anomalous curve shapes and variance. Area under Curve is computed as a summary metric. Biological annotations (custom or in-built for PM-M01,PM-M02, PM-M11 - PM-M14) enable group-level comparisons. |
| Authors: | Katja Danielzik [aut, cre, cph] (ORCID: <https://orcid.org/0009-0007-5021-6212>), Willson Tjioe [aut] (ORCID: <https://orcid.org/0009-0003-3530-1727>), Julia Asche [ctb], Johann Matschke [ctb] (ORCID: <https://orcid.org/0000-0003-4878-8741>), Daniel Hoffmann [ctb] (ORCID: <https://orcid.org/0000-0003-2973-7869>) |
| Maintainer: | Katja Danielzik <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.3 |
| Built: | 2026-11-11 23:58:05 UTC |
| Source: | https://github.com/cran/MetPhenoR |
Integrates experimental assay data with annotation files to assign chemical identities to individual wells. Annotation tables are assumed to be preloaded in the R environment.
annotate_chemical( data, annotation, control_map = list(negative = c("Negative Control", "No Chemical"), positive = c("a-D-Glucose", "D-(+)-Glucose")) )annotate_chemical( data, annotation, control_map = list(negative = c("Negative Control", "No Chemical"), positive = c("a-D-Glucose", "D-(+)-Glucose")) )
data |
A list object containing a data frame element named
|
annotation |
A data frame or a list of data frames containing annotation
metadata. Each data frame must include the columns |
control_map |
Optional named list specifying control classifications.
Each name defines a control category, and each element is a character vector
of chemical names assigned to that category. Defaults include
|
The function performs the following operations:
Accepts one or multiple annotation data frames.
Combines annotation tables into a unified data frame and removes duplicates.
Merges annotation metadata with the experimental dataset based on
"Plate.Type" and "Well".
Optionally assigns control categories based on chemical identity using
control_map.
Column name matching is case-sensitive; ensure consistent naming across inputs.
The input data object with an updated data element,
containing merged annotation columns and, if applicable, an additional
control column indicating control classification.
data("processed_data") data("PM_M01_M02") processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) head(processed_data$data)data("processed_data") data("PM_M01_M02") processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) head(processed_data$data)
Integrates experimental assay data with one or more annotation tables to assign chemical or treatment identities to wells.
annotate_metadata(data, annotation)annotate_metadata(data, annotation)
data |
A list containing a data frame element |
annotation |
A data frame or a list of data frames containing annotation
metadata. Each must include columns |
The function performs the following steps:
Accepts one or multiple annotation data frames.
Combines annotation tables and removes duplicate rows.
Merges annotation metadata into the experimental dataset
using "Chemical" as keys.
The input data object with an updated auc_ratio
element that includes annotation columns.
data("processed_data") # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) processed_data <- compute_auc_ratio(processed_data) processed_data <- annotate_metadata(processed_data, annotation = PM_M01_M02)data("processed_data") # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) processed_data <- compute_auc_ratio(processed_data) processed_data <- annotate_metadata(processed_data, annotation = PM_M01_M02)
Classifies growth curve dynamics from optical density (OD) time-series data using smoothing splines and their first derivatives. Curve behavior is inferred based on derivative thresholds and quality control (QC) metrics, enabling categorization into biologically interpretable growth states.
classify_growth_curve_types( data, spar = 0.7, drop_threshold = -0.01, tol = 0.01, max_od_threshold = 0.1 )classify_growth_curve_types( data, spar = 0.7, drop_threshold = -0.01, tol = 0.01, max_od_threshold = 0.1 )
data |
A structured list containing:
|
spar |
Numeric. Smoothing parameter passed to |
drop_threshold |
Numeric. Threshold for detecting negative growth phases
based on the first derivative (default: |
tol |
Numeric. Tolerance around zero for classifying flat growth
(default: |
max_od_threshold |
Numeric. Maximum OD value below which a curve is
classified as low, flat signal (default: |
The classification distinguishes between actively growing, declining, flat (low signal), slow-growing, and uncertain curves. Uncertainty is assigned when data quality is insufficient or exhibits excessive noise.
For each well, a smoothing spline is fitted to OD measurements over time. The first derivative of the fitted spline is used to quantify growth dynamics:
Positive derivatives indicate growth phases.
Negative derivatives indicate declines in OD.
Near-zero derivatives indicate stationary or flat behavior.
Quality control flags are applied to identify unreliable classifications:
Low data density (fewer than four time points).
High noise, defined as a large standard deviation of derivatives relative to the OD range.
Curve classification is assigned according to the following hierarchy:
"uncertain": QC criteria not satisfied.
"OD_drop": Significant negative derivative detected.
"flat_low": Flat curve with low maximum OD.
"growing": Positive growth phase detected.
"slow_growing": Residual category for weak or inconsistent growth.
A list identical in structure to the input, augmented with a
classification element containing:
A data frame including spline-fitted values and first derivatives for each observation.
A summarized data frame with per-well QC metrics and assigned curve classifications.
data("processed_data") processed_data <- classify_growth_curve_types(processed_data) head(processed_data$classification)data("processed_data") processed_data <- classify_growth_curve_types(processed_data) head(processed_data$classification)
Computes the Area Under the Curve (AUC) for time-series optical density (OD) measurements on a per-well basis using spline-based regression, followed by residual bootstrap to quantify uncertainty.
compute_auc_ci( data, target_curve_type = "growing", n_boot = 100, spline_df = 4, store = TRUE )compute_auc_ci( data, target_curve_type = "growing", n_boot = 100, spline_df = 4, store = TRUE )
data |
A structured list containing:
|
target_curve_type |
Character vector specifying which curve types to include
(default: |
n_boot |
Integer. Number of bootstrap replicates (default: 1000). |
spline_df |
Integer. Degrees of freedom for natural spline fitting (default: 4). |
store |
Logical. If |
A tibble or modified data object (see details).
data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) head(processed_data$auc_results)data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) head(processed_data$auc_results)
This function calculates normalized AUC ratios relative to control wells
and integrates the results into the structured data object,
consistent with compute_auc_ci().
compute_auc_ratio( data, control_labels = c("Negative Control", "No Chemical"), store = TRUE )compute_auc_ratio( data, control_labels = c("Negative Control", "No Chemical"), store = TRUE )
data |
A structured list containing:
|
control_labels |
Character vector defining control wells
(default: |
store |
Logical; if |
If store = TRUE, returns updated data object.
Otherwise returns a tibble with AUC ratio calculations.
data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) processed_data <- compute_auc_ratio(processed_data) head(processed_data$auc_ratio)data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) processed_data <- compute_auc_ratio(processed_data) head(processed_data$auc_ratio)
Excludes one 96-well plate specified by plate_type and filters from data$data.
filter_data(data, plate_type, filters = NULL)filter_data(data, plate_type, filters = NULL)
data |
A structured list containing:
|
plate_type |
Character vector of Plate.Type to exclude in combination with filters |
filters |
Named list of filtering conditions that should be excluded in plates with 'plate_type'.
E.g. list(radiation.dose="0Gy",time.h="2h"),
were list elements have to be the user provided 'variables' |
Filtered data$data element.
data("processed_data") # before filtering qc_data(processed_data) processed_data <- filter_data(processed_data, plate_type = "PM-M01", filters = list( cell.line = "A", treatment = "treatment", inhibitor = "inhibitor", time = "2h" ) ) # after filtering qc_data(processed_data)data("processed_data") # before filtering qc_data(processed_data) processed_data <- filter_data(processed_data, plate_type = "PM-M01", filters = list( cell.line = "A", treatment = "treatment", inhibitor = "inhibitor", time = "2h" ) ) # after filtering qc_data(processed_data)
one PlateInfo.csv file
data("PlateInfo")data("PlateInfo")
A data frame with 1 observations on the following 13 variables.
PlateIda character vector
a character vector
a character vector
a character vector
Samplea character vector
a POSIXct
a numeric vector
a numeric vector
a logical vector
a numeric vector
Positiona character vector
Protocola logical vector
Descriptiona logical vector
# data read in ## list all files including all subdirectories data_path <- "~/Documents/Metabolomics/odin_pipeline/data/ODIN_Sarah_Etemadi_Afshar/CSV for Katja/Drug plates/H460/" files <- list.files(path=data_path, include.dirs = TRUE, recursive = TRUE, full.names = TRUE) # detect metadata in PlateInfo files PlateInfo <- files[stringr::str_detect(string = files, pattern = "_PlateInfo.csv")] # read in Plate Info files PlateInfo <- lapply(PlateInfo,readr::read_csv) PlateInfo <- purrr::list_rbind(PlateInfo) # detect raw RawReads <- files[stringr::str_detect(string = files, pattern ="_RawReads.csv")] RawReads <- lapply(RawReads,readr::read_csv)
RawRead <- RawReads[[1]] use_data(RawRead)
PlateInfo <- PlateInfo[PlateInfo$PlateId==RawRead$PlateId[1],] PlateInfo$Sample <- gsub(" ","_",PlateInfo$Sample)
data(PlateInfo) head(PlateInfo)data(PlateInfo) head(PlateInfo)
Generates faceted visualizations of area-under-the-curve (AUC) estimates for a selected plate across experimental conditions. The function highlights wells that deviate from reference limits derived from negative controls and overlays these limits for visual comparison.
plot_auc(data, selected_plate, facet_vars = NULL)plot_auc(data, selected_plate, facet_vars = NULL)
data |
A list containing processed results. Must include
|
selected_plate |
Character scalar specifying the plate to analyse. |
facet_vars |
Character vector (length |
Control limits are computed within each facet as the minimum and maximum bounds of the AUC confidence intervals from negative control wells.
The function performs the following steps:
Filters data for the selected plate.
Splits data by non-faceted experimental variables.
Classifies wells as negative control, positive control, or test wells.
Computes facet-specific control limits from negative controls.
Identifies wells outside control limits based on AUC confidence bounds.
Orders wells globally by mean AUC for consistent visualization.
Generates faceted ggplot2 visualizations with:
AUC estimates and confidence intervals,
shaded control regions and boundary lines,
color-coded response categories.
Response categories are encoded as:
Red: below control limits
Grey: within control limits
Green: above control limits
Black: control wells
Invisibly returns a named list of ggplot objects, each
corresponding to a unique combination of non-faceted grouping variables.
data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 10) plot_auc(processed_data, selected_plate = "PM-M01")data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 10) plot_auc(processed_data, selected_plate = "PM-M01")
Generates a heatmap of AUC ratios grouped by a specified column in annotation, allowing visualization of treatment effects across groups (e.g. pathways, drug targets).
plot_auc_ratio_by_group( data, group_var, x_var, group_filter = NULL, scale_type = c("natural", "log10") )plot_auc_ratio_by_group( data, group_var, x_var, group_filter = NULL, scale_type = c("natural", "log10") )
data |
A list containing a data frame element |
group_var |
Character string specifying the column to define groups. |
x_var |
Character string indicating the column to be mapped to the x-axis. Defaults to first entry in data$meta$variables. |
group_filter |
Optional character vector specifying group values
to include. If |
scale_type |
Character string specifying the transformation applied to
AUC ratios. Must be one of |
The function performs the following steps:
Optionally filters the dataset for selected pathways.
Removes control wells without chemical treatment.
Constructs a unique identifier per well using plate, well, and chemical.
Optionally applies a log10 transformation to AUC ratios.
Generates a heatmap using ggplot2::geom_tile().
Facets the plot by pathway and additional experimental variables.
A ggplot object representing the AUC ratio heatmap by pathway.
data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) processed_data <- compute_auc_ratio(processed_data) processed_data <- annotate_metadata(processed_data, annotation = PM_M01_M02) plot_auc_ratio_by_group(processed_data, group_var = "middle_hierarchy", x_var = "treatment", group_filter = "Nucleotide metabolism" )data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) processed_data <- compute_auc_ratio(processed_data) processed_data <- annotate_metadata(processed_data, annotation = PM_M01_M02) plot_auc_ratio_by_group(processed_data, group_var = "middle_hierarchy", x_var = "treatment", group_filter = "Nucleotide metabolism" )
Generates a heatmap visualization of AUC ratios across wells, chemicals,
and experimental conditions using the auc_ratio element of the input data.
plot_auc_ratio_heatmap( data, plate_type, x_var = NULL, scale_type = c("natural", "log10") )plot_auc_ratio_heatmap( data, plate_type, x_var = NULL, scale_type = c("natural", "log10") )
data |
A list containing a data frame element |
plate_type |
Character vector specifying one or more plate types to include. |
x_var |
Character string indicating the column to be mapped to the x-axis. Defaults to the first entry in data$meta$variables |
scale_type |
Character string specifying the transformation applied to
AUC ratios. Must be one of |
The function performs the following steps:
Filters the dataset for the selected plate types.
Constructs a unique identifier per well using plate, well, and chemical.
Optionally applies a log10 transformation to AUC ratios.
Generates a heatmap using ggplot2::geom_tile().
Facets the plot by plate type and additional experimental variables.
A ggplot object representing the AUC ratio heatmap.
data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) processed_data <- compute_auc_ratio(processed_data) processed_data <- annotate_metadata(processed_data, annotation = PM_M01_M02) plot_auc_ratio_heatmap(processed_data, plate_type = "PM-M01", x_var = "treatment")data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) processed_data <- compute_auc_ratio(processed_data) processed_data <- annotate_metadata(processed_data, annotation = PM_M01_M02) plot_auc_ratio_heatmap(processed_data, plate_type = "PM-M01", x_var = "treatment")
Visualizes the distribution of AUC ratios across hierarchical groupings using violin plots combined with point distributions.
plot_auc_ratio_violin( data, group_var, group_filter = NULL, color_var, scale_type = c("natural", "log10") )plot_auc_ratio_violin( data, group_var, group_filter = NULL, color_var, scale_type = c("natural", "log10") )
data |
A list containing a data frame element |
group_var |
Character string specifying the variable used for grouping along the y-axis. |
group_filter |
Optional character vector specifying values of
|
color_var |
Character string specifying the variable used for color and fill aesthetics. Defaults to first entry in data$meta$variables |
scale_type |
Character string specifying the x-axis scale. Must be
one of |
The function performs the following steps:
Optionally filters the dataset based on the hierarchy variable.
Removes invalid AUC ratio values (NA, NaN, Inf, and non-positive values).
Generates violin plots with overlaid point distributions
using ggforce::geom_sina().
Applies either a natural or log10 scale to the x-axis.
Facets the plot by the hierarchy variable and additional variables.
A ggplot object representing the distribution of AUC ratios.
#' data("processed_data") # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- classify_growth_curve_types(processed_data) processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- compute_auc_ci(processed_data, n_boot = 1) processed_data <- compute_auc_ratio(processed_data) processed_data <- annotate_metadata(processed_data, annotation = PM_M01_M02) plot_auc_ratio_violin(processed_data, group_var = "middle_hierarchy", group_filter = "Nucleotide metabolism", color_var = "treatment" )#' data("processed_data") # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- classify_growth_curve_types(processed_data) processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- compute_auc_ci(processed_data, n_boot = 1) processed_data <- compute_auc_ratio(processed_data) processed_data <- annotate_metadata(processed_data, annotation = PM_M01_M02) plot_auc_ratio_violin(processed_data, group_var = "middle_hierarchy", group_filter = "Nucleotide metabolism", color_var = "treatment" )
Similar to plot_controls_tween_per_plate but compares across all plates. Includes negative control reference ranges per facet.
plot_controls_tween_all_plate(data, variables = NULL)plot_controls_tween_all_plate(data, variables = NULL)
data |
A list |
variables |
Character vector of column names used for faceting.
If NULL, uses |
A ggplot object.
data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) plot_controls_tween_all_plate(processed_data)data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) plot_controls_tween_all_plate(processed_data)
This function visualizes Area Under the Curve (AUC) estimates for control wells and Tween-treated conditions within a selected plate. The plot includes confidence intervals and highlights the reference range defined by negative controls.
plot_controls_tween_per_plate( data, selected_plate, variables = NULL, tween_labels = c("Tween 20", "Tween 40", "Tween 80") )plot_controls_tween_per_plate( data, selected_plate, variables = NULL, tween_labels = c("Tween 20", "Tween 40", "Tween 80") )
data |
A structured list |
selected_plate |
A character string specifying the |
variables |
A character vector defining experimental grouping variables. At least two variables are recommended for meaningful faceting. Defaults to data$meta$variables. |
tween_labels |
A character vector specifying the names of Tween
compounds to include in the comparison (default:
|
Tween compounds are displayed alongside control groups to facilitate comparative assessment of growth responses relative to baseline and positive controls.
The function performs the following steps:
Filters the dataset for the selected plate and retains only control wells and specified Tween compounds.
Classifies observations into three groups: negative controls, positive controls, and Tween-treated wells.
Computes a reference range based on the minimum and maximum confidence interval bounds of negative controls within each experimental condition.
Visualizes AUC estimates with horizontal error bars representing confidence intervals.
Overlays vertical reference lines indicating:
Lower and upper bounds of the negative control range
Zero baseline (AUC = 0)
Applies faceting based on the specified experimental variables.
This representation enables direct comparison of Tween-induced responses against empirically derived control variability.
A ggplot2 object displaying AUC estimates, confidence
intervals, and control reference ranges across experimental conditions.
data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) plot_controls_tween_per_plate(processed_data, selected_plate = "PM-M01")data(processed_data) # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- compute_auc_ci(processed_data, n_boot = 1) plot_controls_tween_per_plate(processed_data, selected_plate = "PM-M01")
Generates combined visualizations of growth curve classifications and corresponding raw optical density (OD) time-series data. For each experimental condition, a plate layout heatmap is displayed alongside faceted growth curves, enabling direct comparison between spatial well distribution and temporal growth dynamics.
plot_growth_curve(data, curve_types_to_plot = NULL, store_plots = TRUE)plot_growth_curve(data, curve_types_to_plot = NULL, store_plots = TRUE)
data |
A structured list produced by upstream processing steps, containing:
|
curve_types_to_plot |
Optional character vector specifying which
curve types to include in the raw growth curve visualization.
If |
store_plots |
Logical. If |
For each unique combination of grouping variables and plate type, the function:
Constructs a plate layout heatmap (8×12 format) showing well-wise growth classifications.
Overlays raw OD time-series curves, grouped by well and faceted by curve type.
Combines both visualizations using patchwork for side-by-side comparison.
Missing wells in the plate layout are labeled as "empty".
If no curves match the selected curve_types_to_plot, an empty panel
is displayed in place of the time-series plot.
If store_plots = TRUE, returns the input data object augmented with:
A named list of combined ggplot2 objects, one per experimental condition.
If store_plots = FALSE, returns a named list of ggplot2 objects.
data("processed_data") # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- plot_growth_curve(processed_data) print(processed_data[["growth_curve_plots"]])data("processed_data") # subset for fast example processed_data$data <- processed_data$data[1:13728,] processed_data <- annotate_chemical(processed_data, annotation = PM_M01_M02) processed_data <- classify_growth_curve_types(processed_data) processed_data <- plot_growth_curve(processed_data) print(processed_data[["growth_curve_plots"]])
This function extracts the final (latest) time point for each well across experimental conditions and visualizes the corresponding measurements in a 96-well plate layout.
plot_latest_timepoint(data)plot_latest_timepoint(data)
data |
A named list produced by
|
Each plot represents a single experimental condition and displays wells as spatially arranged points, colored according to their measured OD at the final time point.
The function performs the following steps:
Groups the data by experimental variables, Plate.Type, and Well.
Extracts the latest time point per well.
Converts well identifiers (e.g., "A01") into plate coordinates.
Generates a separate plate-layout plot for each experimental condition.
Color intensity reflects the magnitude of diff_OD_590_740 at the final
recorded time point.
A named list of ggplot2 objects, where each element corresponds
to a unique experimental condition.
data("processed_data") plot_latest_timepoint(processed_data)data("processed_data") plot_latest_timepoint(processed_data)
Mapping metabolic plate wells to corresponding Chemical and KEGG annotations
data("PM_M01_M02")data("PM_M01_M02")
A data frame with 201 observations on the following 11 variables.
Odin Plate Type
WellWell ID on plate
ChemicalChemical plated in 'Well' in 'PlateType'
Link to KEGG database
Infoe.g. 'Carbon Source'
KEGGKEGG ID of 'Chemical'
module_idKEGG module ID, can be multiple per 'KEGG'
module_nameKEGG module name
upper_hierarchyupper hierarchy annotation of 'module_id'
middle_hierarchymiddle hierarchy annotation of 'module_id
lower_hierarchylower hierarchy annotation of 'lower_hierarchy
source: PM-M[01] Annotation Exported (from Odin Biolog: PlateId + Well + Chemical), data/annotation/KEGG_background.csv script: scripts/KEGGIDs_from_exported_Odin_annotation some KEGG IDs (comment) were wrong and one could be added by hand includes pathway and functional module annotation from KEGG (potentially multiple pathway annotations!)
Katja Danielzik hand curated the a-D-Glucose KEGG ID to C00267 (as also Julia Asche annotated it) inside the script
data(PM_M01_M02) head(data)data(PM_M01_M02) head(data)
mapping of anti-cancer-drug plate wells to corresponding Chemical, KEGG ID, Inhibition Target, ...
data("PM_M11_M14")data("PM_M11_M14")
A data frame with 384 observations on the following 11 variables.
Odin Plate Type
WellWell ID on plate
ChemicalChemical plated in 'Well' in 'PlateType'
Infoe.g. "antineoplastic, antiinflammatory"
KEGGKEGG ID of 'Chemical'
CASCAS ID of 'Chemical'
Inhibition Target of 'Chemical'
Mechanism of Action of 'Chemical'
Affected Pathway of 'Chemical'
'Chemical' is used to treat ...
Clinical Status of 'Chemical' in March 2025
source: data/annotations PMM11.csv - PMM14.csv provided by Odin Biolog, data/annotations 20250312_SEA_ODIN_PMM11-14 Pathways.xlsx provided by Johann Matschke
data("PM_M11_M14") head(PM_M11_M14)data("PM_M11_M14") head(PM_M11_M14)
results of read_folder() function processed_data <- read_folder("your data path",variables = c("cell.line","radiation.dose","inhibitior","time.h"))
data("processed_data")data("processed_data")
a list
data: a data frame
PlateId: a character vector
‘Project Name’: a character vector
‘Project Code’: a character vector
‘Plate Type’: a character vector
Sample: a character vector
cell.line: a character vector
LKB1.status: a character vector
radiation.dose: a character vector
‘Loaded At’: a POSIXct
‘Incubation Hours’: a numeric vector
‘Incubation Temperature Celsius’: a numeric vector
‘Incubated Offline’: a logical vector
‘Cycle Time Minutes’: a numeric vector
Position: a character vector
Protocol: a logical vector
Description: a logical vector
Id: a character vector
‘Actual Temperature Celsius’: a numeric vector
‘Target Temperature Celsius’: a numeric vector
‘Read At’: a POSIXct
Hour: a numeric vector
Well: a character vector
diff_OD_590_740: a numeric vector
meta: A list
data_path: user set 'data_path'
sample_column: user set 'sample_column'
variables: user set 'variables'
data("processed_data") head(processed_data)data("processed_data") head(processed_data)
The function filters the first five wells,evaluates replicate consistency across experimental conditions, detects duplicated entries, and visualizes replicate counts using a heatmap.
qc_data(data)qc_data(data)
data |
A named list produced by
|
The QC workflow comprises:
Subsetting the dataset to first five wells
Identifying duplicated measurements across grouping variables
Summarising replicate counts per condition
Visualizing replicate distribution as a heatmap
The function internally restricts analysis to a fixed set of wells
(A01–A05). Replicate counts are computed across grouping variables
defined by data$meta$variables, in addition to "Plate.Type",
"Hour", and "Well".
Duplicate entries are defined as observations sharing identical values across all grouping variables and occurring more than once.
The resulting heatmap displays the number of replicate measurements per condition, facilitating rapid identification of inconsistencies such as duplicated or missing replicates.
A ggplot2 object representing a heatmap of replicate counts
across wells and experimental conditions.
data("processed_data") qc_data(processed_data)data("processed_data") qc_data(processed_data)
one RawReads.csv file
data("RawRead")data("RawRead")
A data frame with 288 observations on the following 102 variables.
Ida character vector
PlateIda character vector
Wavelengtha numeric vector
a numeric vector
a numeric vector
a POSIXct
A01a numeric vector
A02a numeric vector
A03a numeric vector
A04a numeric vector
A05a numeric vector
A06a numeric vector
A07a numeric vector
A08a numeric vector
A09a numeric vector
A10a numeric vector
A11a numeric vector
A12a numeric vector
B01a numeric vector
B02a numeric vector
B03a numeric vector
B04a numeric vector
B05a numeric vector
B06a numeric vector
B07a numeric vector
B08a numeric vector
B09a numeric vector
B10a numeric vector
B11a numeric vector
B12a numeric vector
C01a numeric vector
C02a numeric vector
C03a numeric vector
C04a numeric vector
C05a numeric vector
C06a numeric vector
C07a numeric vector
C08a numeric vector
C09a numeric vector
C10a numeric vector
C11a numeric vector
C12a numeric vector
D01a numeric vector
D02a numeric vector
D03a numeric vector
D04a numeric vector
D05a numeric vector
D06a numeric vector
D07a numeric vector
D08a numeric vector
D09a numeric vector
D10a numeric vector
D11a numeric vector
D12a numeric vector
E01a numeric vector
E02a numeric vector
E03a numeric vector
E04a numeric vector
E05a numeric vector
E06a numeric vector
E07a numeric vector
E08a numeric vector
E09a numeric vector
E10a numeric vector
E11a numeric vector
E12a numeric vector
F01a numeric vector
F02a numeric vector
F03a numeric vector
F04a numeric vector
F05a numeric vector
F06a numeric vector
F07a numeric vector
F08a numeric vector
F09a numeric vector
F10a numeric vector
F11a numeric vector
F12a numeric vector
G01a numeric vector
G02a numeric vector
G03a numeric vector
G04a numeric vector
G05a numeric vector
G06a numeric vector
G07a numeric vector
G08a numeric vector
G09a numeric vector
G10a numeric vector
G11a numeric vector
G12a numeric vector
H01a numeric vector
H02a numeric vector
H03a numeric vector
H04a numeric vector
H05a numeric vector
H06a numeric vector
H07a numeric vector
H08a numeric vector
H09a numeric vector
H10a numeric vector
H11a numeric vector
H12a numeric vector
# data read in ## list all files including all subdirectories data_path <- "~/Documents/Metabolomics/odin_pipeline/data/ODIN_Sarah_Etemadi_Afshar/CSV for Katja/Drug plates/H460/" files <- list.files(path=data_path, include.dirs = TRUE, recursive = TRUE, full.names = TRUE) # detect metadata in PlateInfo files PlateInfo <- files[stringr::str_detect(string = files, pattern = "_PlateInfo.csv")] # read in Plate Info files PlateInfo <- lapply(PlateInfo,readr::read_csv) PlateInfo <- purrr::list_rbind(PlateInfo) # detect raw RawReads <- files[stringr::str_detect(string = files, pattern ="_RawReads.csv")] RawReads <- lapply(RawReads,readr::read_csv)
RawRead <- RawReads[[1]] use_data(RawRead)
data(RawRead) head(RawRead)data(RawRead) head(RawRead)
Reads all 'PlateInfo' and 'RawRead' files from a directory (can have subdirectories), merges the 'PlateInfo' files and annotates the RawRead files with the 'Description' column of 'PlateInfo'. Proceeds by aligning the time points of OD values measured at 590 nm and 740 nm, calculates '590 nm' - '740 nm' for noise correction as advised by Biolog.
read_folder(data_path, sample_column, variables)read_folder(data_path, sample_column, variables)
data_path |
Character. Path to directory containing CSV files. At least one file, which name ends on "PlateInfo.csv" containing the metadata with at least a column 'PlateId' and the 'sample_column' containing the description of the experiment. and at least one file containing the raw Odin reads, which name end on "RawReads.csv" and have at least one column 'PlateId' and columns 'A01' to 'H12' representing the wells of a 96-well plate. |
sample_column |
Character. Which column in '_PlateInfo.csv' contains the 'Description' (i.e. the Character vector that should be split according to 'variables') |
variables |
Character vector. Names of variables to extract from the 'Description' column (e.g., c("cell.line", "radiation.dose", "inhibitor")). Have to be separated by "_" and always in the same order for all "_PlateInfo.csv" files (e.g. in format cell.line, radiation.dose, time.point -> "A549_0Gy_0h") |
a list
result: A data frame in long format
PlateId: Odin plate Id from 'PlateInfo', refers to a single 96-well plate
Project Name: Odin project name from 'PlateInfo'
Project Code: Odin project code from 'PlateInfo'
Plate Type: Odin plate type from 'PlateInfo'
Sample: Sample specification from 'PlateInfo'
Loaded At: Loading time from 'PlateInfo'
Incubation Hours: Incubation time from 'PlateInfo'
Incubation Temperature Celsius: Incubation temperature from 'PlateInfo'
Incubated Offline:
Cycle Time Minutes: Time interval of measurements from 'PlateInfo'
Position: Position of Plate in Odin from 'PlateInfo'
Protocol: user specified protocol from 'PlateInfo'
Description: user specified description of the experiment (or in 'Sample')
...: single variable columns from 'sample_column'
Actual Temperature Celsius: measured temperature in Odin from 'RawRead'
Target Temperature Celsius: Target temperature (should be equal to Incubation Temperature Celsius from 'PlateInfo')
Read At: Time of Plate read from 'RawReads'
Hour: difference between Read At and first entry in Read At per plate
Well: Well Id of the 96-well plate
diff_OD_590_740: OD_590nm-OD_740nm, noise correction for mammalian plates according to Biolog
meta: A list
data_path: user set 'data_path'
sample_column: user set 'sample_column'
variables: user set 'variables'
# Raw Reads are in this format data("RawRead") head(RawRead) # PlateInfo is in this format data("PlateInfo") head(PlateInfo) # resulting data frame 'data' from read_folder data("processed_data") head(processed_data$data)# Raw Reads are in this format data("RawRead") head(RawRead) # PlateInfo is in this format data("PlateInfo") head(PlateInfo) # resulting data frame 'data' from read_folder data("processed_data") head(processed_data$data)