getTSNE {singleCellTK} | R Documentation

## Run t-SNE dimensionality reduction method on a SingleCellExperiment Object

### Description

Run t-SNE dimensionality reduction method on a SingleCellExperiment Object

### Usage

    getTSNE(
      inSCE,
      useAssay = "logcounts",
      useAltExp = NULL,
      reducedDimName = "TSNE",
      nIterations = 1000,
      perplexity = NULL,
      run_pca = TRUE,
      ntop = NULL
    )

### Arguments

`inSCE` | Input SingleCellExperiment object.
`useAssay` | Assay to use for tSNE computation. If `useAltExp` is specified, `useAssay` has to exist in `assays(altExp(inSCE, useAltExp))`. Default `"logcounts"`
`useAltExp` | The subset to use for tSNE computation, usually for the selected.variable features. Default `NULL`.
`reducedDimName` | a name to store the results of the dimension reductions. Default `"TSNE"`.
`nIterations` | maximum iterations. Default `1000`.
`perplexity` | perplexity parameter. Default `NULL`.
`run_pca` | run tSNE on PCA components? Default `TRUE`.
`ntop` | Number of top features to use as a further variable feature selection. Default `NULL`.

### Value

A SingleCellExperiment object with tSNE computation updated in `reducedDim(inSCE, reducedDimName)`.

### 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 2.2.0 Index]