Learn R Programming

⚠️There's a newer version (1.73) of this package.Take me there.

WGCNA (version 1.71)

Weighted Correlation Network Analysis

Description

Functions necessary to perform Weighted Correlation Network Analysis on high-dimensional data as originally described in Horvath and Zhang (2005) and Langfelder and Horvath (2008) . Includes functions for rudimentary data cleaning, construction of correlation networks, module identification, summarization, and relating of variables and modules to sample traits. Also includes a number of utility functions for data manipulation and visualization.

Copy Link

Version

Install

install.packages('WGCNA')

Monthly Downloads

13,606

Version

1.71

License

GPL (>= 2)

Maintainer

Peter Langfelder

Last Published

April 22nd, 2022

Functions in WGCNA (1.71)

ImmunePathwayLists

Immune Pathways with Corresponding Gene Markers
PWLists

Pathways with Corresponding Gene Markers - Compiled by Mike Palazzolo and Jim Wang from CHDI
BrainRegionMarkers

Gene Markers for Regions of the Human Brain
BD.getData

Various basic operations on BlockwiseData objects.
BloodLists

Blood Cell Types with Corresponding Gene Markers
GTOMdist

Generalized Topological Overlap Measure
SCsLists

Stem Cell-Related Genes with Corresponding Gene Markers
AFcorMI

Prediction of Weighted Mutual Information Adjacency Matrix by Correlation
GOenrichmentAnalysis

Calculation of GO enrichment (experimental)
BrainLists

Brain-Related Categories with Corresponding Gene Markers
TOMplot

Graphical representation of the Topological Overlap Matrix
addGrid

Add grid lines to an existing plot.
TOMsimilarity

Topological overlap matrix similarity and dissimilarity
bicovWeights

Weights used in biweight midcovariance
addGuideLines

Add vertical ``guide lines'' to a dendrogram plot
addErrorBars

Add error bars to a barplot.
bicorAndPvalue

Calculation of biweight midcorrelations and associated p-values
accuracyMeasures

Accuracy measures for a 2x2 confusion matrix or for vectors of predicted and observed values.
adjacency.splineReg

Calculate network adjacency based on natural cubic spline regression
adjacency.polyReg

Adjacency matrix based on polynomial regression
TrueTrait

Estimate the true trait underlying a list of surrogate markers.
automaticNetworkScreeningGS

One-step automatic network gene screening with external gene significance
TOMsimilarityFromExpr

Topological overlap matrix
adjacency

Calculate network adjacency
addTraitToMEs

Add trait information to multi-set module eigengene structure
allocateJobs

Divide tasks among workers
alignExpr

Align expression data with given vector
allowWGCNAThreads

Allow and disable multi-threading for certain WGCNA calculations
automaticNetworkScreening

One-step automatic network gene screening
branchSplit

Branch split.
bicor

Biweight Midcorrelation
blockSize

Attempt to calculate an appropriate block size to maximize efficiency of block-wise calcualtions.
binarizeCategoricalVariable

Turn a categorical variable into a set of binary indicators
binarizeCategoricalColumns

Turn categorical columns into sets of binary indicators
branchSplit.dissim

Branch split based on dissimilarity.
colQuantileC

Fast colunm- and row-wise quantile of a matrix.
collapseRows

Select one representative row per group
blueWhiteRed

Blue-white-red color sequence
blockwiseConsensusModules

Find consensus modules across several datasets.
chooseTopHubInEachModule

Chooses the top hub gene in each module
clusterCoef

Clustering coefficient calculation
blockwiseIndividualTOMs

Calculation of block-wise topological overlaps
blockwiseModules

Automatic network construction and module detection
coClustering

Co-clustering measure of cluster preservation between two clusterings
collapseRowsUsingKME

Selects one representative row per group based on kME
conformityBasedNetworkConcepts

Calculation of conformity-based network concepts.
conformityDecomposition

Conformity and module based decomposition of a network adjacency matrix.
consensusRepresentatives

Consensus selection of group representatives
consensusTOM

