make_heatmap_matrix {bulkAnalyseR} | R Documentation |
Create a matrix of the average expression of each gene in each condition
Description
This function reshapes the tibble output of
calculate_condition_mean_sd_per_gene
into a matrix of
average expression by condition. Its output can be used by
expression_heatmap
.
Usage
make_heatmap_matrix(tbl, genes = NULL)
Arguments
tbl |
the output of |
genes |
gene names to use for the output; if NULL (the default), all genes will be used |
Value
A matrix of averaged expression per gene in each condition.
Examples
expression.matrix.preproc <- as.matrix(read.csv(
system.file("extdata", "expression_matrix_preprocessed.csv", package = "bulkAnalyseR"),
row.names = 1
))[1:500,]
condition <- factor(rep(c("0h", "12h", "36h"), each = 2))
tbl <- calculate_condition_mean_sd_per_gene(expression.matrix.preproc[1:10, ], condition)
heatmat <- make_heatmap_matrix(tbl)
heatmat
[Package bulkAnalyseR version 1.1.0 Index]