Error while invoking. dba.analyze() in DiffBind
1
0
Entering edit mode
4.0 years ago
PocketChange ▴ 10

Hi everyone, I'm getting errors while trying to run DiffBind - I spent hours trying to figure out what's going on to no avail, hoping some of you may help me figure out what I'm missing..

my design table:

SampleID Factor Condition Replicate    bamReads Peaks Tissue PeakCaller
A1 TF  A   1 A_day2_rep1.trim.filt.sort.bam A_day2_rep1.filt.narrowPeak.gz  Spl bed
A2 TF  A   2 A_day2_rep2.trim.filt.sort.bam A_day2_rep2.filt.narrowPeak.gz  Spl bed
A3 TF  A   3 A_day2_rep3.trim.filt.sort.bam A_day2_rep3.filt.narrowPeak.gz  Spl bed
B1 TF  B   1 B_day2.rep1.trim.filt.sort.bam B_day2_rep1.filt.narrowPeak.gz  Spl bed
B2 TF  B   2 B_day2.rep2.trim.filt.sort.bam B_day2_rep2.filt.narrowPeak.gz  Spl bed
B3 TF  B   3 B_day2.rep3.trim.filt.sort.bam B_day2_rep3.filt.narrowPeak.gz  Spl bed

then:

> set <- dba(sampleSheet = new.table)
> counts <- dba.count(set)
> res<- dba.contrast(set, set$masks$A, set$mask$B, "A", "B", minMembers=3,  categories=DBA_CONDITION)
> res<- dba.analyze(res)

And this is the error I'm getting:

Error in dimnames(x) <- dn : length of 'dimnames' [1] not equal to array extent

This is first time I'm trying DiffBind and not sure what I'm doing wrong - appreciate any help/suggestions! Thank you

ChIP-Seq software error R • 1.5k views
ADD COMMENT
1
Entering edit mode
4.0 years ago
Rory Stark ★ 2.0k

The problem is that you are passing in the original peak data set to dba.contrast() instead of the count data counts. The call should be:

res <- dba.contrast(counts, counts$masks$A, counts$mask$B, "A", "B")

Also, by explicitly specifying the A and B masks, you do not need to specify the minMembers or categories parameters (they will be ignored).

ADD COMMENT
0
Entering edit mode

Ok awesome, that's so silly I missed that. Thank you!

ADD REPLY
0
Entering edit mode

@Rory, It would be much appreciated if you could please help me with the following question: How to make complex contrasts in DiffBind dba.contrast

ADD REPLY

Login before adding your answer.

Traffic: 2708 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6