Learn R Programming

SeuratObject (version 5.0.2)

CreateAssayObject: Create an Assay object

Description

Create an Assay object from a feature (e.g. gene) expression matrix. The expected format of the input matrix is features x cells.

Usage

CreateAssayObject(
  counts,
  data,
  min.cells = 0,
  min.features = 0,
  key = NULL,
  check.matrix = FALSE,
  ...
)

Value

A Assay object

Arguments

counts

Unnormalized data such as raw counts or TPMs

data

Prenormalized data; if provided, do not pass counts

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

key

Optional key to initialize assay with

check.matrix

Check counts matrix for NA, NaN, Inf, and non-integer values

...

Arguments passed to as.sparse

Details

Non-unique cell or feature names are not allowed. Please make unique before calling this function.

See Also

v3 Assay object, validity, and interaction methods: $.Assay(), Assay-class, Assay-validity, [.Assay(), [[.Assay(), dim.Assay(), dimnames.Assay(), merge.Assay(), split.Assay(), subset.Assay()

Examples

Run this code
if (FALSE) {
pbmc_raw <- read.table(
  file = system.file('extdata', 'pbmc_raw.txt', package = 'Seurat'),
  as.is = TRUE
)
pbmc_rna <- CreateAssayObject(counts = pbmc_raw)
pbmc_rna
}

Run the code above in your browser using DataLab