Learn R Programming

WGCNA (version 1.73)

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

14,709

Version

1.73

License

GPL (>= 2)

Last Published

September 18th, 2024

Functions in WGCNA (1.73)

TOMsimilarityFromExpr

Topological overlap matrix
addTraitToMEs

Add trait information to multi-set module eigengene structure
accuracyMeasures

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

Graphical representation of the Topological Overlap Matrix
addErrorBars

Add error bars to a barplot.
TrueTrait

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

Calculate network adjacency
TOMsimilarity

Topological overlap matrix similarity and dissimilarity
allocateJobs

Divide tasks among workers
alignExpr

Align expression data with given vector
bicovWeights

Weights used in biweight midcovariance
bicorAndPvalue

Calculation of biweight midcorrelations and associated p-values
bicor

Biweight Midcorrelation
automaticNetworkScreeningGS

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

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

Adjacency matrix based on polynomial regression
addGrid

Add grid lines to an existing plot.
addGuideLines

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

Allow and disable multi-threading for certain WGCNA calculations
automaticNetworkScreening

One-step automatic network gene screening
blockSize

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

Calculation of block-wise topological overlaps
branchEigengeneDissim

Branch dissimilarity based on eigennodes (eigengenes).
blockwiseModules

Automatic network construction and module detection
blueWhiteRed

Blue-white-red color sequence
branchSplit

Branch split.
binarizeCategoricalColumns

Turn categorical columns into sets of binary indicators
blockwiseConsensusModules

Find consensus modules across several datasets.
branchSplit.dissim

Branch split based on dissimilarity.
binarizeCategoricalVariable

Turn a categorical variable into a set of binary indicators
colQuantileC

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

Chooses the top hub gene in each module
branchSplitFromStabilityLabels

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

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

Check adjacency matrix
collapseRows

Select one representative row per group
chooseOneHubInEachModule

Chooses a single hub gene in each module
coClustering

Co-clustering measure of cluster preservation between two clusterings
coClustering.permutationTest

Permutation test for co-clustering
conformityDecomposition

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

Selects one representative row per group based on kME
conformityBasedNetworkConcepts

Calculation of conformity-based network concepts.
clusterCoef

Clustering coefficient calculation
consensusCalculation

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

Iterative garbage collection.
consensusDissTOMandTree

Consensus clustering based on topological overlap and hierarchical clustering
consensusOrderMEs

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

Consensus dissimilarity of module eigengenes.
consensusProjectiveKMeans

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

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

Calculation of correlations and associated p-values
cor

Fast calculations of Pearson correlation.
consensusTreeInputs

Get all elementary inputs in a consensus tree
convertNumericColumnsToNumeric

Convert character columns that represent numbers to numeric
corPredictionSuccess

Qunatification of success of gene screening
corPvalueFisher

Fisher's asymptotic p-value for correlation
factorizeNonNumericColumns

Turn non-numeric columns into factors
corPvalueStudent

Student asymptotic p-value for correlation
consensusRepresentatives

Consensus selection of group representatives
consensusTOM

Consensus network (topological overlap).
fixDataStructure

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

Constant height tree cut using color labels
correlationPreservation

Preservation of eigengene correlations
displayColors

Show colors used to label modules
exportNetworkToCytoscape

Export network to Cytoscape
exportNetworkToVisANT

Export network data in format readable by VisANT
goodGenes

Filter genes with too many missing entries
goodSamplesMS

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

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

Filter genes with too many missing entries across multiple sets
dynamicMergeCut

Threshold for module merging
empiricalBayesLM

Empirical Bayes-moderated adjustment for unwanted covariates
goodSamplesGenes

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

Filter samples with too many missing entries
coxRegressionResiduals

Deviance- and martingale residuals from a Cox regression model
greenBlackRed

Green-black-red color sequence
fundamentalNetworkConcepts

Calculation of fundamental network concepts from an adjacency matrix.
greenWhiteRed

Green-white-red color sequence
cutreeStatic

Constant-height tree cut
formatLabels

Break long character strings into multiple lines
individualTOMs

Calculate individual correlation network matrices
imputeByModule

Impute missing data separately in each module
hubGeneSignificance

Hubgene significance
hierarchicalConsensusMEDissimilarity

Hierarchical consensus calculation of module eigengene dissimilarity
hierarchicalConsensusCalculation

Hierarchical consensus calculation
hierarchicalConsensusTOM

Calculation of hierarchical consensus topological overlap matrix
hierarchicalConsensusModules

Hierarchical consensus network construction and module identification
hierarchicalConsensusKME

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

Merge close (similar) hierarchical consensus modules
Inline display of progress

Inline display of progress
labeledBarplot

Barplot with text or color labels.
kMEcomparisonScatterplot

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

Calculation of intramodular connectivity
labelPoints

Label scatterplot points
labeledHeatmap

Produce a labeled heatmap plot
labels2colors

Convert numerical labels to colors.
keepCommonProbes

Keep probes that are shared among given data sets
isMultiData

Determine whether the supplied object is a valid multiData structure
list2multiData

Convert a list to a multiData structure and vice-versa.
labeledHeatmap.multiPage

Labeled heatmap divided into several separate plots.
matrixToNetwork

Construct a network from a matrix
mergeCloseModules

Merge close modules in gene expression data
minWhichMin

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

Modified Bisquare Weights
moduleColor.getMEprefix

Get the prefix used to label module eigengenes.
moduleEigengenes

Calculate module eigengenes.
lowerTri2matrix

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

Relabel module labels to best match the given reference labels
metaZfunction

Meta-analysis Z statistic
mtd.setColnames

Get and set column names in a multiData structure.
mtd.setAttr

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

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

Meta-analysis of binary and continuous variables
mtd.apply

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

