tsne: TSNE Plot Maker: Copied from M3C

tsneR Documentation

TSNE Plot Maker: Copied from M3C

Description

This is just a copy of the very nice tsne wrapper from the M3C package which uses the Rtsne This is a flexible t-SNE function that can be run on a standard data frame. It is a wrapper for Rtsne/ggplot2 code and can be customized with different colors and font sizes and more.

Usage

tsne(
  mydata,
  labels = FALSE,
  perplex = 15,
  printres = FALSE,
  seed = FALSE,
  axistextsize = 18,
  legendtextsize = 18,
  dotsize = 5,
  textlabelsize = 4,
  legendtitle = "Group",
  controlscale = FALSE,
  scale = 1,
  low = "grey",
  high = "red",
  colvec = c("skyblue", "gold", "violet", "darkorchid", "slateblue", "forestgreen",
    "violetred", "orange", "midnightblue", "grey31", "black"),
  printheight = 20,
  printwidth = 22,
  text = FALSE
)

Arguments

mydata

Data frame or matrix: if dataframe/matrix should have samples as columns and rows as features

labels

Character vector: if we want to just label by sex for example

perplex

Numerical value: perplexity value that Rtsne uses internally

printres

Logical flag: whether to print the t-SNE into current directory

seed

Numerical value: optionally set the seed

axistextsize

Numerical value: axis text size

legendtextsize

Numerical value: legend text size

dotsize

Numerical value: dot size

textlabelsize

Numerical value: text inside plot label size

legendtitle

Character vector: text legend title

controlscale

Logical flag: whether to control the colour scale

scale

Numerical value: 1=spectral palette, 2=manual low and high palette, 3=categorical labels

low

Character vector: continuous scale low color

high

Character vector: continuous scale high color

colvec

Character vector: a series of colors in vector for categorical labels, e.g. c("sky blue", "gold")

printheight

Numerical value: png height

printwidth

Numerical value: png width

text

Character vector: if we wanted to label the samples with text IDs to look for outliers


genejockey33000/typGumbo documentation built on July 20, 2023, 11:45 p.m.