Learn R Programming

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

WGCNA (version 1.70-3)

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

16,961

Version

1.70-3

License

GPL (>= 2)

Last Published

February 28th, 2021

Functions in WGCNA (1.70-3)

BloodLists

Blood Cell Types with Corresponding Gene Markers
accuracyMeasures

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

Calculate network adjacency
AFcorMI

Prediction of Weighted Mutual Information Adjacency Matrix by Correlation
addTraitToMEs

Add trait information to multi-set module eigengene structure
BD.getData

Various basic operations on BlockwiseData objects.
allowWGCNAThreads

Allow and disable multi-threading for certain WGCNA calculations
addErrorBars

Add error bars to a barplot.
TOMplot

Graphical representation of the Topological Overlap Matrix
ImmunePathwayLists

Immune Pathways with Corresponding Gene Markers
GTOMdist

Generalized Topological Overlap Measure
branchSplit

Branch split.
branchSplitFromStabilityLabels

Branch split (dissimilarity) statistics derived from labels determined from a stability study
branchSplit.dissim

Branch split based on dissimilarity.
automaticNetworkScreening

One-step automatic network gene screening
binarizeCategoricalColumns

Turn categorical columns into sets of binary indicators
addGrid

Add grid lines to an existing plot.
PWLists

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

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

Gene Markers for Regions of the Human Brain
adjacency.polyReg

Adjacency matrix based on polynomial regression
GOenrichmentAnalysis

Calculation of GO enrichment (experimental)
SCsLists

Stem Cell-Related Genes with Corresponding Gene Markers
TOMsimilarity

Topological overlap matrix similarity and dissimilarity
bicorAndPvalue

Calculation of biweight midcorrelations and associated p-values
binarizeCategoricalVariable

Turn a categorical variable into a set of binary indicators
TrueTrait

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

Selects one representative row per group based on kME
blockSize

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

Biweight Midcorrelation
TOMsimilarityFromExpr

Topological overlap matrix
checkSets

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

Find consensus modules across several datasets.
automaticNetworkScreeningGS

One-step automatic network gene screening with external gene significance
adjacency.splineReg

Calculate network adjacency based on natural cubic spline regression
checkAdjMat

Check adjacency matrix
chooseOneHubInEachModule

Chooses a single hub gene in each module
alignExpr

Align expression data with given vector
consensusTreeInputs

Get all elementary inputs in a consensus tree
convertNumericColumnsToNumeric

Convert character columns that represent numbers to numeric
conformityBasedNetworkConcepts

Calculation of conformity-based network concepts.
allocateJobs

Divide tasks among workers
colQuantileC

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

Blue-white-red color sequence
bicovWeights

Weights used in biweight midcovariance
collectGarbage

Iterative garbage collection.
consensusOrderMEs

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

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

Filter samples with too many missing entries
blockwiseModules

Automatic network construction and module detection
coClustering

Co-clustering measure of cluster preservation between two clusterings
blockwiseIndividualTOMs

Calculation of block-wise topological overlaps
consensusProjectiveKMeans

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

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

Construct a network from a matrix
mergeCloseModules

Merge close modules in gene expression data
goodSamplesGenes

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

Keep probes that are shared among given data sets
branchEigengeneDissim

Branch dissimilarity based on eigennodes (eigengenes).
coClustering.permutationTest

Permutation test for co-clustering
chooseTopHubInEachModule

Chooses the top hub gene in each module
clusterCoef

Clustering coefficient calculation
consensusRepresentatives

Consensus selection of group representatives
dynamicMergeCut

Threshold for module merging
hierarchicalConsensusMEDissimilarity

Hierarchical consensus calculation of module eigengene dissimilarity
hierarchicalConsensusModules

Hierarchical consensus network construction and module identification
empiricalBayesLM

Empirical Bayes-moderated adjustment for unwanted covariates
consensusTOM

Consensus network (topological overlap).
cor

Fast calculations of Pearson correlation.
consensusDissTOMandTree

Consensus clustering based on topological overlap and hierarchical clustering
consensusCalculation

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

