Learn R Programming

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

WGCNA (version 1.68)

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

License

GPL (>= 2)

Last Published

May 23rd, 2019

Functions in WGCNA (1.68)

GTOMdist

Generalized Topological Overlap Measure
TOMsimilarityFromExpr

Topological overlap matrix
alignExpr

Align expression data with given vector
allocateJobs

Divide tasks among workers
TrueTrait

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

Calculation of block-wise topological overlaps
blockwiseModules

Automatic network construction and module detection
branchSplitFromStabilityLabels

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

Check adjacency matrix
consensusOrderMEs

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

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

Get all elementary inputs in a consensus tree
convertNumericColumnsToNumeric

Convert character columns that represent numbers to numeric
factorizeNonNumericColumns

Turn non-numeric columns into factors
fixDataStructure

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

Break long character strings into multiple lines
fundamentalNetworkConcepts

Calculation of fundamental network concepts from an adjacency matrix.
PWLists

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

Hierarchical consensus calculation
SCsLists

Stem Cell-Related Genes with Corresponding Gene Markers
hierarchicalConsensusKME

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

Label scatterplot points
TOMplot

Graphical representation of the Topological Overlap Matrix
labeledBarplot

Barplot with text or color labels.
TOMsimilarity

Topological overlap matrix similarity and dissimilarity
metaAnalysis

Meta-analysis of binary and continuous variables
metaZfunction

Meta-analysis Z statistic
bicorAndPvalue

Calculation of biweight midcorrelations and associated p-values
bicovWeights

Weights used in biweight midcovariance
binarizeCategoricalColumns

Turn categorical columns into sets of binary indicators
binarizeCategoricalVariable

Turn a categorical variable into a set of binary indicators
mtd.rbindSelf

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

Chooses the top hub gene in each module
clusterCoef

Clustering coefficient calculation
collapseRowsUsingKME

Selects one representative row per group based on kME
collectGarbage

Iterative garbage collection.
mtd.setAttr

Set attributes on each component of a multiData structure
multiSetMEs

Calculate module eigengenes.
consensusRepresentatives

Consensus selection of group representatives
consensusTOM

Consensus network (topological overlap).
multiUnion

Union and intersection of multiple sets
exportNetworkToCytoscape

Export network to Cytoscape
BrainRegionMarkers

Gene Markers for Regions of the Human Brain
exportNetworkToVisANT

Export network data in format readable by VisANT
newNetworkOptions

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

Green-black-red color sequence
greenWhiteRed

Green-white-red color sequence
normalizeLabels

Transform numerical labels into normal order.
BloodLists

Blood Cell Types with Corresponding Gene Markers
hubGeneSignificance

Hubgene significance
imputeByModule

Impute missing data separately in each module
labels2colors

Convert numerical labels to colors.
pickHardThreshold

Analysis of scale free topology for hard-thresholding.
accuracyMeasures

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

Calculation of GO enrichment (experimental)
BrainLists

Brain-Related Categories with Corresponding Gene Markers
addErrorBars

Add error bars to a barplot.
allowWGCNAThreads

Allow and disable multi-threading for certain WGCNA calculations
pickSoftThreshold

Analysis of scale free topology for soft-thresholding
plotMat

Red and Green Color Image of Data Matrix
projectiveKMeans

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

Barplot of module significance
list2multiData

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

Network preservation calculations
minWhichMin

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

Add trait information to multi-set module eigengene structure
adjacency

Calculate network adjacency
adjacency.polyReg

Adjacency matrix based on polynomial regression
automaticNetworkScreening

One-step automatic network gene screening
AFcorMI

Prediction of Weighted Mutual Information Adjacency Matrix by Correlation
moduleNumber

Fixed-height cut of a dendrogram.
moduleColor.getMEprefix

Get the prefix used to label module eigengenes.
modulePreservation

Calculation of module preservation statistics
branchSplit

Branch split.
branchSplit.dissim

