Signac (version 0.2.4)

GetReadsInRegion: GetReadsInRegion

Description

Extract reads for each cell within a given genomic region or set of regions

Usage

GetReadsInRegion(
  object,
  region,
  assay = NULL,
  tabix.file = NULL,
  group.by = NULL,
  cells = NULL,
  verbose = TRUE,
  ...
)

Arguments

object

A Seurat object

region

A genomic region, specified as a string in the format 'chr:start-end'. Can be a vector of regions.

assay

Name of assay to use

tabix.file

A TabixFile object. If NULL, the file specified in fragment.path will be opened and closed after the function completes. If iterating over many regions, providing an open TabixFile is much faster as it avoids opening and closing the connection each time.

group.by

Cell grouping information to add

cells

Cells to include. Default is all cells present in the object.

verbose

Display messages

...

Additional arguments passed to StringToGRanges

Value

Returns a data frame

Examples

Run this code
# NOT RUN {
fpath <- system.file("extdata", "fragments.tsv.gz", package="Signac")
atac_small <- SetFragments(object = atac_small, file = fpath)
region <- StringToGRanges(regions = "chr1-10245-762629")
GetReadsInRegion(object = atac_small, region = region)
# }

Run the code above in your browser using DataLab