Skip to contents

This function prepares one or multiple Seurat objects for the SCExplorer app. It takes a Seurat object or a list of Seurat objects as input and outputs two hdf5 files: one for the data and one for the metadata.

Usage

PrepareSCExplorer(
  object,
  base_dir = "SCExplorer",
  DataFile = "Data.hdf5",
  MetaFile = "Meta.hdf5",
  assays = "RNA",
  slots = c("counts", "data"),
  ignore_nlevel = 100,
  write_tools = FALSE,
  write_misc = FALSE,
  compression_level = 6,
  overwrite = FALSE
)

Arguments

object

A Seurat object or a list of Seurat objects.

base_dir

The base directory where the SCExplorer hdf5 files will be written. Default is "SCExplorer".

DataFile

Path to the output data file. If not provided, the file will be named "Data.hdf5" in the current directory.

MetaFile

Path to the output meta file. If not provided, the file will be named "Meta.hdf5" in the current directory.

assays

Character vector specifying the assays to include in the data file. Default is "RNA".

slots

Character vector specifying the slots to include in the data file. Default is "data".

ignore_nlevel

The number of levels above which a metadata field will be ignored. Default is 100.

write_tools

A logical value indicating whether to write the tools information to the meta file. Default is FALSE.

write_misc

A logical value indicating whether to write the miscellaneous information to the meta file. Default is FALSE.

compression_level

Compression level for the HDF5 dataset. Default is 6.

overwrite

Logical value indicating whether to overwrite existing data in the data file. Default is FALSE.

Examples

if (FALSE) {
data("pancreas_sub")
pancreas_sub <- Standard_SCP(pancreas_sub)
PrepareSCExplorer(pancreas_sub, base_dir = "./SCExplorer")
}