Learn R Programming

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

WGCNA (version 1.66)

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

Version

1.66

License

GPL (>= 2)

Maintainer

Peter Langfelder

Last Published

October 24th, 2018

Functions in WGCNA (1.66)

allocateJobs

Divide tasks among workers
BrainLists

Brain-Related Categories with Corresponding Gene Markers
TOMplot

Graphical representation of the Topological Overlap Matrix
BloodLists

Blood Cell Types with Corresponding Gene Markers
TOMsimilarity

Topological overlap matrix similarity and dissimilarity
branchSplit

Branch split.
allowWGCNAThreads

Allow and disable multi-threading for certain WGCNA calculations
automaticNetworkScreening

One-step automatic network gene screening
branchSplit.dissim

Branch split based on dissimilarity.
blockSize

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

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

Find consensus modules across several datasets.
GTOMdist

Generalized Topological Overlap Measure
ImmunePathwayLists

Immune Pathways with Corresponding Gene Markers
branchSplitFromStabilityLabels

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

Add grid lines to an existing plot.
chooseOneHubInEachModule

Chooses a single hub gene in each module
checkAdjMat

Check adjacency matrix
consensusCalculation

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

Consensus clustering based on topological overlap and hierarchical clustering
AFcorMI

Prediction of Weighted Mutual Information Adjacency Matrix by Correlation
collapseRowsUsingKME

Selects one representative row per group based on kME
BD.getData

Various basic operations on BlockwiseData objects.
addGuideLines

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

Add trait information to multi-set module eigengene structure
adjacency

Calculate network adjacency
collectGarbage

Iterative garbage collection.
cor

Fast calculations of Pearson correlation.
binarizeCategoricalColumns

Turn categorical columns into sets of binary indicators
adjacency.polyReg

Adjacency matrix based on polynomial regression
binarizeCategoricalVariable

Turn a categorical variable into a set of binary indicators
corAndPvalue

Calculation of correlations and associated p-values
adjacency.splineReg

Calculate network adjacency based on natural cubic spline regression
colQuantileC

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

Student asymptotic p-value for correlation
blockwiseIndividualTOMs

Calculation of block-wise topological overlaps
coxRegressionResiduals

Deviance- and martingale residuals from a Cox regression model
correlationPreservation

Preservation of eigengene correlations
cutreeStatic

Constant-height tree cut
consensusMEDissimilarity

Consensus dissimilarity of module eigengenes.
collapseRows

Select one representative row per group
consensusKME

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

Break long character strings into multiple lines
dynamicMergeCut

Threshold for module merging
fundamentalNetworkConcepts

Calculation of fundamental network concepts from an adjacency matrix.
consensusRepresentatives

Consensus selection of group representatives
blockwiseModules

Automatic network construction and module detection
empiricalBayesLM

Empirical Bayes-moderated adjustment for unwanted covariates
hubGeneSignificance

Hubgene significance
imputeByModule

Impute missing data separately in each module
coClustering

Co-clustering measure of cluster preservation between two clusterings
accuracyMeasures

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

Consensus network (topological overlap).
labelPoints

Label scatterplot points
hierarchicalConsensusTOM

Calculation of hierarchical consensus topological overlap matrix
hierarchicalMergeCloseModules

Merge close (similar) hierarchical consensus modules
labels2colors

Convert numerical labels to colors.
BrainRegionMarkers

Gene Markers for Regions of the Human Brain
labeledBarplot

Barplot with text or color labels.
minWhichMin

Fast joint calculation of row- or column-wise minima and indices of minimum elements
coClustering.permutationTest

Permutation test for co-clustering
consensusOrderMEs

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

Add error bars to a barplot.
list2multiData

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

Calculation of GO enrichment (experimental)
automaticNetworkScreeningGS

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

Construct a network from a matrix
moduleNumber

Fixed-height cut of a dendrogram.
mergeCloseModules

Merge close modules in gene expression data
modulePreservation

Calculation of module preservation statistics
bicor

Biweight Midcorrelation
TOMsimilarityFromExpr

