oCELLoc: Automated Cell Type Assignment in Transcriptomics Data Using Reference Filtering
Interpreting single-cell RNA sequencing (scRNA-seq) and spatial transcriptomics (ST) data requires accurate cell-type prediction, which strongly depends on the quality of the reference used. However, prediction accuracy is highly dependent on reference quality; missing relevant cell types or including irrelevant ones can substantially impair performance. To address this challenge, we developed oCELLoc, a regression-based method that selects the most appropriate reference cell types from a large atlas and tailors them to each new sample. oCELLoc takes pseudobulk gene expression from ST or scRNA-seq data together with a broad reference matrix and uses regularized regression with cross-validation to identify a limited number of essential cell types. We applied oCELLoc to toy datasets, scRNA-seq data, and 2,144 Visium samples across diverse tissues and conditions, demonstrating that using the filtered cell types leads to more biologically meaningful downstream predictions. oCELLoc is available as an R package on GitHub and CRAN.