Hi! I was wondering if there is a way to provide DiffBind with previously defined sizeFactors? I am using a calibrated ChIP-seq approach and can calculate normalisation factors (with DESeq2, for instance) using reads mapping to my reference genome and I would like to use these normalisation factors as sizeFactors when I perform differential analysis on my experimental genome.
There is no easy way to do this from within DiffBind. While there are some tweaks that can be done to modify the library size used in the calculation, I think you want more fine-grained control than that. This is a good example of a case where you'll want to be using the underlying analysis package (DESeq2 or edgeR) explicitly. You can use DiffBind to calculate consensus peaks and do centering/counting, and export this to the differential analysis package using dba.peakset() with bRetrieve=TRUE. You'll want to set the read score appropriately, e.g. to DBA_SCORE_READS.
We are looking at possibly adding a set of features to enable more explicit control of normalization in a future release.
The latest release of DiffBind includes a new interface function, dba.normalize(), that allows for much more flexible normalization. The updated vignette includes a detailed exploration of the impact of different normalization schemes.
Thank you very much, it was very helpful!