Git Product home page Git Product logo

methylclock's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

methylclock's Issues

adding clocks

Congratulations on having created a much-needed R package. I'd considered doing creating a clock package several times for studies that could not be uploaded to Steve Horvath's clock server. Although I've seen a few clocks implemented individually in a various R packages, your package is by far the most complete.

I and colleagues In Leiden have identified a few additional clocks we'd like to calculate:
DunedinPoAm38
epiTOC
Brenner https://doi.org/10.1038/ncomms14617
MiAge https://pubmed.ncbi.nlm.nih.gov/29160179/
Zhang https://github.com/qzhang314/DNAm-based-age-predictor

We would be happy to create a fork of your package and add these clocks ourselves. If you were happy with the result, you could merge our changes with your repository and make whatever changes you thought necessary.

Adding new clock

Hi,

I was wondering if it's possible to add a new clock to this package (by you or by myself):
https://github.com/qzhang314/DNAm-based-age-predictor
Corresponding paper:
https://genomemedicine.biomedcentral.com/articles/10.1186/s13073-019-0667-1

I'm specifically interested in the Elastic Net clock. Already had a look and did some tests to see if it would fit in your structure, and I believe it does. It's also ok to implement it myself and then create a pull request if that's fine with you. Maybe you guys can have a look at it and say what you think?

I'm also checking with the author to see if it's ok to have the clock implemented.

Best, Tom

Negative DNAm PhenoAge values when using Levine's clock _513 CpGs

Dear Professors of ISGlobal,

We greatly appreciate your creation of "methyclock" R package, which enables the calculation of individual DNAm PhenoAge using multiple DNAm Age clock methods simultaneously. This has solved the challenging problem I and colleagues were facing.

