KL_boot_mst: Title

View source: R/scoloc.R

KL_boot_mstR Documentation

Title

Description

Title

Usage

KL_boot_mst(
  dummy_df,
  coord_df,
  min_num = 15,
  Xlim = range(coord_df[, 1]),
  Ylim = range(coord_df[, 2]),
  boot_n = 100,
  prop = 0.8,
  replace = T,
  h = 150,
  n = 25,
  tot_norm = T,
  eps = 1e-20
)

Arguments

dummy_df

Cell type dummy df

coord_df

Coordinates df

min_num

For cells number < min_num, add 1 till min_num

Xlim

The limits of X-axis

Ylim

The limits of Y-axis

boot_n

Number of bootstrapping iterations

prop

Subsample proportion

replace

should sampling be with replacement?

h

Bandwidths for x and y directions, more details in kde2d function in MASS package

n

Number of grid points in each directions, more details in kde2d function in MASS package

tot_norm

Normalization by total?

eps

Small value when calculate KL-divergence

Value

A list of 1. Bootstrap KL-divergence; 2. MST consensus matrix

Examples

boot_mst_res <- KL_boot_mst(dummy_df=cell_type_dummy, coord_df=range(coord_df$X), Xlim=range(coord_df$Y), boot_n=100, prop=0.8, h=150, n=25, tot_norm=T, eps=1e-20)

navinlabcode/CellTrek documentation built on April 15, 2022, 8:04 a.m.