getPathPCLs {pathwayPCA} | R Documentation

## Extract PCs and Loadings from a `superpcOut`- or `aespcOut`-class Object.

### Description

Given an object of class `aespcOut` or `superpcOut`, as returned by the functions `AESPCA_pVals` or `SuperPCA_pVals`, respectively, and the name or unique ID of a pathway, return a data frame of the principal components and a data frame of the loading vectors corresponding to that pathway.

### Usage

    getPathPCLs(pcOut, pathway_char, ...)

    ## S3 method for class 'superpcOut'
    getPathPCLs(pcOut, pathway_char, ...)

    ## S3 method for class 'aespcOut'
    getPathPCLs(pcOut, pathway_char, ...)

### Arguments

`pcOut` | An object of classes `superpcOut` or `aespcOut` as returned by the `SuperPCA_pVals` or `AESPCA_pVals` functions, respectively.
`pathway_char` | A character string of the name or unique identifier of a pathway
`...` | Dots for additional arguments (currently unused).

### Details

Match the supplied pathway character string to either the `pathways` or `terms` columns of the `pVals_df` data frame within the `pcOut` object. Then, subset the `loadings_ls` and `PCs_ls` lists for their entries which match the supplied pathway. Finally, return a list of the PCs, loadings, and the pathway ID and name.

### Value

A list of four elements:

- `PCs` : A data frame of the principal components

- `Loadings` : A matrix of the loading vectors with features in the row names

- `pathway` : The unique pathway identifier for the `pcOut` object

- `term` : The name of the pathway

`NULL`

`NULL`

### Examples

      ###  Load Data  ###
      data("colonSurv_df")
      data("colon_pathwayCollection")

      ###  Create -Omics Container  ###
      colon_Omics <- CreateOmics(
        assayData_df = colonSurv_df[, -(2:3)],
        pathwayCollection_ls = colon_pathwayCollection,
        response = colonSurv_df[, 1:3],
        respType = "survival"
      )

      ###  Calculate Supervised PCA Pathway p-Values  ###
      colon_superpc <- SuperPCA_pVals(
        colon_Omics,
        numPCs = 2,
        parallel = TRUE,
        numCores = 2,
        adjustment = "BH"
      )

      ###  Extract PCs and Loadings  ###
      getPathPCLs(
        colon_superpc,
        "KEGG_PENTOSE_PHOSPHATE_PATHWAY"
      )

[Package pathwayPCA version 1.6.3 Index]