glog_plot_optimised_lambda: Plot SSE error of lambda optimisation process

View source: R/glog_transformation.R

glog_plot_optimised_lambdaR Documentation

Plot SSE error of lambda optimisation process

Description

Plot SSE error of lambda optimisation process

Usage

glog_plot_optimised_lambda(
  df,
  optimised_lambda,
  classes,
  qc_label,
  plot_grid = 100
)

Arguments

df

A matrix-like (e.g. an ordinary matrix, a data frame) or RangedSummarizedExperiment-class object with all values of class numeric() or integer() of peak intensities, areas or other quantitative characteristic.

optimised_lambda

numeric(1), value of optimised lambda from glog_transformation output.

classes

character(), vector of class labels. Must be the same length as the number of sample in the input peak table. If input is SummarizedExperiment object, use SummarizedExperiment_object$meta_data_column_name.

qc_label

character(1) or NULL, class label used to identify QC samples.

plot_grid

integer(1), number of data points to use for SSE optimisation.

Value

Class ggplot object containing optimisation plot.

Examples

data <- MTBLS79[, MTBLS79$Batch == 1]
classes <- data$Class

data <- mv_imputation(df=data, method='knn')
out <- glog_transformation (df=data, classes=classes,
    qc_label='QC')

optimised_lambda <- S4Vectors::metadata(out)
optimised_lambda <- 
    optimised_lambda$processing_history$glog_transformation$lambda_opt

glog_plot_optimised_lambda(df=data, classes=classes,
    qc_label="QC", optimised_lambda=optimised_lambda)

computational-metabolomics/pmp documentation built on March 9, 2024, 4:25 p.m.