Topological overlap matrix
goodSamplesGenesMS

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

Number of sets in a multi-set variable
moduleColor.getMEprefix

Get the prefix used to label module eigengenes.
consensusProjectiveKMeans

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

Nearest centroid predictor
multiSetMEs

Calculate module eigengenes.
TrueTrait

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

Turn non-numeric columns into factors
corPredictionSuccess

Qunatification of success of gene screening
goodSamplesMS

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

Fisher's asymptotic p-value for correlation
newBlockwiseData

Create, merge and expand BlockwiseData objects
fixDataStructure

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

Union and intersection of multiple sets
goodSamples

Filter samples with too many missing entries
exportNetworkToCytoscape

Export network to Cytoscape
newConsensusOptions

Create a list holding consensus calculation options.
hierarchicalConsensusMEDissimilarity

Hierarchical consensus calculation of module eigengene dissimilarity
goodSamplesGenes

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

Calculation of intramodular connectivity
isMultiData

Determine whether the supplied object is a valid multiData structure
exportNetworkToVisANT

Export network data in format readable by VisANT
numbers2colors

Color representation for a numeric variable
greenBlackRed

Green-black-red color sequence
bicorAndPvalue

Calculation of biweight midcorrelations and associated p-values
networkScreeningGS

Network gene screening with an external gene significance measure
hierarchicalConsensusModules

Hierarchical consensus network construction and module identification
newBlockInformation

Create a list holding information about dividing data into blocks
kMEcomparisonScatterplot

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

Green-white-red color sequence
overlapTable

Calculate overlap of modules
individualTOMs

Calculate individual correlation network matrices
plotCor

Red and Green Color Image of Correlation Matrix
orderBranchesUsingHubGenes

Optimize dendrogram using branch swaps and reflections.
keepCommonProbes

Keep probes that are shared among given data sets
branchEigengeneDissim

Branch dissimilarity based on eigennodes (eigengenes).
bicovWeights

Weights used in biweight midcovariance
blueWhiteRed

Blue-white-red color sequence
lowerTri2matrix

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

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

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

Relabel module labels to best match the given reference labels
plotDendroAndColors

Dendrogram plot with color annotation of objects
Inline display of progress

Inline display of progress
mtd.apply

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

Proportion of variance explained by eigengenes.
chooseTopHubInEachModule

Chooses the top hub gene in each module
proportionsInAdmixture

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

Calculate module eigengenes.
clusterCoef

Clustering coefficient calculation
moduleMergeUsingKME

Merge modules and reassign genes using kME.
mtd.rbindSelf

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

Subset rows and columns in a multiData structure
conformityBasedNetworkConcepts

Calculation of conformity-based network concepts.
multiData

Create a multiData structure.
conformityDecomposition

Conformity and module based decomposition of a network adjacency matrix.
mtd.setAttr

Set attributes on each component of a multiData structure
redWhiteGreen

Red-white-green color sequence
consensusTreeInputs

Get all elementary inputs in a consensus tree
relativeCorPredictionSuccess

Compare prediction success
mutualInfoAdjacency

Calculate weighted adjacency matrices based on mutual information
nPresent

Number of present data entries.
pquantile

Parallel quantile, median, mean
pruneAndMergeConsensusModules

Iterative pruning and merging of (hierarchical) consensus modules
pruneConsensusModules

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

Removes the grey eigengene from a given collection of eigengenes.
multiData.eigengeneSignificance

Eigengene significance across multiple sets
mtd.mapply

Apply a function to elements of given multiData structures.
convertNumericColumnsToNumeric

Convert character columns that represent numbers to numeric
cutreeStaticColor

Constant height tree cut using color labels
rgcolors.func

Red and Green Color Specification
displayColors

Show colors used to label modules
sampledBlockwiseModules

Blockwise module identification in sampled data
multiGSub

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

Simulate multi-set expression data
removePrincipalComponents

Remove leading principal components from data
simulateSmallLayer

Simulate small modules
standardScreeningBinaryTrait

