Skip to contents

Reads only the metadata (shape, column names, embedding keys, etc.) from a supported file. No count data is loaded. Memory usage is minimal regardless of dataset size.

Usage

inspect(path, chunk_size = 5000L)

Arguments

path

Path to a file or directory in any supported format (see read_h5ad()).

chunk_size

Cells per internal streaming chunk. Default 5000L. Only affects obs/var metadata reads; does not load the count matrix.

Value

A named list with:

format

Detected file format string.

n_obs

Number of observations (cells).

n_vars

Number of variables (genes/features).

obs_cols

Character vector of cell metadata column names.

var_cols

Character vector of feature metadata column names.

obsm_keys

Character vector of low-dimensional embedding keys.

layers

Named list with parallel vectors name, nnz, nnz_q1, nnz_med, nnz_q3, nnz_max — one entry per layer.

uns_keys

Character vector of unstructured metadata keys.

obsp

Named list with parallel vectors name, nnz, nnz_q1, nnz_med, nnz_q3, nnz_max — one entry per obsp matrix.

varm_keys

Character vector of feature embedding keys.

Examples

if (FALSE) { # \dontrun{
info <- inspect("pbmc3k.h5seurat")
info$n_obs     # 2700
info$obs_cols  # c("orig.ident", "nCount_RNA", ...)
info$obsm_keys # c("X_pca", "X_umap")
} # }