I have a couple questions regarding the dba.plotPCA function in diffbind. The relevant figures are here: https://www.dropbox.com/sh/co3oywz8r745m8o/AACouCCG1q9UEyASR5igqXX9a?dl=0
I've been following the DiffBind vignette, using a dba.count object as input to dba.plotPCA. The resulting figure (see PCA_plot_diffbind.pdf) looks about right, but the variance explained in PC1 seems extremely high. When I extracted the binding count matrix using dba.peakset(db_counts, bRetrieve=TRUE), and tried to reproduce the PCA plot myself by running prcomp on the log2-transformed count matrix, I got a much lower variance explained for PC1 (PCA_plot_prcomp.pdf).
Furthermore, when I ran prcomp on the transposed count matrix, I got the same variance explained values for PC1 and PC2 that DiffBind produced (PCA_plot_prcomp_TRANSPOSED.pdf). I've done this for several different count matrices with the same results.
In addition, the PCA plot from prcomp looks different from the DiffBind plot. Do you have any idea what I'm doing wrong here, and how I can reproduce the DiffBind PCA plot?
As always thanks for this package and for all your help!