Learn R Programming

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

WGCNA (version 1.72-5)

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.72-5

License

GPL (>= 2)

Maintainer

Peter Langfelder

Last Published

December 7th, 2023

Functions in WGCNA (1.72-5)

accuracyMeasures

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

Add trait information to multi-set module eigengene structure
addGrid

Add grid lines to an existing plot.
TOMsimilarityFromExpr

Topological overlap matrix
TrueTrait

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

Topological overlap matrix similarity and dissimilarity
addErrorBars

Add error bars to a barplot.
TOMplot

Graphical representation of the Topological Overlap Matrix
addGuideLines

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

Calculate network adjacency
allowWGCNAThreads

Allow and disable multi-threading for certain WGCNA calculations
automaticNetworkScreening

One-step automatic network gene screening
adjacency.splineReg

Calculate network adjacency based on natural cubic spline regression
allocateJobs

Divide tasks among workers
bicor

Biweight Midcorrelation
bicovWeights

Weights used in biweight midcovariance
bicorAndPvalue

Calculation of biweight midcorrelations and associated p-values
adjacency.polyReg

Adjacency matrix based on polynomial regression
automaticNetworkScreeningGS

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

Align expression data with given vector
blockSize

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

Turn categorical columns into sets of binary indicators
blockwiseIndividualTOMs

Calculation of block-wise topological overlaps
blockwiseModules

Automatic network construction and module detection
branchSplit

Branch split.
branchSplit.dissim

Branch split based on dissimilarity.
branchEigengeneDissim

Branch dissimilarity based on eigennodes (eigengenes).
blueWhiteRed

Blue-white-red color sequence
collapseRows

Select one representative row per group
colQuantileC

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

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

Find consensus modules across several datasets.
checkAdjMat

Check adjacency matrix
binarizeCategoricalVariable

Turn a categorical variable into a set of binary indicators
checkSets

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

Chooses a single hub gene in each module
clusterCoef

Clustering coefficient calculation
chooseTopHubInEachModule

Chooses the top hub gene in each module
coClustering.permutationTest

Permutation test for co-clustering
consensusProjectiveKMeans

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

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

Co-clustering measure of cluster preservation between two clusterings
consensusCalculation

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

Consensus clustering based on topological overlap and hierarchical clustering
collapseRowsUsingKME

Selects one representative row per group based on kME
consensusOrderMEs

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

Consensus dissimilarity of module eigengenes.
collectGarbage

Iterative garbage collection.
cor

Fast calculations of Pearson correlation.
corPvalueStudent

Student asymptotic p-value for correlation
convertNumericColumnsToNumeric

Convert character columns that represent numbers to numeric
corPredictionSuccess

Qunatification of success of gene screening
consensusTOM

Consensus network (topological overlap).
correlationPreservation

Preservation of eigengene correlations
corAndPvalue

Calculation of correlations and associated p-values
corPvalueFisher

Fisher's asymptotic p-value for correlation
consensusRepresentatives

Consensus selection of group representatives
consensusTreeInputs

Get all elementary inputs in a consensus tree
conformityDecomposition

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

Calculation of conformity-based network concepts.
factorizeNonNumericColumns

Turn non-numeric columns into factors
cutreeStaticColor

Constant height tree cut using color labels
fixDataStructure

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

Export network data in format readable by VisANT
dynamicMergeCut

Threshold for module merging
coxRegressionResiduals

Deviance- and martingale residuals from a Cox regression model
displayColors

Show colors used to label modules
cutreeStatic

Constant-height tree cut
exportNetworkToCytoscape

Export network to Cytoscape
empiricalBayesLM

Empirical Bayes-moderated adjustment for unwanted covariates
fundamentalNetworkConcepts

Calculation of fundamental network concepts from an adjacency matrix.
formatLabels

Break long character strings into multiple lines
goodGenes

Filter genes with too many missing entries
goodSamplesGenesMS

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

Filter samples with too many missing entries
goodGenesMS

