generateTSNECoordinates,scRNAseq-method {conclus} | R Documentation

## generateTSNECoordinates

### Description

The function generates several t-SNE coordinates based on given perplexity and ranges of PCs. The final number of t-SNE plots is length(PCs)*length(perplexities).

### Usage

    generateTSNECoordinates(theObject, randomSeed=42, cores=2,
                    PCs=c(4, 6, 8, 10, 20, 40, 50), perplexities=c(30,40),
                    writeOutput = FALSE)

### Arguments

`theObject` | An Object of class scRNASeq for which the count matrix was normalized. See ?normaliseCountMatrix.
`randomSeed` | Default is 42. Seeds used to generate the tSNE.
`cores` | Maximum number of jobs that CONCLUS can run in parallel. Default is 1.
`PCs` | Vector of first principal components. For example, to take ranges 1:5 and 1:10 write c(5, 10). Default = c(4, 6, 8, 10, 20, 40, 50)
`perplexities` | A vector of perplexity (t-SNE parameter). See details. Default = c(30, 40)
`writeOutput` | If TRUE, write the tsne parameters to the output directory defined in theObject. Default = FALSE.

### Details

Generates an object of fourteen (by default) tables with tSNE coordinates. Fourteen because it will vary seven values of principal components PCs=c(4, 6, 8, 10, 20, 40, 50) and two values of perplexity perplexities=c(30, 40) in all possible combinations. The chosen values of PCs and perplexities can be changed if necessary. We found that this combination works well for sc-RNA-seq datasets with 400-2000 cells. If you have 4000-9000 cells and expect more than 15 clusters, we recommend to take more first PCs and higher perplexity, for example, PCs=c(8, 10, 20, 40, 50, 80, 100) and perplexities=c(200, 240). For details about perplexities parameter see ‘?Rtsne’.

### Value

An object of class scRNASeq with its tSNEList slot updated. Also writes coordinates in "dataDirectory/tsnes" subfolder if the parameter writeOutput is TRUE.

### Author(s)

Ilyess RACHEDI, based on code by Polina PAVLOVICH and Nicolas DESCOSTES.

### See Also

normaliseCountMatrix

### Examples

    ## Object scr containing the results of previous steps
    load(system.file("extdata/scrFull.Rdat", package="conclus"))

    ## Compute the tSNE coordinates
    ## These parameters are tweaked to fit our example data and reduce
    ## computing time, please consider using the default parameters or
    ## adjusted to your dataset.
    scr <- generateTSNECoordinates(scr, perplexities=c(2,3),
                                    PCs =c(4,5,6,7,8,9,10), cores=2)

[Package conclus version 1.2.4 Index]