Skip to contents

PseudobulkList - make a pseudobuk summed or average dataset for each samplexcelltype

Usage

PseudobulkList(
  rawcounts,
  metadata,
  sample_col,
  celltype_col,
  avg_or_sum = "sum"
)

Arguments

rawcounts

the raw count UMI data for assay to sum or average for each celtype and sample.

metadata

dataframe of meta data for cells-rows variables-columns i.e. ColData or seuratmeta.data

sample_col

quoted character e.g. "sample" the subject level sample variable - if multiple timepoints helps to code as subjectID_timepoint i.e. s1_0, s1_1

celltype_col

quoted character e.g. "celltype" - the celltypes / clusters for which to create bulk libraries

avg_or_sum

whether to compute default 'sum' or 'average' library for each sample within each celltype (recommend sum)

Value

a R list of standard R matrices indexed by celltype

Examples

if (FALSE) {
pb = scglmmr::PseudobulkList(rawcounts = umi, metadata = meta, sample_col = "sample",
        celltype_col = "lineage", avg_or_sum = "sum")
}