Filter genes with too many missing entries across multiple sets
goodSamplesMS

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

Green-black-red color sequence
greenWhiteRed

Green-white-red color sequence
goodSamplesGenes

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

Hubgene significance
hierarchicalConsensusMEDissimilarity

Hierarchical consensus calculation of module eigengene dissimilarity
hierarchicalConsensusCalculation

Hierarchical consensus calculation
hierarchicalConsensusTOM

Calculation of hierarchical consensus topological overlap matrix
individualTOMs

Calculate individual correlation network matrices
Inline display of progress

Inline display of progress
hierarchicalConsensusKME

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

Impute missing data separately in each module
hierarchicalConsensusModules

Hierarchical consensus network construction and module identification
hierarchicalMergeCloseModules

Merge close (similar) hierarchical consensus modules
labeledHeatmap.multiPage

Labeled heatmap divided into several separate plots.
intramodularConnectivity

Calculation of intramodular connectivity
labelPoints

Label scatterplot points
list2multiData

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

Determine whether the supplied object is a valid multiData structure
labeledHeatmap

Produce a labeled heatmap plot
kMEcomparisonScatterplot

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

Keep probes that are shared among given data sets
labeledBarplot

Barplot with text or color labels.
labels2colors

Convert numerical labels to colors.
mergeCloseModules

Merge close modules in gene expression data
moduleMergeUsingKME

Merge modules and reassign genes using kME.
matrixToNetwork

Construct a network from a matrix
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
metaAnalysis

Meta-analysis of binary and continuous variables
minWhichMin

Fast joint calculation of row- or column-wise minima and indices of minimum elements
moduleColor.getMEprefix

Get the prefix used to label module eigengenes.
moduleNumber

Fixed-height cut of a dendrogram.
mtd.apply

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

Turn a multiData structure into a single matrix or data frame.
mtd.subset

Subset rows and columns in a multiData structure
mtd.setColnames

Get and set column names in a multiData structure.
modulePreservation

Calculation of module preservation statistics
mtd.mapply

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

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

Set attributes on each component of a multiData structure
multiData

Create a multiData structure.
nSets

Number of sets in a multi-set variable
nearestNeighborConnectivityMS

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

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

Union and intersection of multiple sets
nearestNeighborConnectivity

Connectivity to a constant number of nearest neighbors
mutualInfoAdjacency

Calculate weighted adjacency matrices based on mutual information
multiData.eigengeneSignificance

Eigengene significance across multiple sets
multiSetMEs

Calculate module eigengenes.
nPresent

Number of present data entries.
nearestCentroidPredictor

Nearest centroid predictor
networkConcepts

Calculations of network concepts
newBlockwiseData

Create, merge and expand BlockwiseData objects
newBlockInformation

Create a list holding information about dividing data into blocks
networkScreening

Identification of genes related to a trait
networkScreeningGS

Network gene screening with an external gene significance measure
newConsensusTree

Create a new consensus tree
newConsensusOptions

Create a list holding consensus calculation options.
normalizeLabels

Transform numerical labels into normal order.
newNetworkOptions

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

Put close eigenvectors next to each other
overlapTableUsingKME

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

Calculate overlap of modules
plotColorUnderTree

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

Color representation for a numeric variable
orderMEsByHierarchicalConsensus

Order module eigengenes by their hierarchical consensus similarity
newCorrelationOptions

Creates a list of correlation options.
orderBranchesUsingHubGenes

Optimize dendrogram using branch swaps and reflections.
plotClusterTreeSamples

Annotated clustering dendrogram of microarray samples
pickHardThreshold

Analysis of scale free topology for hard-thresholding.
pickSoftThreshold

Analysis of scale free topology for soft-thresholding
plotCor

Red and Green Color Image of Correlation Matrix
plotEigengeneNetworks

Eigengene network plot
pquantile

Parallel quantile, median, mean
plotMultiHist

Plot multiple histograms in a single plot
plotMEpairs

