getTSNE {singleCellTK} | R Documentation

## Run t-SNE dimensionality reduction method on the assay data.

### Description

Run t-SNE dimensionality reduction method on the assay data.

### Usage

    getTSNE(inSCE, useAssay = "logcounts", reducedDimName = "TSNE",
      n_iterations = 1000, perplexity = NULL)

### Arguments

`inSCE` | Input SCtkExperiment object. Required
`useAssay` | Indicate which assay to use. The default is "logcounts".
`reducedDimName` | a name to store the results of the dimension reductions
`n_iterations` | maximum iterations. Default is 1000
`perplexity` | perplexity parameter. Default is 5

### Value

A SCtkE object with the specified reducedDim and pcaVariances updated

### Examples

    data("mouseBrainSubsetSCE")
    #add a CPM assay
    assay(mouseBrainSubsetSCE, "cpm") <- apply(
      assay(mouseBrainSubsetSCE, "counts"), 2, function(x) {
        x / (sum(x) / 1000000)
      })
    mouseBrainSubsetSCE <- getTSNE(mouseBrainSubsetSCE, useAssay = "cpm",
                                   reducedDimName = "TSNE_cpm")
    reducedDims(mouseBrainSubsetSCE)

[Package singleCellTK version 1.7.0 Index]