% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/05_extraction.R
\name{import_gsea_capsule}
\alias{import_gsea_capsule}
\title{Load and Smart-Relocate GSEA Computation Capsule}
\usage{
import_gsea_capsule(file_path, auto_relocate = TRUE, inspect = TRUE)
}
\arguments{
\item{file_path}{Character. Absolute or relative path to the capsule rds file.}

\item{auto_relocate}{Logical. Whether to automatically fix the folder structure
and relocate based on the built-in lineage in the current directory? Default TRUE.}

\item{inspect}{Logical. Whether to automatically print capsule overview after
loading? Default TRUE.}
}
\value{
Returns the parsed GseaRes or GseaEnv capsule object.
}
\description{
Safely load a computation capsule. If the file is moved from its
  original project path (e.g., copied to desktop), the engine will automatically
  restore the standard folder structure in the current working directory and
  relocate the capsule. Fully compatible with GseaEnv and GseaRes objects.
}
\examples{
# Load the pre-computed GseaRes capsule shipped with the package, write it
# to a temp file, then import it (auto_relocate = FALSE to avoid side
# effects).
data(precomputed_gseares, package = "GSEAlens")
tmp_capsule <- file.path(tempdir(), "import_demo.rds")
saveRDS(precomputed_gseares, tmp_capsule)

gsea_res <- import_gsea_capsule(
  tmp_capsule,
  auto_relocate = FALSE,
  inspect = FALSE
)
class(gsea_res)
}
