DiffBind custom normalization factor
2
0
Entering edit mode
C T ▴ 140
@c-t-5858
Last seen 22 months ago
United States

I've searched through the manual and bioconductor support, there doesn't seem to be a way to specify a custom normalization factor in DiffBind when analyzing using DESeq2. I'm wondering if there is a relatively easy "hacky" way to do this? Thanks in advance for your help.

diffbind • 1.2k views
ADD COMMENT
0
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 10 weeks ago
Cambridge, UK

I'm expecting to add a straightforward way to supply normalization factors explicitly before the next release.

In the meantime, there is a hacky way to do this. When you are using the defaults method=DBA_DESEQ2 and bFullLibrarySize=TRUE, the normalization factors are set as follows:

libsize <- as.numeric(DBA$class['Reads',])
sizeFactors <- libsize/min(libsize)

You can change the values of DBA$class['Reads',] to whatever you like so that the final sizeFactors end up how you want them.

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

The latest version of DiffBind has a new interface function, dba.normalize(), that allows vectors of normalization factors and library sizes (or a matrix of normalization offsets) to be specified instead of using the internal normalization calculations.

ADD COMMENT
0
Entering edit mode

Hello!

Thanks so much for adding dba.normalize and all the documentation in the manual! I'm hoping I can ask a follow-up question here.

I am trying to apply pre-calculated spike-in normalization factors using dba.normalize. I'm not using the spikein option because I don't have easy access to the bams, and instead, I have a table with my sample_id and the normalization factor I'd like to apply. I read through the manual sections on normalization and dba.normalize, but unless I'm missing something obvious (quite possible?), I don't think there's an easy solution for providing pre-calculated norm factors.

So what I did was the following:

dbObj_deseq_spike <- dba.normalize(mycounts, method = DBA_DESEQ2, normalize = DBA_NORM_LIB)
dbObj_deseq_spike$norm$DESeq2$norm.facs <- spike_factors
dbObj_deseq_spike$norm$DESeq2$norm.calc <- "spike in"
dbObj_deseq_spike$norm$DESeq2$norm.method <- "spike in"

And then continue on; however, the MA plot is... very skewed, so I am pretty confident this is NOT the right approach. I should add that I confirmed theyre in the right order before proceeding.

Could you advise on an appropriate way to pass pre-calculated normalization factors from a Drosophila spike-in to DiffBind?

Thanks so much!

ADD REPLY

Login before adding your answer.

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