Fixed-height cut of a dendrogram.
corAndPvalue

Calculation of correlations and associated p-values
labeledHeatmap

Produce a labeled heatmap plot
displayColors

Show colors used to label modules
cutreeStaticColor

Constant height tree cut using color labels
modulePreservation

Calculation of module preservation statistics
greenWhiteRed

Green-white-red color sequence
hierarchicalConsensusCalculation

Hierarchical consensus calculation
greenBlackRed

Green-black-red color sequence
hierarchicalConsensusKME

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

Number of sets in a multi-set variable
moduleEigengenes

Calculate module eigengenes.
moduleMergeUsingKME

Merge modules and reassign genes using kME.
exportNetworkToCytoscape

Export network to Cytoscape
lowerTri2matrix

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

Student asymptotic p-value for correlation
labeledHeatmap.multiPage

Labeled heatmap divided into several separate plots.
factorizeNonNumericColumns

Turn non-numeric columns into factors
correlationPreservation

Preservation of eigengene correlations
fixDataStructure

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

Create, merge and expand BlockwiseData objects
newConsensusOptions

Create a list holding consensus calculation options.
nearestCentroidPredictor

Nearest centroid predictor
goodGenes

Filter genes with too many missing entries
mutualInfoAdjacency

Calculate weighted adjacency matrices based on mutual information
numbers2colors

Color representation for a numeric variable
nPresent

Number of present data entries.
plotMat

Red and Green Color Image of Data Matrix
exportNetworkToVisANT

Export network data in format readable by VisANT
plotModuleSignificance

Barplot of module significance
collapseRows

Select one representative row per group
matchLabels

Relabel module labels to best match the given reference labels
consensusKME

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

Subset rows and columns in a multiData structure
formatLabels

Break long character strings into multiple lines
multiData.eigengeneSignificance

Eigengene significance across multiple sets
multiGSub

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

Consensus dissimilarity of module eigengenes.
multiData

Create a multiData structure.
newConsensusTree

Create a new consensus tree
individualTOMs

Calculate individual correlation network matrices
fundamentalNetworkConcepts

Calculation of fundamental network concepts from an adjacency matrix.
goodGenesMS

Filter genes with too many missing entries across multiple sets
newCorrelationOptions

Creates a list of correlation options.
corPredictionSuccess

Qunatification of success of gene screening
Inline display of progress

Inline display of progress
prepComma

Prepend a comma to a non-empty string
prependZeros

Pad numbers with leading zeros to specified total width
redWhiteGreen

Red-white-green color sequence
corPvalueFisher

Fisher's asymptotic p-value for correlation
pickSoftThreshold

Analysis of scale free topology for soft-thresholding
pickHardThreshold

Analysis of scale free topology for hard-thresholding.
pruneAndMergeConsensusModules

Iterative pruning and merging of (hierarchical) consensus modules
rgcolors.func

Red and Green Color Specification
relativeCorPredictionSuccess

Compare prediction success
orderBranchesUsingHubGenes

Optimize dendrogram using branch swaps and reflections.
softConnectivity

Calculates connectivity of a weighted network.
sampledBlockwiseModules

Blockwise module identification in sampled data
spaste

Space-less paste
subsetTOM

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

Deviance- and martingale residuals from a Cox regression model
pquantile

Parallel quantile, median, mean
labelPoints

Label scatterplot points
populationMeansInAdmixture

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

Replace missing values with a constant.
simulateMultiExpr

Simulate multi-set expression data
selectFewestConsensusMissing

Select columns with the lowest consensus number of missing data
pruneConsensusModules

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

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

Hubgene significance
scaleFreePlot

Visual check of scale-free topology
simulateSmallLayer

Simulate small modules
randIndex

Rand index of two partitions
rankPvalue

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

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

Calculation of hierarchical consensus topological overlap matrix
goodSamplesMS

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

Transpose a big matrix or data frame
cutreeStatic

Constant-height tree cut
unsignedAdjacency

Calculation of unsigned adjacency
hierarchicalMergeCloseModules

