calculate_condition_mean_sd_per_gene | R Documentation |
This function calculates the mean and standard deviation of the expression of each gene in an expression matrix, grouped by the conditions supplied.
calculate_condition_mean_sd_per_gene(expression.matrix, condition)
expression.matrix |
the expression matrix; rows correspond to genes and
columns correspond to samples; usually preprocessed by
|
condition |
the condition to group the columns of the expression matrix by; must be a factor of the same length as ncol(expression.matrix) |
A tibble in long format, with the mean and standard deviation of each gene in each condition. The standard deviation is increased to the minimum value in the expression matrix (the noise threshold) if it is lower, in order to avoid sensitivity to small changes.
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) tbl
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.