Skip to content

Error adjusting for cell counts in DNAmAge() #28

Description

@cewim

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions