dot-CreateStdAssay: Generic Assay Creation

.CreateStdAssayR Documentation

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",
  ...
)

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

## S3 method for class '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 class 'Matrix'
.CreateStdAssay(
  counts,
  min.cells = 0,
  min.features = 0,
  cells = NULL,
  features = NULL,
  transpose = FALSE,
  type = "Assay5",
  layer = "counts",
  ...
)

## S3 method for class 'matrix'
.CreateStdAssay(
  counts,
  min.cells = 0,
  min.features = 0,
  cells = NULL,
  features = NULL,
  transpose = FALSE,
  type = "Assay5",
  layer = "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

Value

An object of class type with a layer named layer containing the data found in counts


SeuratObject documentation built on May 29, 2024, 12:31 p.m.