Merge close (similar) hierarchical consensus modules
verboseScatterplot

Scatterplot annotated by regression line and p-value
votingLinearPredictor

Voting linear predictor
labeledBarplot

Barplot with text or color labels.
imputeByModule

Impute missing data separately in each module
isMultiData

Determine whether the supplied object is a valid multiData structure
metaZfunction

Meta-analysis Z statistic
setCorrelationPreservation

Summary correlation preservation measure
metaAnalysis

Meta-analysis of binary and continuous variables
intramodularConnectivity

Calculation of intramodular connectivity
sizeGrWindow

Opens a graphics window with specified dimensions
simulateEigengeneNetwork

Simulate eigengene network from a causal model
minWhichMin

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

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

Simulate a gene co-expression module
labels2colors

Convert numerical labels to colors.
list2multiData

Convert a list to a multiData structure and vice-versa.
mtd.setColnames

Get and set column names in a multiData structure.
vectorizeMatrix

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

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

Cluter merging with size restrictions
swapTwoBranches

Select, swap, or reflect branches in a dendrogram.
mtd.rbindSelf

Turn a multiData structure into a single matrix or data frame.
moduleColor.getMEprefix

Get the prefix used to label module eigengenes.
networkScreeningGS

Network gene screening with an external gene significance measure
mtd.simplify

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

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

Connectivity to a constant number of nearest neighbors
mtd.apply

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

Calculate overlap of modules
mtd.mapply

Apply a function to elements of given multiData structures.
newBlockInformation

Create a list holding information about dividing data into blocks
overlapTableUsingKME

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

Network heatmap plot
plotMultiHist

Plot multiple histograms in a single plot
multiSetMEs

Calculate module eigengenes.
multiUnion

Union and intersection of multiple sets
networkScreening

Identification of genes related to a trait
networkConcepts

Calculations of network concepts
normalizeLabels

Transform numerical labels into normal order.
mtd.setAttr

Set attributes on each component of a multiData structure
newNetworkOptions

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

Put close eigenvectors next to each other
plotClusterTreeSamples

Annotated clustering dendrogram of microarray samples
propVarExplained

Proportion of variance explained by eigengenes.
stdErr

Standard error of the mean of a given vector.
simulateDatExpr5Modules

Simplified simulation of expression data
simulateDatExpr

Simulation of expression data
proportionsInAdmixture

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

Order module eigengenes by their hierarchical consensus similarity
plotMEpairs

Pairwise scatterplots of eigengenes
preservationNetworkConnectivity

Network preservation calculations
removeGreyME

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

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

Eigengene network plot
stratifiedBarplot

Bar plots of data across two splitting parameters
removePrincipalComponents

Remove leading principal components from data
scaleFreeFitIndex

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

Hierarchical consensus module identification in sampled data
plotColorUnderTree

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

Round numeric columns to given significant digits.
plotDendroAndColors

Dendrogram plot with color annotation of objects
qvalue

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

Red and Green Color Image of Correlation Matrix
qvalue.restricted

qvalue convenience wrapper
signumAdjacencyFunction

Hard-thresholding adjacency function
standardScreeningCensoredTime

Standard Screening with regard to a Censored Time Variable
standardScreeningNumericTrait

Standard screening for numeric traits
userListEnrichment

Measure enrichment between inputted and user-defined lists
recutBlockwiseTrees

Repeat blockwise module detection from pre-calculated data
sigmoidAdjacencyFunction

Sigmoid-type adacency function.
signedKME

Signed eigengene-based connectivity
recutConsensusTrees

Repeat blockwise consensus module detection from pre-calculated data
simpleConsensusCalculation

Simple calculation of a single consenus
vectorTOM

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

Colors this library uses for labeling modules.
verboseBoxplot

Boxplot annotated by a Kruskal-Wallis p-value
simpleHierarchicalConsensusCalculation

Simple hierarchical consensus calculation
verboseIplot

Scatterplot with density
standardScreeningBinaryTrait

Standard screening for binatry traits
BrainLists

Brain-Related Categories with Corresponding Gene Markers