module_trait_cor {BioNERO} | R Documentation |
Correlate module eigengenes to trait
module_trait_cor( exp, metadata, MEs, cor_method = "spearman", transpose = FALSE, palette = "RdYlBu", continuous_trait = FALSE, cex.lab.x = 0.6, cex.lab.y = 0.6, cex.text = 0.6 )
exp |
A gene expression data frame with genes in row names and samples in column names or a 'SummarizedExperiment' object. |
metadata |
A data frame containing sample names in row names and sample annotation in the first column. Ignored if 'exp' is a 'SummarizedExperiment' object, since the function will extract colData. |
MEs |
Module eigengenes. It is the 2nd element of the result list
generated by the function |
cor_method |
Method to calculate correlation. One of 'pearson', 'spearman' or 'kendall'. Default is 'spearman'. |
transpose |
Logical indicating whether to transpose the heatmap of not. Default is FALSE. |
palette |
RColorBrewer's color palette to use. Default is "RdYlBu", a palette ranging from blue to red. |
continuous_trait |
Logical indicating if trait is a continuous variable. Default is FALSE. |
cex.lab.x |
Font size for x axis labels. Default: 0.6. |
cex.lab.y |
Font size for y axis labels. Default: 0.6. |
cex.text |
Font size for numbers inside matrix. Default: 0.6. |
Significance levels: 1 asterisk: significant at alpha = 0.05. 2 asterisks: significant at alpha = 0.01. 3 asterisks: significant at alpha = 0.001. no asterisk: not significant.
A data frame with correlation and correlation p-values for each pair of ME and trait along with a heatmap.
Fabricio Almeida-Silva
corPvalueStudent
,labeledHeatmap
,blueWhiteRed
data(filt.se) gcn <- exp2gcn(filt.se, SFTpower = 18, cor_method = "pearson") module_trait_cor(filt.se, MEs=gcn$MEs)