| olink_heatmap_plot | R Documentation |
Generates a heatmap using pheatmap::pheatmap of all samples from NPX
data.
olink_heatmap_plot(
df,
check_log = NULL,
variable_row_list = NULL,
variable_col_list = NULL,
center_scale = TRUE,
cluster_rows = TRUE,
cluster_cols = TRUE,
show_rownames = TRUE,
show_colnames = TRUE,
colnames = "both",
annotation_legend = TRUE,
fontsize = 10,
na_col = "black",
...
)
df |
Data frame in long format with SampleID, NPX, OlinkID, Assay and columns of choice for annotations. |
check_log |
output from check_npx on |
variable_row_list |
Columns in |
variable_col_list |
Columns in |
center_scale |
Logical. If data should be centered and scaled across
assays (default |
cluster_rows |
Logical. Determining if rows should be clustered
(default |
cluster_cols |
Logical. Determining if columns should be clustered
(default |
show_rownames |
Logical. Determining if row names are shown
(default |
show_colnames |
Logical. Determining if column names are shown
(default |
colnames |
Character. Determines how to label the columns. Must be 'assay', 'oid', or 'both' (default 'both'). |
annotation_legend |
Logical. Determining if legend for annotations
should be shown (default |
fontsize |
Fontsize (default 10) |
na_col |
Color of cells with |
... |
Additional arguments used in |
The values are by default scaled across and centered in the heatmap. Columns and rows are by default sorted by by dendrogram. Unique sample names are required.
An object of class ggplot, generated from the gtable
returned by pheatmap::pheatmap.
if (rlang::is_installed(pkg = c("ggplotify", "pheatmap"))) {
npx_data <- npx_data1 |>
dplyr::filter(
!stringr::str_detect(
string = .data[["SampleID"]],
pattern = "CONT"
)
)
check_log <- OlinkAnalyze::check_npx(
df = npx_data
)
# Heatmap
OlinkAnalyze::olink_heatmap_plot(
df = npx_data,
check_log = check_log
)
# Heatmap with annotation
OlinkAnalyze::olink_heatmap_plot(
df = npx_data,
check_log = check_log,
variable_row_list = c("Time", "Site")
)
# Heatmap with calls from pheatmap
OlinkAnalyze::olink_heatmap_plot(
df = npx_data,
check_log = check_log,
cutree_rows = 3L
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.