Automatically selects the best TXI implementation based on dataset size and available computational resources. Uses R implementation for smaller datasets and C++ implementation with optimal parallelization for larger datasets.
.TXI_sc_adaptive(expression, strata_values, force_method = NULL, ncores = NULL)Vector of TXI values
Matrix of expression values, dgCMatrix
Numeric vector of phylostratum values
Character, force specific method: "r", "cpp_simple", or "cpp_batched"
Integer, number of cores to use (default: parallel::detectCores())
Based on performance benchmarking: - R implementation is fastest for < 50,000 cells - C++ batched implementation becomes advantageous for >= 100,000 cells - Optimal core count scales with dataset size