Import or approximate SCENIC+ networks
Usage
RunSCENICPlus(
object,
rna_assay = "RNA",
atac_assay = "peaks",
rna_layer = "counts",
atac_layer = "counts",
backend = c("python", "cpp"),
grn_method = c("grnboost2", "regdiffusion", "genie3", "gniplr"),
regulators = NULL,
rna_expr = NULL,
atac_expr = NULL,
tf_gene_prior = NULL,
region_gene_prior = NULL,
tf_region_prior = NULL,
triplets_prior = NULL,
eregulons_prior = NULL,
auc_expr = NULL,
auc_rankings = NULL,
region_gene_window = 250000,
region_gene_search_space = NULL,
region_gene_method = c("gbm", "correlation"),
region_gene_n_rounds = 500,
max_region_gene = 5,
max_tf_region = 500,
min_eregulon_size = 5,
egrn_rho_threshold = 0.05,
egrn_quantiles = c(0.85, 0.9, 0.95),
egrn_top_n_region_gene = c(5L, 10L, 15L),
egrn_min_target_genes = 10L,
group.by = NULL,
grn_top_targets = Inf,
max_grn_targets = Inf,
grn_target_scope = c("all", "region_gene"),
grn_n_rounds = 5000,
grn_learning_rate = 0.01,
grn_max_depth = 3,
grn_max_features = 0.1,
grn_subsample = 0.9,
grn_early_stop_window_length = 25,
seed = 666,
cores = NULL,
assay_name = "scenicplus",
tool_name = "SCENICPlus",
python_result_dir = NULL,
scplus_object = NULL,
auto_prepare = TRUE,
work_dir = "scenicplus_output/",
envname = NULL,
conda = "auto",
verbose = TRUE,
srt = NULL,
egrn_method = c("gsea", "leading_edge"),
egrn_n_perm = 1000L,
region_auc_rankings = NULL
)Arguments
- object
A
Seuratobject.- rna_assay
RNA assay name.
- atac_assay
Chromatin assay.
- rna_layer
RNA count layer used for TF-gene inference and AUC scoring.
- atac_layer
ATAC count layer used for peak-gene correlations.
- backend
"python"imports official results."cpp"fits an approximation using motif annotations or supplied priors. To run official SCENIC+, useRunGRN()withmethods = "scenicplus".- grn_method
TF-gene inference method for
backend = "cpp".- regulators
Candidate transcription factors. If
NULL, motif TF names are used when available; otherwise all RNA genes are considered.- rna_expr, atac_expr
RNA expression and chromatin accessibility matrices for the C++ workflow. Use features as rows and cells as columns.
- tf_gene_prior
Precomputed TF-gene table (
TF,target,importance).- region_gene_prior
Precomputed region-gene table (
region,gene,score).- tf_region_prior
Precomputed TF-region table (
TF,region,score).- triplets_prior
Precomputed TF-region-gene table (
TF,region,gene,score).- eregulons_prior
Precomputed eRegulon table (
regulon,target).- auc_expr
Gene-by-cell expression matrix for eRegulon AUC.
- auc_rankings
Cell-by-gene matrix of zero-based ranks for gene AUC.
- region_gene_window
Maximum peak-to-gene distance in base pairs.
- region_gene_search_space
Candidate pairs as a table or file with
region/Nameandgene/Genecolumns.- region_gene_method
"gbm"combines boosting and correlation."correlation"uses correlation alone.- region_gene_n_rounds
Number of boosting rounds for C++ region-gene importance scoring.
- max_region_gene
Maximum region-gene links retained per gene.
- max_tf_region
Maximum motif-supported regions retained per TF.
- min_eregulon_size
Minimum genes per eRegulon retained for AUC scoring.
- egrn_rho_threshold
Absolute Spearman correlation threshold for signed modules.
- egrn_quantiles
Region-gene importance quantiles for candidate modules.
- egrn_top_n_region_gene
Top region-gene links per gene for candidate modules.
- egrn_min_target_genes
Minimum leading-edge genes per eRegulon.
- group.by
Optional metadata column used to calculate eRegulon specificity scores.
- grn_top_targets
Maximum TF-gene edges per target.
Infkeeps all positive edges.- max_grn_targets
Maximum target genes.
Infkeeps the full target set.- grn_target_scope
"all"uses all RNA genes."region_gene"uses genes with region links, ranked by absolute peak-gene correlation.- grn_n_rounds
Boosting rounds for TF-gene inference.
- grn_learning_rate
C++ tree boosting learning rate.
- grn_max_depth
Maximum depth of each C++ TF-gene regression tree.
- grn_max_features
Fraction of candidate TFs sampled at each C++ tree split.
- grn_subsample
Fraction of cells sampled for each C++ boosting round.
- grn_early_stop_window_length
Out-of-bag early stopping window.
0disables it.- seed
Random seed.
- cores
CPU cores for C++ inference.
NULLuses the OpenMP team.- assay_name
Assay used to store eRegulon AUC scores.
- tool_name
Name of the
srt@toolsslot used to store results.- python_result_dir
Directory of official SCENIC+ result tables. Accepts TSV, CSV, or TXT, optionally compressed with gzip, bzip2, or xz.
- scplus_object
Official SCENIC+
.h5mu,.pkl, or.picklefile to extract.- auto_prepare
Look for local results when paths are omitted. The search checks
scenicplus,scplus,scenic,outs, and the current directory.- work_dir
Directory for tables extracted from a SCENIC+ object.
- envname
Python environment. By default,
.h5muusesscenicplus_io_envand pickle usesscenicplus_env.- conda
The path or command name of a conda-compatible executable.
- verbose
Whether to print messages.
- srt
Deprecated alias for
object; supply exactly one of the two. It will be removed in scop 1.0.0.- egrn_method
Module filter:
"gsea"or"leading_edge".- egrn_n_perm
Number of gene-set permutations per GSEA module.
- region_auc_rankings
Cell-by-region matrix of zero-based ranks for region AUC.
Examples
if (FALSE) { # \dontrun{
data(pancreas_sub)
pancreas_sub <- RunStandardWorkflow(pancreas_sub)
pancreas_sub <- RunSCENICPlus(
pancreas_sub,
backend = "python",
python_result_dir = "test/scenicplus"
)
scenicplus_dot <- SCENICPlusPlot(
pancreas_sub,
group.by = "CellType"
)
example_regulons <- head(rownames(pancreas_sub[["scenicplus"]]), 6)
GroupHeatmap(
pancreas_sub,
group.by = "CellType",
features = example_regulons,
assay = "scenicplus",
layer = "data",
exp_method = "raw",
lib_normalize = FALSE
)$plot
FeatureStatPlot(
pancreas_sub,
stat.by = example_regulons,
group.by = "CellType",
assay = "scenicplus",
layer = "data",
plot_type = "violin"
)
FeatureDimPlot(
pancreas_sub,
features = example_regulons,
assay = "scenicplus",
layer = "data",
reduction = "UMAP"
)
SCENICPlusPlot(
pancreas_sub,
group.by = "CellType",
plot_type = "eregulon_dim",
features = example_regulons
)
} # }