Diffbind error: Not enough y observations

Hello. I am trying to identified the regions that are differently enriched (H3K4me3) between 2 groups using Diffbind, but keep getting following error. I’d appreciate any help!

Error in wilcox.test.default(toplot[[i]], toplot[[j]], paired = FALSE) :
not enough ‘y’ observations
Calls: dba.plotBox … pv.plotBoxplot → pvalMethod → wilcox.test.default
Warning messages:
1: Unable to perform PCA. Make sure there aren’t fewer sites than there are samples.
2: In bxp(list(stats = c(4.28039961112653, 4.28039961112653, 5.75150066843621, :
some notches went outside hinges (‘box’): maybe set notch=FALSE

Dear @shill,
It seems to me that (a) diffbind could not find enough differentially enriched binding sites or (b) you do not have enough replicates (datasets). Maybe set the FDR threshold a bit higher, e.g., to 0.1. I could also recommend to use MACS2 instead of diffbind for ChIP-Seq data.

Have a good day and best wishes,
Florian

Thank you so much for the reply! I tried Diffbind with higher thresholds but ended up with the same error. Which MACS2 tool would you use to compare 2 groups, 4 samples in the each group?

Yes. However, be careful about the pooling option in macs2 (see this post). MACS2 pooling is just combining the replicates into one entity and not taking the difference of the replicates into account. So it is better to perform a robust peak analysis as described in the post.

Cheers,
Florian