This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extract RPKM values from Diffbind

Hi everyone, does anyone know if there is a way to extrapolate rpkm values from Diffbind?? Thanks Francesca

chip-seq diffbind rpkm

2 answers

You can set the read score to DBA_SCORE_RPKM in dba.count(). You can do this when you originally count, or anytime after by calling

DBA <-  dba.count(DBA,peaks=NULL,score=DBA_SCORE_RPKM)

Then you can retrievethe RPKM values in a GRanges object (or data.frame):

rpkm <- dba.peakset(DBA, bRetrieve=TRUE)

Thank you Rory. I have another question. When I retrieve these RPKM values I obtain very low numbers (ranging from around 0.5 to 2). Which values should I expect for trusted regions? If I retrieve TMM values (DBA_SCORE_TMM_MINUS_FULL) these values range from around 10 to 200. Usually I was counting using DBA_SCORE_TMM_MINUS_FULL. Thank you.

RPKM values are much lower in general than read counts. The first step is to divide by how many million sequence reads you have in your library. So if you sequenced to a depth of 20M reads, all the counts would be divided by at least 20.

Here's how it's implemented in DiffBind:

rpkm    <- (counts/(width(intervals)/1000))/(libsize/1e+06)

are counts the same as pileup in macs2?

I guess, more broadly, my question would probably be: what field in an excel report from a peakcaller like macs2 is the count number?

Secondly, for the calculation of rpkm of each sample intervals are taken as-is from the peakcaller or it uses the consensus peakset, calculated by DiffBind?

Log in to answer this question.