how to get the estimated libSize in DiffBind
2
0
Entering edit mode
@shangguandong1996-21805
Last seen 2.1 years ago
China

Hi, Dr Stark. In the Question: diffBind: differentially bound sites are highly different between using EDGER and DESEQ2. You mentioned

Correct, the factors are only estimated by DESeq2 if bFullLibrarySize=FALSE, otherwise they are based directly on the libSizes.

And I am wondering whether I can get the libSizes factor (full library size, total number of reads in BAM/SAM/BED file, instead of the peak count) in Diffbind project.

Best wishes Guandong Shang

diffbind • 1.3k views
ADD COMMENT
1
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 5 weeks ago
Cambridge, UK
data(tamoxifen_counts)
as.numeric(tamoxifen$class["Reads",])

[1] 776353 782419 438994 465700 577273 507493 1831766 747610 728601 804427 2918549

ADD COMMENT
0
Entering edit mode

Thanks Dr.Stark. Sorry I just have another Question, I am wondering whether I can get the sizeFactors(according to the above libSize instead of peak count) , which will be assignd to DESeq2 dds when set bFullLibrarySize = TRUE.

Or I just calculate myself like below?

library(DiffBind)
data(tamoxifen_counts)
libSize <- as.numeric(tamoxifen$class["Reads",])

> libSize / max(libSize)
 [1] 0.2660065 0.2680849 0.1504152 0.1595656 0.1977945 0.1738854
 [7] 0.6276290 0.2561581 0.2496449 0.2756257 1.0000000
ADD REPLY
1
Entering edit mode

According to DiffBind Vignette,

If bFullLibrarySize is set to TRUE (default), then sizeFactors is called with the number of reads in the BAM/BED files for each ChIP sample, divided by the minimum of these;

Therefore, wouldn't it be, libSize/min(libSize) ?

ADD REPLY
0
Entering edit mode

Thanks :) , I am sorry I did not see it.

ADD REPLY
0
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 5 weeks ago
Cambridge, UK

The recently released version of DiffBind includes a new interface function, dba.normalize(), that allows library sizes and normalization factors (or offsets) to be set and retrieved directly.

ADD COMMENT

Login before adding your answer.

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