Consensus network (topological overlap).
factorizeNonNumericColumns

Turn non-numeric columns into factors
fixDataStructure

Put single-set data into a form useful for multiset calculations.
branchEigengeneDissim

Branch dissimilarity based on eigennodes (eigengenes).
collectGarbage

Iterative garbage collection.
formatLabels

Break long character strings into multiple lines
cor

Fast calculations of Pearson correlation.
coClustering.permutationTest

Permutation test for co-clustering
branchSplitFromStabilityLabels

Branch split (dissimilarity) statistics derived from labels determined from a stability study
corAndPvalue

Calculation of correlations and associated p-values
checkAdjMat

Check adjacency matrix
fundamentalNetworkConcepts

Calculation of fundamental network concepts from an adjacency matrix.
checkSets

Check structure and retrieve sizes of a group of datasets.
chooseOneHubInEachModule

Chooses a single hub gene in each module
consensusKME

Calculate consensus kME (eigengene-based connectivities) across multiple data sets.
corPredictionSuccess

Qunatification of success of gene screening
consensusMEDissimilarity

Consensus dissimilarity of module eigengenes.
individualTOMs

Calculate individual correlation network matrices
Inline display of progress

Inline display of progress
corPvalueFisher

Fisher's asymptotic p-value for correlation
coxRegressionResiduals

Deviance- and martingale residuals from a Cox regression model
cutreeStatic

Constant-height tree cut
consensusProjectiveKMeans

Consensus projective K-means (pre-)clustering of expression data
consensusOrderMEs

Put close eigenvectors next to each other in several sets.
consensusTreeInputs

Get all elementary inputs in a consensus tree
convertNumericColumnsToNumeric

Convert character columns that represent numbers to numeric
goodSamplesGenes

Iterative filtering of samples and genes with too many missing entries
goodSamples

Filter samples with too many missing entries
list2multiData

Convert a list to a multiData structure and vice-versa.
labels2colors

Convert numerical labels to colors.
consensusCalculation

Calculation of a (single) consenus with optional data calibration.
consensusDissTOMandTree

Consensus clustering based on topological overlap and hierarchical clustering
dynamicMergeCut

Threshold for module merging
empiricalBayesLM

Empirical Bayes-moderated adjustment for unwanted covariates
hierarchicalConsensusMEDissimilarity

Hierarchical consensus calculation of module eigengene dissimilarity
matrixToNetwork

Construct a network from a matrix
mergeCloseModules

Merge close modules in gene expression data
hierarchicalConsensusModules

Hierarchical consensus network construction and module identification
labeledBarplot

Barplot with text or color labels.
labelPoints

Label scatterplot points
corPvalueStudent

Student asymptotic p-value for correlation
correlationPreservation

Preservation of eigengene correlations
intramodularConnectivity

Calculation of intramodular connectivity
exportNetworkToCytoscape

Export network to Cytoscape
exportNetworkToVisANT

Export network data in format readable by VisANT
greenBlackRed

Green-black-red color sequence
greenWhiteRed

Green-white-red color sequence
isMultiData

Determine whether the supplied object is a valid multiData structure
multiData.eigengeneSignificance

Eigengene significance across multiple sets
multiGSub

Analogs of grep(l) and (g)sub for multiple patterns and relacements
goodSamplesGenesMS

Iterative filtering of samples and genes with too many missing entries across multiple data sets
hierarchicalConsensusCalculation

Hierarchical consensus calculation
metaZfunction

Meta-analysis Z statistic
metaAnalysis

Meta-analysis of binary and continuous variables
newBlockInformation

Create a list holding information about dividing data into blocks
networkScreeningGS

Network gene screening with an external gene significance measure
hierarchicalConsensusKME

Calculation of measures of fuzzy module membership (KME) in hierarchical consensus modules
cutreeStaticColor

Constant height tree cut using color labels
displayColors

Show colors used to label modules
moduleNumber

Fixed-height cut of a dendrogram.
goodSamplesMS

