Run the optional SecAct R package from scop to infer secreted protein
signaling activity from bulk, single-cell, or spatial transcriptomics
profiles. SecAct is not bundled with scop; it is checked and installed
from data2intelligence/SecAct when this function is called.
Usage
RunSecAct(
srt = NULL,
inputProfile = NULL,
inputProfile_control = NULL,
mode = c("auto", "matrix", "scRNAseq", "ST"),
assay = NULL,
layer = "counts",
cellType_meta = NULL,
is.singleCellLevel = FALSE,
is.differential = FALSE,
is.paired = FALSE,
is.singleSampleLevel = FALSE,
scale.factor = NULL,
sigMatrix = "SecAct",
is.filter.sig = FALSE,
is.group.sig = TRUE,
is.group.cor = 0.9,
lambda = 5e+05,
nrand = 1000,
ncores = 1L,
backend = "auto",
rng_method = "mt19937",
batch_size = NULL,
output_h5 = NULL,
activity = c("zscore", "beta", "se", "pvalue"),
assay_out = "SecAct",
store_assay = !is.null(srt),
store_results = TRUE,
tool_name = "SecAct",
return_seurat = !is.null(srt),
verbose = TRUE
)Arguments
- srt
Optional Seurat object. When
mode = "scRNAseq", this is passed toSecAct.activity.inference.scRNAseq. Whenmode = "matrix", expression is extracted fromsrtifinputProfileis not supplied.- inputProfile
Expression matrix, Seurat object, or SpaCET object. Matrix input must be genes x samples, cells, or spatial spots.
- inputProfile_control
Optional control expression matrix or SpaCET object passed to SecAct.
- mode
SecAct workflow.
autodispatches from the input class.- assay
Assay used when extracting a matrix from
srt; also sets the default assay for Seurat input passed to SecAct.- layer
Assay layer used when
mode = "matrix"andinputProfileis not supplied.- cellType_meta
Metadata column containing cell type or state labels for
mode = "scRNAseq"whenis.singleCellLevel = FALSE.- is.singleCellLevel
Whether SecAct should return single-cell activity rather than cell-state activity for Seurat input.
- is.differential, is.paired, is.singleSampleLevel
Parameters passed to
SecAct.activity.inferencefor matrix or bulk input.- scale.factor
Spot-level scale factor passed to
SecAct.activity.inference.ST.- sigMatrix
SecAct signature matrix name.
- is.filter.sig, is.group.sig, is.group.cor, lambda, nrand, ncores, backend, rng_method
Parameters passed to SecAct activity inference.
- batch_size, output_h5
Optional large-matrix controls passed only to
SecAct.activity.inference.- activity
Activity matrix to store as a Seurat assay when possible.
- assay_out
Name of the Seurat assay used to store activity values.
- store_assay
Whether to store a SecAct activity matrix as a Seurat assay when its columns match Seurat cells.
- store_results
Whether to store raw SecAct results in
srt@tools.- tool_name
Name used in
srt@tools.- return_seurat
Whether to return a Seurat object when
srtis supplied.- verbose
Whether to print the message. Default is
TRUE.