wgcna_sample_dendrogram: wgcna_sample_dendrogram (from WGCNA functions).

Description Usage Arguments Details Value Examples

Description

This function implements optimal hierarchical clustering based on an adjacency matrix and plots a cluster tree with sample heatmap. It also identifies samples with too many entries and zero variance.

Usage

1
wgcna_sample_dendrogram(expmatrix, datTraits, thresholdZ.k = -2.5)

Arguments

expmatrix

An input matrix with gene names as row names and sample names as column names.

datTraits

Numeric matrix of phenotypes belonging to each sample in columns of matrix.

thresholdZ.k

Connectivity threshold. If scaled connectibity of a sample is below this value, it is marked as an outlier. Defaults to -2.5 but can also be changed to e.g. -5.

Details

The function goodSamplesGenes iteratively identifies samples and genes with too many missing entries and genes with zero variance. Iterations may be required since excluding samples effectively changes criteria on genes and vice versa. The process is repeated until the lists of good samples and genes are stable. The constants ..minNSamples and ..minNGenes are both set to the value 4.

Value

Shows a sample dendrogram plot with sample heatmap and returns the object datExpr, which is the transformed expmatrix input and can be used for the next steps in the WGCNA pipeline.

Examples

1
2
3
4
datTraits <- data.frame(Ctrl = c(rep(1, 4), rep(0,12)), TolLPS = c(rep(0, 4), rep(1, 4),
             rep(0, 8)), TolS100A8 = c(rep(0, 8), rep(1, 4), rep(0, 4)), ActLPS = c(rep(0, 12),
             rep(1, 4)), Tol = c(rep(0, 4), rep(1, 8), rep(0, 4)), row.names = colnames(expmatrix))
datExpr <- wgcna_sample_dendrogram(expmatrix, datTraits)

ShirinG/exprAnalysis documentation built on May 9, 2019, 1:28 p.m.