View source: R/gcn_inference.R
module_trait_cor | R Documentation |
Correlate module eigengenes to trait
module_trait_cor(
exp,
metadata,
MEs,
metadata_cols = NULL,
cor_method = "pearson"
)
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 |
metadata_cols |
A vector (either numeric or character) indicating which columns should be extracted from column metadata if exp is a 'SummarizedExperiment' object. The vector can contain column indices (numeric) or column names (character). By default, all columns are used. |
cor_method |
Method to calculate correlation. One of 'pearson', 'spearman' or 'kendall'. Default is 'spearman'. |
A data frame with correlation and correlation p-values for each pair of ME and trait, with the following variables:
Factor, module eigengene.
Factor, trait name. Each trait corresponds to a variable of the sample metadata (if numeric) or levels of a variable (if categorical).
Numeric, correlation.
Numeric, correlation P-values.
Character, name of the metadata variable.
Fabricio Almeida-Silva
data(filt.se)
gcn <- exp2gcn(filt.se, SFTpower = 18, cor_method = "pearson")
module_trait_cor(filt.se, MEs = gcn$MEs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.