Use a trained TorchDecon model or ensemble to predict cell type fractions from bulk RNA-seq data.
Arguments
- model
A trained TorchDeconModel or TorchDeconEnsemble object.
- data
Matrix, data frame, or file path to bulk RNA-seq data (genes x samples). Can also be a TorchDeconProcessed object.
- scaling
Character. Scaling method to apply. Default is "log_min_max". Set to NULL to skip scaling (if data is already processed).
- return_all
Logical. For ensemble, return predictions from all models in addition to the average. Default is FALSE.
- verbose
Logical. Print progress messages. Default is TRUE.
Value
A data frame of predicted cell type fractions with samples as rows and cell types as columns. If return_all = TRUE for ensemble, returns a list with 'average' and individual model predictions.