bin: Subfunction of bin_metadata() for expression/positional...

View source: R/bin.R

binR Documentation

Subfunction of bin_metadata() for expression/positional binning

Description

This function computes a pseudospatial distance between beads that combines spatial distance and distance from the expression space, then using the silhouette score and hierarchical clustering, segregates beads into bins

Usage

bin(
  dat,
  md,
  k,
  pos = TRUE,
  pos_k = 55,
  ex_k = 1,
  hc_function = "ward.D2",
  plot_directory
)

Arguments

dat

data.table of smoothed relative expression intensities

md

data.table of metadata of each bead

k

number of malignant bins to set

pos

TRUE if doing spatial and expressional binning, FALSE if just expressional binning

pos_k

positional weight

ex_k

expressional weight

hc_function

hierarchical clustering function

plot_directory

output plot directory path

Value

A data.table of bead metadata combined with bin designations


dkzhang777/SlideCNA documentation built on Jan. 25, 2025, 5:53 p.m.