Residual contamination removal
Standard SPLIT purifies spatial transcriptomics profiles by proportionally
redistributing signal between assigned cell types. Some genes, however, are
not specific to any of the assigned cell types — they represent contamination
from cell types entirely absent from the local deconvolution model and cannot
be resolved by proportional redistribution alone.
This release introduces DO_remove_residual_contamination = TRUE in purify(),
which explicitly zeros out these non-specific genes using the reference expression
profiles. The specificity threshold is automatically derived from the reference
distribution, requiring no manual tuning. On a public Xenium breast cancer
dataset, this removes an additional ~2–5% of counts on top of standard SPLIT,
with a measurable improvement in marker gene specificity.
See the dedicated vignette for a full comparison.
Other changes
- Remove
epsilonfrom the purification formula — genes with no reference
support in the primary cell type are now explicitly zeroed rather than
receiving a small residual value, giving cleaner output across all modes. - New vignette
Residual_Contamination_Removal.Rmd. - Updated
Run_RCTD_and_SPLIT_on_Xenium.Rmdwith notes on the
annotation-method agnostic interface and py-RCTD.
Backward compatibility
All changes are fully backward compatible. DO_remove_residual_contamination
defaults to FALSE — existing purify() calls are unaffected.
Full changelog: #27