
Compile the weights
compile_weights.RdCompile the weights
Arguments
- weights
A data frame with the weights
- gs
The gene sets
- level
The level of the gene sets
- range
The quantization range for
format = "db"only: the 4-element formc(-low, -high, low, high)(defaultc(-5, -1, 1, 5)) scales the positive weights into[low, high]and the negative ones into[-high, -low]before rounding them to integers (the db format can only encode integer weights via+/-repeats). The universal output is never rescaled — it keeps the raw trained weights.- format
The format of the output data frame. One of
"universal"(default) or"db".- drop_zero
Whether to drop markers whose trained weight is exactly zero from the output (default
TRUE). Zero weights mean the marker carries no learned direction for the cell type; dropping them (before any db quantization) makes zero mean "no direction" — the marker is absent from the cell type's list. PassFALSEto keep every candidate marker.- pos_only
Whether to keep only the markers whose trained weight is positive in the output (default
FALSE). A marker trained with a negative weight anti-correlates with the cell type and is reported withdirection = "negative"; passTRUEto drop those rows (as well as any exactly-zero ones, sodrop_zerois then redundant) and keep only the markers overexpressed in the cell type.
Value
A data frame with the compiled weights in the universal marker
format (default) or the db format (format = "db"), consumable by
gs_prepare().