Question of DiffBind for ChIP-Seq analysis
1
0
Entering edit mode
mengm5 • 0
@mengm5-16796
Last seen 5.6 years ago

Hi,

I have several samples divided into 5 conditions, such as A, B, C, D, E. All samples are from different tissues, no replicate. I want to differentiate them according to 5 conditions by DiffBind package, and display result on heatmap. So I did as follows:

>ALL <- dba(sampleSheet="mysamples.csv")

>ALL_count <- dba.count(ALL, summits=250)

>ALL_contrast <- dba.contrast(ALL_count, categories=DBA_CONDITION)

>ALL_analyze <- dba.analyze(ALL_contrast)

>plot(ALL_analyze)

But the heatmap do not show as the same as I expected, for example, a sample of A should belong to A, but it is mixed with sample of B on the heatmap.

Under the premise of not deleting the sample as much as possible, I want to ask how could I set up parameters to clearly differentiate samples by conditions? Or which parameter I could use for accomplishing my expectation?

Thanks for answering!

Best,

Meng

 

diffbind • 591 views
ADD COMMENT
1
Entering edit mode
Rory Stark ★ 5.1k
@rory-stark-5741
Last seen 9 weeks ago
Cambridge, UK

As you are not specifying a contrast when calling the plot() function (really dba.plotHeatmap()), it is always plotting using the global binding matrix. In order to get plots based on the differentially bound sites, you need to add contrast=n to the call, where n is the number of the comparison. You can see the contrast numbers by printing out the DBA object ALL_analyze. Programmatically, you can get the contrast numbers by calling:

> contrasts <- dba.show(ALL_analyze, bContrasts=TRUE)

It is worth noting that even after running a differential analysis, and plotting only the differentially bound sites, you may see some samples clustering in ways other than you would expect. It can be useful to use PCA plots (dba.plotPCA()) to get more insight into how the samples are clustering, or to lower the FDR threshold to include only the differential sights with the highest confidence.

 

ADD COMMENT
0
Entering edit mode

Thank you Mr. Stark!

As you said, I used "contrast = n " to compare my samples, thanks to your detailed manual. It's really helpful.

And I still wanted to plot a well-clustered heat map using the global binding matrix, so I tried "score=DBA_SCORE_READS" in dba.plotHeatmap, which displayed different results.

The samples were suddenly clustered well.

I checked the manual, but I could not fully understand it.

Thanks again!

Meng

ADD REPLY
0
Entering edit mode

The default is to use normalized counts. DBA_SCORE_READS uses non-normalized counts.

ADD REPLY

Login before adding your answer.

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