oplsda: Orthogonal projections to latent structures discriminant...

Description Usage Arguments Value References See Also Examples

View source: R/analysis_on_quantification.R

Description

Perform an OPLS-DA with the function of the ropls package on a SummarizedExperiment object obtained with the formatForAnalysis function

Usage

1
2
3
4
5
6
7
8
9
oplsda(
  analysis_data,
  condition,
  cross.val = 1,
  thres.VIP = 1,
  type.data = "quantifications",
  seed = 12345,
  ...
)

Arguments

analysis_data

A SummarizedExperiment object obtained with the formatForAnalysis function.

condition

The name of the design variable (two level factor) specifying the response to be explained.

cross.val

Number of cross validation folds.

thres.VIP

A number specifying the VIP threshold used to identify influential variables.

type.data

Type of data used for the analyses (e.g., "quantifications", "buckets"...). Default to "quantifications".

seed

Random seed to control randomness of cross validation folds.

...

Further arguments to be passed to the function opls for specifying the parameters of the algorithm, if necessary.

Value

A S4 object of class AnalysisResults containing OPLS-DA results.

References

Trygg, J. and Wold, S. (2002). Orthogonal projections to latent structures (O-PLS). Journal of Chemometrics, 16(3), 119–128.

Thevenot, E.A., Roux, A., Xu, Y., Ezan, E., Junot, C. 2015. Analysis of the human adult urinary metabolome variations with age, body mass index and gender by implementing a comprehensive workflow for univariate and OPLS statistical analyses. Journal of Proteome Research. 14:3322-3335.

See Also

AnalysisResults

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# Import quantification results
if (require("ASICSdata", quietly = TRUE)) {
  quantif_path <- system.file("extdata", "results_ASICS.txt",
                              package = "ASICSdata")
  quantification <- read.table(quantif_path, header = TRUE, row.names = 1)

  # Import design
  design <- read.table(system.file("extdata", "design_diabete_example.txt",
                                   package = "ASICSdata"), header = TRUE)
  design$condition <- factor(design$condition)

  # Create object for analysis and remove features with more than 25% of
  # zeros
  analysis_obj <- formatForAnalysis(quantification,
                                    zero.threshold = 25, design = design)
  res_oplsda <- oplsda(analysis_obj, "condition", orthoI = 1)
}

GaelleLefort/ASICS documentation built on July 19, 2020, 2:08 p.m.