Learn R Programming

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

WGCNA (version 1.69)

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.69

License

GPL (>= 2)

Maintainer

Peter Langfelder

Last Published

February 28th, 2020

Functions in WGCNA (1.69)

accuracyMeasures

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

Add grid lines to an existing plot.
addGuideLines

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

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

Topological overlap matrix
adjacency.splineReg

Calculate network adjacency based on natural cubic spline regression
bicor

Biweight Midcorrelation
addErrorBars

Add error bars to a barplot.
SCsLists

Stem Cell-Related Genes with Corresponding Gene Markers
binarizeCategoricalColumns

Turn categorical columns into sets of binary indicators
allowWGCNAThreads

Allow and disable multi-threading for certain WGCNA calculations
allocateJobs

Divide tasks among workers
alignExpr

Align expression data with given vector
addTraitToMEs

Add trait information to multi-set module eigengene structure
colQuantileC

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

Graphical representation of the Topological Overlap Matrix
blueWhiteRed

Blue-white-red color sequence
TrueTrait

Estimate the true trait underlying a list of surrogate markers.
adjacency.polyReg

Adjacency matrix based on polynomial regression
adjacency

Calculate network adjacency
TOMsimilarity

Topological overlap matrix similarity and dissimilarity
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
bicorAndPvalue

Calculation of biweight midcorrelations and associated p-values
branchEigengeneDissim

Branch dissimilarity based on eigennodes (eigengenes).
automaticNetworkScreening

One-step automatic network gene screening
collapseRows

Select one representative row per group
bicovWeights

Weights used in biweight midcovariance
branchSplit

Branch split.
chooseOneHubInEachModule

Chooses a single hub gene in each module
checkSets

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

Find consensus modules across several datasets.
branchSplitFromStabilityLabels

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

Automatic network construction and module detection
branchSplit.dissim

Branch split based on dissimilarity.
collapseRowsUsingKME

Selects one representative row per group based on kME
collectGarbage

Iterative garbage collection.
checkAdjMat

Check adjacency matrix
consensusMEDissimilarity

Consensus dissimilarity of module eigengenes.
consensusKME

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

Calculation of block-wise topological overlaps
coClustering

Co-clustering measure of cluster preservation between two clusterings
consensusCalculation

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

Chooses the top hub gene in each module
clusterCoef

Clustering coefficient calculation
consensusProjectiveKMeans

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

Consensus clustering based on topological overlap and hierarchical clustering
corPredictionSuccess

Qunatification of success of gene screening
corPvalueFisher

Fisher's asymptotic p-value for correlation
consensusOrderMEs

Put close eigenvectors next to each other in several sets.
coClustering.permutationTest

Permutation test for co-clustering
cor

Fast calculations of Pearson correlation.
corAndPvalue

Calculation of correlations and associated p-values
consensusTreeInputs

Get all elementary inputs in a consensus tree
convertNumericColumnsToNumeric

Convert character columns that represent numbers to numeric
cutreeStaticColor

Constant height tree cut using color labels
corPvalueStudent

Student asymptotic p-value for correlation
empiricalBayesLM

Empirical Bayes-moderated adjustment for unwanted covariates
dynamicMergeCut

Threshold for module merging
factorizeNonNumericColumns

Turn non-numeric columns into factors
goodSamples

Filter samples with too many missing entries
fixDataStructure

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

Preservation of eigengene correlations
goodSamplesGenes

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

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

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

Show colors used to label modules
goodGenesMS

Filter genes with too many missing entries across multiple sets
hierarchicalConsensusCalculation

Hierarchical consensus calculation
conformityBasedNetworkConcepts

Calculation of conformity-based network concepts.
goodGenes

Filter genes with too many missing entries
hierarchicalConsensusKME

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

Impute missing data separately in each module
hubGeneSignificance

Hubgene significance
exportNetworkToVisANT

Export network data in format readable by VisANT
exportNetworkToCytoscape

Export network to Cytoscape
hierarchicalConsensusMEDissimilarity

Hierarchical consensus calculation of module eigengene dissimilarity
greenBlackRed