Filter samples with too many missing entries across multiple data sets
modulePreservation

Calculation of module preservation statistics
minWhichMin

Fast joint calculation of row- or column-wise minima and indices of minimum elements
goodGenes

Filter genes with too many missing entries
mtd.setColnames

Get and set column names in a multiData structure.
nearestNeighborConnectivityMS

Connectivity to a constant number of nearest neighbors across multiple data sets
mtd.simplify

If possible, simplify a multiData structure to a 3-dimensional array.
nearestNeighborConnectivity

Connectivity to a constant number of nearest neighbors
moduleColor.getMEprefix

Get the prefix used to label module eigengenes.
goodGenesMS

Filter genes with too many missing entries across multiple sets
orderMEs

Put close eigenvectors next to each other
orderMEsByHierarchicalConsensus

Order module eigengenes by their hierarchical consensus similarity
prepComma

Prepend a comma to a non-empty string
prependZeros

Pad numbers with leading zeros to specified total width
plotNetworkHeatmap

Network heatmap plot
plotMultiHist

Plot multiple histograms in a single plot
hierarchicalConsensusTOM

Calculation of hierarchical consensus topological overlap matrix
networkConcepts

Calculations of network concepts
mutualInfoAdjacency

Calculate weighted adjacency matrices based on mutual information
networkScreening

Identification of genes related to a trait
hierarchicalMergeCloseModules

Merge close (similar) hierarchical consensus modules
redWhiteGreen

Red-white-green color sequence
nPresent

Number of present data entries.
pickHardThreshold

Analysis of scale free topology for hard-thresholding.
mtd.setAttr

Set attributes on each component of a multiData structure
mtd.rbindSelf

Turn a multiData structure into a single matrix or data frame.
simulateModule

Simulate a gene co-expression module
relativeCorPredictionSuccess

Compare prediction success
sampledBlockwiseModules

Blockwise module identification in sampled data
rgcolors.func

Red and Green Color Specification
simulateEigengeneNetwork

Simulate eigengene network from a causal model
standardScreeningNumericTrait

Standard screening for numeric traits
standardScreeningCensoredTime

Standard Screening with regard to a Censored Time Variable
verboseBoxplot

Boxplot annotated by a Kruskal-Wallis p-value
pickSoftThreshold

Analysis of scale free topology for soft-thresholding
newConsensusTree

Create a new consensus tree
newCorrelationOptions

Creates a list of correlation options.
hubGeneSignificance

Hubgene significance
kMEcomparisonScatterplot

Function to plot kME values between two comparable data sets.
imputeByModule

Impute missing data separately in each module
keepCommonProbes

Keep probes that are shared among given data sets
moduleMergeUsingKME

Merge modules and reassign genes using kME.
moduleEigengenes

Calculate module eigengenes.
numbers2colors

Color representation for a numeric variable
orderBranchesUsingHubGenes

Optimize dendrogram using branch swaps and reflections.
sigmoidAdjacencyFunction

Sigmoid-type adacency function.
proportionsInAdmixture

Estimate the proportion of pure populations in an admixed population based on marker expression values.
signedKME

Signed eigengene-based connectivity
propVarExplained

Proportion of variance explained by eigengenes.
replaceMissing

Replace missing values with a constant.
returnGeneSetsAsList

Return pre-defined gene lists in several biomedical categories.
simulateDatExpr

Simulation of expression data
simulateDatExpr5Modules

Simplified simulation of expression data
mtd.apply

Apply a function to each set in a multiData structure.
mtd.mapply

Apply a function to elements of given multiData structures.
verboseIplot

Scatterplot with density
nSets

Number of sets in a multi-set variable
nearestCentroidPredictor

Nearest centroid predictor
spaste

Space-less paste
softConnectivity

Calculates connectivity of a weighted network.
userListEnrichment

Measure enrichment between inputted and user-defined lists
overlapTableUsingKME

Determines significant overlap between modules in two networks based on kME tables.
overlapTable

Calculate overlap of modules
labeledHeatmap.multiPage

