Learn R Programming

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

WGCNA (version 1.72-1)

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-1

License

GPL (>= 2)

Maintainer

Peter Langfelder

Last Published

January 18th, 2023

Functions in WGCNA (1.72-1)

SCsLists

Stem Cell-Related Genes with Corresponding Gene Markers
BloodLists

Blood Cell Types with Corresponding Gene Markers
AFcorMI

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

Various basic operations on BlockwiseData objects.
BrainRegionMarkers

Gene Markers for Regions of the Human Brain
PWLists

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

Calculation of GO enrichment (experimental)
BrainLists

Brain-Related Categories with Corresponding Gene Markers
GTOMdist

Generalized Topological Overlap Measure
TOMplot

Graphical representation of the Topological Overlap Matrix
accuracyMeasures

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

Add error bars to a barplot.
TOMsimilarityFromExpr

Topological overlap matrix
TrueTrait

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

Add grid lines to an existing plot.
ImmunePathwayLists

Immune Pathways with Corresponding Gene Markers
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
TOMsimilarity

Topological overlap matrix similarity and dissimilarity
addTraitToMEs

Add trait information to multi-set module eigengene structure
alignExpr

Align expression data with given vector
adjacency

Calculate network adjacency
automaticNetworkScreeningGS

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

Biweight Midcorrelation
allocateJobs

Divide tasks among workers
adjacency.polyReg

Adjacency matrix based on polynomial regression
bicorAndPvalue

Calculation of biweight midcorrelations and associated p-values
bicovWeights

Weights used in biweight midcovariance
adjacency.splineReg

Calculate network adjacency based on natural cubic spline regression
binarizeCategoricalColumns

Turn categorical columns into sets of binary indicators
binarizeCategoricalVariable

Turn a categorical variable into a set of binary indicators
blueWhiteRed

Blue-white-red color sequence
branchEigengeneDissim

Branch dissimilarity based on eigennodes (eigengenes).
branchSplit

Branch split.
blockSize

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

Fast colunm- and row-wise quantile of a matrix.
branchSplit.dissim

Branch split based on dissimilarity.
chooseOneHubInEachModule

Chooses a single hub gene in each module
checkSets

Check structure and retrieve sizes of a group of datasets.
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
coClustering

Co-clustering measure of cluster preservation between two clusterings
collapseRows

Select one representative row per group
consensusCalculation

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

Consensus clustering based on topological overlap and hierarchical clustering
chooseTopHubInEachModule

Chooses the top hub gene in each module
blockwiseConsensusModules

Find consensus modules across several datasets.
coClustering.permutationTest

Permutation test for co-clustering
consensusOrderMEs

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

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

Clustering coefficient calculation
consensusTreeInputs

Get all elementary inputs in a consensus tree
consensusKME

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

Consensus dissimilarity of module eigengenes.
checkAdjMat

Check adjacency matrix
collapseRowsUsingKME

Selects one representative row per group based on kME
convertNumericColumnsToNumeric

Convert character columns that represent numbers to numeric
coxRegressionResiduals

Deviance- and martingale residuals from a Cox regression model
corPvalueStudent

Student asymptotic p-value for correlation
cutreeStatic

Constant-height tree cut
correlationPreservation

Preservation of eigengene correlations
fixDataStructure

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

Turn non-numeric columns into factors
collectGarbage

Iterative garbage collection.
corPredictionSuccess

Qunatification of success of gene screening
cutreeStaticColor

Constant height tree cut using color labels
conformityBasedNetworkConcepts

Calculation of conformity-based network concepts.
cor

Fast calculations of Pearson correlation.
conformityDecomposition

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

Calculation of correlations and associated p-values
dynamicMergeCut

Threshold for module merging
consensusRepresentatives

Consensus selection of group representatives
displayColors

Show colors used to label modules
greenBlackRed

Green-black-red color sequence
corPvalueFisher

Fisher's asymptotic p-value for correlation
empiricalBayesLM

Empirical Bayes-moderated adjustment for unwanted covariates
goodSamplesGenesMS

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

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

Green-white-red color sequence
goodGenes

Filter genes with too many missing entries
exportNetworkToCytoscape

Export network to Cytoscape
consensusTOM

Consensus network (topological overlap).
goodGenesMS

Filter genes with too many missing entries across multiple sets
exportNetworkToVisANT

Export network data in format readable by VisANT
fundamentalNetworkConcepts

Calculation of fundamental network concepts from an adjacency matrix.
hierarchicalConsensusMEDissimilarity

Hierarchical consensus calculation of module eigengene dissimilarity
formatLabels

Break long character strings into multiple lines
hierarchicalConsensusModules

Hierarchical consensus network construction and module identification
hierarchicalConsensusCalculation

Hierarchical consensus calculation
goodSamples

Filter samples with too many missing entries
Inline display of progress

Inline display of progress
individualTOMs

Calculate individual correlation network matrices
hubGeneSignificance

Hubgene significance
goodSamplesGenes

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

Calculation of hierarchical consensus topological overlap matrix
hierarchicalMergeCloseModules

Merge close (similar) hierarchical consensus modules
kMEcomparisonScatterplot

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

Keep probes that are shared among given data sets
hierarchicalConsensusKME

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

Impute missing data separately in each module
labeledHeatmap

Produce a labeled heatmap plot
labeledBarplot

Barplot with text or color labels.
labelPoints

Label scatterplot points
intramodularConnectivity

Calculation of intramodular connectivity
labeledHeatmap.multiPage

Labeled heatmap divided into several separate plots.
list2multiData

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

Convert numerical labels to colors.
matrixToNetwork

Construct a network from a matrix
metaAnalysis

Meta-analysis of binary and continuous variables
isMultiData

