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.

getPathPCLs(pcOut, pathway_char, ...)

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

# S3 method for 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).

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

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.

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" )
#> #> ====== Creating object of class OmicsSurv =======
#> The input pathway database included 676 unique features.
#> The input assay dataset included 656 features.
#> Only pathways with at least 3 or more features included in the assay dataset are #> tested (specified by minPathSize parameter). There are 15 pathways which meet #> this criterion.
#> Because pathwayPCA is a self-contained test (PMID: 17303618), only features in #> both assay data and pathway database are considered for analysis. There are 615 #> such features shared by the input assay and pathway database.
### Calculate Supervised PCA Pathway p-Values ### colon_superpc <- SuperPCA_pVals( colon_Omics, numPCs = 2, parallel = TRUE, numCores = 2, adjustment = "BH" )
#> Initializing Computing Cluster:
#> DONE
#> Calculating Pathway Test Statistics in Parallel:
#> DONE
#> Calculating Pathway Critical Values in Parallel:
#> DONE
#> Calculating Pathway p-Values:
#> DONE
#> Adjusting p-Values and Sorting Pathway p-Value Data Frame:
#> DONE
### Extract PCs and Loadings ### getPathPCLs( colon_superpc, "KEGG_PENTOSE_PHOSPHATE_PATHWAY" )
#> $PCs #> # A tibble: 250 x 3 #> sampleID V1 V2 #> <chr> <dbl> <dbl> #> 1 subj1 0.0404 0.0457 #> 2 subj2 0.129 -0.0526 #> 3 subj3 -0.0267 0.0764 #> 4 subj4 0.0385 -0.0676 #> 5 subj5 0.0577 -0.0284 #> 6 subj6 0.00634 0.0518 #> 7 subj7 -0.00680 0.0869 #> 8 subj8 0.0367 -0.0246 #> 9 subj9 -0.00828 -0.0105 #> 10 subj10 -0.109 -0.0215 #> # … with 240 more rows #> #> $Loadings #> # A tibble: 11 x 3 #> featureID PC1 PC2 #> <chr> <dbl> <dbl> #> 1 RPE -0.330 11.3 #> 2 RPIA -8.68 0.0615 #> 3 PGLS -11.3 -5.62 #> 4 PFKL -11.0 -3.01 #> 5 TKT -12.0 6.25 #> 6 TKTL2 -3.04 1.34 #> 7 PGD -7.83 4.39 #> 8 H6PD -3.51 -7.57 #> 9 PRPS1L1 0.286 1.95 #> 10 PRPS1 -0.283 12.9 #> 11 PFKP -0.576 3.69 #> #> $pathway #> [1] "pathway3" #> #> $term #> [1] "KEGG_PENTOSE_PHOSPHATE_PATHWAY" #> #> $description #> [1] NA #>