associate_phenotype: Modules phenotpic association

Description Usage Arguments Value Examples

View source: R/biological_integration.R

Description

Compute the correlation between all modules and the phenotypic variables

Usage

1
associate_phenotype(eigengenes, phenotypes, id_col = NULL)

Arguments

eigengenes

matrix or data.frame, eigengenes of the modules. Provided by the output of modules_detection.

phenotypes

matrix or data.frame, phenotypes for each sample to associate.

id_col

string or vector of string, optional name of the columns containing the common id between eigengenes and phenotypes.

Value

A list of two data.frames : associations modules/phenotype and p.values associated to this associations

Examples

1
2
3
4
5
6
7
eigengene_mat <- data.frame(mod1 = rnorm(20, 0.1, 0.2),
mod2 = rnorm(20, 0.2, 0.2))
phenotype_mat <- data.frame(phenA = sample(c("X", "Y", "Z"), 20,
                            replace = TRUE),
                            phenB = sample(c("U", "V"), 20, replace = TRUE),
                            stringsAsFactors = FALSE)
association <- associate_phenotype(eigengene_mat, phenotype_mat)

GWENA documentation built on Feb. 17, 2021, 2:01 a.m.