Determine whether the supplied object is a valid multiData structure
metaZfunction

Meta-analysis Z statistic
lowerTri2matrix

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

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

Relabel module labels to best match the given reference labels
moduleColor.getMEprefix

Get the prefix used to label module eigengenes.
mergeCloseModules

Merge close modules in gene expression data
moduleMergeUsingKME

Merge modules and reassign genes using kME.
moduleEigengenes

Calculate module eigengenes.
mtd.setColnames

Get and set column names in a multiData structure.
moduleNumber

Fixed-height cut of a dendrogram.
mtd.simplify

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

Create a multiData structure.
mtd.setAttr

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

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

Calculation of module preservation statistics
mtd.apply

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

Subset rows and columns in a multiData structure
nSets

Number of sets in a multi-set variable
multiData.eigengeneSignificance

Eigengene significance across multiple sets
nearestNeighborConnectivity

Connectivity to a constant number of nearest neighbors
nearestCentroidPredictor

Nearest centroid predictor
mtd.mapply

Apply a function to elements of given multiData structures.
nPresent

Number of present data entries.
mutualInfoAdjacency

Calculate weighted adjacency matrices based on mutual information
nearestNeighborConnectivityMS

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

Create, merge and expand BlockwiseData objects
newConsensusOptions

Create a list holding consensus calculation options.
normalizeLabels

Transform numerical labels into normal order.
newNetworkOptions

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

Create a list holding information about dividing data into blocks
networkScreeningGS

Network gene screening with an external gene significance measure
multiSetMEs

Calculate module eigengenes.
multiGSub

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

Union and intersection of multiple sets
newCorrelationOptions

Creates a list of correlation options.
newConsensusTree

Create a new consensus tree
pickHardThreshold

Analysis of scale free topology for hard-thresholding.
networkScreening

Identification of genes related to a trait
networkConcepts

Calculations of network concepts
pickSoftThreshold

Analysis of scale free topology for soft-thresholding
numbers2colors

Color representation for a numeric variable
plotCor

Red and Green Color Image of Correlation Matrix
plotClusterTreeSamples

Annotated clustering dendrogram of microarray samples
plotColorUnderTree

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

Parallel quantile, median, mean
overlapTable

Calculate overlap of modules
populationMeansInAdmixture

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

Dendrogram plot with color annotation of objects
orderBranchesUsingHubGenes

Optimize dendrogram using branch swaps and reflections.
overlapTableUsingKME

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

Eigengene network plot
plotMEpairs

Pairwise scatterplots of eigengenes
plotMat

Red and Green Color Image of Data Matrix
pruneConsensusModules

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

Iterative pruning and merging of (hierarchical) consensus modules
plotModuleSignificance

Barplot of module significance
projectiveKMeans

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

Network preservation calculations
orderMEsByHierarchicalConsensus

Order module eigengenes by their hierarchical consensus similarity
orderMEs

Put close eigenvectors next to each other
prepComma

Prepend a comma to a non-empty string
propVarExplained

Proportion of variance explained by eigengenes.
proportionsInAdmixture

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

Red-white-green color sequence
relativeCorPredictionSuccess

Compare prediction success
plotNetworkHeatmap

Network heatmap plot
plotMultiHist

Plot multiple histograms in a single plot
qvalue.restricted

qvalue convenience wrapper
qvalue

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

Sigmoid-type adacency function.
rgcolors.func

Red and Green Color Specification
sampledBlockwiseModules

Blockwise module identification in sampled data
signedKME

Signed eigengene-based connectivity
randIndex

Rand index of two partitions
prependZeros

Pad numbers with leading zeros to specified total width
simpleConsensusCalculation

Simple calculation of a single consenus
simpleHierarchicalConsensusCalculation

Simple hierarchical consensus calculation
returnGeneSetsAsList

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

Replace missing values with a constant.
setCorrelationPreservation

Summary correlation preservation measure
shortenStrings

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

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

Round numeric columns to given significant digits.
recutBlockwiseTrees

Repeat blockwise module detection from pre-calculated data
signumAdjacencyFunction

Hard-thresholding adjacency function
spaste

Space-less paste
softConnectivity

Calculates connectivity of a weighted network.
verboseBoxplot

Boxplot annotated by a Kruskal-Wallis p-value
simulateEigengeneNetwork

Simulate eigengene network from a causal model
verboseIplot

Scatterplot with density
standardColors

Colors this library uses for labeling modules.
simulateDatExpr

Simulation of expression data
scaleFreeFitIndex

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

Hierarchical consensus module identification in sampled data
simulateModule

Simulate a gene co-expression module
removeGreyME

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

Repeat blockwise consensus module detection from pre-calculated data
standardScreeningBinaryTrait

Standard screening for binatry traits
removePrincipalComponents

Remove leading principal components from data
vectorizeMatrix

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

Standard error of the mean of a given vector.
sizeGrWindow

Opens a graphics window with specified dimensions
subsetTOM

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

Bar plots of data across two splitting parameters
sizeRestrictedClusterMerge

Cluter merging with size restrictions
swapTwoBranches

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

Select columns with the lowest consensus number of missing data
standardScreeningCensoredTime

Standard Screening with regard to a Censored Time Variable
simulateDatExpr5Modules

Simplified simulation of expression data
scaleFreePlot

Visual check of scale-free topology
simulateSmallLayer

Simulate small modules
simulateMultiExpr

Simulate multi-set expression data
verboseBarplot

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

Standard screening for numeric traits
transposeBigData

Transpose a big matrix or data frame
unsignedAdjacency

Calculation of unsigned adjacency
vectorTOM

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

Measure enrichment between inputted and user-defined lists
verboseScatterplot

Scatterplot annotated by regression line and p-value
votingLinearPredictor

Voting linear predictor