guoweilong / cgmaptools

toolbox for analysing BS-seq data, advance features in SNV, ASM and DMR
https://cgmaptools.github.io
61 stars 26 forks source link

Some questions about cgmaptools mfg and mtr #64

Open TuoCai2000 opened 1 year ago

TuoCai2000 commented 1 year ago

Hi, thank you for developing cgmaptools! I would like to calculate the methylation level of specific genomic regions like cgi / genebody. Then I tried two ways to calculate it but i got different results. First,I used cgmaptools-bed2fragreg to split the bed files into 1 region(-n 1),then I used the output file as the input of the cgmaptools-mfg command ,then I get the mfg files,the "total_ave_mC" is the methylation level of the specific genomic region. The second way to calculate is the cgmaptools-mtr, I just need to prepare the genomic bed files and then I need to calculate the mean value of the column"read(C)/#read(T+C)" of the output file. However,I get different results.I wonder what's the difference between mfg(freg -n 1) and mtr? which is the correct way to calculate? Thank you so much!

guoweilong commented 9 months ago

To calculate mC level for one region, the second way is suggested "ccgmaptools mtr".

The first way "cgaptools bed2fragreg" is to draw figure like Figure 7.4 in https://cgmaptools.github.io/cgmaptools_documentation/graphics.html#fragreg , which need to be feeded with a group of regions.

Best, Weilong