Hi All,
I am trying to call differential peaks in pairs, each of my mutants (3 in total) from the same WT, within one single run.
I firstly created a dba object of my 4 strains in triplicates:
> samples
12 Samples, 419 sites in matrix (553 total):
ID Tissue Factor Condition Replicate Caller Intervals
1 WT-1 SC DNA WT 1 MACS 312
2 WT-2 SC DNA WT 2 MACS 343
3 WT-3 SC DNA WT 3 MACS 308
4 rif1-1 SC DNA rif1 1 MACS 418
5 rif1-2 SC DNA rif1 2 MACS 395
6 rif1-3 SC DNA rif1 3 MACS 449
7 fkh1fkh2-1 SC DNA fkh1fkh2 1 MACS 314
8 fkh1fkh2-2 SC DNA fkh1fkh2 2 MACS 392
9 fkh1fkh2-3 SC DNA fkh1fkh2 3 MACS 397
10 fkh1fkh2rif1-1 SC DNA fkh1fkh2rif1 1 MACS 439
11 fkh1fkh2rif1-2 SC DNA fkh1fkh2rif1 2 MACS 444
12 fkh1fkh2rif1-3 SC DNA fkh1fkh2rif1 3 MACS 493
and then added consensus peaksets of each of the strain:
> samples = dba.peakset(samples, consensus = DBA_CONDITION, minOverlap = 3)
Add consensus: WT
Add consensus: rif1
Add consensus: fkh1fkh2
Add consensus: fkh1fkh2rif1
> samples_consensus = dba(samples, mask = samples$masks$`Replicate.1-2-3`, minOverlap = 3)
> samples_consensus
4 Samples, 385 sites in matrix:
ID Tissue Factor Condition Replicate Caller Intervals
1 WT SC DNA WT 1-2-3 counts 385
2 rif1 SC DNA rif1 1-2-3 counts 385
3 fkh1fkh2 SC DNA fkh1fkh2 1-2-3 counts 385
4 fkh1fkh2rif1 SC DNA fkh1fkh2rif1 1-2-3 counts 385
So I got these erorrs when I tried to add contrast:
> samples_consensus = dba.contrast(samples_consensus, categories = DBA_CONDITION, minMembers = 3)
Warning message:
No contrasts added. Perhaps try more categories, or lower value for minMembers.
> samples_consensus = dba.contrast(samples_consensus, categories = DBA_CONDITION, minMembers = 1)
Error in dba.contrast(samples_consensus, categories = DBA_CONDITION, minMembers = 1) :
minMembers must be at least 2. Use of replicates strongly advised.
How do I fix the error or is there a better way to do this? Thank you!
Hi Gord,
Thank you so much for your help!
I was originally run this analysis on the "samples" object exactly like what you said. However, at the dba.analyze step, I got this error:
Error in topTags(con$edgeR$db, nrow(counts)) :
Need to run exactTest or glmLRT first
and I don't know exactly what to do with it and that is the reason why I changed the strategy. Do you have any idea how to fix this error? Thank you!
Yiwei
I haven't seen this error. Can you share (or email me directly, address on the DiffBind page) the exact script you used, and possibly your sample sheet and
dba
object (afterdba.count
)? It looks as though theEdgeR
differential analysis step failed somehow, andDiffBind
is going ahead to try to generate results. But I'll need some data to investigate more closely.