Give path of indexed fragments file that goes with data in the object. Checks for a valid path and an index file with the same name (.tbi) at the same path. Stores the path under the tools slot for access by visualization functions. One fragments file can be stored for each assay.

SetFragments(object, file, assay = NULL)

Arguments

object

A Seurat object

file

Path to indexed fragment file. See https://support.10xgenomics.com/single-cell-atac/software/pipelines/latest/output/fragments

assay

Assay used to generate the fragments. If NULL, use the active assay.

Value

Returns a Seurat object

Examples

fpath <- system.file("extdata", "fragments.tsv.gz", package="Signac") SetFragments(object = atac_small, file = fpath)
#> An object of class Seurat #> 300 features across 100 samples within 3 assays #> Active assay: peaks (100 features, 90 variable features) #> 2 other assays present: bins, RNA #> 2 dimensional reductions calculated: lsi, umap