pca {ASICS} | R Documentation

## Principal Component Analysis (PCA) on a `SummarizedExperiment` object

### Description

Perform a PCA with the function of the `ropls` package on a `SummarizedExperiment` object obtained from the `formatForAnalysis` function

### Usage

    pca(
      analysis_data,
      scale.unit = TRUE,
      type.data = "quantifications",
      condition = NULL
    )

### Arguments

`analysis_data` | A `SummarizedExperiment` object obtained from the `formatForAnalysis` function.
`scale.unit` | Logical. If `TRUE`, data are scaled to unit variance prior PCA.
`type.data` | Type of data used for the analysis (e.g., `"quantifications"`, `"buckets"`...). Default to `"quantifications"`.
`condition` | The name of the design variable (two level factor) specifying the groups, if one is available. Default to NULL, no group provided.

### Value

A S4 object of class AnalysisResults containing PCA results.

### See Also

AnalysisResults

### Examples

    # 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)

      # Create object for analysis and remove features with more than 25% of
      # zeros
      analysis_obj <- formatForAnalysis(quantification, zero.threshold = 25)
      res_pca <- pca(analysis_obj)
    }

[Package ASICS version 2.4.3 Index]