Learn R Programming

SeuratObject (version 5.0.2)

.CreateStdAssay: Generic Assay Creation

Description

Create an assay object; runs a standardized filtering scheme that works regardless of the direction of the data (eg. cells as columns and features as rows or vice versa) and creates an assay object based on the initialization scheme defined for StdAssay-derived class type

Usage

.CreateStdAssay(
  counts,
  min.cells = 0,
  min.features = 0,
  cells = NULL,
  features = NULL,
  transpose = FALSE,
  type = "Assay5",
  ...
)

# S3 method for default .CreateStdAssay( counts, min.cells = 0, min.features = 0, cells = NULL, features = NULL, transpose = FALSE, type = "Assay5", layer = "counts", ... )

# S3 method for list .CreateStdAssay( counts, min.cells = 0, min.features = 0, cells = NULL, features = NULL, transpose = FALSE, type = "Assay5", csum = Matrix::colSums, fsum = Matrix::rowSums, ... )

# S3 method for Matrix .CreateStdAssay( counts, min.cells = 0, min.features = 0, cells = NULL, features = NULL, transpose = FALSE, type = "Assay5", layer = "counts", ... )

# S3 method for matrix .CreateStdAssay( counts, min.cells = 0, min.features = 0, cells = NULL, features = NULL, transpose = FALSE, type = "Assay5", layer = "counts", ... )

Value

An object of class type with a layer named layer

containing the data found in counts

Arguments

counts

A two-dimensional expression matrix

min.cells

Include features detected in at least this many cells; will subset the counts matrix as well. To reintroduce excluded features, create a new object with a lower cutoff

min.features

Include cells where at least this many features are detected

cells

Vector of cell names

features

Vector of feature names

type

Type of assay object to create; must be the name of a class that's derived from StdAssay

...

Extra parameters passed to new for assay creation; used to set slots not defined by StdAssay

layer

Name of layer to store counts as

csum

Function for calculating cell sums

fsum

Function for calculating feature sums