% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/set.defaults.R
\name{set.defaults}
\alias{set.defaults}
\title{Set Default Parameters for Network Extraction}
\usage{
set.defaults(seurat.obj, clean.up = FALSE, defaults = list())
}
\arguments{
\item{seurat.obj}{A \code{Seurat} object with a \code{NNet.mod} list stored in the \code{misc} slot.
This list is created by \code{\link{run.nn.reg}}.}

\item{clean.up}{A logical indicating whether to reset defaults to initial values
(effect-based assay, quadratic transformation, self-loop removal,
and pruning at cutoff 0.95). Default is \code{FALSE}.}

\item{defaults}{A named list of default parameters to update. Valid entries include:
\itemize{
  \item{f} {A function mapping effect estimates to importance scores.
                   Default is \code{function(x) 2*x^2}.}
  \item{remove.self.loops} {Logical, whether to remove self-loops. Default: \code{TRUE}.}
  \item{assay} {Co-expression measure to use for downstream analysis.
                       Options: \code{"effect"}, \code{"p.val"}, or \code{"meta.network"}.}
  \item{predictors} {Character vector of predictor genes.}
  \item{responses} {Character vector of response genes.}
  \item{cutoff} {Numeric threshold for pruning, between 0 and 1. Default: \code{0.95}.}
}}
}
\value{
A \code{Seurat} object with updated default settings stored in
        \code{misc$NNet.mod$defaults}.
}
\description{
This function updates or resets default settings used in downstream network
extraction and analysis within a Seurat object. Defaults include pruning
thresholds, response and predictor gene sets, co-expression measures, and
transformation functions for effect estimates.
}
\details{
The \code{defaults} list defines how networks are extracted and post-processed
in downstream analyses (e.g., pruning, TF activity inference, meta-network learning).
By setting \code{clean.up = TRUE}, all defaults are reset to standardized values.
Only valid arguments present in the current \code{NNet.mod$defaults} are updated.
}
\examples{
# Reset defaults to initial values
seurat.obj <- set.defaults(seurat.obj, clean.up = TRUE)

# Update only the cutoff threshold and assay
seurat.obj <- set.defaults(
  seurat.obj,
  defaults = list(cutoff = 0.5, assay = "p.val")
)

# Check updated defaults
Seurat::Misc(seurat.obj, "mod")$defaults

}
\seealso{
\code{\link{run.nn.reg}}, \code{\link{prepare.reg}}
}