Standard screening for binatry traits
newConsensusTree

Create a new consensus tree
standardScreeningCensoredTime

Standard Screening with regard to a Censored Time Variable
unsignedAdjacency

Calculation of unsigned adjacency
goodGenes

Filter genes with too many missing entries
userListEnrichment

Measure enrichment between inputted and user-defined lists
newCorrelationOptions

Creates a list of correlation options.
goodGenesMS

Filter genes with too many missing entries across multiple sets
orderMEs

Put close eigenvectors next to each other
orderMEsByHierarchicalConsensus

Order module eigengenes by their hierarchical consensus similarity
simpleConsensusCalculation

Simple calculation of a single consenus
hierarchicalConsensusCalculation

Hierarchical consensus calculation
pickHardThreshold

Analysis of scale free topology for hard-thresholding.
plotEigengeneNetworks

Eigengene network plot
pickSoftThreshold

Analysis of scale free topology for soft-thresholding
simpleHierarchicalConsensusCalculation

Simple hierarchical consensus calculation
plotModuleSignificance

Barplot of module significance
plotMat

Red and Green Color Image of Data Matrix
qvalue

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

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

Calculations of network concepts
networkScreening

Identification of genes related to a trait
labeledHeatmap

Produce a labeled heatmap plot
labeledHeatmap.multiPage

Labeled heatmap divided into several separate plots.
plotMEpairs

Pairwise scatterplots of eigengenes
metaAnalysis

Meta-analysis of binary and continuous variables
prepComma

Prepend a comma to a non-empty string
prependZeros

Pad numbers with leading zeros to specified total width
standardScreeningNumericTrait

Standard screening for numeric traits
mtd.setColnames

Get and set column names in a multiData structure.
metaZfunction

Meta-analysis Z statistic
recutBlockwiseTrees

Repeat blockwise module detection from pre-calculated data
stdErr

Standard error of the mean of a given vector.
recutConsensusTrees

Repeat blockwise consensus module detection from pre-calculated data
scaleFreePlot

Visual check of scale-free topology
swapTwoBranches

Select, swap, or reflect branches in a dendrogram.
qvalue.restricted

qvalue convenience wrapper
transposeBigData

Transpose a big matrix or data frame
randIndex

Rand index of two partitions
mtd.simplify

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

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

Connectivity to a constant number of nearest neighbors
nearestNeighborConnectivityMS

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

Select columns with the lowest consensus number of missing data
signifNumeric

Round numeric columns to given significant digits.
setCorrelationPreservation

Summary correlation preservation measure
signumAdjacencyFunction

Hard-thresholding adjacency function
stratifiedBarplot

Bar plots of data across two splitting parameters
replaceMissing

Replace missing values with a constant.
shortenStrings

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

Simulation of expression data
returnGeneSetsAsList

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

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

Hierarchical consensus module identification in sampled data
simulateDatExpr5Modules

Simplified simulation of expression data
verboseBarplot

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

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

Opens a graphics window with specified dimensions
softConnectivity

Calculates connectivity of a weighted network.
verboseBoxplot

Boxplot annotated by a Kruskal-Wallis p-value
newNetworkOptions

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

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

Transform numerical labels into normal order.
plotClusterTreeSamples

Annotated clustering dendrogram of microarray samples
plotColorUnderTree

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

Plot multiple histograms in a single plot
vectorizeMatrix

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

Network heatmap plot
preservationNetworkConnectivity

Network preservation calculations
projectiveKMeans

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

Sigmoid-type adacency function.
signedKME

Signed eigengene-based connectivity
simulateEigengeneNetwork

Simulate eigengene network from a causal model
simulateModule

Simulate a gene co-expression module
spaste

Space-less paste
standardColors

Colors this library uses for labeling modules.
verboseIplot

Scatterplot with density
verboseScatterplot

Scatterplot annotated by regression line and p-value
votingLinearPredictor

Voting linear predictor
PWLists

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

Stem Cell-Related Genes with Corresponding Gene Markers
alignExpr

Align expression data with given vector