filterTrajFeaturesByCOV {CellTrails} | R Documentation

## Filter features by Coefficient of Variation (COV)

### Description

Filters trajectory features by their coefficient of variation.

### Usage

    filterTrajFeaturesByCOV(sce, threshold, design = NULL, show_plot = TRUE)

### Arguments

`sce` | An `SingleCellExperiment` object
`threshold` | Minimum coefficient of variation; numeric value between 0 and 1
`design` | A numeric matrix describing the factors that should be blocked
`show_plot` | Indicates if plot should be shown (default: TRUE)

### Details

For each trajectory feature x listed in the `SingleCellExperiment` object the coefficient of variation is computed by CoV(x) = sd(x) / mean(x). Features with a CoV(x) greater than `threshold` remain labeled as trajectory feature in the `SingleCellExperiment` object, otherwise they are not considered for dimensionality reduction, clustering and trajectory reconstruction. Please note that spike-in controls are ignored and are not listed as trajectory features.
To account for systematic bias in the expression data (e.g., cell cycle effects), a design matrix can be provided for the learning process. It should list the factors that should be blocked and their values per sample. It is suggested to construct a design matrix with `model.matrix`.

### Value

A `character` vector

### Author(s)

Daniel C. Ellwanger

### See Also

`trajFeatureNames` `model.matrix`

### Examples

    # Simulate example data
    set.seed(1101)
    dat <- simulate_exprs(n_features=15000, n_samples=100)

    # Create container
    alist <- list(logcounts=dat)
    sce <- SingleCellExperiment(assays=alist)

    # Filter incrementally
    trajFeatureNames(sce) <- filterTrajFeaturesByDL(sce, threshold=2)
    trajFeatureNames(sce) <- filterTrajFeaturesByCOV(sce, threshold=0.5)

    # Number of features
    length(trajFeatureNames(sce)) #filtered
    nrow(sce) #total

[Package CellTrails version 1.12.0 Index]