Skip to contents

A small, fully synthetic dataset used in the package examples and vignette. It contains a cohort of 120 samples with eight genes carrying genuine linear age trends, plus a ridge-fit linear clock that predicts age from those genes. Two samples are planted deviators: S001 reads older than expected for its age and S002 reads younger, both driven by a shared senescence / inflammaging axis (CDKN2A, GDF15, IL6).

Usage

clockshap_example

Format

A list with three elements:

features

A 120 x 8 numeric matrix of synthetic gene expression. Rows are samples (S001-S120); columns are genes (CDKN2A, GDF15, EDA2R, IL6, LMNB1, ELN, COL1A1, FOXO3).

age

Numeric vector of length 120, chronological age in years.

clock

A linear_clock object (intercept, per-gene weights, centering and scaling) fit by ridge regression so predicted age tracks chronological age with realistic regression to the mean (slope < 1).

Details

The data are entirely synthetic and carry no real biological signal; gene symbols are used only to make the example legible. Regenerated by data-raw/make_clockshap_example.R.

Examples

ref <- fit_reference_profile(
  features = as.data.frame(clockshap_example$features),
  age      = clockshap_example$age
)
cs <- clockshap(
  features  = clockshap_example$features,
  age       = clockshap_example$age,
  clock     = clockshap_example$clock,
  reference = ref
)
cs$deviation
#>   [1]   5.49994940  -5.62065543  -0.91403369  -1.41774659  -8.21981299
#>   [6]   0.56611380  -2.66954128   7.99020312  -0.46191481   1.35074814
#>  [11]   1.43543306  -5.54087953  -0.90004772  -8.74054673  -6.91839911
#>  [16]   4.40022943  -6.76994444   1.52739335  -1.44844670   2.50389708
#>  [21]  -2.78797481   8.00360277   3.10853507   2.82987816  -4.59495264
#>  [26]  -1.77506686   1.65472709  -2.14184346   5.17283461   2.66241510
#>  [31]   0.32239711   6.75608114   1.86572244   9.37634294  -0.33506981
#>  [36]  -3.02170046  -6.06381856   2.82269978   0.83812662   4.23317033
#>  [41]   1.52890561   7.34272521  -1.43122643  -1.10077029   2.08657566
#>  [46]   4.10552598   6.32132174  -3.37728416  -7.22421118   6.32223991
#>  [51]  -0.51870528  -6.62350261  -0.65445572  -3.45507769  -9.33911083
#>  [56]  -2.73000668  -2.64716638   4.54212059   1.82504708  -8.15153414
#>  [61]  -8.64572195 -12.92112976  -1.94611267  -4.08959595  -3.52663299
#>  [66]  -7.66369654   2.64030922  -9.94615369   2.22056693   3.97092065
#>  [71]   5.15467514   2.59627783  -5.93141226  -2.92105939   6.48033698
#>  [76] -11.10073791   1.05909611  -2.23835043  -3.59423128   7.49138684
#>  [81]   8.07795560  -4.40640855   3.48220561   3.01799256   5.77744094
#>  [86]  -0.08985333   3.35278604  -4.90522567  -6.70899709   2.89880503
#>  [91]   4.91994992  -1.75190025   5.46483110  -6.17563615   0.53454133
#>  [96]   2.13206986   0.16793507  -8.73469383   8.28880704   7.23294207
#> [101]  -1.87552898  -5.25062811   6.11316785  -2.57587267   3.78379643
#> [106]  12.45570345   7.59044152   4.96426269   1.89804856  -3.03407606
#> [111] -11.28963736   6.16037424 -10.95929795  12.98228381  -7.65720568
#> [116]   2.63521357  -3.60071362   5.48136618   8.60043540   2.51406923