View source: R/olink_pathway_heatmap.R
| olink_pathway_heatmap | R Documentation |
olink_pathway_enrichment.Creates a heatmap of proteins related to pathways using enrichment results
from olink_pathway_enrichment.
olink_pathway_heatmap(
enrich_results,
test_results,
method = "GSEA",
keyword = NULL,
number_of_terms = 20L
)
enrich_results |
data frame of enrichment results from
|
test_results |
a data frame of statistical test results including the columns "Adjusted_pval" and "estimate". |
method |
One of "GSEA" (default) or "ORA". |
keyword |
(optional) keyword to filter enrichment results on. If not specified, displays top terms. |
number_of_terms |
number of terms to display (default is 20). |
A heatmap as a ggplot object.
if (rlang::is_installed(pkg = c("msigdbr", "clusterProfiler"))) {
# Run olink_ttest or other stats test (see documentation )
npx_df <- npx_data1 |>
dplyr::filter(
!grepl(
pattern = "control",
x = .data[["SampleID"]],
ignore.case = TRUE
)
)
check_log <- check_npx(df = npx_df)
ttest_results <- OlinkAnalyze::olink_ttest(
df = npx_df,
variable = "Treatment",
alternative = "two.sided",
check_log = check_log
)
# Run olink_pathway_enrichment (see documentation)
# GSEA
gsea_results <- OlinkAnalyze::olink_pathway_enrichment(
df = npx_df,
test_results = ttest_results,
check_log = check_log
)
# ORA
ora_results <- OlinkAnalyze::olink_pathway_enrichment(
df = npx_df,
test_results = ttest_results,
check_log = check_log,
method = "ORA"
)
# Plot
OlinkAnalyze::olink_pathway_heatmap(
enrich_results = gsea_results,
test_results = ttest_results
)
OlinkAnalyze::olink_pathway_heatmap(
enrich_results = ora_results,
test_results = ttest_results,
method = "ORA",
keyword = "cell"
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.