Branch split based on dissimilarity.
checkSets

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

Chooses a single hub gene in each module
redWhiteGreen

Red-white-green color sequence
conformityBasedNetworkConcepts

Calculation of conformity-based network concepts.
blockSize

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

Calculate network adjacency based on natural cubic spline regression
conformityDecomposition

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

Student asymptotic p-value for correlation
BD.getData

Various basic operations on BlockwiseData objects.
correlationPreservation

Preservation of eigengene correlations
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
coxRegressionResiduals

Deviance- and martingale residuals from a Cox regression model
cutreeStatic

Constant-height tree cut
blockwiseConsensusModules

Find consensus modules across several datasets.
relativeCorPredictionSuccess

Compare prediction success
goodSamples

Filter samples with too many missing entries
coClustering

Co-clustering measure of cluster preservation between two clusterings
goodSamplesGenes

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

Calculate individual correlation network matrices
nSets

Number of sets in a multi-set variable
nearestCentroidPredictor

Nearest centroid predictor
newConsensusTree

Create a new consensus tree
newCorrelationOptions

Creates a list of correlation options.
bicor

Biweight Midcorrelation
scaleFreePlot

Visual check of scale-free topology
blueWhiteRed

Blue-white-red color sequence
selectFewestConsensusMissing

Select columns with the lowest consensus number of missing data
coClustering.permutationTest

Permutation test for co-clustering
numbers2colors

Color representation for a numeric variable
colQuantileC

Fast colunm- and row-wise quantile of a matrix.
Inline display of progress

Inline display of progress
branchEigengeneDissim

Branch dissimilarity based on eigennodes (eigengenes).
collapseRows

Select one representative row per group
intramodularConnectivity

Calculation of intramodular connectivity
consensusKME

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

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

Consensus dissimilarity of module eigengenes.
corPredictionSuccess

Qunatification of success of gene screening
orderBranchesUsingHubGenes

Optimize dendrogram using branch swaps and reflections.
plotEigengeneNetworks

Eigengene network plot
consensusDissTOMandTree

Consensus clustering based on topological overlap and hierarchical clustering
isMultiData

Determine whether the supplied object is a valid multiData structure
corPvalueFisher

Fisher's asymptotic p-value for correlation
lowerTri2matrix

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

Fast calculations of Pearson correlation.
plotMEpairs

Pairwise scatterplots of eigengenes
matchLabels

Relabel module labels to best match the given reference labels
propVarExplained

Proportion of variance explained by eigengenes.
corAndPvalue

Calculation of correlations and associated p-values
dynamicMergeCut

Threshold for module merging
mtd.apply

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

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

Apply a function to elements of given multiData structures.
nearestNeighborConnectivity

Connectivity to a constant number of nearest neighbors
cutreeStaticColor

Constant height tree cut using color labels
displayColors

Show colors used to label modules
recutBlockwiseTrees

Repeat blockwise module detection from pre-calculated data
goodGenes

Filter genes with too many missing entries
empiricalBayesLM

Empirical Bayes-moderated adjustment for unwanted covariates
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
simulateEigengeneNetwork

Simulate eigengene network from a causal model
goodSamplesMS

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

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

Calculation of hierarchical consensus topological overlap matrix
networkScreeningGS

Network gene screening with an external gene significance measure
simulateModule

Simulate a gene co-expression module
newBlockInformation

Create a list holding information about dividing data into blocks
recutConsensusTrees

Repeat blockwise consensus module detection from pre-calculated data
hierarchicalMergeCloseModules

Merge close (similar) hierarchical consensus modules
labeledHeatmap

Produce a labeled heatmap plot
hierarchicalConsensusMEDissimilarity

Hierarchical consensus calculation of module eigengene dissimilarity
overlapTable

Calculate overlap of modules
overlapTableUsingKME

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

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

Hierarchical consensus network construction and module identification
keepCommonProbes

