runTSNE: Run tSNE from (R pkg 'Rtsne') on a GatingSet

Description Usage Arguments Details Value

Description

- If groupBy is empty, no sampling is done. If length is 1, equal number of cells are sampled from each category in the column. If length is 2, equal number of cells are sampled from each category in the first column. Additionally, within each category, equal numbers of cells are sampled from the second column (usually the Sample names column).

Usage

1
2
3
4
runTSNE(gs = NULL, parentGate = NULL, degreeFilterGates = c(),
  otherGates = c(), tsneMarkers = c(), groupBy = c(),
  degreeFilter = 0, seed = 999, theta = 0.9, numThreads = 1,
  cloneGs = TRUE, n = NULL, ...)

Arguments

gs

a GatingSet object or path to a GatingSet directory, properly gated data with annotation in its pData

parentGate

a string describing the gate upstream of the cytokine gates (eg. "CD4", "cd8+", etc...)

degreeFilterGates

a vector of strings describing the marker gates immediately downstream of parentGate, eg: "CD4/IL2", "CD4/IFNg". Events are assigned degrees based on how many degreeFilterGates they belong to

otherGates

a vector of strings describing additional gates to obtain boolean data for (gate membership is assigned to each cell)

tsneMarkers

the markers on which to run tSNE. Although data from all markers will be returned, tSNE is only run on the markers specified in tsneMarkers

groupBy

a vector of strings describing columns of the gatingSet's phenoData. Affects sampling (see function description).

degreeFilter

keep cells of this degree and higher

seed

since tSNE is random, need a random seed so we can reproduce results

theta

parameter to be passed to the Rtsne function

numThreads

if > 1, uses multicore t-SNE instead of regular t-SNE

cloneGs

boolean for whether to to clone the GatingSet. Cloning is safer when gs is a GatingSet object because the GatingSet may get modified in this function. Cloning takes up time and memory, however, so if you are not using the in-memory-GatingSet again you can choose FALSE.

...

other parameters to be passed to the Rtsne function

Details

- All channels must have non-NA marker names and be unique.

- Requires a valid GatingSet with cytokine gates downstream of a parent gate - Also expects that pData(gs) contains at least columns: 'name', 'ptid' so we can identify cells later

TODO: allow option to use pre-sampled GatingSet (to save time) and/or save sampled GatingSet to disk...

Value

a matrix of X and Y coordinates


seshadrilab/flowHelpers documentation built on May 23, 2019, 4:05 a.m.