fateSelectionTest_multipleSamples: Differential fate selection Test with multiple samples

fateSelectionTest_multipleSamplesR Documentation

Differential fate selection Test with multiple samples

Description

Test whether or not the cell repartition between lineages is independent of the conditions, with samples not being confounded by conditions

Usage

fateSelectionTest_multipleSamples(cellWeights, ...)

## S4 method for signature 'matrix'
fateSelectionTest_multipleSamples(cellWeights, conditions, Samples, ...)

## S4 method for signature 'SlingshotDataSet'
fateSelectionTest_multipleSamples(cellWeights, conditions, Samples, ...)

## S4 method for signature 'SingleCellExperiment'
fateSelectionTest_multipleSamples(cellWeights, conditions, Samples, ...)

## S4 method for signature 'PseudotimeOrdering'
fateSelectionTest_multipleSamples(cellWeights, conditions, Samples, ...)

Arguments

cellWeights

Can be either a SlingshotDataSet, a SingleCellExperiment object or a matrix of cell weights defining the probability that a cell belongs to a particular lineage. Each row represents a cell and each column represents a lineage. If only a single lineage, provide a matrix with one column containing all values of 1.

...

Other arguments passed to fateSelectionTest.

conditions

Either the vector of conditions, or a character indicating which column of the metadata contains this vector.

Samples

A vector assigning each cell to a sample. Samples must be shared across all conditions.

Value

The same object has the fateSelectionTest with one more column per sample.

Examples

data('slingshotExample', package = "slingshot")
rd <- slingshotExample$rd
cl <- slingshotExample$cl
condition <- factor(rep(c('A','B'), length.out = nrow(rd)))
condition[110:139] <- 'A'
sds <- slingshot::slingshot(rd, cl)
samples <- sample(1:2, 140, replace = TRUE)
fateSelectionTest_multipleSamples(cellWeights = sds, conditions = condition, Samples = samples)

HectorRDB/condiments documentation built on Feb. 5, 2024, 10:24 p.m.