create.pseudobulk: Reformat count matrix to 3D pseudocount matrix

View source: R/expression_fit.R

create.pseudobulkR Documentation

Reformat count matrix to 3D pseudocount matrix

Description

Sum up the counts per cell type and individual for each gene and create a 3 dimensional matrix of genes x individuals x cell types

Usage

create.pseudobulk(expr.singlets, annotation, colName = "cell.type")

Arguments

expr.singlets

gene count matrix (already filtered for multiplets etc.)

annotation

Data frame with annotation of each cell to a cell type and donor, the data frame must be sorted in the same way as the expression matrix (required columns: individual)

colName

Column name of the cell type annotation in the annotation data frame

Value

3d matrix of genes x individuals x cell type


heiniglab/scPower documentation built on Jan. 9, 2025, 12:13 p.m.