Perform gene set enrichment analysis
KO_gsea(
ko_stat,
weight = "logFC",
add_mini = NULL,
p.adjust.method = "BH",
type = c("pathway", "module")[1],
feature = "ko",
modulelist = NULL,
verbose = TRUE
)
ko_stat dataframe from ko.test
.
the metric used for ranking, default: logFC
add_mini when calculate the logFC. e.g (10+0.1)/(0+0.1), default 0.05*min(avg_abundance)
The method used for p-value adjustment (default: "BH").
"pathway" or "module" for default KOlist_file.
one of "ko", "gene", "compound"
NULL or customized modulelist dataframe, must contain "id","K_num","KOs","Description" columns. Take the `KOlist` as example, use custom_modulelist
.
logical
DOSE object
message("The following example require some time to run:")
#> The following example require some time to run:
# \donttest{
## use `GSEA` from the `clusterProfiler` package.
if (requireNamespace("clusterProfiler")) {
data("reporter_score_res")
gsea_res <- KO_gsea(reporter_score_res, p.adjust.method = "none")
enrichplot::gseaplot(gsea_res, geneSetID = data.frame(gsea_res)$ID[1])
gsea_res_df <- as.enrich_res(gsea_res)
plot(gsea_res_df)
}
#> Loading required namespace: clusterProfiler
# }