stsPlotClusterProfiles: stsPlotClusterProfiles

stsPlotClusterProfilesR Documentation

stsPlotClusterProfiles

Description

stsPlotClusterProfiles

Usage

stsPlotClusterProfiles(
  profile_dt,
  cluster_dt = profile_dt,
  cluster_ = "cluster_id",
  w = 0.05,
  h = 0.05,
  x_var = "x",
  y_var = "y",
  id_var = "id",
  wide_var = "wide_var",
  tall_var = "tall_var"
)

Arguments

profile_dt

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

cluster_dt

Tidy data.table of cluster information. As returned by chiptsne:::nn_clust or chiptsne:::combine_most_similar

cluster_

Variable name of cluster assignment in cluster_dt.

w

Relative width of profile glpyhs as fraction of total plot range.

h

Relative height of profile glpyhs as fraction of total plot range.

Value

a ggplot of TSNE point clusters overlayed with summary profiles.

Examples

data("profile_dt")
data("tsne_dt")
setalloccol(tsne_dt)
setalloccol(profile_dt)
cluster_dt = chiptsne:::nn_clust(tsne_dt, nn = 5)

debug(chiptsne:::stsPlotClusterProfiles)
chiptsne:::stsPlotClusterProfiles(profile_dt, cluster_dt)

chiptsne:::stsPlotClusterProfiles(profile_dt, cluster_dt, w = .1, h = .1) +
  scale_color_manual(values = c("H3K4me3" = "forestgreen", "H3K27me3" = "firebrick"))

cluster_dt.reduced = chiptsne:::combine_most_similar(cluster_dt, profile_dt, n_times = 3)
chiptsne:::stsPlotClusterProfiles(profile_dt, cluster_dt.reduced, w = .1, h = .1) +
  scale_color_manual(values = c("H3K4me3" = "forestgreen", "H3K27me3" = "firebrick"))

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