- Home
- CRAN
**WGCNA**: Weighted Correlation Network Analysis**greenWhiteRed**: Green-white-red color sequence

# Green-white-red color sequence

### Description

Generate a green-white-red color sequence of a given length.

### Usage

1 | ```
greenWhiteRed(n, gamma = 1, warn = TRUE)
``` |

### Arguments

`n` |
number of colors to be returned |

`gamma` |
color change power |

`warn` |
logical: should the user be warned that this function produces a palette unsuitable for people with most common color blindness? |

### Details

The function returns a color vector that starts with green, gradually turns into white and then to
red. The power `gamma`

can be used to control the behaviour of the quarter- and three quarter-values
(between green and white, and white and red, respectively). Higher powers will make the mid-colors more
white, while lower powers will make the colors more saturated, respectively.

Typical use of this function is to produce (via function `numbers2colors`

)
a color representation of numbers within a symmetric interval
around 0, for example, the interval [-1, 1]. Note though that since green and red are not distinguishable by
people with the most common type of color blindness, we recommend using the analogous palette returned by
the function `blueWhiteRed`

.

### Value

A vector of colors of length `n`

.

### Author(s)

Peter Langfelder

### See Also

`blueWhiteRed`

for a color sequence more friendly to people with the most common type of color
blindness;

`numbers2colors`

for a function that produces a color representation for continuous numbers.

### Examples

