use diffbind with normilized bedgraph files from spike ins
Entering edit mode
Last seen 2.4 years ago

Hi all,

diffbind takes bam files to calculate the coverage (of course it can be used without setting bam files). Since I would like to take advantage of the spike ins (to normalize the samples with the ratio as derived from the spike ins (multiply all counts in the bedgraph file with the ratio), there is no way to do this if the only coverage file accepted is bam files. If I am not mistaken DESeq2 can read bedgraph files.

Any idea if there is an alternative?

thank you

diffbind chip-seq chip spike spike-ins • 450 views
Entering edit mode
Rory Stark ★ 4.4k
Last seen 6 days ago
CRUK, Cambridge, UK

'DiffBind' can only use '.bam' files to obtain counts, not bedgraphs.

You can use spike-in samples to help set the normalization factors. The way I am familiar with is to count the number of reads that align to the spike-in reference for each sample, then override the the library sizes after calling dba.count()but before calling dba.analyze(). You probably want to normalize the spike-in reads by the sequencing depth. Assuming you have the number of spike-in reads in a vector called spikeinReads (in the same order as the samples), here's what has worked for me:

myDBA <- dba.count(myDBA,...)
libsizes <- myDBA$class['Reads',]
scaling <- spikeinReads / libsize
relScaling <- scaling / mean(scaling) 
myDBA$class['Reads',] <-  relScaling * mean(libsize)
myDBA <- dba.analyze(myDBA, bFullLibrarySize=TRUE)

Login before adding your answer.

Traffic: 530 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6