Skip to contents

Fetch data from the hdf5 file and returns a Seurat object

Usage

FetchH5(
  data_file,
  meta_file,
  name = NULL,
  features = NULL,
  layer = NULL,
  assay = NULL,
  metanames = NULL,
  reduction = NULL,
  verbose = TRUE
)

Arguments

data_file

The path to the hdf5 file containing the data.

meta_file

The path to the hdf5 file containing the metadata.

name

Dataset in the hdf5 file. If not specified, the function will attempt to find the shared group name in both files.

features

The names of the genes or features to fetch. If specified, only these features will be fetched.

layer

The layer for the counts in the hdf5 file. If not specified, the first layer will be used.

assay

Assay to use. If not specified, the default assay in the hdf5 file will be used.

metanames

The names of the metadata columns to fetch.

reduction

Reduction to fetch.

verbose

Whether to print the message. Default is TRUE.

Value

A Seurat object with the fetched data.

Examples

if (FALSE) { # \dontrun{
data(pancreas_sub)
pancreas_sub <- RunStandardWorkflow(pancreas_sub)
PrepareSCExplorer(pancreas_sub, base_dir = "./SCExplorer")
srt <- FetchH5(
  data_file = "./SCExplorer/data.hdf5",
  meta_file = "./SCExplorer/meta.hdf5",
  features = c("Ins1", "Ghrl"),
  metanames = c("SubCellType", "Phase"),
  reduction = "UMAP"
)
} # }