use diffbind with normilized bedgraph files from spike ins
1
0
Entering edit mode
Theo ▴ 10
@theodoregeorgomanolis-7993
Last seen 5 months ago
Germany

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 • 1.6k views
ADD COMMENT
0
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 6 weeks ago
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)
ADD COMMENT

Login before adding your answer.

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