Returns a subset of a Motif-class object.

# S3 method for Motif
subset(x, features = NULL, motifs = NULL, ...)

# S3 method for Motif
[(x, i, j, ...)

Arguments

x

A Motif object

features

Which features to retain

motifs

Which motifs to retain

...

Arguments passed to other methods

i

Which columns to retain

j

Which rows to retain

Value

Returns a subsetted Motif object

See also

Examples

motif.obj <- SeuratObject::GetAssayData(
  object = atac_small[['peaks']], slot = "motifs"
)
subset(x = motif.obj, features = head(rownames(motif.obj), 10))
#> A Motif object containing 10 motifs in 10 regions
motif.obj <- SeuratObject::GetAssayData(
  object = atac_small, assay = 'peaks', slot = 'motifs'
)
#> Warning: The `slot` argument of `GetAssayData()` is deprecated as of SeuratObject 5.0.0.
#>  Please use the `layer` argument instead.
motif.obj[1:10,1:10]
#> A Motif object containing 10 motifs in 10 regions