Fit models for gene expression

fit_grn_models(object, ...)

# S3 method for SeuratPlus
fit_grn_models(
  object,
  genes = NULL,
  network_name = paste0(method, "_network"),
  peak_to_gene_method = c("Signac", "GREAT"),
  upstream = 1e+05,
  downstream = 0,
  extend = 1e+06,
  only_tss = FALSE,
  peak_to_gene_domains = NULL,
  parallel = FALSE,
  tf_cor = 0.1,
  peak_cor = 0,
  aggregate_rna_col = NULL,
  aggregate_peaks_col = NULL,
  method = c("glm", "glmnet", "cv.glmnet", "brms", "xgb", "bagging_ridge",
    "bayesian_ridge"),
  interaction_term = ":",
  adjust_method = "fdr",
  scale = FALSE,
  verbose = TRUE,
  ...
)

Arguments

...

Other parameters for the model fitting function.

genes

A character vector with the target genes to consider for GRN inference. Takes all VariableFeatures in the object per default.

peak_to_gene_method

Character specifying the method to link peak overlapping motif regions to nearby genes. One of 'Signac' or 'GREAT'.

upstream

Integer defining the distance upstream of the gene to consider as potential regulatory region.

downstream

Integer defining the distance downstream of the gene to consider as potential regulatory region.

extend

Integer defining the distance from the upstream and downstream of the basal regulatory region. Only used of peak_to_gene_method = 'GREAT'.

only_tss

Logical. Measure distance from the TSS (TRUE) or from the entire gene body (FALSE).

peak_to_gene_domains

GenomicRanges object with regulatory regions for each gene. If provided, all other peaks-to-gene methods are overwritten and these regions are used instead.

parallel

Logical. Whether to parellelize the computation with foreach.

tf_cor

Threshold for TF - target gene correlation.

peak_cor

Threshold for binding peak - target gene correlation.

method

A character string indicating the method to fit the model.

  • 'glm' - Generalized Liner Model with stats.

  • 'glmnet', 'cv.glmnet' - Regularized Generalized Liner Model with glmnet.

  • 'brms' - Bayesian Regression Models using brms.

  • 'xgb' - Gradient Boosting Regression using xgboost.

  • 'bagging_ridge' - Bagging Ridge Regression using scikit-learn via reticulate.

  • 'bayesian_ridge' - Bayesian Ridge Regression using scikit-learn via reticulate.

interaction_term

The interaction term to use in the model between TF and binding site.

  • '+' for additive interaction.

  • ':' for 'multiplicative' interaction.

  • '*' for crossing interaction, i.e. additive AND 'multiplicative'. For more info, see stats

adjust_method

Method for adjusting p-values.

scale

Logical. Whether to z-transform the expression and accessibility matrices.

verbose

Logical. Display messages

Value

A SeuratPlus object.