Learn R Programming

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

WGCNA (version 1.67)

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,041

Version

1.67

License

GPL (>= 2)

Maintainer

Peter Langfelder

Last Published

April 11th, 2019

Functions in WGCNA (1.67)

GTOMdist

Generalized Topological Overlap Measure
GOenrichmentAnalysis

Calculation of GO enrichment (experimental)
TOMsimilarityFromExpr

Topological overlap matrix
TrueTrait

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

Align expression data with given vector
allocateJobs

Divide tasks among workers
blockSize

Attempt to calculate an appropriate block size to maximize efficiency of block-wise calcualtions.
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
BloodLists

Blood Cell Types with Corresponding Gene Markers
BrainLists

Brain-Related Categories with Corresponding Gene Markers
conformityBasedNetworkConcepts

Calculation of conformity-based network concepts.
blockwiseConsensusModules

Find consensus modules across several datasets.
AFcorMI

Prediction of Weighted Mutual Information Adjacency Matrix by Correlation
TOMplot

Graphical representation of the Topological Overlap Matrix
automaticNetworkScreening

One-step automatic network gene screening
conformityDecomposition

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

Blue-white-red color sequence
BD.getData

Various basic operations on BlockwiseData objects.
accuracyMeasures

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

Calculation of biweight midcorrelations and associated p-values
TOMsimilarity

Topological overlap matrix similarity and dissimilarity
addErrorBars

Add error bars to a barplot.
bicovWeights

Weights used in biweight midcovariance
automaticNetworkScreeningGS

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

Adjacency matrix based on polynomial regression
checkSets

Check structure and retrieve sizes of a group of datasets.
adjacency.splineReg

Calculate network adjacency based on natural cubic spline regression
bicor

Biweight Midcorrelation
branchSplit

Branch split.
chooseOneHubInEachModule

Chooses a single hub gene in each module
branchEigengeneDissim

Branch dissimilarity based on eigennodes (eigengenes).
consensusRepresentatives

Consensus selection of group representatives
blockwiseIndividualTOMs

Calculation of block-wise topological overlaps
branchSplit.dissim

Branch split based on dissimilarity.
consensusOrderMEs

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

Automatic network construction and module detection
coClustering

Co-clustering measure of cluster preservation between two clusterings
consensusProjectiveKMeans

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

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

Consensus network (topological overlap).
checkAdjMat

Check adjacency matrix
cutreeStaticColor

Constant height tree cut using color labels
colQuantileC

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

Show colors used to label modules
collapseRows

Select one representative row per group
collapseRowsUsingKME

Selects one representative row per group based on kME
consensusCalculation

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

Consensus clustering based on topological overlap and hierarchical clustering
collectGarbage

Iterative garbage collection.
corPvalueStudent

Student asymptotic p-value for correlation
PWLists

Pathways with Corresponding Gene Markers - Compiled by Mike Palazzolo and Jim Wang from CHDI
coClustering.permutationTest

Permutation test for co-clustering
correlationPreservation

Preservation of eigengene correlations
hubGeneSignificance

Hubgene significance
SCsLists

Stem Cell-Related Genes with Corresponding Gene Markers
addTraitToMEs

Add trait information to multi-set module eigengene structure
consensusKME

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

Impute missing data separately in each module
adjacency

Calculate network adjacency
intramodularConnectivity

Calculation of intramodular connectivity
exportNetworkToCytoscape

Export network to Cytoscape
consensusMEDissimilarity

Consensus dissimilarity of module eigengenes.
cor

Fast calculations of Pearson correlation.
consensusTreeInputs

Get all elementary inputs in a consensus tree
binarizeCategoricalColumns

Turn categorical columns into sets of binary indicators
isMultiData

Determine whether the supplied object is a valid multiData structure
convertNumericColumnsToNumeric

Convert character columns that represent numbers to numeric
corAndPvalue

Calculation of correlations and associated p-values
matrixToNetwork