However, when calculating DNAm PhenoAge using Levine's clock _513 CpGs, some individuals' DNAm PhenoAge values turned out to be negative (i.e., DNAm PhenoAge < 0). It is worth noting that this issue also occurred when using your provided TestDataset on the website (https://www.bioconductor.org/packages/devel/bioc/vignettes/methylclock/inst/doc/methylclock.html#chronological-age-prediction-using-expressionset-data) (as shown in the attached figure).

This problem only appears when using Levine's clock, and I would like to inquire about how to solve it and whether these negative values would have any impact on subsequent analysis.

Thank you very much for your time and consideration. Your response would be greatly appreciated as this is crucial for our work.
We looking forward to hearing from you at your earliest time.

Best regards,
Carrie Chen
Negative DNAm PhenoAge values when using Levine's clock _513 CpGs in methyclock R package

Bug with DNAmAge when using the age argument

Hello,

When I add a vector of numeric value to the age argument, the DNAmAge function fail with the error message next:

Error in methylclock::DNAmAge(myBvals, age = AgeAtV1) : 
  cell counts cannot be estimated since
                meffilEstimateCellCountsFromBetas function is giving an error.
                Probably your data do not have any of the required CpGs for that for that
                reference panel.

What is weird is that if I remove the age argument, the function work even when I don't specify a specific clock.

Any idea of what can cause that? I'm using the latest version (on bioconductor) with R 4.3.3.

Reversed description of IEAA and EEAA in the vignette?

Hi,

If I understand correctly, the intrinsic changes in the methylome do not take into account the cell types, and it is what you've written in the function ageAcc2

mod.ieaa <- lm(y ~ age, data = df, na.action = "na.exclude")
mod.eeaa <- lm(y ~ ., data = df, na.action = "na.exclude")

So I think the descriptions of IEAA and EEAA in the vignette are reversed
- **IEAA** (Intrinsic Epigenetic Age Acceleration): Residuals obtained after regressing DNAmAge and chronological age adjusted by cell counts.
- **EEAA** (Extrinsic Epigenetic Age Acceleration): Residuals obtained after regressing DNAmAge and chronological age. This measure was also known as DNAmAge acceleration residual in the first Horvath's paper.

Best regards, Lijiao

Error in using DNAmAge

Run :
age.example1008 <- DNAmAge(MethylationData)

"MethylationData" is a data with 853103ods. od 1009 variables.

Error :
Error in preprocessCore::normalize.quantiles.use.target(X, target = coefsgs$MeansGS) :
ERROR; return code from pthread_create() is 22

I have an error like this. And I have no idea why this error occurs. PLZ help me!!!!!!!

unit of measurement for Telomere Length clock?

Hi there, saludos desde California!

Thank you so much for publishing this work, it's truly excellent.

I was excited to see your recent addition of the Telomere Length clock. May I ask, what unit it is reporting?

When I run it clock on methylation data from an Illumina EPIC, I'm getting a number between 155-167 which seems orders of magnitude away from the measurements quoted in the research paper (between 6 and 8).

June.

Wu age calculation

I appears that there is an error in calculating the Wu clock. The Wu clock was trained on age transformed as Horvath did but using toddler age = 48 months (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6914436/) instead of adult age = 20 years. However, the reverse transformation function called by DNAmAge() for the Wu clock identical to that described by Horvath:

anti.trafo <- function(x, adult.age = 20) { ifelse(x < 0, (1 + adult.age) * exp(x) - 1, (1 + adult.age) * x + adult.age) }
This results in substantial overestimation of age. For the Wu clock, I believe that adult.age = 48 should be used.

Can't run DNAmAge, since last update.

I tried to run the function DNAmAge to estimate methylation Age. This used to work well with beta matrix - an object with variables (CpGs) in the rows and the observations (patients) in the collums. I named this object "myNorm". But now this returns a error message: Run: Age <-DNAmAge(myNorm, clocks="Hannum") Return: "Error in data.frame(id =rownames(cpgs, imp), Hannum = hannum): arguments imply differng number of rows: 0,40. I though this error ocours on a internal object made by the funcition, so i searched these code in github but don't have sucess. Someone can help me?

https://drive.google.com/file/d/1_YL_T7F-ttxlEmP0yMZYVSWqIHxFIceE/view?usp=sharing
example dataframe

"Bayesian method cannot be estimated"

First of all, thanks for creating this useful package!

I'd like to flag an issue with the BNN clock. I've been unable to get any data from it. The other clocks run fine, however.

Whenever I run:
my_data <- DNAmAge(my_betas)

I get the warning message:
In DNAmAge(my_betas) : Bayesian method cannot be estimated

This only happens when I try to run my own dataset. When I use the dataset included in the tutorial, the BNN clock runs fine. Do you know what could be causing the problem?

I've also noticed that the BLUP and EN clocks mentioned in the vignette don't seem to be included in the R package?

Error while computing age acceleration

Hello,

First of all thank you for developing such a very helpful and useful package!

I am trying to run the this command using my data to estimate the age acceleration:

age.example55 <- DNAmAge(MethylationData, age=age,
cell.count=TRUE)

My command:

age_estim = DNAmAge(beta_lung, age = age, cell.count = TRUE)

where:

  • beta_lung = the beta values.
  • age = chronological age of my patients

The error I am getting:

Error in model.frame.default(formula = y ~ age, data = df, na.action = "na.exclude", :
invalid type (list) for variable 'age'

Could you please help me.

Thank you in advance.

Convert the Bisulfite Methylseq data to beta values or M-values for Methylclock analysis

I am new to Methylclock and I have a Bisulfite sequencing dataset with Methylation calls.

I am interested in performing the methylclock analysis and checking it looks that it used the models derived from 450K Methyl chip dataset using M-values and beta values.

I want to know how can I convert the Bisulfite sequencing dataset which consists of the coverage, num Cs and num Ts dataset to M-values or beta values.

Thank you.

factor bug in predAge

The predAge() function uses coefs$CpGmarker to index the methylation matrix. The indexing isn't working as expected because for some clocks coefs$CpGmarker is a factor, not a character.

Is Hannum age correct??

Hi,

I'm using methylclock to calculate various clocks, including Hannum. Besides methylclock I'm also using GrimAge which also returns a Hannum age. What caught my eye is that the Hannum ages are very different (~5 year difference). I then checked another R tool (cgageR) & the web tool from Horvath to verify both Hannum results, and these returned the exact same ages as GrimAge does. So now I'm very curious to know why your calculation of Hannum is so different.

A reproducible example:
I did a test using the "dat0BloodIllumina450K" dataset from Horvaths website (https://horvath.genetics.ucla.edu/html/dnamage/). I used this set in methylclock & their own web tool (http://dnamage.genetics.ucla.edu/home) just as reference (or cgageR for that matter). Below are the output from each analysis:

Horvath Horvath Hannum Hannum Levine Levine skinHorvath skinHorvath
SampleID Chronological Methylclock website Methylclock website Methylclock website Methylclock website
Sample1 54 56.40613057 56.40613057 67.97281509 62.38395578 63.69309142 63.69296394 57.87486951 57.87486951
Sample2 61 53.3333378 53.3333378 75.85577134 69.3625622 69.65720737 69.65707989 63.52767866 63.52767866
Sample3 51 42.88095788 42.88095788 69.06511562 63.33772736 60.01958205 60.01945457 53.41694824 53.41694824
Sample4 49 49.66514624 49.66514624 65.3893445 60.64285613 59.9686585 59.96853102 54.14267335 54.14267335
Sample5 60 59.7888936 59.7888936 74.62617747 69.5195625 61.98412288 61.9839954 65.99091495 65.99091495
Sample6 44 42.39851636 42.39851636 61.5230668 56.62311564 62.29411828 62.2939908 50.89238517 50.89238517
Sample7 44 42.59163084 42.59163084 54.95363471 48.4001517 45.75172444 45.75159696 51.46764711 51.46764711
Sample8 44 44.8255743 44.8255743 63.8710032 58.71293305 60.30713587 60.30700839 52.96796253 52.96796253
Sample9 50 52.23688708 52.23688708 72.4938971 66.45257321 62.09370501 62.09357753 58.54669773 58.54669773
Sample10 45 48.47986667 48.47986667 68.24220286 62.11073585 65.64209699 65.64196951 56.10547055 56.10547055
Sample11 44 39.64655546 39.64655546 62.75810044 57.02140051 54.52849928 54.5283718 49.9444891 49.9444891
Sample12 56 66.71139069 66.71139069 83.58793981 78.30729348 72.1303907 72.13026322 66.58504288 66.58504288
Sample13 36 43.4434294 43.4434294 60.44763689 54.49256252 46.12905568 46.45391493 48.41746685 48.41324397
Sample14 NA 47.88172647 47.88172647 60.01940224 53.82554186 55.90011527 55.89998779 52.80662669 52.80662669
Sample15 36 35.04433888 35.04433888 54.94983951 49.2669058 46.53487967 46.53475219 41.3809557 41.3809557

You can see that Horvath, Levine & Horvath2/skin are all the same, but Hannum is clearly not. Any ideas??

PS. I'm using methylclock v0.7.5 (the latest master)

Best, Tom

ageAcc3.Horvath possible issue (reporting 0 values)

Hello,

I am using DNAmAge to calculate IEAA and EEAA using beta values calculated by Sesame, where it produces a matrix of CpGs in rows (with CpG names as rownames) and columns representing samples (and colnames = sample names).

I am able to produce age estimates for ageAcc and ageAcc2 for Horvath, Hannum, and Levine, but I ageAcc3.Horvath and ageAcc3.Hannum are reporting 0's for their estimates. Furthermore, I am receiving a warning which states

Warning message:
In DNAmAge(betas_unmasked, age = age, normalize = TRUE, cell.count = TRUE,  :
  Bayesian method cannot be estimated

Is the 0 value that is reported an error due to the Bayesian method not being estimate? Do you have any suggestions as to the cause for this warning, and a possible solution to fix this? The rest of the code is attached to the bottom including session info.

Thanks,
Varun

> library(sesame)
> library(sesameData)
> betas_unmasked = openSesame(patientID,BPPARAM=BiocParallel::SnowParam(10), mask = FALSE)
> head(betas_unmasked)
> head(betas_unmasked)
                                R01C01                 R02C01               R03C01               R04C01               R05C01               R06C01
cg00000029           0.5739221           0.6108738           0.5837727           0.7546659           0.6303706           0.7441521
cg00000103           0.9381232           0.9461803           0.9391074           0.9445436           0.9424710           0.9465154
cg00000109           0.9377471           0.9262207           0.9374167           0.9437616           0.9415424           0.9497956
cg00000155           0.9539705           0.9583607           0.9562199           0.9640863           0.9614547           0.9582190
cg00000158           0.9610545           0.9678355           0.9641447           0.9642052           0.9624602           0.9632444
cg00000165           0.1964285           0.1734710           0.2841674           0.2603667           0.1592896           0.1933614
                                 R07C01                R08C01
cg00000029           0.7096819           0.7721658
cg00000103           0.9463656           0.9557872
cg00000109           0.9457374           0.9434120
cg00000155           0.9620859           0.9641823
cg00000158           0.9622377           0.9639014
cg00000165           0.1770486           0.1801381

> age.example1 <-DNAmAge(betas_unmasked, age=age,normalize = TRUE, 
+                        cell.count = TRUE)
Warning message:
In DNAmAge(betas_unmasked, age = age, normalize = TRUE, cell.count = TRUE) :
  Bayesian method cannot be estimated

> age.example1
# A tibble: 8 x 31
  id          Horvath ageAcc.Horvath ageAcc2.Horvath ageAcc3.Horvath Hannum ageAcc.Hannum ageAcc2.Hannum ageAcc3.Hannum Levine ageAcc.Levine
  <chr>         <dbl>          <dbl>           <dbl>           <dbl>  <dbl>         <dbl>          <dbl>          <dbl>  <dbl>         <dbl>
1 2043169701~    56.6          1.57           1.23                 0   46.2        -8.85          -2.22               0   34.7         -20.3
2 2043169701~    66.4         -2.57           0.0300               0   58.9       -10.1            1.92               0   49.3         -19.7
3 2043169701~    55.0          2.95           1.98                 0   51.1        -0.942          4.53               0   36.9         -15.1
4 2043169701~    60.5         -1.54          -0.408                0   49.7       -12.3           -3.00               0   41.0         -21.0
5 2043169701~    49.5          3.48           1.24                 0   46.4         0.425          3.59               0   27.9         -18.1
6 2043169701~    51.5         -0.536         -1.51                 0   45.8        -6.16          -0.689              0   33.0         -19.0
7 2043169701~    43.4          5.43           1.50                 0   38.4         0.402          0.498              0   24.4         -13.6
8 2043169701~    43.4         -1.60          -4.05                 0   37.6        -7.43          -4.64               0   17.6         -27.4
# ... with 20 more variables: ageAcc2.Levine <dbl>, ageAcc3.Levine <dbl>, BNN <lgl>, skinHorvath <dbl>, ageAcc.skinHorvath <dbl>,
#   ageAcc2.skinHorvath <dbl>, ageAcc3.skinHorvath <dbl>, PedBE <dbl>, ageAcc.PedBE <dbl>, ageAcc2.PedBE <dbl>, ageAcc3.PedBE <dbl>,
#   Wu <dbl>, ageAcc.Wu <dbl>, ageAcc2.Wu <dbl>, ageAcc3.Wu <dbl>, TL <dbl>, ageAcc.TL <dbl>, ageAcc2.TL <dbl>, ageAcc3.TL <dbl>, age <int>

Session Info is:

> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] meffil_1.1.2                                       SmartSVA_0.1.3                                    
 [3] RSpectra_0.16-0                                    isva_1.9                                          
 [5] JADE_2.0-3                                         qvalue_2.24.0                                     
 [7] gdsfmt_1.28.0                                      statmod_1.4.36                                    
 [9] DNAcopy_1.66.0                                     fastICA_1.2-2                                     
[11] lme4_1.1-27.1                                      Matrix_1.3-4                                      
[13] multcomp_1.4-17                                    TH.data_1.0-10                                    
[15] survival_3.2-11                                    mvtnorm_1.1-2                                     
[17] markdown_1.1                                       gridExtra_2.3                                     
[19] Cairo_1.5-12.2                                     knitr_1.33                                        
[21] plyr_1.8.6                                         sva_3.40.0                                        
[23] BiocParallel_1.26.1                                genefilter_1.74.0                                 
[25] mgcv_1.8-35                                        nlme_3.1-152                                      
[27] MASS_7.3-54                                        impute_1.66.0                                     
[29] methylclock_0.7.5                                  quadprog_1.5-8                                    
[31] devtools_2.4.2                                     usethis_2.0.1                                     
[33] preprocessCore_1.54.0                              DunedinPoAm45_0.1.0                               
[35] IlluminaHumanMethylationEPICmanifest_0.3.0         wateRmelon_1.36.0                                 
[37] illuminaio_0.34.0                                  IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.0
[39] ROC_1.68.0                                         lumi_2.44.0                                       
[41] methylumi_2.38.0                                   minfi_1.38.0                                      
[43] bumphunter_1.34.0                                  locfit_1.5-9.4                                    
[45] iterators_1.0.13                                   foreach_1.5.1                                     
[47] Biostrings_2.60.1                                  XVector_0.32.0                                    
[49] SummarizedExperiment_1.22.0                        MatrixGenerics_1.4.0                              
[51] FDb.InfiniumMethylation.hg19_2.2.0                 TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2           
[53] GenomicFeatures_1.44.0                             GenomicRanges_1.44.0                              
[55] GenomeInfoDb_1.28.1                                ggplot2_3.3.5                                     
[57] reshape2_1.4.4                                     scales_1.1.1                                      
[59] matrixStats_0.59.0                                 limma_3.48.1                                      
[61] org.Hs.eg.db_3.13.0                                AnnotationDbi_1.54.1                              
[63] IRanges_2.26.0                                     S4Vectors_0.30.0                                  
[65] Biobase_2.52.0                                     sesame_1.10.4                                     
[67] sesameData_1.10.0                                  rmarkdown_2.9                                     
[69] ExperimentHub_2.0.0                                AnnotationHub_3.0.1                               
[71] BiocFileCache_2.0.0                                dbplyr_2.1.1                                      
[73] BiocGenerics_0.38.0                               

loaded via a namespace (and not attached):
  [1] rappdirs_0.3.3                SparseM_1.81                  rtracklayer_1.52.0            tidyr_1.1.3                  
  [5] ggpmisc_0.4.0                 bit64_4.0.5                   DelayedArray_0.18.0           data.table_1.14.0            
  [9] KEGGREST_1.32.0               RCurl_1.98-1.3                GEOquery_2.60.0               generics_0.1.0               
 [13] snow_0.4-3                    callr_3.7.0                   RSQLite_2.2.7                 bit_4.0.4                    
 [17] tzdb_0.1.2                    xml2_1.3.2                    lubridate_1.7.10              httpuv_1.6.1                 
 [21] ggpp_0.4.1                    assertthat_0.2.1              tidyverse_1.3.1               xfun_0.24                    
 [25] hms_1.1.0                     evaluate_0.14                 promises_1.2.0.1              fansi_0.5.0                  
 [29] restfulr_0.0.13               scrime_1.3.5                  progress_1.2.2                readxl_1.3.1                 
 [33] DBI_1.1.1                     reshape_0.8.8                 purrr_0.3.4                   ellipsis_0.3.2               
 [37] dplyr_1.0.7                   ggpubr_0.4.0                  backports_1.2.1               annotate_1.70.0              
 [41] biomaRt_2.48.2                sparseMatrixStats_1.4.0       vctrs_0.3.8                   remotes_2.4.0                
 [45] quantreg_5.86                 abind_1.4-5                   cachem_1.0.5                  withr_2.4.2                  
 [49] GenomicAlignments_1.28.0      xts_0.12.1                    prettyunits_1.1.1             mclust_5.4.7                 
 [53] cluster_2.1.2                 crayon_1.4.1                  edgeR_3.34.0                  pkgconfig_2.0.3              
 [57] pkgload_1.2.1                 rlang_0.4.11                  lifecycle_1.0.0               nleqslv_3.3.2                
 [61] sandwich_3.0-1                MatrixModels_0.5-0            filelock_1.0.2                affyio_1.62.0                
 [65] modelr_0.1.8                  cellranger_1.1.0              randomForest_4.6-14           rprojroot_2.0.2              
 [69] rngtools_1.5                  base64_2.0                    carData_3.0-4                 boot_1.3-28                  
 [73] Rhdf5lib_1.14.2               zoo_1.8-9                     reprex_2.0.0                  processx_3.5.2               
 [77] png_0.1-7                     rjson_0.2.20                  bitops_1.0-7                  KernSmooth_2.23-20           
 [81] rhdf5filters_1.4.0            blob_1.2.2                    DelayedMatrixStats_1.14.0     doRNG_1.8.2                  
 [85] stringr_1.4.0                 nor1mix_1.3-0                 readr_2.0.0                   rstatix_0.7.0                
 [89] ggsignif_0.6.2                memoise_2.0.0                 magrittr_2.0.1                zlibbioc_1.38.0              
 [93] compiler_4.1.0                BiocIO_1.2.0                  RColorBrewer_1.1-2            clue_0.3-59                  
 [97] Rsamtools_2.8.0               cli_3.0.1                     affy_1.70.0                   ps_1.6.0                     
[101] PerformanceAnalytics_2.0.4    tidyselect_1.1.1              stringi_1.7.3                 forcats_0.5.1                
[105] yaml_2.2.1                    askpass_1.1                   grid_4.1.0                    tools_4.1.0                  
[109] rio_0.5.27                    rstudioapi_0.13               foreign_0.8-81                digest_0.6.27                
[113] BiocManager_1.30.16           shiny_1.6.0                   wheatmap_0.1.0                Rcpp_1.0.7                   
[117] car_3.0-11                    siggenes_1.66.0               broom_0.7.8                   BiocVersion_3.13.1           
[121] later_1.2.0                   httr_1.4.2                    colorspace_2.0-2              rvest_1.0.0                  
[125] XML_3.99-0.6                  fs_1.5.0                      splines_4.1.0                 conquer_1.0.2                
[129] multtest_2.48.0               sessioninfo_1.1.1             xtable_1.8-4                  nloptr_1.2.2.2               
[133] jsonlite_1.7.2                testthat_3.0.4                R6_2.5.0                      pillar_1.6.1                 
[137] htmltools_0.5.1.1             mime_0.11                     minqa_1.2.4                   glue_1.4.2                   
[141] fastmap_1.1.0                 interactiveDisplayBase_1.30.0 beanplot_1.2                  codetools_0.2-18             
[145] pkgbuild_1.2.0                utf8_1.2.1                    lattice_0.20-44               tibble_3.1.2                 
[149] curl_4.3.2                    zip_2.2.0                     openxlsx_4.2.4                openssl_1.4.4                
[153] desc_1.3.0                    munsell_0.5.0                 rhdf5_2.36.0                  GenomeInfoDbData_1.2.6       
[157] HDF5Array_1.20.0              haven_2.4.1                   gtable_0.3.0

Horvath2 - a typo and naming consistency

Hi there,

I very much appreciate this library and have been using it across the last month or two.

A couple of things of note,

In file DNAmage.R, L253, please correct a typo:

change     skinHorvath <- ageAcc2(skinHorvath, df, lab = "Hovarth2")
to         skinHorvath <- ageAcc2(skinHorvath, df, lab = "Horvath2")

Also, consider consistent naming for this clock, either skinHorvath or Hovarth2. It's easier to build loops on returned data with consistent naming.

Error in method "full_join"

Hi,

I'm getting an error when using:

methylclock <- DNAmAge(
  x = beta1,
  age = age2,
  clocks = "Hannum",
  fastImp = TRUE
)

Which produces this error:

Error in UseMethod("full_join") : 
  no applicable method for 'full_join' applied to an object of class "NULL"

Everything is ok when doing:

methylclock <- DNAmAge(
  x = beta1,
  age = age2,
  clocks = c("Horvath","Hannum"),
  fastImp = TRUE
)

When Horvath isn't used, the "out" object will still be NULL when it's joined by another output:

out <- NULL
  if (1 %in% method) {
    out <- Horvath
  }
  if (2 %in% method) {
    out <- out %>% full_join(Hannum, by = "id")
  }

Best regards, Tom

Underestimated DNAmAge for skinHorvath and Hannum Clocks

Hi,
I got unexpected results for skinHorvath and Hannum clocks. Every patient in my data has estimated DNAm age that is lower than their chronological age (Though correlation between DNAmAge and chronAge is high ( R>0.85)). For other clocks such as Horvath and Levin, some patients have lower and some higher DNAm age compared to their chronological age (as one would expect). Do you know if there is something unique about the models used for skinHorvath and Hannum that may explain these underestimates? I used "methylclock version 1.6.0". Thank you!

Error adjusting for cell counts in DNAmAge()

Hello,

I have encountered an error while attempting to use DNAmAge() to obtain DNAmAge, AgeAcDiff, IEAA, and EEAA from a methylation dataset.

I'm running the code below:

DNAmAge(Beta,
                         clocks=c("Horvath"),
                         toBetas=FALSE,
                         cell.count=TRUE,
                         cell.count.reference = "blood gse167998",
                         age=60,
                         min.perc=0.25)

The error I receive is:

Error in DNAmAge(Beta, clocks = c("Horvath"), toBetas = FALSE, cell.count = TRUE,  : 
  cell counts cannot be estimated since
                meffilEstimateCellCountsFromBetas function is giving an error.
                Probably your data do not have any of the required CpGs for that
                reference panel.
In addition: Warning message:
In knnimp(x, k, maxmiss = rowmax, maxp = maxp) :
  40589 rows with more than 50 % entries missing;
 mean imputation used for these rows

The error appears to indicate that I do not have the appropriate CpGs for "blood gse167998."

However, I know that my beta matrix contains the CpGs in Salas et al. 2022 because I used the FlowSorted.BloodExtended.EPIC dataset to perform leukocyte deconvolution on this dataset.

This also happens when I try to use other reference sets, e.g., Salas' "blood idoloptimized epic."

I took a look at the meffilEstimateCellCountsFromBetas function within DNAmAge() using trace("DNAmAge", edit=T). I thought maybe this error was thrown because meffilEstimateCellCountsFromBetas() is now meffil.estimate.cell.counts.from.betas().

I updated the name of the meffil function in DNAmAge(). Unfortunately, the same error occurred.

Will you please assist me in figuring out why this is happening?

Also, am I able to provide my own cell type estimates?

Thank you very much!

Courtney

cell.count.reference argument?

Hello,

I am currently trying to to make cell estimates with EPIC data.

I can't seem to find any cell.count.reference argument. There are other arguments in the meffil package for this but not cell.count.reference.

Is it possible to detail the use of this argument in the supplementary material as well?

Thanks.

Cannot load methylclock in R version 4.2

Thank you for creating this very useful package. I can load and use methylcock (version 1.0.1) in R 4-1.3 (Bioconductor version 3.14). However, when I upgrade to R-4.2 (with Bioconductor version 3.15) and install methylcock (version 1.2.0) , It cannot be loaded. The error massage say:
Error: package ‘methylclockData’ required by ‘methylclock’ could not be found

and in the installation process, there were warning massages:
Warning messages:
1: In install.packages(...) :
installation of package ‘openssl’ had non-zero exit status
2: In install.packages(...) :
installation of package ‘GenomeInfoDbData’ had non-zero exit status
3: In install.packages(...) :
installation of package ‘roxygen2’ had non-zero exit status
4: In install.packages(...) :
installation of package ‘methylclockData’ had non-zero exit status

Is there a way to solve this issue?

Error when run DNAmAge

I have EPIC methylation with 679491 CpGs and 1073 samples, it ran DNAmGA successfully. But it failed to run DNAmAge, I used fastImp=TRUE . I set clocks =“ Hannum” or “Horvath”. It showed Error in apply(cpgs [, cpgs.in],2, median,na.rm=TRUE): object ‘cpgs.in’ not found
Calls: DNAmAge ->cpgs_imputation—>apply
Execution halted.
If I use fastImp=FALSE, job killed after reaching LSF memory limit . I ran the job on cluster .

Do you have suggestion?

thank you’

Running DNAmAge method call with age parameter fails

It seems that the package expects that the age is variable which is included in the parent environment.

When you call the method DNAmAge from within your own R environment and you specify age as a environment variable the methods works.

However if you specify age in the method call like here DNAmAge(age = age, ....) it fails.

This error occurs: Error in eval(predvars, data, env) : object 'age' not found

Error: segfault from C stack overflow

Hi,

I'm getting a stack overflow error when using a big dataframe as input:

> dim(beta)
[1] 442644    951

And running this with:

methylclock1 <- DNAmAge(
  x = beta,
  age = age1,
  fastImp = TRUE
)

It gives me back this error (traceback() doesn't give any extra details):

Error: segfault from C stack overflow

Maybe a recursion problem in one of your C scripts? Using only Horvath didn't produce an error for this dataset, but when using all clocks it returned this stack overflow message. I couldn't try other clocks independently due to my other issue (#8). I've checked my memory usage, but that wasn't the problem. Any idea what could be the problem?
Best regards, Tom

IEAA and EEAA descriptions

I believe the descriptions of IEAA and EEAA on the Bioconductor vignette are incorrect (https://www.bioconductor.org/packages/release/bioc/vignettes/methylclock/inst/doc/methylclock.html#chronological-and-biological-dnam-age-estimation).

The current descriptions are:
IEAA (Intrinsic Epigenetic Age Acceleration): Residuals obtained after regressing DNAmAge and chronological age.
EEAA (Extrinsic Epigenetic Age Acceleration): Residuals obtained after regressing DNAmAge and chronological age adjusted by cell counts. This measure was also known as DNAmAge acceleration residual in the first Horvath’s paper.

I believe the correct descriptions should be:
IEAA: Residuals obtained after regressing DNAmAge and chronological age adjusted by cell counts.
EEAA: Residuals obtained after regressing DNAmAge and chronological age. This measure was also known as DNAmAge acceleration residual in the first Horvath's paper.

EPIC array v2

Hello,

Can this package be used with the latest EPIC Array (v2).

Thank you in advance for your answer.

How to use MthylClock using Bed9+ file from WGBS as input

Hello,

I have Bed9+ files for WGBS and I wanted to estimate their ages. In the Bed9+ files, I have the beta values (in percentages) and the genome position rather than the CpG ID. Is there a way I could use this Bed9+ file directly, or use a tool/R Function to transform it to an accepted input format?

Thank you in advance!

Issue with normalization

Thank you for developing this useful package! I am having trouble implementing the DNAmAge function with normalization = TRUE. Running DNAmAge with or without normalization has similar run time and produces identical estimates, so it doesn't appear that the data are being normalized. When looking at the code for DNAmAge, I don't see when the normalization argument is used in DNAmAge or predAge.

Thanks for your help!

checkClocksGA() returns missing_CpGs for Cpgs_in_clock (Bohlin)

Hi,

The function checkClocksGA() returns a table containing the information on the number of CpGs present in the individual clocks and the number of missing CpGs from your datasets. For the Bohlin clock, the number of missing CpGs is displayed column Cpgs_in_clock, where it should state 96 (actual number of CpGs in clock) therefore the missing percentage is always at 100.
Is it possible to fix this that it is correctly displayed?

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.