Hi, I am doing the differential peaks analysis using DiffBind. My sample has two replicates. And my code is the following:
samples <- read.csv("H101.csv")
dbObj <- dba(sampleSheet=samples)
H101C_H1 H3K27ac Responsive Full-media 1 bed
H101C_H2 H3K27ac Responsive Full-media 2 bed
H101RP_H1 H3K27ac Resistant Full-media 1 bed
H101RP_H2 H3K27ac Resistant Full-media 2 bed
dbObj
4 Samples, 10143 sites in matrix:
ID Factor Condition Treatment Replicate Intervals
1 H101C_H1 H3K27ac Responsive Full-media 1 5348
2 H101C_H2 H3K27ac Responsive Full-media 2 5348
3 H101RP_H1 H3K27ac Resistant Full-media 1 4808
4 H101RP_H2 H3K27ac Resistant Full-media 2 4808
dbObj <- dba.blacklist(dbObj, blacklist=DBA_BLACKLIST_HG38)
Genome detected: Hsapiens.UCSC.hg38
Applying blacklist...
Removed: 120 of 20312 intervals.
Counting control reads for greylist...
Building greylist: reads/H101C_Input_chr1_sorted.bam
coverage: 2437116 bp (0.98%)
Building greylist: reads/H101RP_Input_chr1_sorted.bam
coverage: 5649399 bp (2.27%)
H101RP_C: 1003 ranges, 5649399 bases
Master greylist: 1013 ranges, 5724151 bases
Removed: 4054 of 20192 intervals.
Removed: 2084 merged (of 10143) and 2084 (of 10143) consensus.
dbObj <- dba.count(dbObj, bUseSummarizeOverlaps=TRUE)
Computing summits...
Re-centering peaks...
dbObj <- dba.contrast(dbObj, reorderMeta=list(Condition="Responsive"))
Warning message:
No contrasts added. There must be at least two sample groups with at least three replicates.
I also tried the following code and got the same warning message.
dbObj <- dba.contrast(dbObj, categories=DBA_TISSUE, minMembers = 2)
Besides, as some people suggested before, I also tried to do dba.blacklist first before dba.count. But it still didn't work. Then I also extracted all the reads and peaks only from Chr 1, it still didn't work.
Further, I copied all the files and codes to another computer and tried again. Then I got some other random error messages...
The only things worked were those demo files from this package...
Can anyone help me to figure it out? Thank you.