runBBKNN {singleCellTK} | R Documentation

## Apply BBKNN batch effect correction method to SingleCellExperiment object

### Description

BBKNN, an extremely fast graph-based data integration algorithm. It modifies the neighbourhood construction step to produce a graph that is balanced across all batches of the data.

### Usage

    runBBKNN(
      inSCE,
      useAssay = "logcounts",
      batch = "batch",
      reducedDimName = "BBKNN",
      nComponents = 50L
    )

### Arguments

`inSCE` | SingleCellExperiment inherited object. Required.
`useAssay` | A single character indicating the name of the assay requiring batch correction. Default `"logcounts"`.
`batch` | A single character indicating a field in `colData` that annotates the batches. Default `"batch"`.
`reducedDimName` | A single character. The name for the corrected low-dimensional representation. Will be saved to `reducedDim(inSCE)`. Default `"BBKNN"`.
`nComponents` | An integer. Number of principle components or the dimensionality, adopted in the pre-PCA-computation step, the BBKNN step (for how many PCs the algorithm takes into account), and the final UMAP combination step where the value represent the dimensionality of the updated reducedDim. Default `50L`.

### Value

The input SingleCellExperiment object with `reducedDim(inSCE, reducedDimName)` updated.

### References

Krzysztof Polanski et al., 2020

### Examples

    ## Not run:
    data('sceBatches', package = 'singleCellTK')
    logcounts(sceBatches) <- log(counts(sceBatches) + 1)
    sceBatches.small <- sample(sceBatches, 20)
    sceCorr <- runBBKNN(sceBatches.small, useAssay = "logcounts",
                        nComponents = 10)

    ## End(Not run)

[Package singleCellTK version 2.2.0 Index]