RRBS analysis using methylkit with 2 variables
1
0
Entering edit mode
2.6 years ago
maria2019 ▴ 210

Hi,

I have 16 RRBS samples: 4 control-female, 4 control-male, 4 treatment female, 4 treatment-male.

I wanna analyse for DMR using methylkit.

I can easily divide them to two analysis (8 samples each) and perform one for female control vs treatment ,and male control vs treatment.

I however, want to also be able to normalize the methylation data among all samples and selected the bases that has been covered in all positions in all 16 samples, and then find the DMR for each female and male. Is that possible?

Following code will result in meth object to be used in MDR analysis. Is there a way to separate samples after I have meth? so that I can find the DMR for each male and female?


obj=methRead(location=file.list,sample.id, assembly="hg38", treatment= treatment, context="CpG")meth=unite(filtered.obj, min.per.group=1L, destrand=FALSE)

filtered.obj=filterByCoverage(obj,lo.count=10,lo.perc=NULL, hi.count=NULL,hi.perc=99.9)

normalizeCoverage(filtered.obj,method="median")

meth=unite(filtered.obj)



DMR

myDiff=calculateDiffMeth(meth,mc.cores=2)

methylkit RRBS DMR • 873 views
1
Entering edit mode

Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (text becomes text), or select a chunk of text and use the highlighted button to format it as a code block. I've done it for you this time.

2
Entering edit mode
2.6 years ago
jomo018 ▴ 650

I haven't actually tried your exact workflow however I believe you can use reorganize to select samples for downstream. The command should be inserted in your case between unite and calculateDiffMeth.

0
Entering edit mode

Thank you!!! I just checked it. I believe that is what I needed.

0
Entering edit mode

I have moved jomo018's comment to an answer. If it solved your problem, please click the green check mark to accept this answer.