Labeled heatmap divided into several separate plots.
labeledHeatmap

Produce a labeled heatmap plot
newNetworkOptions

Create a list of network construction arguments (options).
plotCor

Red and Green Color Image of Correlation Matrix
vectorTOM

Topological overlap for a subset of the whole set of genes
plotDendroAndColors

Dendrogram plot with color annotation of objects
normalizeLabels

Transform numerical labels into normal order.
populationMeansInAdmixture

Estimate the population-specific mean values in an admixed population.
pquantile

Parallel quantile, median, mean
plotClusterTreeSamples

Annotated clustering dendrogram of microarray samples
plotColorUnderTree

Plot color rows in a given order, for example under a dendrogram
sampledHierarchicalConsensusModules

Hierarchical consensus module identification in sampled data
removeGreyME

Removes the grey eigengene from a given collection of eigengenes.
simulateMultiExpr

Simulate multi-set expression data
scaleFreeFitIndex

Calculation of fitting statistics for evaluating scale free topology fit.
removePrincipalComponents

Remove leading principal components from data
plotMat

Red and Green Color Image of Data Matrix
simulateSmallLayer

Simulate small modules
subsetTOM

Topological overlap for a subset of a whole set of genes
pruneAndMergeConsensusModules

Iterative pruning and merging of (hierarchical) consensus modules
swapTwoBranches

Select, swap, or reflect branches in a dendrogram.
pruneConsensusModules

Prune (hierarchical) consensus modules by removing genes with low eigengene-based intramodular connectivity
setCorrelationPreservation

Summary correlation preservation measure
sizeRestrictedClusterMerge

Cluter merging with size restrictions
lowerTri2matrix

Reconstruct a symmetric matrix from a distance (lower-triangular) representation
shortenStrings

Shorten given character strings by truncating at a suitable separator.
sizeGrWindow

Opens a graphics window with specified dimensions
preservationNetworkConnectivity

Network preservation calculations
matchLabels

Relabel module labels to best match the given reference labels
projectiveKMeans

Projective K-means (pre-)clustering of expression data
recutBlockwiseTrees

Repeat blockwise module detection from pre-calculated data
plotModuleSignificance

Barplot of module significance
signifNumeric

Round numeric columns to given significant digits.
signumAdjacencyFunction

Hard-thresholding adjacency function
transposeBigData

Transpose a big matrix or data frame
recutConsensusTrees

Repeat blockwise consensus module detection from pre-calculated data
standardColors

Colors this library uses for labeling modules.
unsignedAdjacency

Calculation of unsigned adjacency
votingLinearPredictor

Voting linear predictor
mtd.subset

Subset rows and columns in a multiData structure
verboseScatterplot

Scatterplot annotated by regression line and p-value
standardScreeningBinaryTrait

Standard screening for binatry traits
multiData

Create a multiData structure.
multiSetMEs

Calculate module eigengenes.
multiUnion

Union and intersection of multiple sets
newBlockwiseData

Create, merge and expand BlockwiseData objects
newConsensusOptions

Create a list holding consensus calculation options.
plotEigengeneNetworks

Eigengene network plot
qvalue

Estimate the q-values for a given set of p-values
plotMEpairs

Pairwise scatterplots of eigengenes
randIndex

Rand index of two partitions
qvalue.restricted

qvalue convenience wrapper
rankPvalue

Estimate the p-value for ranking consistently high (or low) on multiple lists
stdErr

Standard error of the mean of a given vector.
simpleConsensusCalculation

Simple calculation of a single consenus
selectFewestConsensusMissing

Select columns with the lowest consensus number of missing data
scaleFreePlot

Visual check of scale-free topology
stratifiedBarplot

Bar plots of data across two splitting parameters
vectorizeMatrix

Turn a matrix into a vector of non-redundant components
simpleHierarchicalConsensusCalculation

Simple hierarchical consensus calculation
verboseBarplot

Barplot with error bars, annotated by Kruskal-Wallis or ANOVA p-value