Search
Question: Structure of DiffBind dba.count matrix equivalent to DESeqDataSetFromMatrix input?
0
11 months ago by
rbronste60
rbronste60 wrote:

Wondering if the basic matrix output from dba.count in DiffBind would be an appropriate input matrix into DESeq2 (via DESeqDataSetFromMatrix) or if has to be modified in some other fashion? I want to run DESeq2 interactions on this interval read count matrix generated by DiffBind. Thank you.

modified 11 months ago by Rory Stark2.6k • written 11 months ago by rbronste60
1
11 months ago by
Rory Stark2.6k
CRUK, Cambridge, UK
Rory Stark2.6k wrote:

Yes this can be used to create a DESeqDataSet object. You have to pay attention to the score, which should be DBA_SCORE_READS (or, more controversially, DBA_SCORE_READ_MINUS). You can change an existing score without recounting by calling dba.count() with peaks=NULL, then retrieve the counts using dba.peakset():

> myDBA <- dba.count(myDBA, peaks=NULL, score=DBA_SCORE_COUNTS)
> rangedCounts <- dba.peakset(myDBA, bRetrieve=TRUE)

If you want the counts by themselves (without the site interval ranges) in a matrix (for use in DESeqDataSetFromMatrix) :

> counts <- as.matrix(mcols(rangedCounts))

Thanks for the info Rory! Thats pretty much what I have been doing. Is there a good way on the back end, once I do whatever interaction analysis with DESeq2, to quickly interrogate specific intervals (differential/interacting ones I find interesting) when the site interval ranges are removed from the matrix I am inputting into DESeqDataSet?

I guess with genes and transcripts its easier since you have the identifier/name. I guess they still have the first numbered column of the matrix.