makeTSNE: Generate a tSNE Plot to visually evaluate the quality of...

Description Usage Arguments Value Examples

View source: R/makeTSNE.R

Description

Given a set of parameters, this function will simulate data and then output four tSNE plots: one corresponding to clustering after no batch correction, and another three, each corresponding to clustering after one of the three batch correction methods "limma," "combat," and "mnn."

Usage

1
2
3
makeTSNE(seed = 0, ncells = 1000, ngenes = 100, xmus = c(0, 5, 5),
  xsds = c(1, 0.1, 1), ymus = c(5, 5, 0), ysds = c(1, 0.1, 1),
  prop1 = c(0.3, 0.5, 0.2), prop2 = c(0.65, 0.3, 0.05))

Arguments

seed

seed for reproducibility

ncells

The number of cells in the sequencing experiment.

ngenes

The number of genes per cell.

xmus

A vector of three numbers, representing the x-coordinates of the three cell types in a two-dimensional space before projection to the space of all genes.

xsds

The standard deviations of x-coordinates of the three cell types in a two-dimensional space before projection to the space of all genes.

ymus

A vector of three numbers, representing the y-coordinates of the three cell types in a two-dimensional space before projection to the space of all genes.

ysds

The standard deviations of y-coordinates of the three cell types in a two-dimensional space before projection to the space of all genes.

prop1

A vector of three numbers, representing the proportions of the three cell types in the first batch. The elements of the vector must sum to 1.

prop2

A vector of three numbers, representing the proportions of the three cell types in the second batch. The elements of the vector must sum to 1.

Value

Returns four tSNE plots (on the same figure).

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
makeTSNE(
seed=0,ncells=1000,ngenes=100,
xmus=c(0,5,5),xsds=c(1,0.1,1),
ymus=c(5,5,0),ysds=c(1,0.1,1),
prop1=c(0.3,0.5,0.2),prop2=c(0.65,0.3,0.05)
)

## End(Not run)

jlakkis/mnnsim documentation built on Jan. 21, 2020, 1:21 a.m.