aggregate_signals: aggregate_signals

View source: R/function_plot_raster_summary.R

aggregate_signalsR Documentation

aggregate_signals

Description

aggregate_signals is retrieves a single representative value for a genomic region per sample by default this is the maximum anywhere in the region but this can be overriden using xmin/xmax and agg_FUN

Usage

aggregate_signals(
  profile_dt,
  agg_FUN = max,
  y_ = "y",
  yout_ = "ynorm",
  xmin = -Inf,
  xmax = Inf,
  by_ = c("tall_var", "wide_var")
)

Arguments

profile_dt

Tidy data.table of profile information. As returned by seqsetvis::ssvFetchBam.

agg_FUN

A function appled to all y_ values in xmin to xmax range. Must accept single numeric vector and return 1 value.

y_

Variable name containing profile scores.

yout_

Variable name in output containing aggregate profile score information.

xmin

The min range of x-values to apply agg_FUN to

xmax

The max range of x-values to apply agg_FUN to

by_

Character vector of variable names to apply agg_FUN by.

Value

A data.table summarizing every profile with a single value. Suitable for input to chiptsne:::plot_binned_aggregates.

Examples

aggregate_signals(profile_dt)
aggregate_signals(profile_dt, xmin = -.2, xmax = .2, agg_FUN = mean)

jrboyd/seqtsne documentation built on Nov. 5, 2022, 6:37 a.m.