DiffBind paired samples
2
0
Entering edit mode
igor ▴ 40
@igor
Last seen 10 months ago
United States

When you run dba.contrast and dba.analyze in DiffBind, it divides the samples into all the possible groups and compares the various groups. If you have paired samples (for example, before and after treatment), is there a way to indicate that so that the analysis takes that into account (rather than simply doing all "before" versus all "after")?

diffbind • 1.8k views
ADD COMMENT
1
Entering edit mode
Gord Brown ▴ 650
@gord-brown-5664
Last seen 3.3 years ago
United Kingdom

Hi,

The block parameter of dba.contrast allows the sort of paired comparison you want.  See section 5 of the vignette for details.

ADD COMMENT
0
Entering edit mode

I looked at the block parameter. That seems appropriate, but it's fairly flexible. I wasn't sure if there is some other option that specifically assumes paired analysis.

ADD REPLY
1
Entering edit mode

To the best of my knowledge, block is the only parameter for this purpose.  The EdgeR user manual gives a bit more detail about how to use it.

ADD REPLY
1
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 15 days ago
Cambridge, UK

The block parameter is set up to handle paired samples.  So for example if the CONDITION is before or after, and each pair of samples share the same REPLICATE or TISSUE id, you can try:

 

myDBA <- dba.contrast(myDBA, group1=myDBA$masks$before, group2=myDBA$masks$after, name1="before",name2="after", block=DBA_REPLICATE)

myDBA <- dba.analyze(myDBA)

myReport <- dba.report(myDBA, method=DBA_EDGER_BLOCK)

 

 
ADD COMMENT
0
Entering edit mode

Quick followup. This is your example:

dba.contrast(myDBA, group1=myDBA$masks$before, group2=myDBA$masks$after, name1="before",name2="after", block=DBA_REPLICATE)

Since we only have 2 conditions here, I would do this:

dba.contrast(myDBA, categories=DBA_CONDITION, block=DBA_REPLICATE)

Since you used the less concise approach, are the two actually different? Or was it to make the answer more clear?

ADD REPLY
0
Entering edit mode

You are correct, I made it very explicit in case you had other conditions, these are the same.

Actually I tend to add each contrast explicitly so I can see the contrasts in my analysis script instead of relying on DiffBind's automatic feature.

-Rory

ADD REPLY

Login before adding your answer.

Traffic: 981 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