Keep probes that are shared among given data sets
stdErr

Standard error of the mean of a given vector.
labeledHeatmap.multiPage

Labeled heatmap divided into several separate plots.
sigmoidAdjacencyFunction

Sigmoid-type adacency function.
moduleEigengenes

Calculate module eigengenes.
signedKME

Signed eigengene-based connectivity
matrixToNetwork

Construct a network from a matrix
moduleMergeUsingKME

Merge modules and reassign genes using kME.
stratifiedBarplot

Bar plots of data across two splitting parameters
userListEnrichment

Measure enrichment between inputted and user-defined lists
mergeCloseModules

Merge close modules in gene expression data
mtd.setColnames

Get and set column names in a multiData structure.
populationMeansInAdmixture

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

Topological overlap for a subset of the whole set of genes
mtd.simplify

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

Parallel quantile, median, mean
multiData.eigengeneSignificance

Eigengene significance across multiple sets
simulateDatExpr

Simulation of expression data
mtd.subset

Subset rows and columns in a multiData structure
multiData

Create a multiData structure.
multiGSub

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

Calculations of network concepts
simulateDatExpr5Modules

Simplified simulation of expression data
mutualInfoAdjacency

Calculate weighted adjacency matrices based on mutual information
nPresent

Number of present data entries.
newBlockwiseData

Create, merge and expand BlockwiseData objects
sizeGrWindow

Opens a graphics window with specified dimensions
newConsensusOptions

Create a list holding consensus calculation options.
orderMEs

Put close eigenvectors next to each other
qvalue

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

Order module eigengenes by their hierarchical consensus similarity
qvalue.restricted

qvalue convenience wrapper
networkScreening

Identification of genes related to a trait
plotClusterTreeSamples

Annotated clustering dendrogram of microarray samples
plotColorUnderTree

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

Red and Green Color Image of Correlation Matrix
plotDendroAndColors

Dendrogram plot with color annotation of objects
plotMultiHist

Plot multiple histograms in a single plot
replaceMissing

Replace missing values with a constant.
returnGeneSetsAsList

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

Network heatmap plot
pruneAndMergeConsensusModules

Iterative pruning and merging of (hierarchical) consensus modules
sizeRestrictedClusterMerge

Cluter merging with size restrictions
pruneConsensusModules

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

Transpose a big matrix or data frame
unsignedAdjacency

Calculation of unsigned adjacency
prepComma

Prepend a comma to a non-empty string
rgcolors.func

Red and Green Color Specification
removeGreyME

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

Remove leading principal components from data
sampledBlockwiseModules

Blockwise module identification in sampled data
sampledHierarchicalConsensusModules

Hierarchical consensus module identification in sampled data
prependZeros

Pad numbers with leading zeros to specified total width
simpleConsensusCalculation

Simple calculation of a single consenus
simpleHierarchicalConsensusCalculation

Simple hierarchical consensus calculation
scaleFreeFitIndex

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

Calculates connectivity of a weighted network.
simulateMultiExpr

Simulate multi-set expression data
simulateSmallLayer

Simulate small modules
spaste

Space-less paste
verboseBoxplot

Boxplot annotated by a Kruskal-Wallis p-value
standardColors

Colors this library uses for labeling modules.
randIndex

Rand index of two partitions
rankPvalue

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

Scatterplot with density
standardScreeningBinaryTrait

Standard screening for binatry traits
subsetTOM

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

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

Scatterplot annotated by regression line and p-value
setCorrelationPreservation

Summary correlation preservation measure
votingLinearPredictor

Voting linear predictor
shortenStrings

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

Round numeric columns to given significant digits.
signumAdjacencyFunction

Hard-thresholding adjacency function
standardScreeningCensoredTime

Standard Screening with regard to a Censored Time Variable
standardScreeningNumericTrait

Standard screening for numeric traits
vectorizeMatrix

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

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

Immune Pathways with Corresponding Gene Markers