Green-black-red color sequence
labelPoints

Label scatterplot points
labeledBarplot

Barplot with text or color labels.
conformityDecomposition

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

Green-white-red color sequence
consensusRepresentatives

Consensus selection of group representatives
hierarchicalConsensusModules

Hierarchical consensus network construction and module identification
intramodularConnectivity

Calculation of intramodular connectivity
labels2colors

Convert numerical labels to colors.
individualTOMs

Calculate individual correlation network matrices
labeledHeatmap

Produce a labeled heatmap plot
Inline display of progress

Inline display of progress
list2multiData

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

Construct a network from a matrix
labeledHeatmap.multiPage

Labeled heatmap divided into several separate plots.
mtd.rbindSelf

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

Relabel module labels to best match the given reference labels
lowerTri2matrix

Reconstruct a symmetric matrix from a distance (lower-triangular) representation
multiData.eigengeneSignificance

Eigengene significance across multiple sets
newConsensusOptions

Create a list holding consensus calculation options.
metaAnalysis

Meta-analysis of binary and continuous variables
mtd.setAttr

Set attributes on each component of a multiData structure
consensusTOM

Consensus network (topological overlap).
multiGSub

Analogs of grep(l) and (g)sub for multiple patterns and relacements
mtd.apply

Apply a function to each set in a multiData structure.
pickHardThreshold

Analysis of scale free topology for hard-thresholding.
metaZfunction

Meta-analysis Z statistic
coxRegressionResiduals

Deviance- and martingale residuals from a Cox regression model
plotCor

Red and Green Color Image of Correlation Matrix
multiData

Create a multiData structure.
mtd.subset

Subset rows and columns in a multiData structure
newBlockwiseData

Create, merge and expand BlockwiseData objects
pickSoftThreshold

Analysis of scale free topology for soft-thresholding
isMultiData

Determine whether the supplied object is a valid multiData structure
mergeCloseModules

Merge close modules in gene expression data
mtd.mapply

Apply a function to elements of given multiData structures.
nPresent

Number of present data entries.
mtd.setColnames

Get and set column names in a multiData structure.
mutualInfoAdjacency

Calculate weighted adjacency matrices based on mutual information
moduleColor.getMEprefix

Get the prefix used to label module eigengenes.
propVarExplained

Proportion of variance explained by eigengenes.
plotDendroAndColors

Dendrogram plot with color annotation of objects
nearestCentroidPredictor

Nearest centroid predictor
nSets

Number of sets in a multi-set variable
newBlockInformation

Create a list holding information about dividing data into blocks
mtd.simplify

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

Transform numerical labels into normal order.
minWhichMin

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

Color representation for a numeric variable
networkScreeningGS

Network gene screening with an external gene significance measure
newNetworkOptions

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

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

Annotated clustering dendrogram of microarray samples
removePrincipalComponents

Remove leading principal components from data
removeGreyME

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

Replace missing values with a constant.
plotMEpairs

Pairwise scatterplots of eigengenes
cutreeStatic

Constant-height tree cut
plotEigengeneNetworks

Eigengene network plot
scaleFreeFitIndex

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

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

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

Hierarchical consensus module identification in sampled data
qvalue

Estimate the q-values for a given set of p-values
qvalue.restricted

qvalue convenience wrapper
orderBranchesUsingHubGenes

Optimize dendrogram using branch swaps and reflections.
sampledBlockwiseModules

Blockwise module identification in sampled data
rgcolors.func

Red and Green Color Specification
signumAdjacencyFunction

Hard-thresholding adjacency function
nearestNeighborConnectivity

Connectivity to a constant number of nearest neighbors
hierarchicalConsensusTOM

Calculation of hierarchical consensus topological overlap matrix
nearestNeighborConnectivityMS

Connectivity to a constant number of nearest neighbors across multiple data sets
signifNumeric

Round numeric columns to given significant digits.
simpleConsensusCalculation

Simple calculation of a single consenus
fundamentalNetworkConcepts

Calculation of fundamental network concepts from an adjacency matrix.
formatLabels

