After installing the SecAct R package, you can complete
all analyses in the tutorial sections. Note that the activity inference
functions (SecAct.activity.inference and its
*.ST and *.scRNAseq variants) rely on ridge
regression and permutation in R language, and may run relatively slowly.
The default ridge + permutation kernel is pure R with no compiled
dependencies — SecAct installs and runs anywhere R runs. For large
datasets, two optional accelerator packages provide drop-in
speed-ups:
Installation
Once either package is installed, no additional configuration is required—the activity inference functions will automatically use the available accelerator.
Example
With either installed,
SecAct.activity.inference(..., backend = "auto") (the
default) picks GPU > CPU-fast > pure-R automatically. At
rng_method = "mt19937" (default) and
ncores = 1, output is bit-identical across all three
backends.
# Memory-bounded inference on 100k samples
res <- SecAct.activity.inference(
inputProfile = Y_large,
is.differential = TRUE,
batch_size = 5000
)For memory-constrained workflows, set batch_size to
process samples in column-batches:
# Stream results to HDF5 when even the result matrices don't fit in RAM
SecAct.activity.inference(
inputProfile = Y_large,
is.differential = TRUE,
batch_size = 5000,
output_h5 = "results.h5",
is.group.sig = FALSE
)