Closed leon945945 closed 3 months ago
HI @leon945945 ,
regionCounts
will drop regions not overlapping with any site from your methylBase object.
You could try to figure out which regions are not kept by converting the summarized methylBase to GRanges and comparing it to your original GRanges with setdiff
.
Best, Alex
Thank you for your reply.
I have another question about calculating methylation precentage of one region.
Let's say there is a 100bp region, each nucleotide has coverage 4, the region has 10 Cytosine sites, and 3 of which have 3,2,4 reads were methylated respectively. Then the methylation percentage is sum(3,2,4)/(4*10) or sum(3,2,4)/(4*3) ? Or other calculation methods?
Hope for your reply.
You can actually check the code. It will be the first calculation, taking the sum of all methylated reads divided by all reads for that region.
Best, Alex
Thanks, the code is clear.
Hi, I took use of
regioncounts
to calculate methylation degree at some regions:but after
regioncounts
some regions were lost:As you can see, the first, second and fourth region were lost in methylBase object. I want to know what is the probable reason, and can the lost regions be restored? Thanks very much.