Generate an scGate model from scratch or edit an existing one
Usage
gating_model(
model = NULL,
level = 1,
name,
signature,
positive = TRUE,
negative = FALSE,
remove = FALSE
)Arguments
- model
scGate model to be modified. When is NULL (default) a new model will be initialized.
- level
integer. It refers to the hierarchical level of the model tree in which the signature will be added (level=1 by default)
- name
Arbitrary signature name (i.e. Immune, Tcell, NK etc).
- signature
character vector indicating gene symbols to be included in the signature (e.g. CD3D). If a minus sign is placed to the end of a gene name (e.g. "CD3D-"), this gene will be used as negative in UCell computing. See UCell documentation for details
- positive
Logical indicating if the signature must be used as a positive signature in those model level. Default is TRUE.
- negative
Same as `positive` but negated (negative=TRUE equals to positive=FALSE)
- remove
Whether to remove the given signature from the model
Value
A scGate model that can be used by scGate to filter target cell types.
Examples
# create a simple gating model
my_model <- gating_model(level = 1, name = "immune", signature = c("PTPRC"))
my_model <- gating_model(model = my_model, level = 1, positive = FALSE,
name = "Epithelial", signature = c("CDH1","FLT1") )
# Remove an existing signature
dropped_model <- gating_model(model = my_model, remove =TRUE, level = 1, name = "Epithelial")