Apply a function to elements of given multiData structures.
mtd.rbindSelf

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

Calculation of module preservation statistics
moduleMergeUsingKME

Merge modules and reassign genes using kME.
mtd.subset

Subset rows and columns in a multiData structure
moduleNumber

Fixed-height cut of a dendrogram.
nPresent

Number of present data entries.
multiData.eigengeneSignificance

Eigengene significance across multiple sets
nearestCentroidPredictor

Nearest centroid predictor
multiData

Create a multiData structure.
multiUnion

Union and intersection of multiple sets
networkScreening

Identification of genes related to a trait
nSets

Number of sets in a multi-set variable
multiGSub

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

Connectivity to a constant number of nearest neighbors
multiSetMEs

Calculate module eigengenes.
mutualInfoAdjacency

Calculate weighted adjacency matrices based on mutual information
networkConcepts

Calculations of network concepts
newConsensusTree

Create a new consensus tree
nearestNeighborConnectivityMS

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

Create a list holding consensus calculation options.
newNetworkOptions

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

Creates a list of correlation options.
networkScreeningGS

Network gene screening with an external gene significance measure
orderMEsByHierarchicalConsensus

Order module eigengenes by their hierarchical consensus similarity
newBlockInformation

Create a list holding information about dividing data into blocks
normalizeLabels

Transform numerical labels into normal order.
overlapTableUsingKME

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

Create, merge and expand BlockwiseData objects
numbers2colors

Color representation for a numeric variable
pickHardThreshold

Analysis of scale free topology for hard-thresholding.
orderBranchesUsingHubGenes

Optimize dendrogram using branch swaps and reflections.
pickSoftThreshold

Analysis of scale free topology for soft-thresholding
orderMEs

Put close eigenvectors next to each other
plotClusterTreeSamples

Annotated clustering dendrogram of microarray samples
plotDendroAndColors

Dendrogram plot with color annotation of objects
overlapTable

Calculate overlap of modules
plotEigengeneNetworks

Eigengene network plot
populationMeansInAdmixture

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

Network heatmap plot
plotMultiHist

Plot multiple histograms in a single plot
plotModuleSignificance

Barplot of module significance
plotCor

Red and Green Color Image of Correlation Matrix
pruneConsensusModules

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

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

Pairwise scatterplots of eigengenes
pquantile

Parallel quantile, median, mean
propVarExplained

Proportion of variance explained by eigengenes.
prependZeros

Pad numbers with leading zeros to specified total width
plotMat

Red and Green Color Image of Data Matrix
projectiveKMeans

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

Prepend a comma to a non-empty string
pruneAndMergeConsensusModules

Iterative pruning and merging of (hierarchical) consensus modules
proportionsInAdmixture

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

Network preservation calculations
qvalue

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

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

Repeat blockwise module detection from pre-calculated data
shortenStrings

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

Sigmoid-type adacency function.
sampledBlockwiseModules

Blockwise module identification in sampled data
replaceMissing

Replace missing values with a constant.
removePrincipalComponents

Remove leading principal components from data
sampledHierarchicalConsensusModules

Hierarchical consensus module identification in sampled data
scaleFreeFitIndex

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

Compare prediction success
scaleFreePlot

Visual check of scale-free topology
removeGreyME

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

Repeat blockwise consensus module detection from pre-calculated data
qvalue.restricted

qvalue convenience wrapper
simpleHierarchicalConsensusCalculation

Simple hierarchical consensus calculation
simulateDatExpr

Simulation of expression data
signumAdjacencyFunction

Hard-thresholding adjacency function
signedKME

Signed eigengene-based connectivity
returnGeneSetsAsList

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

Rand index of two partitions
rgcolors.func

Red and Green Color Specification
simpleConsensusCalculation

Simple calculation of a single consenus
simulateModule

Simulate a gene co-expression module
softConnectivity

Calculates connectivity of a weighted network.
redWhiteGreen

Red-white-green color sequence
signifNumeric

Round numeric columns to given significant digits.
stratifiedBarplot

Bar plots of data across two splitting parameters
sizeRestrictedClusterMerge

Cluter merging with size restrictions
userListEnrichment

Measure enrichment between inputted and user-defined lists
simulateMultiExpr

Simulate multi-set expression data
stdErr

Standard error of the mean of a given vector.
setCorrelationPreservation

Summary correlation preservation measure
selectFewestConsensusMissing

Select columns with the lowest consensus number of missing data
simulateDatExpr5Modules

Simplified simulation of expression data
unsignedAdjacency

Calculation of unsigned adjacency
standardScreeningNumericTrait

Standard screening for numeric traits
simulateEigengeneNetwork

Simulate eigengene network from a causal model
spaste

Space-less paste
standardColors

Colors this library uses for labeling modules.
simulateSmallLayer

Simulate small modules
swapTwoBranches

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

Opens a graphics window with specified dimensions
transposeBigData

Transpose a big matrix or data frame
verboseIplot

Scatterplot with density
standardScreeningCensoredTime

Standard Screening with regard to a Censored Time Variable
standardScreeningBinaryTrait

Standard screening for binatry traits
verboseBarplot

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

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

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

Voting linear predictor
verboseBoxplot

Boxplot annotated by a Kruskal-Wallis p-value
subsetTOM

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

Scatterplot annotated by regression line and p-value
PWLists

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

Calculation of GO enrichment (experimental)
SCsLists

Stem Cell-Related Genes with Corresponding Gene Markers
GTOMdist

Generalized Topological Overlap Measure
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
AFcorMI

Prediction of Weighted Mutual Information Adjacency Matrix by Correlation
BD.getData

Various basic operations on BlockwiseData objects.
ImmunePathwayLists

Immune Pathways with Corresponding Gene Markers