topologyTest_multipleSamples: Differential Topology Test with multiple samples

topologyTest_multipleSamplesR Documentation

Differential Topology Test with multiple samples

Description

Test whether or not slingshot should be fitted independently for different conditions or not, per sample, with samples not being confounded by conditions.

Usage

topologyTest_multipleSamples(sds, ...)

## S4 method for signature 'SlingshotDataSet'
topologyTest_multipleSamples(sds, conditions, Samples, ...)

## S4 method for signature 'SingleCellExperiment'
topologyTest_multipleSamples(sds, conditions, Samples, ...)

## S4 method for signature 'PseudotimeOrdering'
topologyTest_multipleSamples(sds, conditions, Samples, ...)

Arguments

sds

A slingshot object already run on the full dataset. Can be either a SlingshotDataSet or a SingleCellExperiment object.

...

Other arguments passed to topologyTest.

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 topologyTest 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)
topologyTest_multipleSamples(sds = sds, conditions = condition,
                             Samples = samples, rep = 10)

HectorRDB/condiments documentation built on Oct. 18, 2024, 10:13 p.m.