Skip to contents

This function reloads previously saved SHAP analysis results from a specified directory (e.g., created by FindShapKeyDriver()) and attaches them to a Seurat object.

Usage

ReloadShapOutput(seurat_obj, shap_dir)

Arguments

seurat_obj

A Seurat object to attach SHAP results to.

shap_dir

Path to the directory containing SHAP outputs (e.g., "results/shap_output_split").

Value

A Seurat object with SHAP results loaded into seurat_obj@misc$shap.

Details

It is useful when SHAP results were not stored in @misc or when working across sessions.

Examples

seurat_obj <- ReloadShapOutput(seurat_obj, shap_dir = "results/shap_output_split")
#> Error in ReloadShapOutput(seurat_obj, shap_dir = "results/shap_output_split"): Directory not found: results/shap_output_split