imbalance_score: Imbalance score.

Description Usage Arguments Details Value

View source: R/imbalance_score.R

Description

Compute an imbalance score to show whether nearby cells have the same condition of not

Usage

1
imbalance_score(rd, cl, k = 10, smooth = k)

Arguments

rd

The reduced dimension matrix of the cells

cl

the vector of conditions

k

The number of neighbours to consider when computing the score. Default to 10.

smooth

The smoothing parameter. Default to k. Lower values mean that we smooth more.

Details

The score is computed in two steps. First, a score is computed for each cell. The distribution of labels among the k-nearest- neighbours is computed to the overall distribution for all cells. This yields a p-value based on the multinomial distribution, which is squared to return the scores.

Then, splines are used to smooth the scores along the reduced dimension space, with smooth nodes. This yields the scaled_scores.

Value

A list with two components:


kstreet13/bioc2020trajectories documentation built on April 22, 2021, 11:41 a.m.