al2na / methylKit

R package for DNA methylation analysis
https://bioconductor.org/packages/release/bioc/html/methylKit.html
209 stars 96 forks source link

Convert normalized b/m values into methobj for calculatediffmeth #145

Closed gpwhiz closed 5 years ago

gpwhiz commented 5 years ago

Hello, I have normalized beta and M values for EPIC array, and would like to run calculatediffmeth() with covariates. I am unable to figure out how to create a methobj for the analysis. I have phenotype, values and covariates and idat files. My current data frame is generated from ChAMP. Any advice would be much appreciated

alexg9010 commented 5 years ago

Hi @gpwhiz,

Can you show me how your data.frame looks like? Would you be able to share a small subset of your data or is there example data that I can find online?

If you are reading every sample separately you could probably use the methRead function and adjust the pipeline input to your format at hand (check out the Details of the methRead function).

If your already have a data.frame with sample counts per base, i.e. rows are CpG-positions and columns are samples, we can maybe help you to import your data directly into a methylBase object.

@al2na do you have a better idea ?

Best, Alex

al2na commented 5 years ago

I would stick to tests and packages that are designed for arrays in this case. You can construct a table that looks like expected count based format so that you can read into methylKit, but why go to that trouble when there are packages designed to deal with this type of data

On Mon 11. Feb 2019 at 14:43, Alexander Gosdschan notifications@github.com wrote:

Hi @gpwhiz https://github.com/gpwhiz,

Can you show me how your data.frame looks like? Would you be able to share a small subset of your data or is there example data that I can find online?

If you are reading every sample separately you could probably use the methRead function and adjust the pipeline input to your format at hand (check out the Details of the methRead function https://www.rdocumentation.org/packages/methylKit/versions/0.99.2/topics/methRead ).

If your already have a data.frame with sample counts per base, i.e. rows are CpG-positions and columns are samples, we can maybe help you to import your data directly into a methylBase object.

@al2na https://github.com/al2na do you have a better idea ?

Best, Alex

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/al2na/methylKit/issues/145#issuecomment-462331324, or mute the thread https://github.com/notifications/unsubscribe-auth/AAm9EeEkZwOsB5Nm-Gv-hYANY_Pr66Ehks5vMXNlgaJpZM4azJYI .

-- Sent from mobile, excuse the brevity

alexg9010 commented 5 years ago

Altuna is actually right,

there are many packages on Bioconductor designed for Analysis of methylation arrays, while methylKit is designed for data stemming from bisulfite sequencing.

gpwhiz commented 5 years ago

@alexg9010 @al2na Thank you all for your responses. My goal is to use covariates for DMP, and methylkit has a really good feature, which other packages lack. Therefore, I really would like to use calculatediffmeth(). I have M values for each probe (~800,000) from Illumina EPIC for all samples[~100] as separate text files. The text files look as follows image I tried the methRead() but I don't have other columns as shown in the example text files. I need help in converting this information into methobj so I do diff.meth. I am open to suggestions.

al2na commented 5 years ago

you can use limma to test for differential methylation with covariates when you have array data https://bioconductor.org/packages/release/bioc/vignettes/missMethyl/inst/doc/missMethyl.html#testing-for-differential-methylation-using

On Mon, Feb 11, 2019 at 4:04 PM gpwhiz notifications@github.com wrote:

@alexg9010 https://github.com/alexg9010 @al2na https://github.com/al2na Thank you all for your responses. My goal is to use covariates for DMP, and methylkit has a really good feature, which other packages lack. Therefore, I really would like to use calculatediffmeth(). I have M values for each probe from Illumina EPIC for all samples. The text files look as follows [image: image] https://user-images.githubusercontent.com/38232090/52571625-8725cd00-2ddb-11e9-8184-a5c69d040105.png I tried the methRead() but I don't have other columns as shown in the example text files. I need help in converting this information into methobj so I do diff.meth. I am open to suggestions.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/al2na/methylKit/issues/145#issuecomment-462360210, or mute the thread https://github.com/notifications/unsubscribe-auth/AAm9EUTYI5ODSkZxIaEl6eqwZf0YloDzks5vMYaOgaJpZM4azJYI .

alexg9010 commented 5 years ago

added a section to vignette faq in 2159a840c98113ac1d6768bbf5e2d1f1dcf1eac3