R: 'Assay' Methods

Assay-methods {SeuratObject} | R Documentation

## `Assay` Methods

### Description

Methods for `Assay` objects for generics defined in other packages

### Usage

    ## S3 method for class 'Assay'
    x[i, j, ...]

    ## S3 method for class 'Assay'
    x[[i, ..., drop = FALSE]]

    ## S3 method for class 'Assay'
    dim(x)

    ## S3 method for class 'Assay'
    dimnames(x)

    ## S3 method for class 'Assay'
    head(x, n = 10L, ...)

    ## S3 method for class 'Assay'
    merge(x = NULL, y = NULL, add.cell.ids = NULL, merge.data = TRUE, ...)

    ## S3 method for class 'Assay'
    subset(x, cells = NULL, features = NULL, ...)

    ## S3 method for class 'Assay'
    tail(x, n = 10L, ...)

    ## S4 replacement method for signature 'Assay'
    x[[i, j, ...]] <- value

    ## S4 method for signature 'Assay'
    colMeans(x, na.rm = FALSE, dims = 1, ..., slot = "data")

    ## S4 method for signature 'Assay'
    colSums(x, na.rm = FALSE, dims = 1, ..., slot = "data")

    ## S4 method for signature 'Assay'
    rowMeans(x, na.rm = FALSE, dims = 1, ..., slot = "data")

    ## S4 method for signature 'Assay'
    rowSums(x, na.rm = FALSE, dims = 1, ..., slot = "data")

    ## S4 method for signature 'Assay'
    show(object)

### Arguments

`x, object` | An `Assay` object
`i, features` | For `[[`: metadata names; for all other methods, feature names or indices
`j, cells` | Cell names or indices
`...` | Arguments passed to other methods
`drop` | See `drop`
`n` | an integer vector of length up to `dim(x)` (or 1, for non-dimensioned objects). Values specify the indices to be selected in the corresponding dimension (or along the length) of the object. A positive value of `n[i]` includes the first/last `n[i]` indices in that dimension, while a negative value excludes the last/first `abs(n[i])`, including all remaining indices. `NA` or non-specified values (when `length(n) < length(dim(x))`) select all indices in that dimension. Must contain at least one non-missing value.
`y` | A vector or list of one or more objects to merge
`add.cell.ids` | A character vector of `length(x = c(x, y))`; appends the corresponding values to the start of each objects' cell names
`merge.data` | Merge the data slots instead of just merging the counts (which requires renormalization); this is recommended if the same normalization approach was applied to all objects
`value` | Additional metadata to add
`na.rm` | logical. Should missing values (including `NaN`) be omitted from the calculations?
`dims` | completely ignored by the `Matrix` methods.
`slot` | Name of assay expression matrix to calculate column/row means/sums on

### Value

`[`: The `data` slot for features `i` and cells `j`

`[[`: The feature-level metadata for `i`

`dim`: The number of features (`nrow`) and cells (`ncol`)

`dimnames`: Feature (row) and cell (column) names

`head`: The first `n` rows of feature-level metadata

`merge`: Merged object

`subset`: A subsetted `Assay`

`tail`: The last `n` rows of feature-level metadata

`[[<-`: `x` with metadata `value` added as `i`

`colMeans`: The column (cell-wise) means of `slot`

`colSums`: The column (cell-wise) sums of `slot`

`rowMeans`: The row (feature-wise) means of `slot`

`rowSums`: The row (feature-wise) sums of `slot`

`show`: Prints summary to `stdout` and invisibly returns `NULL`

### Functions

- `[.Assay`: Get expression data from an `Assay`

- `[[.Assay`: Get feature-level metadata

- `dim.Assay`: Number of cells and features for an `Assay`

- `dimnames.Assay`: Cell- and feature-names for an `Assay`

- `head.Assay`: Get the first rows of feature-level metadata

- `merge.Assay`: Merge `Assay` objects

- `subset.Assay`: Subset an `Assay`

- `tail.Assay`: Get the last rows of feature-level metadata

- `[[<-,Assay-method`: Add feature-level metadata

- `colMeans,Assay-method`: Calculate `colMeans` on an `Assay`

- `colSums,Assay-method`: Calculate `colSums` on an `Assay`

- `rowMeans,Assay-method`: Calculate `rowMeans` on an `Assay`

- `rowSums,Assay-method`: Calculate `rowSums` on an `Assay`

- `show,Assay-method`: Overview of an `Assay` object

[Package SeuratObject version 4.0.3 Index]