1 2 3 4 5 6 7 | ```
par(mfrow = c(3, 1))
displayColors(greenWhiteRed(50));
title("gamma = 1")
displayColors(greenWhiteRed(50, 3));
title("gamma = 3")
displayColors(greenWhiteRed(50, 0.5));
title("gamma = 0.5")
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.

- accuracyMeasures: Accuracy measures for a 2x2 confusion matrix or for vectors...
- addErrorBars: Add error bars to a barplot.
- addGrid: Add grid lines to an existing plot.
- addGuideLines: Add vertical "guide lines" to a dendrogram plot
- addTraitToMEs: Add trait information to multi-set module eigengene structure
- adjacency: Calculate network adjacency
- adjacency.polyReg: Adjacency matrix based on polynomial regression
- adjacency.splineReg: Calculate network adjacency based on natural cubic spline...
- AFcorMI: Prediction of Weighted Mutual Information Adjacency Matrix by...
- alignExpr: Align expression data with given vector
- allocateJobs: Divide tasks among workers
- allowWGCNAThreads: Allow and disable multi-threading for certain WGCNA...
- automaticNetworkScreening: One-step automatic network gene screening
- automaticNetworkScreeningGS: One-step automatic network gene screening with external gene...
- bicor: Biweight Midcorrelation
- bicorAndPvalue: Calculation of biweight midcorrelations and associated...
- bicovWeights: Weights used in biweight midcovariance
- blockSize: Attempt to calculate an appropriate block size to maximize...
- blockwiseConsensusModules: Find consensus modules across several datasets.
- blockwiseIndividualTOMs: Calculation of block-wise topological overlaps
- blockwiseModules: Automatic network construction and module detection
- BloodLists: Blood Cell Types with Corresponding Gene Markers
- blueWhiteRed: Blue-white-red color sequence
- BrainLists: Brain-Related Categories with Corresponding Gene Markers
- BrainRegionMarkers: Gene Markers for Regions of the Human Brain
- branchEigengeneDissim: Branch dissimilarity based on eigennodes (eigengenes).
- branchSplit: Branch split.
- branchSplit.dissim: Branch split based on dissimilarity.
- branchSplitFromStabilityLabels: Branch split (dissimilarity) statistic derived from labels...
- checkAdjMat: Check adjacency matrix
- checkSets: Check structure and retrieve sizes of a group of datasets.
- chooseOneHubInEachModule: Chooses a single hub gene in each module
- chooseTopHubInEachModule: Chooses the top hub gene in each module
- clusterCoef: Clustering coefficient calculation
- coClustering: Co-clustering measure of cluster preservation between two...
- coClustering.permutationTest: Permutation test for co-clustering
- collapseRows: Select one representative row per group
- collapseRowsUsingKME: Selects one representative row per group based on kME
- collectGarbage: Iterative garbage collection.
- colQuantileC: Fast colunm- and row-wise quantile of a matrix.
- conformityBasedNetworkConcepts: Calculation of conformity-based network concepts.
- conformityDecomposition: Conformity and module based decomposition of a network...
- consensusDissTOMandTree: Consensus clustering based on topological overlap and...
- consensusKME: Calculate consensus kME (eigengene-based connectivities)...
- consensusMEDissimilarity: Consensus dissimilarity of module eigengenes.
- consensusOrderMEs: Put close eigenvectors next to each other in several sets.
- consensusProjectiveKMeans: Consensus projective K-means (pre-)clustering of expression...
- consensusRepresentatives: Consensus selection of group representatives
- consensusTOM: Consensus network (topological overlap).
- cor: Fast calculations of Pearson correlation.
- corAndPvalue: Calculation of correlations and associated p-values
- corPredictionSuccess: Qunatification of success of gene screening
- corPvalueFisher: Fisher's asymptotic p-value for correlation
- corPvalueStudent: Student asymptotic p-value for correlation
- correlationPreservation: Preservation of eigengene correlations
- coxRegressionResiduals: Deviance- and martingale residuals from a Cox regression...
- cutreeStatic: Constant-height tree cut
- cutreeStaticColor: Constant height tree cut using color labels
- displayColors: Show colors used to label modules
- dynamicMergeCut: Threshold for module merging
- empiricalBayesLM: Empirical Bayes-moderated adjustment for unwanted covariates
- exportNetworkToCytoscape: Export network to Cytoscape
- exportNetworkToVisANT: Export network data in format readable by VisANT
- fixDataStructure: Put single-set data into a form useful for multiset...
- formatLabels: Break long character strings into multiple lines
- fundamentalNetworkConcepts: Calculation of fundamental network concepts from an adjacency...
- GOenrichmentAnalysis: Calculation of GO enrichment (experimental)
- goodGenes: Filter genes with too many missing entries
- goodGenesMS: Filter genes with too many missing entries across multiple...
- goodSamples: Filter samples with too many missing entries
- goodSamplesGenes: Iterative filtering of samples and genes with too many...
- goodSamplesGenesMS: Iterative filtering of samples and genes with too many...
- goodSamplesMS: Filter samples with too many missing entries across multiple...
- greenBlackRed: Green-black-red color sequence
- greenWhiteRed: Green-white-red color sequence
- GTOMdist: Generalized Topological Overlap Measure
- hubGeneSignificance: Hubgene significance
- ImmunePathwayLists: Immune Pathways with Corresponding Gene Markers
- initProgInd: Inline display of progress
- intramodularConnectivity: Calculation of intramodular connectivity
- isMultiData: Determine whether the supplied object is a valid multiData...
- keepCommonProbes: Keep probes that are shared among given data sets
- kMEcomparisonScatterplot: Function to plot kME values between two comparable data sets.
- labeledBarplot: Barplot with text or color labels.
- labeledHeatmap: Produce a labeled heatmap plot
- labeledHeatmap.multiPage: Labeled heatmap divided into several separate plots.
- labelPoints: Label scatterplot points
- labels2colors: Convert numerical labels to colors.
- list2multiData: Convert a list to a multiData structure and vice-versa.
- lowerTri2matrix: Reconstruct a symmetric matrix from a distance...
- matchLabels: Relabel module labels to best match the given reference...
- matrixToNetwork: Construct a network from a matrix
- mergeCloseModules: Merge close modules in gene expression data
- metaAnalysis: Meta-analysis of binary and continuous variables
- metaZfunction: Meta-analysis Z statistic
- moduleColor.getMEprefix: Get the prefix used to label module eigengenes.
- moduleEigengenes: Calculate module eigengenes.
- moduleMergeUsingKME: Merge modules and reassign genes using kME.
- moduleNumber: Fixed-height cut of a dendrogram.
- modulePreservation: Calculation of module preservation statistics
- mtd.apply: Apply a function to each set in a multiData structure.
- mtd.mapply: Apply a function to elements of given multiData structures.
- mtd.rbindSelf: Turn a multiData structure into a single matrix or data...
- mtd.setAttr: Set attributes on each component of a multiData structure
- mtd.setColnames: Get and set column names in a multiData structure.
- mtd.simplify: If possible, simplify a multiData structure to a...
- mtd.subset: Subset rows and columns in a multiData structure
- multiData: Create a multiData structure.
- multiData.eigengeneSignificance: Eigengene significance across multiple sets
- multiSetMEs: Calculate module eigengenes.
- multiUnion: Union and intersection of multiple sets
- mutualInfoAdjacency: Calculate weighted adjacency matrices based on mutual...
- nearestCentroidPredictor: Nearest centroid predictor
- nearestNeighborConnectivity: Connectivity to a constant number of nearest neighbors
- nearestNeighborConnectivityMS: Connectivity to a constant number of nearest neighbors across...
- networkConcepts: Calculations of network concepts
- networkScreening: Identification of genes related to a trait
- networkScreeningGS: Network gene screening with an external gene significance...
- normalizeLabels: Transform numerical labels into normal order.
- nPresent: Number of present data entries.
- nSets: Number of sets in a multi-set variable
- numbers2colors: Color representation for a numeric variable
- orderBranchesUsingHubGenes: Optimize dendrogram using branch swaps and reflections.
- orderMEs: Put close eigenvectors next to each other
- overlapTable: Calculate overlap of modules
- overlapTableUsingKME: Determines significant overlap between modules in two...
- pickHardThreshold: Analysis of scale free topology for hard-thresholding.
- pickSoftThreshold: Analysis of scale free topology for soft-thresholding
- plotClusterTreeSamples: Annotated clustering dendrogram of microarray samples
- plotColorUnderTree: Plot color rows in a given order, for example under a...
- plotCor: Red and Green Color Image of Correlation Matrix
- plotDendroAndColors: Dendrogram plot with color annotation of objects
- plotEigengeneNetworks: Eigengene network plot
- plotMat: Red and Green Color Image of Data Matrix
- plotMEpairs: Pairwise scatterplots of eigengenes
- plotModuleSignificance: Barplot of module significance
- plotNetworkHeatmap: Network heatmap plot
- populationMeansInAdmixture: Estimate the population-specific mean values in an admixed...
- pquantile: Parallel quantile, median, mean
- prepComma: Prepend a comma to a non-empty string
- prependZeros: Pad numbers with leading zeros to specified total width
- preservationNetworkConnectivity: Network preservation calculations
- projectiveKMeans: Projective K-means (pre-)clustering of expression data
- proportionsInAdmixture: Estimate the proportion of pure populations in an admixed...
- propVarExplained: Proportion of variance explained by eigengenes.
- PWLists: Pathways with Corresponding Gene Markers - Compiled by Mike...
- qvalue: Estimate the q-values for a given set of p-values
- qvalue.restricted: qvalue convenience wrapper
- randIndex: Rand index of two partitions
- rankPvalue: Estimate the p-value for ranking consistently high (or low)...
- recutBlockwiseTrees: Repeat blockwise module detection from pre-calculated data
- recutConsensusTrees: Repeat blockwise consensus module detection from...
- redWhiteGreen: Red-white-green color sequence
- relativeCorPredictionSuccess: Compare prediction success
- removeGreyME: Removes the grey eigengene from a given collection of...
- removePrincipalComponents: Remove leading principal components from data
- returnGeneSetsAsList: Return pre-defined gene lists in several biomedical...
- rgcolors.func: Red and Green Color Specification
- scaleFreeFitIndex: Calculation of fitting statistics for evaluating scale free...
- scaleFreePlot: Visual check of scale-free topology
- SCsLists: Stem Cell-Related Genes with Corresponding Gene Markers
- selectFewestConsensusMissing: Select columns with the lowest consensus number of missing...
- setCorrelationPreservation: Summary correlation preservation measure
- shortenStrings: Shorten given character strings by truncating at a suitable...
- sigmoidAdjacencyFunction: Sigmoid-type adacency function.
- signedKME: Signed eigengene-based connectivity
- signumAdjacencyFunction: Hard-thresholding adjacency function
- simulateDatExpr: Simulation of expression data
- simulateDatExpr5Modules: Simplified simulation of expression data
- simulateEigengeneNetwork: Simulate eigengene network from a causal model
- simulateModule: Simulate a gene co-expression module
- simulateMultiExpr: Simulate multi-set expression data
- simulateSmallLayer: Simulate small modules
- sizeGrWindow: Opens a graphics window with specified dimensions
- softConnectivity: Calculates connectivity of a weighted network.
- spaste: Space-less paste
- standardColors: Colors this library uses for labeling modules.
- standardScreeningBinaryTrait: Standard screening for binatry traits
- standardScreeningCensoredTime: Standard Screening with regard to a Censored Time Variable
- standardScreeningNumericTrait: Standard screening for numeric traits
- stdErr: Standard error of the mean of a given vector.
- stratifiedBarplot: Bar plots of data across two splitting parameters
- subsetTOM: Topological overlap for a subset of a whole set of genes
- swapTwoBranches: Select, swap, or reflect branches in a dendrogram.
- TOMplot: Graphical representation of the Topological Overlap Matrix
- TOMsimilarity: Topological overlap matrix similarity and dissimilarity
- TOMsimilarityFromExpr: Topological overlap matrix
- transposeBigData: Transpose a big matrix or data frame
- TrueTrait: Estimate the true trait underlying a list of surrogate...
- unsignedAdjacency: Calculation of unsigned adjacency
- userListEnrichment: Measure enrichment between inputted and user-defined lists
- vectorizeMatrix: Turn a matrix into a vector of non-redundant components
- vectorTOM: Topological overlap for a subset of the whole set of genes
- verboseBarplot: Barplot with error bars, annotated by Kruskal-Wallis or ANOVA...
- verboseBoxplot: Boxplot annotated by a Kruskal-Wallis p-value
- verboseIplot: Scatterplot with density
- verboseScatterplot: Scatterplot annotated by regression line and p-value
- votingLinearPredictor: Voting linear predictor
- WGCNA-package: Weighted Gene Co-Expression Network Analysis