This function finds the RAV with the highest validation score (including RAVs with negative silhouette width) for specified PC of the dataset and returns the top enriched pathways.
annotatePC(
PCnum,
val_all,
RAVmodel,
n = 5,
scoreCutoff = 0.5,
nesCutoff = NULL,
simplify = TRUE,
abs = FALSE,
trimed_pathway_len = 45
)
A numeric vector. PC number of your dataset to retrieve
annotation results for. The vector can contain any integer number among
1:8
.
The output from validate
The RAVmodel used to generate the input for the argument,
val_all
.
An integer. Default is 5. The number of the top enriched pathways
to print out. If there are fewer than n pathways passed the cutoff, it will
print out NA
.
A numeric value for the minimum correlation between loadings of the dataset principal component and the RAV. Default is 0.5.
A numeric value for the minimum Normalized Enrichment Score
(NES) for the enrichment analysis. Default is NULL
The suggested value is 3.
A logical. Under default (TRUE
), the output will be a
data frame with the number of column same as the length of PCnum
argument, and the number of row same as the n
argument. If it is set
to FALSE
, the output will be a list with the length of PCnum
argument, where each element is a data frame containing detailed GSEA output
of enriched pathways.
Default is FALSE
. If it's set to TRUE
, the enriched
pathways will be listed based on absolute value of the Normalized Enrichment
Score (NES).
Positive integer values, which is the display width of pathway names. Default is 45.
A data frame of a list based on the simplify
argument. Check
the output detail above.
data(miniRAVmodel)
library(bcellViper)
data(bcellViper)
val_all <- validate(dset, miniRAVmodel)
annotatePC(2, val_all, miniRAVmodel)
#> RAV1076 can be filtered based on GSEA_PLIERpriors
#> PC2.RAV1076
#> 1 REACTOME_METABOLISM_OF_PROTEINS
#> 2 REACTOME_HOST_INTERACTIONS_OF_HIV_FACTORS
#> 3 MIPS_SPLICEOSOME
#> 4 KEGG_SPLICEOSOME
#> 5 REACTOME_ASSEMBLY_OF_THE_PRE_REPLICATIVE_COMP...