Applies clocks to the preprocessed representations returned by
tAge_preprocessing and returns the sample metadata with one
prediction column per clock.
Arguments
- tAge_eset
A named list of ExpressionSet objects, each representing a different normalization method (e.g., "scaled", "scaled_diff", "yugene", "yugene_diff"), as returned by
tAge_preprocessing.- model_paths
A clock table with a
pathcolumn, or a named list of model paths per representation; see Details.- species
Species of the samples:
"mouse","rat","human"or"monkey"(seetage_species). Its only effect is the rescaling of chronological-age clocks to age units by the species maximum lifespan; mortality and normalized-age clocks ignore it. It is not the species group the model was trained on ("Mouse" / "Rodents" / "Multispecies" inlist_clocks). DefaultNULLtakes the species recorded bytAge_preprocessing.- mode
"EN"or"BR". DefaultNULLtakes each model's type from the clock table, the registry or its file name.- return_std
Logical. Whether to keep the per-sample predictive standard deviation of Bayesian Ridge clocks. Default
NULLkeeps it for every Bayesian ridge clock, as a<column>_sdcolumn. Pass these to these_columnsargument oftage_compare_groupsfor the Bayesian ridge statistics.- age_units
Units of chronological-age predictions:
"auto"(default; months for rodents, years for primates),"months"or"years".- normalized_age
Scale of normalized-age clocks:
"fraction"of the expected maximum lifespan (default) or"percent"(x100, as in the paper).
Value
A data frame containing the predicted transcriptomic age results for all
provided ExpressionSet objects, with appropriately named columns. The
attribute "tage_units" is a named character vector giving the unit of
every prediction column (e.g. "months", "log10 hazard ratio").
Details
model_paths is either
a clock table from
list_clocksorlist_module_clockswith apathcolumn (e.g. fromdownload_clocks): each row is applied to the representation itsscalingnames (Scaled->scaled_diff,YuGene->yugene_diff), and the column is named after the model file, as in the Python package; ora named list, representation -> model path(s). With one path per representation the column is
<representation>_<mode>_tAge; with several, each column is named after its model file.
Examples
if (FALSE) { # \dontrun{
clocks <- download_clocks(list_clocks(type = "EN", species = "Rodents",
tissue = "Multi-Tissue"))
res <- predict_tAge(tAge_eset, clocks) # six columns, named by model file
attr(res, "tage_units")
} # }