Pairwise scatterplots of eigengenes
populationMeansInAdmixture

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

Red and Green Color Image of Data Matrix
plotDendroAndColors

Dendrogram plot with color annotation of objects
plotNetworkHeatmap

Network heatmap plot
plotModuleSignificance

Barplot of module significance
qvalue.restricted

qvalue convenience wrapper
qvalue

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

Iterative pruning and merging of (hierarchical) consensus modules
pruneConsensusModules

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

Network preservation calculations
projectiveKMeans

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

Prepend a comma to a non-empty string
prependZeros

Pad numbers with leading zeros to specified total width
proportionsInAdmixture

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

Proportion of variance explained by eigengenes.
redWhiteGreen

Red-white-green color sequence
replaceMissing

Replace missing values with a constant.
relativeCorPredictionSuccess

Compare prediction success
returnGeneSetsAsList

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

Remove leading principal components from data
recutConsensusTrees

Repeat blockwise consensus module detection from pre-calculated data
removeGreyME

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

Repeat blockwise module detection from pre-calculated data
rankPvalue

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

Rand index of two partitions
signedKME

Signed eigengene-based connectivity
sigmoidAdjacencyFunction

Sigmoid-type adacency function.
setCorrelationPreservation

Summary correlation preservation measure
shortenStrings

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

Hierarchical consensus module identification in sampled data
scaleFreeFitIndex

Calculation of fitting statistics for evaluating scale free topology fit.
rgcolors.func

Red and Green Color Specification
sampledBlockwiseModules

Blockwise module identification in sampled data
scaleFreePlot

Visual check of scale-free topology
simulateDatExpr5Modules

Simplified simulation of expression data
simulateMultiExpr

Simulate multi-set expression data
simulateDatExpr

Simulation of expression data
selectFewestConsensusMissing

Select columns with the lowest consensus number of missing data
signifNumeric

Round numeric columns to given significant digits.
signumAdjacencyFunction

Hard-thresholding adjacency function
simulateSmallLayer

Simulate small modules
standardScreeningNumericTrait

Standard screening for numeric traits
sizeGrWindow

Opens a graphics window with specified dimensions
simpleHierarchicalConsensusCalculation

Simple hierarchical consensus calculation
simulateModule

Simulate a gene co-expression module
softConnectivity

Calculates connectivity of a weighted network.
transposeBigData

Transpose a big matrix or data frame
standardScreeningBinaryTrait

Standard screening for binatry traits
vectorTOM

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

Simple calculation of a single consenus
spaste

Space-less paste
simulateEigengeneNetwork

Simulate eigengene network from a causal model
standardColors

Colors this library uses for labeling modules.
stratifiedBarplot

Bar plots of data across two splitting parameters
sizeRestrictedClusterMerge

Cluter merging with size restrictions
standardScreeningCensoredTime

Standard Screening with regard to a Censored Time Variable
userListEnrichment

Measure enrichment between inputted and user-defined lists
vectorizeMatrix

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

Standard error of the mean of a given vector.
subsetTOM

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

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

Calculation of unsigned adjacency
swapTwoBranches

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

Scatterplot annotated by regression line and p-value
votingLinearPredictor

Voting linear predictor
verboseBoxplot

Boxplot annotated by a Kruskal-Wallis p-value
verboseIplot

Scatterplot with density
GOenrichmentAnalysis

Calculation of GO enrichment (experimental)
GTOMdist

Generalized Topological Overlap Measure
AFcorMI

Prediction of Weighted Mutual Information Adjacency Matrix by Correlation
PWLists

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

Stem Cell-Related Genes with Corresponding Gene Markers
BloodLists

Blood Cell Types with Corresponding Gene Markers
BD.getData

Various basic operations on BlockwiseData objects.
BrainLists

Brain-Related Categories with Corresponding Gene Markers
ImmunePathwayLists

Immune Pathways with Corresponding Gene Markers
BrainRegionMarkers

Gene Markers for Regions of the Human Brain