combine_most_similar: combine_most similar

combine_most_similarR Documentation

combine_most similar

Description

combines 2 most similar clusters, will repeat up to n_times as long as all clusters are over min_dist apart.

Usage

combine_most_similar(
  p_dt,
  profile_dt,
  n_times = 1,
  min_dist = Inf,
  cluster_ = "cluster_id",
  new_cluster_ = cluster_
)

Arguments

p_dt

plot dt containing cluster information.

profile_dt

profile data

n_times

number of times to combine

min_dist

don't combined once under this distance

cluster_

variable name of cluster assignment

new_cluster_

variable name for new cluster assignment. by default original clusters will be overwritten.

Value

p_dt with clusters combined

Examples

data("profile_dt")
data("tsne_dt")
setalloccol(tsne_dt)
clust_res = chiptsne:::nn_clust(tsne_dt, nn = 5, return_plot = TRUE)
clust_res[[2]]
chiptsne:::combine_most_similar(clust_res[[1]], profile_dt, n_times = 3)

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