PseudoBulkGenotypes: Aggregate pseudo-bulk genotypes

View source: R/PseudoBulkGenotypes.R

PseudoBulkGenotypesR Documentation

Aggregate pseudo-bulk genotypes

Description

Starting from a Seurat object, for each of the identities given as the ident argument, compute a pseudo-bulk aggregated genotype. Store the results in a genotype object. If the ident is a list of cells, compute only one aggregated genotype for the cells listed. If it is the name of a metadata column, or a vector listing the identity of each individual cells, use the levels of this vector/column to define the groups of cells aggregated into individual pseudo-bulk genotypes.

Usage

PseudoBulkGenotypes(
  object,
  ident = Idents(object),
  tolerance.pct = 5,
  assays = c("VAR", "REF", "ALT"),
  layer = "data"
)

Arguments

object

Seurat object.

ident

character(n). The name of a metadata column, or a vector listing the individual identities of cells, or a list of cells. Defines the groups of cells that are aggregated in pseudo-bulk genotypes. Default: Idents(object).

tolerance.pct

numeric(1). The percentage of counts not matching the rest tolerated to keep a homozygous call.

assays

character(3). The name of the assays in which the consensus matrix (expected to also contain variant metadata), reference allele count and alt allele count are stored in the seurat object. Default: c("VAR","REF","ALT").

layer

character(1). The assay layer that should be used in the Seurat object. Default: "data".

Value

Returns a genotype object with the aggregated pseudo-bulk genotypes and their metadata.

Examples

GenotypeObject <- PseudoBulkGenotypes(MySeuratObject)

nbroguiere/burgertools documentation built on Jan. 30, 2024, 3:48 a.m.