gr.sum: gr.sum

gr.sumR Documentation

gr.sum

Description

Sums GRanges either by doing coverage and either weighting them equally or using a field "weight". Will return either sum or average.

Usage

gr.sum(gr, field = NULL, mean = FALSE)

Arguments

gr

GRanges to sum

field

metadata field from gr to use as a weight

mean

logical scalar specifying whether to divide the output at each interval but the total number of intervals overlapping it (only applies if field == NULL) (default FALSE)

Value

non-overlapping GRanges spanning the seqlengths of gr with $score (if field is NULL) or $field specifying the sum / mean at that position


mskilab/gUtils documentation built on June 6, 2023, 12:08 a.m.