findBestK: Testing multiple K for RUV4 batch correction to find the best...

findBestKR Documentation

Testing multiple K for RUV4 batch correction to find the best K.

Description

Testing multiple K for RUV4 batch correction to find the best K.

Usage

findBestK(
  spe,
  maxK = 10,
  factor_of_int,
  factor_batch,
  NCGs,
  point_size = 3,
  line_col = "black",
  point_col = "black",
  text_size = 13
)

Arguments

spe

A Spatial Experiment object.

maxK

Integer. The max k to test, will test k from 1 to maxK, by default is 10.

factor_of_int

Column name(s) to indicate the factors of interest. This is required for the RUV4 method.

factor_batch

Column name to indicate the batch.

NCGs

Negative control genes. This is required for the RUV4 method.

point_size

Numeric. Plotting parameter.

line_col

Character. Plotting parameter.

point_col

Character. Plotting parameter.

text_size

Numeric. Plotting parameter.

Value

A ggplot object.

Examples

data("dkd_spe_subset")
spe <- findNCGs(dkd_spe_subset, top_n = 100)
findBestK(spe,
  factor_of_int = c("disease_status"),
  factor_batch = "SlideName", NCGs = S4Vectors::metadata(spe)$NCGs
)


DavisLaboratory/standR documentation built on Dec. 6, 2024, 9:55 p.m.