Estimate Residual Spillover From a Known-Negative Mask
Source:R/estimate_residual_spillover.R
estimate.residual.spillover.RdThin, in-memory wrapper over the batched pair estimator, for callers that already know which events are target-negative and do not need the estimator to infer it.
Usage
estimate.residual.spillover(
unmixed,
source,
targets,
negative.mask,
threshold.source,
threshold.target = NULL,
spread.var = NULL,
neg.var = NULL,
...
)Arguments
- unmixed
Numeric matrix, cells x fluorophores, already-unmixed abundances. Must contain a column named
sourceand one column per entry oftargets.- source
Character scalar, the name of the source fluorophore's column in
unmixed.- targets
Character vector, the names of the target fluorophores' columns in
unmixedto estimate residual spillover into.- negative.mask
Logical vector, length
nrow(unmixed),TRUEfor events already known to be target-negative. Used directly in place of the batched estimator's own negative-event inference.- threshold.source
Numeric scalar or vector of length
nrow(unmixed), the source fluorophore's own per-event positivity boundary.- threshold.target
Optional numeric matrix, cells x fluorophores, containing at least the columns in
targets, giving each target's own per-event positivity boundary. WhenNULL, every event is treated as below threshold beforenegative.maskis applied.- spread.var
Optional numeric vector, length
length(targets), the source's contribution to each target's spillover-spread variance. Defaults to zero for every target whenNULL.- neg.var
Optional numeric vector, length
length(targets), each target's negative-population variance. WhenNULL, computed asstats::mad()^2on each target's column ofunmixed.- ...
Additional arguments passed through to
.fix.envelope.slope.batch().