ctPlotBinAggregates: ctPlotBinAggregates

View source: R/ctPlots.R

ctPlotBinAggregatesR Documentation

ctPlotBinAggregates

Description

Divide t-SNE space into xbins*ybins and summarize signal in each bean as the mean value results from agg_FUN on xmin:xmax of signal profiles present.

Usage

ctPlotBinAggregates(
  sts,
  feature_name = NULL,
  signal_name = NULL,
  xmin = -Inf,
  xmax = Inf,
  profile_value = ssvQC:::val2var[sts$signal_config$plot_value],
  profile_value_label = ssvQC:::val2lab[sts$signal_config$plot_value],
  agg_FUN = max,
  xbins = 50,
  ybins = xbins,
  bg_color = "gray60",
  min_size = 5,
  extra_vars = character()
)

Arguments

sts

A ChIPtSNE object with ssvQC.prepSignal already called.

feature_name

Feature name present in sts. With default of NULL, first feature name will be used.

signal_name

Signal name present in sts. With default of NULL, first signal name will be used.

xmin

The min range of x-values to apply agg_FUN to.

xmax

The max range of x-values to apply agg_FUN to.

profile_value

Value to use for profiles. Default is the plot_value defined in the signal config of sts.

profile_value_label

Label to use for profile scale. Default is the plot_value label defined in the signal config of sts.

agg_FUN

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

xbins

Number of bins (pixel) in the x direction

ybins

Number of bins (pixel) in the y direction. Default reuses xbins.

bg_color

Color to use for plot background. Default is "gray60".

min_size

Bins must contain at least this many points to appear in final plot.

Value

ggplot summarizing signal profiles across t-SNE space in heatmap style plot.

Examples

data(ex_sts)
ctPlotBinAggregates(sts)

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