subset.Fragment: Subset a Fragment object

View source: R/objects.R

subset.FragmentR Documentation

Subset a Fragment object

Description

Returns a subset of a Fragment-class object.

Usage

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

Arguments

x

A Fragment object

cells

Vector of cells to retain

...

Arguments passed to other methods

Value

Returns a subsetted Fragment object

See Also

subset

Examples

fpath <- system.file("extdata", "fragments.tsv.gz", package="Signac")
cells <- colnames(x = atac_small)
names(x = cells) <- paste0("test_", cells)
frags <- CreateFragmentObject(path = fpath, cells = cells, verbose = FALSE, tolerance = 0.5)
subset(frags, head(names(cells)))

timoast/signac documentation built on Aug. 23, 2024, 1:48 a.m.