Construct a network from a matrix
mergeCloseModules

Merge close modules in gene expression data
factorizeNonNumericColumns

Turn non-numeric columns into factors
fixDataStructure

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

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

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

Threshold for module merging
corPredictionSuccess

Qunatification of success of gene screening
goodGenes

Filter genes with too many missing entries
corPvalueFisher

Fisher's asymptotic p-value for correlation
coxRegressionResiduals

Deviance- and martingale residuals from a Cox regression model
binarizeCategoricalVariable

Turn a categorical variable into a set of binary indicators
exportNetworkToVisANT

Export network data in format readable by VisANT
empiricalBayesLM

Empirical Bayes-moderated adjustment for unwanted covariates
chooseTopHubInEachModule

Chooses the top hub gene in each module
cutreeStatic

Constant-height tree cut
goodGenesMS

Filter genes with too many missing entries across multiple sets
clusterCoef

Clustering coefficient calculation
goodSamples

Filter samples with too many missing entries
goodSamplesGenesMS

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

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

Green-black-red color sequence
formatLabels

Break long character strings into multiple lines
newConsensusTree

Create a new consensus tree
goodSamplesMS

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

Calculation of fundamental network concepts from an adjacency matrix.
individualTOMs

Calculate individual correlation network matrices
hierarchicalConsensusCalculation

Hierarchical consensus calculation
newCorrelationOptions

Creates a list of correlation options.
orderMEs

Put close eigenvectors next to each other
hierarchicalConsensusKME

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

Calculation of hierarchical consensus topological overlap matrix
Inline display of progress

Inline display of progress
labeledHeatmap

Produce a labeled heatmap plot
hierarchicalConsensusMEDissimilarity

Hierarchical consensus calculation of module eigengene dissimilarity
orderMEsByHierarchicalConsensus

Order module eigengenes by their hierarchical consensus similarity
hierarchicalConsensusModules

Hierarchical consensus network construction and module identification
plotEigengeneNetworks

Eigengene network plot
lowerTri2matrix

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

Merge close (similar) hierarchical consensus modules
matchLabels

Relabel module labels to best match the given reference labels
labels2colors

Convert numerical labels to colors.
labelPoints

Label scatterplot points
plotMEpairs

Pairwise scatterplots of eigengenes
labeledBarplot

Barplot with text or color labels.
greenWhiteRed

Green-white-red color sequence
moduleEigengenes

Calculate module eigengenes.
mtd.apply

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

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

Merge modules and reassign genes using kME.
labeledHeatmap.multiPage

Labeled heatmap divided into several separate plots.
qvalue.restricted

qvalue convenience wrapper
mtd.rbindSelf

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

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

Meta-analysis of binary and continuous variables
metaZfunction

Meta-analysis Z statistic
mtd.setAttr

Set attributes on each component of a multiData structure
minWhichMin

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

Red-white-green color sequence
mtd.mapply

Apply a function to elements of given multiData structures.
nearestNeighborConnectivity

Connectivity to a constant number of nearest neighbors
relativeCorPredictionSuccess

Compare prediction success
mutualInfoAdjacency

Calculate weighted adjacency matrices based on mutual information
moduleColor.getMEprefix

Get the prefix used to label module eigengenes.
nPresent

Number of present data entries.
kMEcomparisonScatterplot

Function to plot kME values between two comparable data sets.
multiData.eigengeneSignificance

Eigengene significance across multiple sets
moduleNumber

Fixed-height cut of a dendrogram.
multiGSub

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

Keep probes that are shared among given data sets
setCorrelationPreservation

Summary correlation preservation measure
nearestNeighborConnectivityMS

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

Subset rows and columns in a multiData structure
multiData

Create a multiData structure.
shortenStrings

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

Calculate module eigengenes.
multiUnion

Union and intersection of multiple sets
plotClusterTreeSamples

Annotated clustering dendrogram of microarray samples
signifNumeric

