module_trait_cor {BioNERO} | R Documentation

## Correlate module eigengenes to trait

### Description

Correlate module eigengenes to trait

### Usage

    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
    )

### Arguments

`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 `exp2gcn`.
`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.

### Details

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.

### Value

A data frame with correlation and correlation p-values for each pair of ME and trait along with a heatmap.

### Author(s)

Fabricio Almeida-Silva

### See Also

`corPvalueStudent`,`labeledHeatmap`,`blueWhiteRed`

### Examples

    data(filt.se)
    gcn <- exp2gcn(filt.se, SFTpower = 18, cor_method = "pearson")
    module_trait_cor(filt.se, MEs=gcn$MEs)

[Package BioNERO version 1.0.4 Index]