Hi, I have some doubts. I ran an analysis more times.
The first time, I designed the matrix with 14 samples divided in 4 conditions (3 samples of condition A-2 samples of B-5 samples of C-4 samples of D).
The second time, I put in the matrix only 5 of the 14 samples (3 of condition A and 2 of B).
The third time, my matrix was composed only of four samples: the same samples of the second time, except for 1 replicate. (so it was 2 of A vs 2 of B).
I performed the differential analysis for the groups A vs B for all three matrices.
In the first case,I obtained 113 db, in the second 116 and in the third 179.
I thought that almost all 113 db should be contained in the 116, since the only thing I changed was the starting matrix composition, but it wasn't the case. In particular :
- peaks common to all 3 analyses:56
- peaks common to first and second analysis: 56
- peaks common to first and third analysis:72
- peaks common to second and third analysis:87
So why I see so different results? If I have more conditions to analyse,is it better to build different matrices for each comparison or only one?
I ran with this code, first creating a consensus dataset for each condition.
library(DiffBind) samplesdbprova<-read.csv("sheet.csv") dbObjprova <- dba(sampleSheet=sheet) dbob.consensus <- dba.peakset(dbObjprova,consensus = DBA_CONDITION, minOverlap=0.66) consensus <- dba.peakset(dbob.consensus, bRetrieve=TRUE, peaks=dbob.consensus$masks$Consensus, minOverlap=1) dbObjprova <- dba.count(dbObjprova, peaks=consensus, bUseSummarizeOverlaps=TRUE, minOverlap=2) contrastprova <- dba.contrast(dbObjprova, dbObjprova$masks$A, dbObjprova$masks$B,"A", "B") bObjprova <- dba.analyze(contrastprova, method=DBA_EDGER)