Hi,
Recently I'm using DiffBind.
After running dba.count, I can use tamoxifen$binding to get a table.
> head(tamoxifen$binding)
CHR START END Sample1 Sample2 Sample3 Sample4 Sample5
1 1 10400 10999 29.5902750 26.3166045 44.5083833 30.57152 2.491209
2 1 15200 16199 0.6295803 0.7740178 0.6743694 1.09184 2.491209
3 1 97600 99799 130.3231261 181.8941783 195.5671390 230.37824 196.805481
4 1 103000 106799 239.2405214 288.7086320 328.4179196 276.23551 52.315381
5 1 108000 109599 33.9973372 20.1244623 22.2541917 30.57152 12.456043
6 1 110400 111799 23.9240521 24.7685690 18.2079750 21.83680 4.982417
I'm wondering what are these values. DiffBind author Rory Stark mentioned DiffBind will subtract INPUT reads from ChIP reads and deal with negative values. I'd like to have some details about how these values are calculated from the first place. Can someone help me on this and/or show me an example?
I tried to read the code. But it's hard for me to follow.
Thanks.
Thank you so muck for your response. Rory.
Hi Rory!
I'm trying to scale my bigwig files so the visualization on IGV matches what the DiffBind analysis results, being that the samples are all scaled to be on the same sequencing depth with the input reads subtracted. I know I can scale the coverage in the bedgraph files using the normFactors computed by the analysis; however I can't figure out how to deal with the subtraction of input reads. I was just wondering, by default while using
bSubControl=TRUE
, do you subtract the raw input reads from the raw ChIP reads? I tried changing the scoring method to bothscore=DBA_SCORE_RPKM_MINUS
orscore=DBA_SCORE_READS_MINUS
, but in both cases, I get the same library size for each sample. I'm usingmethod=DBA_DESEQ2
as well as the full library sizes for normalization.I'm a bit confused as you can see! Your help would be much appreciated.
Here is just the bit of test that I did to try to figure out how the scoring impacts the library sizes.
As you have seen, the library sizes are based on the number of aligned reads and are not altered by subtracting control reads. Control read subtraction only impacts the read counts themselves.
In general,
DiffBind
has moved away from subtracting control reads, preferring greylists, as this has a more principled statistical justification.