I am trying the csaw package to filter the background from my data using the "local enrichment" method. I first tested in a dataset with low input material (resulting in low library sizes) and find that the method works nicely, when I keep all regions with 2-fold enrichment over the local background. But when I tested the method on a dataset with higher input material (resulting in 10x more library sizes), I find that I have to increase the filtering threshold to 6-fold enrichment to keep the bound regions without noise.
I wanted to automate this process and that's why I am wondering what would be an appropriate way to select the filtering cutoff from the filter.stats that works for all library sizes?
I managed to use cpm instead of normal windowCounts and regionCounts to get the filter.stats. But the distribution of filter.stats is still not similar between the two kind of samples, so I won't be able to use a single cutoff for both. Any ideas?