Question: DiffBind block not working for me
0
gravatar for liruiradiant
5 weeks ago by
United States
liruiradiant0 wrote:

Hello Rory,

I have the following experimental design, Rep1 and Rep2 are collected in different batches, with batch effect obvious from PCA plots:

Sample    Condition    Replicate
1              A         1
2              A         2
3              B         1
4              B         2

I used the following code to account for batch effect:

db.counts <- dba.contrast(db.counts, 
                            categories=DBA_CONDITION, 
                            block = DBA_REPLICATE, # block design
                            minMember = 2)
db.counts <- dba.analyze(db.counts)
db.results <- dba.report(db.counts, th = 1, 
                         method=db.counts$config$AnalysisMethod,
                         bCalled = TRUE)

However, when I use the altered code below, all the output csv files are the same as above.

db.counts <- dba.contrast(db.counts, 
                            categories=DBA_CONDITION, 
                           # block = DBA_REPLICATE, # block design
                            minMember = 2)
db.counts <- dba.analyze(db.counts)
db.results <- dba.report(db.counts, th = 1, 
                         method=db.counts$config$AnalysisMethod,
                         bCalled = TRUE)
write.csv(db.results, paste(metaFile, "res.csv", sep = '.'))

Did I do sth. wrong? Thanks!

Ray

diffbind • 49 views
ADD COMMENTlink modified 5 weeks ago by Rory Stark3.0k • written 5 weeks ago by liruiradiant0
Answer: DiffBind block not working for me
3
gravatar for Rory Stark
5 weeks ago by
Rory Stark3.0k
CRUK, Cambridge, UK
Rory Stark3.0k wrote:

When you add a blocking contrast, DiffBind runs two different analyses: one with and one without the blocking factor. By default, when you call dba.report(), you get the non-blocked analysis. You have to request the blocked results using the method parameter.

To retrieve the results for the blocked analysis:

db.results <- dba.report(db.counts, th = 1, 
                         method=DBA_DESEQ2_BLOCK,
                         bCalled = TRUE)
ADD COMMENTlink written 5 weeks ago by Rory Stark3.0k

Book online Packers & Movers Services at Home for best rates

ADD REPLYlink modified 5 weeks ago • written 5 weeks ago by sumitsingh50653770

Thanks Rory! I replaced method=db.counts$config$AnalysisMethod, to DBADESEQ2BLOCK and everything works well now!

ADD REPLYlink written 5 weeks ago by liruiradiant0

Thanks Rory! I replaced method=db.counts$config$AnalysisMethod, to DBADESEQ2BLOCK and everything works well now!

ADD REPLYlink written 5 weeks ago by liruiradiant0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 222 users visited in the last hour