Raw Count Matrix from DiffBind
1
0
Entering edit mode
@barbaramariotti-8083
Last seen 18 months ago
Italy

Hi,

I know that those are very stupid question but is there a way to obtain an "exportable" data frame (something like a txt file) containing the raw count for each peak in each sample obtained with dba.count without performing all the differential analysis? Is there the possibility to obtained data frame containing the consensus peak set generated in my analysis?

 

Thank you so much

Barbara

 

diffbind • 3.9k views
ADD COMMENT
2
Entering edit mode
Rory Stark ★ 5.1k
@rory-stark-5741
Last seen 6 days ago
Cambridge, UK

Hi Barbara-

Yes, you can do this using the dba.peakset() function with the parameter bRetrieve=TRUE.

For example, if you have a DBA object called myDBA:

> myDBA <- dba.count(myDBA)
> counts <- dba.peakset(myDBA, bRetrieve=TRUE)

This will return a GRanges object with the count scores. The default count score is TMM normalised using the edgeR package. If you want raw read counts, you can change the score first:

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

If you would prefer a data frame to a GRanges object:

> counts <- dba.peakset(myDBA, bRetrieve=TRUE, DataType=DBA_DATA_FRAME)

And if you want to write out the counts to a text file:

> counts <- dba.peakset(myDBA, bRetrieve=TRUE, writeFile="readscores.txt")

Cheers-

Rory

ADD COMMENT

Login before adding your answer.

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