Closed MichalRozenwald closed 6 months ago
My guess here is that this is because, for a single region, the behavior used to be that the rolling average (default size 25 or something) would get zeros for places with no valid or modified bases in the pileup. This is now changed with the modkit_parsing_beta branch, with the implementation of JIRA issue DM-1 with this commit.
However, we also do not allow thresholds of zero with this version; dimelo.parse_bam.pileup
and dimelo_parse_bam.extract
will raise errors. A threshold of zero is a meaningless analysis as it will by definition be 100% everywhere where the motif is present.
When setting the
threshA
andthreshC
parameters to 0 in thedm.plot_enrichment_profile()
function from the the dimelo package using the dimilo test ctcf demo data from github in the rolling avg plots we get lines that are fluctuating (CTCF_demo_A+CG_sm_rolling_avg.pdf). The expectation was to see flat horizontal y-lines corresponding to the fractions equal to 1 instead of fluctuations as all the regions are supposed to be considered methylated when setting the thresholds to be equal to zero. What could be the reason for that?Here is the code:
And here is a Google Colab Notebook installing dimelo package and reproducing these results and figures: https://colab.research.google.com/drive/1ajMwrk98OVuT176DafGKxEuaH7U55-OV?usp=sharing