Round numeric columns to given significant digits.
modulePreservation

Calculation of module preservation statistics
networkScreeningGS

Network gene screening with an external gene significance measure
nSets

Number of sets in a multi-set variable
newNetworkOptions

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

Hard-thresholding adjacency function
newBlockwiseData

Create, merge and expand BlockwiseData objects
normalizeLabels

Transform numerical labels into normal order.
newConsensusOptions

Create a list holding consensus calculation options.
plotColorUnderTree

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

Colors this library uses for labeling modules.
standardScreeningBinaryTrait

Standard screening for binatry traits
nearestCentroidPredictor

Nearest centroid predictor
pickHardThreshold

Analysis of scale free topology for hard-thresholding.
newBlockInformation

Create a list holding information about dividing data into blocks
networkConcepts

Calculations of network concepts
numbers2colors

Color representation for a numeric variable
pickSoftThreshold

Analysis of scale free topology for soft-thresholding
overlapTable

Calculate overlap of modules
networkScreening

Identification of genes related to a trait
subsetTOM

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

Optimize dendrogram using branch swaps and reflections.
plotMultiHist

Plot multiple histograms in a single plot
propVarExplained

Proportion of variance explained by eigengenes.
overlapTableUsingKME

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

Red and Green Color Image of Correlation Matrix
plotNetworkHeatmap

Network heatmap plot
plotMat

Red and Green Color Image of Data Matrix
swapTwoBranches

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

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

Barplot of module significance
proportionsInAdmixture

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

Iterative pruning and merging of (hierarchical) consensus modules
pquantile

Parallel quantile, median, mean
plotDendroAndColors

Dendrogram plot with color annotation of objects
rgcolors.func

Red and Green Color Specification
recutBlockwiseTrees

Repeat blockwise module detection from pre-calculated data
stdErr

Standard error of the mean of a given vector.
sampledBlockwiseModules

Blockwise module identification in sampled data
verboseScatterplot

Scatterplot annotated by regression line and p-value
stratifiedBarplot

Bar plots of data across two splitting parameters
verboseBoxplot

Boxplot annotated by a Kruskal-Wallis p-value
pruneConsensusModules

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

Voting linear predictor
recutConsensusTrees

Repeat blockwise consensus module detection from pre-calculated data
randIndex

Rand index of two partitions
preservationNetworkConnectivity

Network preservation calculations
verboseIplot

Scatterplot with density
projectiveKMeans

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

Visual check of scale-free topology
removeGreyME

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

Remove leading principal components from data
rankPvalue

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

Select columns with the lowest consensus number of missing data
prepComma

Prepend a comma to a non-empty string
sampledHierarchicalConsensusModules

Hierarchical consensus module identification in sampled data
simulateMultiExpr

Simulate multi-set expression data
simulateSmallLayer

Simulate small modules
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.
prependZeros

Pad numbers with leading zeros to specified total width
replaceMissing

Replace missing values with a constant.
spaste

Space-less paste
returnGeneSetsAsList

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

Simulate eigengene network from a causal model
sigmoidAdjacencyFunction

Sigmoid-type adacency function.
simulateModule

Simulate a gene co-expression module
sizeGrWindow

Opens a graphics window with specified dimensions
userListEnrichment

Measure enrichment between inputted and user-defined lists
vectorizeMatrix

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

Signed eigengene-based connectivity
vectorTOM

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

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

Simulation of expression data
sizeRestrictedClusterMerge

Cluter merging with size restrictions
simulateDatExpr5Modules

Simplified simulation of expression data
transposeBigData

Transpose a big matrix or data frame
standardScreeningCensoredTime

Standard Screening with regard to a Censored Time Variable
standardScreeningNumericTrait

Standard screening for numeric traits
unsignedAdjacency

Calculation of unsigned adjacency
BrainRegionMarkers

Gene Markers for Regions of the Human Brain
ImmunePathwayLists

Immune Pathways with Corresponding Gene Markers