filterTrajFeaturesByDL {CellTrails} | R Documentation

## Filter trajectory features by Detection Level (DL)

### Description

Filters trajectory features that are detected in a minimum number of samples.

### Usage

    filterTrajFeaturesByDL(sce, threshold, show_plot = TRUE)

### Arguments

`sce` | An `SingleCellExperiment` object
`threshold` | Minimum number of samples; if value < 1 it is interpreted as fraction, otherwise as absolute sample count
`show_plot` | Indicates if plot should be shown (default: TRUE)

### Details

The detection level denotes the fraction of samples in which a feature was detected. For each trajectory feature listed in the CellTrailsSet object the relative number of samples having a feature expression value greater than 0 is counted. Features that are expressed in a fraction of all samples greater than `threshold` remain labeled as trajectory feature as listed in the `SingleCellExperiment` object, otherwise they may be not considered for dimensionality reduction, clustering, and trajectory reconstruction. If the parameter `threshold` fullfills `threshold` >= 1 it becomes converted to a relative fraction of the total sample count. Please note that spike-in controls are ignored and are not listed as trajectory features.

### Value

A `character` vector

### Author(s)

Daniel C. Ellwanger

### See Also

`trajFeatureNames`

### Examples

    # 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 features
    tfeat <- filterTrajFeaturesByDL(sce, threshold=2)
    head(tfeat)

    # Set trajectory features to object
    trajFeatureNames(sce) <- tfeat

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

[Package CellTrails version 1.10.0 Index]