plot_tsne: plot_tsne

View source: R/plot_tsne.R

plot_tsneR Documentation

plot_tsne

Description

Generates a tSNE plot from a gene presence/absence matrix

Usage

plot_tsne(pa, category = NULL, plot = TRUE, perplexity = 20, pcadims = 50)

Arguments

pa

binary presence/absence matrix

category

a factor vector which can be used to colour the points

plot

whether to return the plot or just the data.frame used for plotting (default=TRUE)

perplexity

the 'perplexity' argument passed to tSNE

pcadims

the number of principle components passed from the inital stage used in the main tSNE algorithm

Value

either a ggplot2 object or a 'data.frame' with the data needed to recreate the plot

Examples


sim <- simulate_pan(rate=1e-3)
plot_tsne(sim$pa)


gtonkinhill/panstripe documentation built on Feb. 27, 2025, 9:01 p.m.