View source: R/utils_adjust_and_sort_pValues.R
TabulatepValues | R Documentation |
p
-valuesAdjust the pathway p
-values, then return a data frame of
the relevant pathway information, sorted by adjusted significance.
TabulatepValues(
pVals_vec,
genesets_ls,
adjust = TRUE,
proc_vec = c("BH", "Bonferroni", "Holm", "Hochberg", "SidakSS", "SidakSD", "BY", "ABH",
"TSBH"),
...
)
pVals_vec |
A named vector of permutation |
genesets_ls |
A list of known gene pathways, trimmed to match the given
assay data by the
|
adjust |
Should you adjust the |
proc_vec |
Character vector of procedures. The returned data frame will
be sorted in ascending order by the first procedure in this vector, with
ties broken by the unadjusted |
... |
Additional arguments to pass to the |
This is a wrapper function for the ControlFDR
function. The number of p
-values passed to the pVals_vec
argument must equal the number of pathways and set size values in
the genesets_ls
argument. If you trimmed a pathway from p
-
value calculation, then pad this missing value with an NA
.
A data frame with columns
pathways
: The names of the pathways in the Omics*
object (stored in object@trimPathwayCollection$pathways
).
n_tested
: The number of genes in each pathway after being
trimmed to match the assay. Given in the n_tested
element of the
trimmed pathway collection.
terms
: The pathway title, as stored in the
object@trimPathwayCollection$TERMS
object.
description
: The pathway description, if it is stored in
the object@trimPathwayCollection$description
object.
rawp
: The unadjusted p
-values of each pathway.
...
: Additional columns as specified through the
adjustment
argument.
The data frame will be sorted in ascending order by the method specified
first in the adjustment
argument. If adjustpValues = FALSE
,
then the data frame will be sorted by the raw p
-values. If you have
the suggested tidyverse
package suite loaded, then this data frame
will print as a tibble
. Otherwise, it will stay a
simple data frame.
# DO NOT CALL THIS FUNCTION DIRECTLY.
# Call this function through AESPCA_pVals() or SuperPCA_pVals() instead.
## Not run:
### Load the Example Data ###
data("colonSurv_df")
data("colon_pathwayCollection")
### Create an OmicsSurv Object ###
colon_Omics <- CreateOmics(
assayData_df = colonSurv_df[, -(2:3)],
pathwayCollection_ls = colon_pathwayCollection,
response = colonSurv_df[, 1:3],
respType = "surv"
)
### Extract Pathway PCs and Loadings ###
colonPCs_ls <- ExtractAESPCs(
object = colon_Omics,
parallel = TRUE,
numCores = 2
)
### Pathway p-Values ###
pVals <- PermTestSurv(
OmicsSurv = colon_Omics,
pathwayPCs_ls = colonPCs_ls$PCs,
parallel = TRUE,
numCores = 2
)
### Create Table of p-Values ###
trimmed_PC <- getTrimPathwayCollection(colon_Omics)
TabulatepValues(
pVals_vec = pVals,
genesets_ls = trimmed_PC
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.