superpcOut
- or aespcOut
-class
Object.getPathPCLs.Rd
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, ...)
pcOut | An object of classes |
---|---|
pathway_char | A character string of the name or unique identifier of a pathway |
... | Dots for additional arguments (currently unused). |
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
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.
### 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" )#> $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 #>