Skip to contents

Get footprints around a set of genomic coordinates

Usage

footprint(
  fragments,
  ranges,
  zero_based_coords = !is(ranges, "GRanges"),
  cell_groups = rlang::rep_along(cellNames(fragments), "all"),
  cell_weights = rlang::rep_along(cell_groups, 1),
  flank = 125L,
  normalization_width = flank%/%10L
)

Arguments

fragments

IterableFragments object

ranges

Footprint centers given as GRanges, data.frame, or list. See help("genomic-ranges-like") for details on format and coordinate systems. Required attributes:

  • chr, start, end: genomic position

  • strand: +/- or TRUE/FALSE for positive or negative strand

"+" strand ranges will footprint around the start coordinate, and "-" strand ranges around the end coordinate.

zero_based_coords

If true, coordinates start and 0 and the end coordinate is not included in the range. If false, coordinates start at 1 and the end coordinate is included in the range

cell_groups

Character or factor assigning a group to each cell, in order of cellNames(fragments)

cell_weights

Numeric vector assigning weight factors (e.g. inverse of total reads) to each cell, in order of cellNames(fragments)

flank

Number of flanking basepairs to include on either side of the motif

normalization_width

Number of basepairs at the upstream + downstream extremes to use for calculating enrichment

Value

tibble::tibble() with columns group, position, and count, enrichment