Skip to contents

This function takes a cell data set object and a cell metadata variable as input. The latter is specified as a named list. The name is the cell metadata variable name and each element must be a character vector of length 2 specifying the levels of that variable to compare. For example, for a column named "genotype" with levels "WT", "heterozygote", and "homozygote", you would compare differential abundance between WT and homozygote like this: list(genotype = c("WT", "homozygote")). Cells with these classifications will get a differential abundance score. Negative values will be assigned to the first element (WT in this example) and positive values to the second element (homozygote in this example). Cells with other values for this variable ("heterozygote" in this example) will get an NA. Multiple comparisons can be performed for different levels within the same variable or for different variables altogether by providing additional elements to the list. E.g. list(genotype = c("WT", "heterozygote), genotype = c("WT", "homozygote")). For each comparison, a new cell metadata column will be added in the form of da_score_name_level1_level2. E.g. da_score_genotype_WT_homozygote.

Usage

bb_daseq(obj, comparison_list, sample_var = "sample")

Arguments

obj

a cell data set object

comparison_list

a named list as specified in description

sample_var

the cell metadata variable holding biological sample information, Default: 'sample'

Value

a cell data set