DiffBind matrix of values
1
0
Entering edit mode
igor ▴ 50
@igor
Last seen 17 months ago
United States

I am using DiffBind and trying to export the matrix of values for all peaks. If I use dba.report() with bcounts=TRUE, I get those values, but it's only for the two groups being compared. What if you have more than two groups?

I tried dba.peakset() with bRetrieve=TRUE. That seems to return what I want, but the actual values are different than the ones from dba.report(). I assume they are just normalized differently, but how can I normalize them the same way?

diffbind • 1.6k views
ADD COMMENT
1
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 28 days ago
Cambridge, UK

You can change the read score values using the score parameter in dba.count(). If you set peaks=NULL, the score will be recalculated without requiring the read to be re-counted. See the man page for dba.count() for all the possible score values.

Here are some examples:

# Raw read counts
> mDBA <- dba.count(myDBA, peaks=NULL, score=DBA_SCORE_READS)
> allReads <- dba.peakset(myDBA, bRetrieve=TRUE)

# RPKM values
> mDBA <- dba.count(myDBA, peaks=NULL, score=DBA_SCORE_RPKM)
> allRPKM <- dba.peakset(myDBA, bRetrieve=TRUE)

# TMM-normalized read count (via edgeR), 
# using read-in-peaks adjusted to be counts-per-million
> mDBA <- dba.count(myDBA, peaks=NULL, 
                    score=DBA_SCORE_TMM_READS_EFFECTIVE_CPM)
> allRPKM <- dba.peakset(myDBA, bRetrieve=TRUE)

You may not be able to get the exact score values returned by dba.report() for a specific contrast, as those scores are normalized based on the specific analysis method (eg right now you can't get DESeq2 normalized score values using dba.count()) as well as the specific subset of samples involved in the contrast.

-Rory

ADD COMMENT
0
Entering edit mode

I am using DESeq2-based analysis, so thanks for clarifying that part. I guess DBA_SCORE_RPKM should be close enough (or as close as possible) for something like plotting.

Is there a chance DESeq2 normalization becomes an option at some point? If you are just using plain DESeq2, they provide an option to extract normalized counts before doing any comparisons, so it's not an entirely unreasonable assumption.

ADD REPLY

Login before adding your answer.

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