PseudobulkSeurat: Pseudobulk Seurat

View source: R/PseudoBulk.R

PseudobulkSeuratR Documentation

Pseudobulk Seurat

Description

Aggregates raw counts in the seurat object, generating a new seurat object where each same has the sum of the counts, grouped by the desired variables

Usage

PseudobulkSeurat(
  seuratObj,
  groupFields,
  assayToAggregate = Seurat::DefaultAssay(seuratObj),
  additionalFieldsToAggregate = NULL,
  metaFieldCollapseCharacter = "|",
  nCountRnaStratification = F,
  stratificationGroupingFields = c("ClusterNames_0.2", "ClusterNames_0.4",
    "ClusterNames_0.6", "ClusterNames_0.8", "ClusterNames_1.2")
)

Arguments

seuratObj

The seurat object

groupFields

The set of fields on which to group

assayToAggregate

The assay to aggregate

additionalFieldsToAggregate

An option list of additional fields (which must be numeric). Per field, the mean per group will be computed and stored in the output object.

metaFieldCollapseCharacter

The character to use when concatenating metadata fields together to form the sample key field

nCountRnaStratification

A boolean determining whether or not automatic outlier detection of clusters with abnormal nCount_RNA should be detected.

stratificationGroupingFields

The metadata fields containing groupings of cells to be specified as having abnormal nCount_RNA distributions or not. The "leftmost"/first argument that detects an outlier will break the looping and sequester cells at that value. It is recommended that this vector is arranged by a "least to most" specific hierarchy/progression.

Value

An aggregated Seurat object.


bimberlabinternal/CellMembrane documentation built on Dec. 25, 2024, 8:10 a.m.