Add information to the Kandinsky 'sf' slot. Based on Seurat::FetchData function

populate_sf(
  seurat = NULL,
  vars = NULL,
  assay = DefaultAssay(seurat),
  layer = "data",
  return.seurat = F
)

Arguments

seurat

a Seurat object containing Kandinsky data (`KanData()`)

vars

character vector containing variable names stored in Seurat object to be copied into the KanData `sf` object

assay

name of the Seurat assay to be used to search for variables of interest

layer

name of the Seurat layer to be used to search for variables of interest

return.seurat

boolean, set to FALSE by default. It indicates whether returning Seurat object with updated KanData `sf` containing the new variables (TRUE), or the updated KanData `sf` object only

Value

if return.seurat is set to TRUE, a Seurat object with updated KanData `sf` containing the new variables. if return.seurat is set to FALSE, only the updated KanData `sf` object will be returned