Skip to contents

Write insertion counts data for one or more pseudobulks to bedgraph format. This reports the total number insertions at each basepair for each group listed in cell_groups.

Usage

write_insertion_bedgraph(
  fragments,
  path,
  cell_groups = rlang::rep_along(cellNames(fragments), "all"),
  insertion_mode = c("both", "start_only", "end_only")
)

Arguments

fragments

IterableFragments object

path

(character vector) Path(s) to save bedgraph to, optionally ending in ".gz" to add gzip compression. If cell_groups is provided, path must be a named character vector, with one name for each level in cell_groups

cell_groups

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

insertion_mode

(string) Which fragment ends to use for coverage calculation. One of "both", "start_only", or "end_only"