I'm comparing two datasets using GRanges to see how many peaks are retained or leave after a certain treatment. However, when I do the code, it doesn't quite add up.
I have 2 datasets called "untreated" and "treated"
peaks_stay <- intersect(untreated, treated)
peaks_leave <- setdiff(untreated, treated)
I am not quite sure why there are more peaks identified using setdiff compared to the original. Can anyone help me with this?
Thanks in advance!