prep_summary: prep_summary

prep_summaryR Documentation

prep_summary

Description

prep_summary

Usage

prep_summary(
  profile_dt,
  position_dt,
  x_points,
  y_points = x_points,
  xrng = range(position_dt$tx),
  yrng = range(position_dt$ty),
  facet_by = NULL,
  x_var = "x",
  y_var = "y",
  id_var = "id",
  wide_var = "name",
  tall_var = "tall_none",
  extra_vars = character()
)

Arguments

profile_dt

a tidy data.table for profile data as retrieved by stsFetchTsneInput. Expected variable names are id, tall_var, wide_var, x, and y.

position_dt

a tidy data.table containing t-sne embedding. Expected variable names are tx, ty, id, and tall_var.

x_points

numeric. number of grid points to use in x dimension.

y_points

numeric. number of grid points to use in y dimension. Defaults to same value as x_points.

xrng

view domain in x dimension, default is range of position_dt$tx.

yrng

view domain in y dimension, default is range of position_dt$ty.

facet_by

character. variable name to facet profile_dt by when constructing images. The only valid non-null value with chiptsne functions is "tall_var".

Value

summary of profiles binned across tsne space according to x_points, y_points, and within xrng and yrng

Examples

data("profile_dt")
data("tsne_dt")
summary_dt = prep_summary(profile_dt, tsne_dt, 4)
img_res = prep_images(summary_dt, 4)
#zoom on top-right quadrant
summary_dt.zoom = prep_summary(profile_dt, tsne_dt, 4,
    xrng = c(0, .5), yrng = c(0, .5))
img_res.zoom = prep_images(summary_dt.zoom, 4,
    xrng = c(0, .5), yrng = c(0, .5))

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