Break long character strings into multiple lines
newConsensusTree

Create a new consensus tree
stdErr

Standard error of the mean of a given vector.
populationMeansInAdmixture

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

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

Creates a list of correlation options.
stratifiedBarplot

Bar plots of data across two splitting parameters
simpleHierarchicalConsensusCalculation

Simple hierarchical consensus calculation
overlapTable

Calculate overlap of modules
pquantile

Parallel quantile, median, mean
overlapTableUsingKME

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

Iterative pruning and merging of (hierarchical) consensus modules
recutConsensusTrees

Repeat blockwise consensus module detection from pre-calculated data
kMEcomparisonScatterplot

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

Repeat blockwise module detection from pre-calculated data
hierarchicalMergeCloseModules

Merge close (similar) hierarchical consensus modules
plotMultiHist

Plot multiple histograms in a single plot
shortenStrings

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

Keep probes that are shared among given data sets
setCorrelationPreservation

Summary correlation preservation measure
standardScreeningCensoredTime

Standard Screening with regard to a Censored Time Variable
moduleMergeUsingKME

Merge modules and reassign genes using kME.
transposeBigData

Transpose a big matrix or data frame
modulePreservation

Calculation of module preservation statistics
moduleEigengenes

Calculate module eigengenes.
unsignedAdjacency

Calculation of unsigned adjacency
multiSetMEs

Calculate module eigengenes.
sizeGrWindow

Opens a graphics window with specified dimensions
plotNetworkHeatmap

Network heatmap plot
simulateModule

Simulate a gene co-expression module
multiUnion

Union and intersection of multiple sets
moduleNumber

Fixed-height cut of a dendrogram.
preservationNetworkConnectivity

Network preservation calculations
simulateEigengeneNetwork

Simulate eigengene network from a causal model
networkConcepts

Calculations of network concepts
projectiveKMeans

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

Order module eigengenes by their hierarchical consensus similarity
randIndex

Rand index of two partitions
rankPvalue

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

Identification of genes related to a trait
standardScreeningNumericTrait

Standard screening for numeric traits
orderMEs

Put close eigenvectors next to each other
plotMat

Red and Green Color Image of Data Matrix
signedKME

Signed eigengene-based connectivity
softConnectivity

Calculates connectivity of a weighted network.
simulateDatExpr

Simulation of expression data
simulateDatExpr5Modules

Simplified simulation of expression data
vectorTOM

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

Sigmoid-type adacency function.
verboseBarplot

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

Cluter merging with size restrictions
vectorizeMatrix

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

Measure enrichment between inputted and user-defined lists
spaste

Space-less paste
verboseBoxplot

Boxplot annotated by a Kruskal-Wallis p-value
plotModuleSignificance

Barplot of module significance
prependZeros

Pad numbers with leading zeros to specified total width
prepComma

Prepend a comma to a non-empty string
simulateMultiExpr

Simulate multi-set expression data
redWhiteGreen

Red-white-green color sequence
standardScreeningBinaryTrait

Standard screening for binatry traits
subsetTOM

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

Colors this library uses for labeling modules.
simulateSmallLayer

Simulate small modules
relativeCorPredictionSuccess

Compare prediction success
scaleFreePlot

Visual check of scale-free topology
selectFewestConsensusMissing

Select columns with the lowest consensus number of missing data
swapTwoBranches

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

Scatterplot with density
verboseScatterplot

Scatterplot annotated by regression line and p-value
votingLinearPredictor

Voting linear predictor
BloodLists

Blood Cell Types with Corresponding Gene Markers
BrainRegionMarkers

Gene Markers for Regions of the Human Brain
BrainLists

Brain-Related Categories with Corresponding Gene Markers
GOenrichmentAnalysis

Calculation of GO enrichment (experimental)
ImmunePathwayLists

Immune Pathways with Corresponding Gene Markers
BD.getData

Various basic operations on BlockwiseData objects.
GTOMdist

Generalized Topological Overlap Measure
PWLists

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

Prediction of Weighted Mutual Information Adjacency Matrix by Correlation