perishky / meffil

Efficient algorithms for analyzing DNA methylation data.
Artistic License 2.0
53 stars 28 forks source link

Cell composition #34

Closed SofyaMa closed 2 years ago

SofyaMa commented 3 years ago

First of all, thank you for this handy tool.

I have one understanding issue : when I correct my data using meffil.qc(). i do cell.type.reference="blood gse35069", as I have whole blood samples. When later in the pipeline, I would perform an EWAS, do I have to set cell.counts = 0 (as we already normalized) or how do I provide the cell conuts, in case it is needed?

Thank you in advance?

perishky commented 3 years ago

Glad you are finding it useful. In meffil.qc(), the cell counts are estimated for quality control purposes, but they are not used to normalize the data. Therefore, if cell counts are a potential confounder, then you do need to include them in your EWAS. However, you should include the cell count estimates in the 'covariates' argument and leave the 'cell.counts' argument NULL (the default). The 'cell.counts' argument is only valid for the case where your tissue is composed of only 2 cell types. The 'covariates' argument is expected to be a data frame/matrix. To get the cell counts you created using meffil.qc() in this format, you can use meffil.cell.count.estimates(qc.objects). Hopefully that's clear! Let me know if not.