R/plottingFunctions.R
plotMsigWordcloud.Rd
Given a gene set collection, this function computes the word frequency of gene set names from the Molecular Signatures Database (MSigDB) collection (split by _). Word frequencies are also computed using short descriptions attached with each gene set object.
plotMsigWordcloud(
msigGsc,
groups,
weight = NULL,
measure = c("tfidf", "tf"),
version = msigdb::getMsigdbVersions(),
org = c("auto", "hs", "mm"),
rmwords = getMsigBlacklist(),
type = c("Name", "Short")
)
a GeneSetCollection object, containing gene sets from the
MSigDB. The GSEABase::getBroadSets()
function can be used to parse XML
files downloaded from MSigDB.
a named list, of character vectors or numeric indices specifying node groupings. Each element of the list represent a group and contains a character vector with node names.
a named numeric vector, containing weights to apply to each gene-set. This can be -log10(FDR), -log10(p-value) or an enrichment score (ideally unsigned).
a character, specifying how frequencies should be computed. "tf" uses term frequencies and "tfidf" (default) applies inverse document frequency weights to term frequencies.
a character, specifying the version of msigdb to use (see
msigdb::getMsigdbVersions()
).
a character, specifying the organism to use. This can either be "auto" (default), "hs" or "mm".
a character vector, containing a blacklist of words to discard from the analysis.
a character, specifying the source of text mining. Either gene
set names (Name
) or descriptions (Short
) can be used.
a ggplot object.
data("hgsc")
groups <- list('g1' = names(hgsc)[1:25], 'g2' = names(hgsc)[26:50])
plotMsigWordcloud(hgsc, groups, rmwords = getMsigBlacklist())
#> Warning: Assuming the organism to be human.
#> Warning: Assuming the organism to be human.
#> Some words could not fit on page. They have been removed.
#> Some words could not fit on page. They have been removed.