R/visualization.R
VisualizeGeneTSNE.RdPlots a 2-D t-SNE of genes coloured by a discrete gene partition (modules) or a continuous numeric score. If no pre-computed embedding or partition is provided, they are computed internally.
VisualizeGeneTSNE(
dist = NULL,
gene_embedding = NULL,
gene_partition = NULL,
filtered = TRUE,
perplexity = 30,
text = TRUE,
module_color = NULL
)A dist object of pairwise gene distances. Required if
gene_embedding or gene_partition is NULL.
Data frame with columns tSNE_1 and tSNE_2 (output
of ObtainGeneTSNE()). If NULL the embedding is computed from dist.
Named factor or character/logical vector of gene module
assignments. If NULL, ClusterGenes() is called on dist.
Logical. Passed to ClusterGenes() when gene_partition is
NULL. Default TRUE.
Numeric. Passed to ObtainGeneTSNE() when
gene_embedding is NULL. Default 30.
Logical. If TRUE (default) and gene_partition is a factor,
module centroid labels are overlaid.
Named character vector mapping module levels to colours.
If NULL, colours are generated automatically from RColorBrewer::brewer.pal.
A ggplot2 object.
if (FALSE) {
p <- VisualizeGeneTSNE(dist = gene_dist, gene_partition = gene_partition)
print(p)
}