Diffbind: how to get raw read counts and normalized read counts
1
1
Entering edit mode
20 months ago
soda ▴ 50

Hi,


I want to get raw reads and normalized read count from Diffbind. This is my code:

dbObj=dba(sampleSheet = samplesheet)
dbObj=dba.count(dbObj, bUseSummarizeOverlaps=T,bRemoveDuplicates = T)
datac=dba.normalize(datac,normalize=DBA_NORM_LIB)

Then I want to get normalized read count dataframe from this. I try to read this quesion and official manuals.So I write following code:

rawread=dba.peakset(datac,bRetrieve = T,DataType = DBA_DATA_FRAME,writeFile = 'rawread.csv',peak.format ='csv' )

I get a dataframe: enter image description here

So is it right? Or how can I get raw read counts and normalized read counts?

Diffbind rawcount • 1.2k views
ADD COMMENT
2
Entering edit mode
20 months ago
Rory Stark ★ 2.1k

Yes, these are the normalized reads.

If you want to get the raw read counts, you can change the reported score and then re-retrieve the binding matrix:

normread <- dba.peakset(datac, bRetrieve = TRUE, DataType = DBA_DATA_FRAME, writeFile = 'normread.txt')
datac    <- dba.count(datac, peaks=NULL, score=DBA_SCORE_READS)
rawread  <- dba.peakset(datac, bRetrieve = TRUE, DataType = DBA_DATA_FRAME, writeFile = 'rawread.txt' )
ADD COMMENT
0
Entering edit mode

Thank you. I really appreciate it.

ADD REPLY

Login before adding your answer.

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