View source: R/getWordsOnDendro.R
getWordsOnDendro | R Documentation |
Get grobs to plot on the dendrogram with the position information
getWordsOnDendro(
dhc,
geneVec,
geneNumLimit = 1000,
geneVecType = "ENSEMBL",
useWC = FALSE,
useRandomColor = FALSE,
numberOfWords = 25,
showType = "ID",
wcArgs = list(),
highlight = NULL,
textSize = 3.5,
wcScale = 3,
wrap = NULL,
candidateNodes = NULL,
takeIntersect = TRUE,
useDf = NULL,
bg.colour = NULL,
type = "words",
argList = list(),
useFunc = NULL,
useggfx = NULL,
normalizeByClusterNum = TRUE,
autoSize = TRUE
)
dhc |
dendrogram |
geneVec |
gene-named vector of node names in dendrogram |
geneNumLimit |
when the gene number is above this threshold, pyramid plots are not produced |
geneVecType |
type of the name of geneVec (default: ENSEMBL) |
useWC |
use wordcloud |
useRandomColor |
use random colors on wordclouds |
numberOfWords |
the number of words to plot (default: 25) |
showType |
when "enrich", which labels to show |
wcArgs |
argument list for ggwordcloud |
highlight |
words to highlight |
textSize |
text size in pyramid plots |
wcScale |
max_size of wordcloud |
wrap |
wrap the strings |
candidateNodes |
if NULL, all nodes are investigated |
takeIntersect |
take intersection or frequent words |
useDf |
data.frame to subset when manual function is specified |
bg.colour |
background color for wordcloud |
type |
"words" or "enrich" |
argList |
passed to refseq |
useFunc |
function to summarize text |
useggfx |
use ggfx on resulting plot |
normalizeByClusterNum |
normalize frequency by ID numbers or not |
autoSize |
size the text based on grob width |
The function accepts the dendrogram and named vector of genes with associated clusters and returns the list of plots with the positional information. Used internally in 'plotEigengeneNetworksWithWords'.
list of pyramid plot grobs and its positions
mod <- returnExample()
result <- hclust(dist(t(mod$MEs)))
dhc <- result |>
as.dendrogram() |>
dendextend::hang.dendrogram()
geneVec <- paste0("ME", mod$colors)
names(geneVec) <- names(mod$colors)
getWordsOnDendro(dhc, geneVec, numberOfWords = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.