.defineSubspace {CellMixS} | R Documentation

## .defineSubspace

### Description

Helper function for ldfSce and cms to define or recalculate the subspace for analysis.

### Usage

    .defineSubspace(sce, assay_name, dim_red, n_dim)

### Arguments

`sce` | A `SingleCellExperiment` object with the data to define the subspace.
`assay_name` | Character. Name of the assay to use for PCA. Only relevant if no existing 'dim_red' is provided. Must be one of `names(assays(sce))`.
`dim_red` | Character. Name of embeddings to use as subspace.
`n_dim` | Numeric. Number of subspace elements to include to define subspace.

### Details

Function to determine the subspace for `ldfDiff` and `cms`. Checks whether the defined 'dim_red' is present. Only if no subspace is defined or present it will perform a PCA using `runPCA`. To calculate PCA counts defined in 'assay_name' are used.

### Value

A matrix of cell embeddings with reduced dimensions as columns.

### See Also

`ldfSce`, `cms`.

Other helper functions: `.cmsCell()`, `.filterKnn()`, `.filterLocMin()`, `.ldfKnn()`, `.smoothCms()`

[Package CellMixS version 1.10.0 Index]